#clojure logs

2011-07-06

00:02dnolencemerick: Racket folk don't seem to really have much against Clojure from what I can tell. Lots of possibilities for idea cross-pollination there.
00:03cemerickI agree. Schemers have always seemed to be friendly, level-headed people.
00:03dnolencemerick: Racket, not Scheme :) Schemers I'm not so sure about :D
00:03cemerickyeah, yeah :-)
00:04cemerickI never did catch up on the full Racket/Scheme "split".
00:04dnolencemerick: it's significant. Racket has basically moving on doing it's own thing.
00:05dnolenScheme is still obssessed w/ the minimalism that makes it crippled for real programming.
00:05cemerickdnolen: looks like it's R6RS+++++?
00:06dnolencemerick: nah, to me Racket is the Haskell of Lisps. Very academic, filled w/ cool ideas people should steal into their own langs.
00:07pcavsdnolen: Wouldn't scheme be the Haskell of Lisps?
00:07pcavsRacket has a lot of pragmatic features I thought? That's what made it so appealing
00:07pcavsC-M-% made makes
00:08dnolenpcavs: no, Haskell is a crazy hack, no standard, practical bits but still academic. Racket seems similar to me.
00:09dnolenScheme is all about standardization, some truly beautiful ideal which will never be attained and will most likely become obsolete (like Standard ML)
00:09pcavsdnolen: interesting, I haven't played around much with Haskell, closest I've come to it is SML-NJ
00:10dnolenScheme is much more like SML-NJ
00:10sean_corfieldtoday has been a very happy clojure day :)
00:10pcavsdnolen: I really liked SML-NJ, it was a lot of un
00:11dnolenpcavs: oh yeah it totally rules, just pointing at that standardization kills languages.
00:11dnolenagain and again.
00:12pcavsdnolen: I dislike that there isn't as much as an advantage to a business for devs to be writing clean beautiful code, rather than 80% working code faster...worse is better
00:13hiredmangetting agreement to what is beautiful for a practical program from a team is almost impossible
00:14pcavshiredman: true...
00:14dnolenpcavs: yeah but the problem is the Worse Is Better / Better is Better isn't something that stands still. What was Better before is not Better now.
00:14pcavshiredman: I was just reading teach yourself scheme in fixnum days, and the call/cc examples with tree-gen and amb operator are just beautiful
00:15hiredmanpcavs: ok, what real world problem will it solve?
00:15hiredmandoes it log each step, is it transactional, etc, etc
00:16hiredmanhow robust is the error handling?
00:16pcavshiredman: Absolutely None! But boy is it sexy. Maybe it should be called code porn
00:16hiredmandoes it
00:16hiredmanerp
00:16pcavsit's like code golf, in that it isn't practical, but it's sure fun
00:16sean_corfielddnolen: as someone who spent eight years on the ANSI C++ Standards Committee, i'm a bit put out that you think so poorly of standardization...
00:18dnolensean_corfield: ah, for lower level systems programming languages no I don't think so poorly of standardization. Though it's not like C++, C ever really delivered on the run everywhere promise ever.
00:19dnolenit's like JavaScript, death by a million paper cuts.
00:19sean_corfieldECMA...
00:19sean_corfieldok, i'm (somewhat) mollified :)
00:23cemerick'course, it's hard to not notice that the most entrenched languages with the widest distribution are those that have been aggressively standardized, with an obsession with backwards compatibility
00:30RaynesDid dnolen say that Haskell isn't standardized?
00:31RaynesI'm pretty sure it is.
00:31RaynesAnd damn if wikipedia doesn't agree with me.
00:31RaynesI'm kind of sad that he isn't here for me to correct him. I hate it when someone is wrong on the internet.
00:34amalloyRaynes: i think sexpbot has a $mail feature
00:34RaynesThat would be rude.
00:38pcavsRaynes: Thinking of this? http://xkcd.com/386/
00:38technomancysomeone with a facebook page want to tell me what this is all about? http://www.facebook.com/pages/Leiningen-Versus-the-Ants/103110463062611
00:38technomancy*facebook account
00:39hiredmanit's just a page about the short story
00:39technomancy"about"?
00:39technomancythis isn't wikipedia
00:39hiredmanlike the wikipedia page but somehow part of facebook's "social graph" or something
00:40hiredmaninfact
00:40technomancylike for people to announce that they are fans of certain works of short fiction?
00:40hiredmanthe bottom of the page as a footer:
00:40pcavstechomancy: Facebook's endgame is the same as AOL's
00:40hiredmanDescription above from the Wikipedia article Leiningen Versus the Ants, licensed under CC-BY-SA full list of contributors here. Community Pages are not affiliated with, or endorsed by, anyone associated with the topic.
00:40hiredmans/as/has/
00:40technomancyhah
00:40hiredmanyes, exactly that
00:40technomancyand this story has no fans? what is wrong with kids these days?
00:41technomancyoh wait, it does have fans
00:41technomancyI just can't see them because I'm not logged in or something. whew.
00:41technomancyexcellent. carry on, Internet.
00:42hiredman28 people
01:16pcavsis there a letmacro ?
01:16pcavsfor a scoped macro?
01:22cemericklike symbol-macrolet?
01:23cemerickif so, no
01:38technomancyI wonder if it's still worth mentioning inf-lisp on the Getting Started with Emacs in confluence
01:38sritchieis it considered bad form to write a function like (defn illegal-args [str] (throw (IllegalArgumentException. str))) ?
01:38sritchiesince the error's thrown from this new function
01:39hiredmansritchie: depends, not everyone nows how to read a stacktrace
01:40hiredmansymbol-macrolet seems more like a scoped version of ^:const
01:42hiredmanwell, sort of
01:44cemerickI'm afraid I never got that far into CL.
01:46amalloypcavs: clojure.contrib.macro-utils has [symbol-]macrolet
01:46pcavsamalloy: cool thanks
01:49amalloypcavs: and amalloy-utils has anon-macro, for if you don't even want to name the macro :P
01:49pcavshaha, nice
02:19sritchieis there a function like split-with that checks all items in a coll?
02:19sritchie(unweave odd? [1 2 3 4]) => ((1 3) (2 4))
02:20amalloy(juxt filter remove)
02:20sritchieah, thanks
02:27zakwilsonI didn't know Clojure had symbol macros or a way to fake them.
02:28hiredmanwell you just need the ablity to define macros, then you can create a macro that expands its arguments and walks and replaces
02:29amalloyzakwilson: ^ is what symbol-macrolet in fact does
02:29zakwilsonOh... I should have figured that out. It would be hard to have define-symbol-macro, but symbol-macrolet is obvious now.
08:06pyr_hi
08:06pyr_is there any chance a call to an agent within a transaction might get resent ?
08:13bsteuberpyr_: no, it's guaranteed to be sent only once
08:20pyr_bsteuber: thx!
08:27bsteuberhow can I make paredit 22 correctly recognize [] and {} when used in the slime-repl?
08:42ejacksonbsteuber: I use technomancy's durendal which handles it: https://github.com/technomancy/durendal/blob/master/durendal.el
08:42ejacksoni think L154 is where it all gets defined
08:44bsteuberejackson: thanks, durendal looks nice
09:37babilenHi, I have a licensing question. Clojure and quite a bunch of libraries are licensed under EPL-1.0, which is incompatible with anything else. Does this essentially mean that I have to license *my* work under EPL-1.0 as well? I'd like to license my work under GPL or BSD, but am not sure about the legal ramifications. And EPL seems to be incompatible with both of them.
09:38babilenI guess I'll have to license every change to EPL licensed work under EPL, but can incorporate those in BSD/GPL licensed code under GPLs linking exception, or?
09:39babilenOr does it basically boil down to: If you work with Clojure and use a single EPL lib, I'll have to license my work under EPL too?
09:40rlbI'm not sure, but I'd be a bit surprised if you have to license your code (assuming it's not going in to clojure itself) under the EPL.
09:43babilenGPL seems to be out of the question, but *I* don't want to license my work under EPL as I find problems like this inherently bad. If I am forced to use EPL as soon as I use any other clojure library (which might just be EPL licensed) I'd probably have to think about the language choice. (citation: http://www.eclipse.org/legal/eplfaq.php#USEINANOTHER)
09:43clgvbabilen: afair you have to license derivative work under EPL. If you only use EPL licensed libs unchanged you only have to mention you are using them (and maybe how they are licensed) and your software can have a different license
09:44clgvbut if there is money involved you should recheck that and maybe consult a lawyer.
09:45clgvbabilen: it's a bit odd that you fear being forced to use EPL when you want to use GPL which indeed forces lincencees to use GPL... ;)
09:46babilenclgv: I basically favour BSD, but work in GPL environments too.
09:46babilenclgv: Ok, and if I change some of the libs I'll license those changes under EPL and my own work as BSD/GPL and am fine?
09:46clgvbabilen: I read the EPL stuff and some FAQs last week since I considered using some clojure code unchanged in a commercial product
09:47babilenAnd no, there is no money involved.
09:47clgvbabilen: yes you have to license the change licensed lib und EPL and provide the source to them, but the rest of your project can be any license - even a commercial one
09:48clgvs/und/under/
09:48sexpbot<clgv> babilen: yes you have to license the change licensed lib under EPL and provide the source to them, but the rest of your project can be any license - even a commercial one
09:49babilenI guess that the majority of people working with Clojure just license their work under EPL. This license is a bummer :)
09:49clgvhmm I think the EPL is more relaxed than the GPL
09:50clgvIn general I hate this license stuff because you can never be entirely sure without consulting a lawyer
09:50babilenIt is, but unfortunately incompatible. What I dislike is that it is also incompatible with BSD (or any other license) ... but meh
09:51xmuxHow is the EPL incompatible with BSD?
09:51babilenxmux: http://www.eclipse.org/legal/eplfaq.php#USEINANOTHER (I have no other opinion on that)
09:53babilenxmux: It'll just mean that I have to work with two licenses for the rest of my Clojure life or give in and just use EPL if that becomes to cumbersome.
09:53xmuxI think that just means you can't take EPL licensed code and release it under a different license. That's the same as *any* other license
09:55xmuxEPL is weakly copyleft so it has some of the same 'disadvantages' as the GPL
09:55xmuxbut I believe the intention is to allow you to *link* EPL components/libraries to applications which have any license you want
09:57babilenxmux: Ok, but as I know myself I'll soon contribute to projects I am using. That work has to be licensed under EPL in that case. Is most of the stuff on clojars EPL? (I have no numbers about that)
10:01babilenThanks for the clarification, i'll read up on it, but wanted some views from the community too.
10:03dnolenbabilen: my take - EPL for things you think you want to contribute to Clojure, otherwise use whatever you want.
10:04timvisherhey all
10:04timvisherwhat're people using for json at this point?
10:04timvisherI count no less than 3 options at the clojure toolbox
10:04timvisherthey all look to be roughly equally maintained
10:06timvishercheshire seems to have the best docs and the biggest promises. :)
10:27eliantorhi everyone
10:31eliantori get a RejectedExecutionException trying to run futures
10:31eliantorhttps://gist.github.com/1067356
10:32eliantorand agents never complete submitted actions
10:33bsteubereliantor: leiningen 1.6.0?
10:34eliantorbsteuber: yes
10:34bsteuberit's fixed in github and should be released soon
10:35bsteuberso in the meantime use 1.5.2 or the master version of lein
10:35eliantorok thanks, i didn't know of this bug
10:36bsteuberI guess that's the reason why the stable branch got reset to 1.5.2
11:48shanmuhi this code errors after printing the first value to the file:(with-open [w (io/writer "t.txt")] (doseq [i '(1 2 3 4) ] (spit w i))) with a file closed error
11:54timvishershanmu: you've run into a laziness issue
11:54timvisheractually, there are a number of issues
11:54timvisherfor one, you don't need the whole with-open construct using spit
11:54timvisherspit opens and closes the file stream for you
11:55timvisherare you trying to write 1 2 3 4 on separate lines to t.txt?
11:59shanmutimvisher: yes...
11:59shanmuwhen I tried with .write on writer, it wrote binary data :(
12:05timvishershanmu: ok, what you want is something along the lines of (with-open [w (io/writer "path")] (binding [*out* w] (dorun (map #(prn %) [1 2 3 4] ))))
12:06timvisherread up on *out*, binding, and dorun especially
12:06Raynesshanmu: (doseq [i '(1 2 3 4)] (spit "t.txt" (str i "\n") :append true)) ; Untested, but should do what you want.
12:06timvisherRaynes: wasn't aware of :append!
12:06timvisherthat's neat
12:07Raynesdnolen: Haskell is too standardized.
12:07Raynestimvisher: Yeah, it isn't in-your-face apparent.
12:07timvisherif you use my solution you'll also need to require clojure.java.io as io
12:10technomancyeliantor: lein upgrade and you'll get the fixed version
12:10technomancy1.6.1 is released
12:11shanmuRaynes: timvisher: Thanks!
12:12dnolenRayes: sure with 12 years gaps in between and everybody just using the inbetween thing.
12:17jcromartiehave you all seen the latest PragProg magazine? It's Clojureific
12:26jcromartiehttp://pragprog.com/magazines/2011-07/content
12:28kryftHmm, growing a DSL looks interesting (from a noob's perspective)
12:28cemerickPerfect storm of PR these days…
12:34pyr_cemerick: indeed
12:36ejacksonwoah - wall to wall clojure.
12:51bdeshamI'm trying to transpose a matrix (a vector of vectors), but I get this weird assertion error: https://gist.github.com/1067736
12:52bdeshamany idea... am I just using assertions wrong?
12:59Vinzentbdesham_, I've tried to move :pre to the one-arg body and it works, I think that's the problem
13:00dnolenbdesham_: that seems like a bug to me.
13:01Vinzentit works with (constantly true)
13:02Vinzent(prn mat) in :pre returns [[1 2 3] [4 5 6] [7 8 9]]...
13:03dnolenbdesham_: ah silly me not a bug. Your 2nd arity is recursive
13:03dnolen(() ()) is not a square matrix
13:03dnolenthe assert will be called on each iteration
13:03Vinzentah! :)
13:03bdeshamdnolen: oh, silly me!
13:04bdeshamso I should put the condition on the one-argument version, since that will be used by all outside callers anyway
13:05dnolenbdesham: I would probably use loop/recur in your second arity so you can validate both arities.
13:05bdeshamok
13:06bdeshamalthough if I use loop/recur I don't even need more than one arity
13:06bdeshamso that's even better! :)
13:09bdeshamthis works fine now: https://gist.github.com/1067736
13:26mprenticeanyone familiar with using xml structures, zips, and zip-filters care to help me out? i have a graphml file parsed into an xml struct-map, and i want to update all targets that are currently "t1" to be "t2" instead
13:27mprentice(a graphml edge has a source attribute and a target attribute)
13:40timvishermprentice: maybe you could post to gist?
13:40timvisherfeel like i'd need more details to help you out
13:40timvisheri'm not directly familiar with what you're doing, but it should be a simple call to `map`.
13:40amalloysritchie: cake master is fixed now if you want to go back to it
13:41sritchieawesome, thanks
13:42mprenticetimvisher: sure, i'll come up with a small example
13:48jaskiratbdesham_: you could just do #(apply map vector %) to transpose matrices
13:52chousermprentice: zip-filter's unfortunately not much good at changing things. It can be used if you only want to make a single change, but changing all x to y is beyond it's capabilities.
13:52derp__I have a map that's basically a configuration file, it's made up of smaller maps that declare the function name and source file. But how do I load a specified function outside of the namespace declaration?
13:53mprenticechouser:
13:53mprenticechouser: ah, ok
13:54mprenticetimvisher: https://gist.github.com/1067874
13:55mprenticechouser: so i guess what i want is a looping structure? find edge such that attribute target='n3', assoc target to 'n4', pass new xml to next stage of loop, repeat until there are no target 'n3'
13:57mprenticei've been looking for a good tutorial on how to jump around an xml zipper like that, but i have come up short
14:05chousermprentice: you might consider clojure.walk instead of zippers
14:06derp__um, how do you handle dynamically loading functions based on a config file?
14:07chouserderp__: not sure what you mean. "based on" how?
14:08edwUsing Compojure, what's the proper way to handle "connection reset by peer" exceptions?
14:08chouser(doc clojure.walk/postwalk)
14:08clojurebot"([f form]); Performs a depth-first, post-order traversal of form. Calls f on each sub-form, uses f's return value in place of the original. Recognizes all Clojure data structures except sorted-map-by. Consumes seqs as with doall."
14:08chousermprentice: ^^^
14:08mprenticechouser: oh, that looks nice
14:08mprenticethanks!
14:09derp__chouser: basically I want to have a file that tells my clojure script which functions to load out of which files
14:11bryanlany suggestions on a clojure book for casual learning?
14:13chouserderp__: you want to list individual function names and skip over loading any that aren't listed? sounds tricky.
14:14mprenticechouser: aha, that works perfectly
14:14chouserbryanl: I recommend Joy of Clojure to everyone in every circumstance. :-)
14:14mprenticechouser: i had looked at clojure.walk before but couldn't figure out how to apply it. postwalk was what i wanted
14:14chousermprentice: great!
14:15chouserbryanl: It's got a friendly drunk guy on the cover -- what more could you want? http://joyofclojure.com/
14:16bryanlchouser: did you write it?
14:16chouserbryanl: helped, yes.
14:16bryanlcool
14:16bryanli will check it out
14:17technomancyclojurebot: tell bryanl about the peepcode
14:17clojurebotpeepcode is a commercial screencast series; see the Clojure one at http://peepcode.com/products/functional-programming-with-clojure by technomancy
14:17chouserIf you want *really* casual and aren't targetting Clojure too specifically, you might like Land of Lisp. ...which I have nothing to do with.
14:17bryanltechnomancy: I watched that
14:17technomancybryanl: awesome =)
14:18bryanli just wanted to learn a new language
14:18bryanlin my spare time
14:26bryanli do have a problem that i plan on solving in clojure this evening. scanning gigs of log files for interesting data
14:35ohpauleezbryanl: That will be a blast in clojure
14:36ohpauleez(it's my favorite kind of task to do in the language: Large data analysis, stream processing, etc)
14:36bryanli wrote the first version in ruby. it made me sad
14:37derp__I am looking at this: http://en.wikibooks.org/wiki/Clojure_Programming/Tutorials_and_Tips#Using_the_.28ns.29_macro
14:37derp__and it talks about the :require and :as options for the ns macro
14:37edwAnyone using Compojure/Ring/Noir around?
14:38derp__is there a way to run something like (str-utils/"str-join" "," ["foo" "bar"])
14:38derp__so that the "str-join" part is not hard-coded
14:39derp__e.g. name of function turns into an actual function call?
14:39ohpauleezedw: I've never used noir, but I'm familiar with it (I've used the other pieces)
14:40derp__lol, I meant i.e.
14:40edwohpauleez: How do you catch "connection reset by peer" IOExceptions?
14:43ohpauleezI've never seen that happen in any app I've rolled (that I recall), but if you know where the exception is being generated from, you can wrap it in a (try (catch))
14:43ohpauleezyou can also use Contrib's condition lib
14:43ohpauleezor checkout the discussions here: http://dev.clojure.org/display/design/Error+Handling
14:43edwohpauleez: Right. It's running in a different thread, so I don't believe I can catch it.
14:43technomancydon't use c.c.Condition; use slingshot instead
14:44edwIf you take your web app and Command-R/Control-R the crap out of it in your web browser, you *will* suffer a connection reset.
14:44ohpauleezedw: It just means the server thread is generating it, but it's happening on an action that's being done in that thread, no?
14:44ohpauleezsure
14:45ohpauleezand you just don't want to see that in the logs?
14:45edwWhich causes the server to fall over. Not a good thing.
14:45chouserderp__: resolve
14:45chouser,(resolve "map")
14:45clojurebotjava.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.Symbol
14:46chouser,(resolve (name "map"))
14:46clojurebotjava.lang.ClassCastException: java.lang.String cannot be cast to clojure.lang.Symbol
14:46chouserheh
14:46chousersorry
14:46chouser,(resolve (symbol "map"))
14:46clojurebot#'clojure.core/map
14:46ohpauleezoh weird, I've never had that happen to me (to where it fell over).
14:46ohpauleezLet me try that
14:46chouserderp__: the var that resolve returns is callable
14:47edwThis happens using 'heroku foreman', 'lein run -m blah.core', and inside the Heroku cloud.
14:47chouser,((resolve (symbol "map")) vector [1 2 3])
14:47clojurebot([1] [2] [3])
14:48jcromartieI just had an interviewee that said Lisp was probably his least favorite language
14:48ohpauleezedw: I see the connection reset by peer in the logs (even on the prod systems)
14:48ohpauleezbut the server doesn't come down
14:48jcromartieI'm not sure what to do with that
14:48ohpauleezI even held ctrl/cmd-r down
14:49ohpauleezto be fair, they were logging warnings, from netty
14:49edwHmm. I wonder why my code is dying. Maybebecause I'm joining on the RUN-JETTY.
14:49ohpauleezthat sounds likely now
14:49ohpauleezI was just about to try a jetty system
14:50edwI just switching things up and am trying :join false now.
14:50jcromartielook at the first version of emit-bash-form here http://pragprog.com/magazines/2011-07/growing-a-dsl-with-clojure
14:51jcromartieit uses (case (class a) java.lang.String ...)
14:51jcromartieand it doesn't seem to work in my REPL, but the REPL in the article shows the proper output
14:51ohpauleezedw: What's the result?
14:51jcromartieI know people were just talking about case and class literals the other day
14:52edwHmm. Same thing. It's not hard to get the thing pitting out endless IOExceptions.
14:55ohpauleezbut is the server failing too?
14:55ohpauleezor just logging all that noise
14:56ohpauleezand wrapping the run-jetty call in a try catch doesn't help?
14:58bdeshamjaskirat: oh, nice, thanks! (regarding #(apply map vector %))
14:59edwohpauleez: wrapping the run-jetty does nothing.
15:01edwohpauleez: I removed the wrap-reload or whatever it's called and the problem went away.
15:01edwOr I can't get the connection to reset, at least.
15:01ohpauleezOh weird, that's good to know
15:02edwYeah.
15:09lpetitHi
15:10chouserlpetit!
15:11lpetitHello !
15:11lpetit's been a while, isn't it ?
15:11chouserI guess so. Been busy / distracted.
15:13lpetitTalking 'bout you, or me ? :)
15:13chouserheh. It's been a while since *we* talked. *I've* been distracted.
15:13lpetitBeen very busy, but also working with cgrand on improving perfs of the ccw editor, by means of helping him debug / perf test his parsley library
15:13ataggartlpetit: log2logger committed
15:14chouserlpetit: ooh, cool!
15:14lpetitataggart: awesome, thx
15:15ataggartNow I'm going to pull all the impl stuff out of the clojure.tools.logging namespace
15:20lpetitattagart: great, so people requiring the main namespace with some "log" alias will only see code completion for the vars of interest, cool
15:20lpetitataggart: ^^ (inverted t & g)
15:21ataggartyes, the protocols are for implementations, not consumers, so I'll move them into clojure.tools.logging.impl
15:22ataggartand then lib-specific stuff will be in its own ns, e.g., clojure.tools.logging.log4j. That also gives a place to hang any future implementation-specific functionality.
15:22ataggartthough for now each will just have a single load-factory function
15:23ataggartsound reasonable?
15:25lpetitataggart: yes
15:34dnolenlpetit: parsley's really coming along.
15:35lpetitdnolen: I would not speak for cgrand, but really coming soon
15:36lpetit(a version of which will be hopefully packaged by me for use in ccw tomorrow)
15:36dnolenlpetit: yeah he sent a couple of emails. Within 3X of Clojure's parser, and whole incremental thing is pretty amazing.
15:36hiredmanreally? does it have docs yet?
15:37dnolenhiredman: no but soon I think.
15:38dnolenno lex/parse dichotomy. All in all I think it's gonna be a real nice lib.
15:38lpetithiredman: not yet. Christophe's been busy with the book recently. I've been pulling him off-path to work on parsley for the greater good of it and of ccw, but right now it's not much documented.
15:39lpetitdnolen: a potential to be a killer lib in its area, mind you ! :-D
15:39dnolenlpetit: I totally, totally agree.
15:40dsantiagoI know more about Clojure stuff than Java... what is it about the ScheduledThreadPoolExecutor in Aaron Bedra's PragProg article that makes it a unix service? If anything?
15:40lpetitAnd it's a tiny library, with no dep but clojure jar
15:42lpetitThe current state of paredit.clj's clojure grammar is horrible, but anyway, this will give you a sense of how you define the grammar for a language in parsley : https://github.com/laurentpetit/paredit.clj/blob/master/src/paredit/parser.clj#L73
15:45amalloydsantiago: link?
15:46dsantiagoamalloy: http://pragprog.com/magazines/2011-07/create-unix-services-with-clojure
15:46hiredmanlpetit: I don't see the advantage over fnparse (which even though it is being constantly rewritten) which is documented and comes with examples?
15:46amalloyhm. he misspelled "leinigen" :P
15:48lpetithiredman: well, I don't know fnparse well, so I'm not really well placed, but here are some hints: parsley generates a parser, and I guess a really optimized one. How much time would it take for a (decently written) clojure grammar written with fnparse to parse clojure's core.clj (6kloc) file ?
15:48amalloydsantiago: i think he just means he's reimplementing cron in clojure
15:49kephalei'm playing around with org.eclipse.swt, i'd like to have my project be multi-platform but the SWT dependencies are system specific. is there a simple way to have leiningen auto-discover the correct dependency to use?
15:49dsantiagoamalloy, yeah, I thought maybe I was reading too much unix into it, but I thought maybe there was something about it.
15:49hiredmanlpetit: no idea, but how long would it take to write? fnparse has docs, parsley doesn't
15:49amalloyalthough not a very general cron
15:49lpetithiredman: parsley will output an abstract tree. You plug into it custom make-node / make-leaf functions to get a concrete parse tree. Or whatever you want to make out of the abstract parse tree, really.
15:49hiredmanparsley can be super fast, but if there are no docs
15:50hiredmanlpetit: sounds like a great feature, when I am interested in parsing something, how can I find out about parsley's great features?
15:50lpetithiredman: I'm not announcing parsley publicly here, for general consumption. Just reporting progress, and enthousiasm of an early adopter (for ccw)
15:50lpetithiredman: when ready, cgrand will announce it broadly
15:51dnolenlpetit: I'm looking forward to hooking it up to core.logic pronto soon as he does ;)
15:52lpetithiredman: and so, a unique feature of parsley is its use in conjunction with an incremental buffer, which lets him reuse as much as possible of the existing abstract parse-tree (and all the derivative concrete values from your custom make-node / make-leaf functions, which are memoized with the abstract parse-tree nodes)
15:53lpetitdnolen: now parsley is working. It's not a "Christmas promise" anymore :). It's up to Christophe to say if he's happy enough with its public API for general consumption or not.
15:55dnolenwhich means editing then updating the parse tree on a large file like core.clj takes ms.
15:56thorwilhmm, how do i wrap a ring handler with both wrap-params and assoc-param?
15:58lpetitdnolen: exactly
15:58lpetitdnolen: there are still some worst cases, though, to be improved upon over time. But having all this done generically is damn awesome
16:20technomancyI like the latest pragprog issue, but i'm confused why the article on a simple sh compiler uses the term "dsl" instead of compiler
16:20technomancyis it because it's targeted towards ruby programmers?
16:21jcromartietechnomancy: because compilers are scary?
16:21pjstadigtechnomancy: you're saying it is not a domain specific language?
16:21bsteuberbecause dsl are is a buzzword
16:21bsteuber-are
16:21jcromartieyeah, DSL is a bit of a stretch
16:22technomancypjstadig: I'm saying that's a meaningless term. how many defmacros do you need to define before you've created a new "language"?
16:22jcromartieand I emailed the author about the use of case with class literals
16:22jcromartieit just doesn't work
16:22pjstadigtechnomancy: 7
16:22jcromartieI think ClojureQL counts
16:22technomancyjcromartie: also the use of (fn [form] (class form)) instead of class bugged me, but whatever.
16:22jcromartieheh
16:24technomancyrubyist: "hey look, I'm writing a DSL" / lisper: "oh, we call that 'programming' where I'm from."
16:24pjstadigi guess DSL is fuzzy as a term, but to me it means a way to manipulate nouns and verbs in the domain you're writing for
16:26lpetitinternal DSL, external DSL ...
16:27jcromartiei think it's a good goal to develop a "language" in which to work in the domain
16:28jcromartiebut an inherent problem in any domain-specific language is that it's not really useful outside of that domain
16:28jcromartiebah
16:28lpetitinteresting thought: create a ns where you refer to clojure.core as alias core, carefully :use some namespaces full of vars relevant to your domain, carefully :require :as some other namespaces related to your domain. Use it in a text editor/IDE with proper completion, and you've customised a "generic" Clojure editor for your "internal DSL"
16:28jcromartieI can't use that term with a straight face anymore
16:29hiredmana dsl should really be nothing but a on ramp to the full language
16:29jcromartieyup
16:29jcromartiehiredman: eh?
16:29jcromartieI don't think a DSL should be "easy"
16:29jcromartieit should be focused
16:29hiredmaneasy?
16:30jcromartieyou say it should be an on-ramp to the "full" language
16:30jcromartiethat sounds like "training wheels" or something
16:30lpetitjcromatie: thus my thought above ^^^ for the "focus" part of it
16:30hiredmanthey are more or less
16:30hiredmanyou create a restricted language, domain specific
16:31hiredmanmeans it is cut off from other domains, which you will eventually need in any real application so you will need the full language
16:31jcromartiemaybe
16:32jcromartieI thought the presentation by Naughty Dog about their scripting language for Uncharted 2 was really cool. It used Scheme to build a "DSL" for doing asynchronous game event scripting.
16:32jcromartieIt was pretty much self-contained.
16:32jcromartieonce you were writing the state scripts, thati s
16:32jcromartiethat is
16:33hiredmanjcromartie: yeah, but has it been used anywhere else? is it really useful outside of uncharted 2?
16:33jonabbeyNaughty Dog did their PS2 games entirely in a Lisp based system, actually.. they switched to using C++ for their framework on the PS3 so other Sony studios would be able to work with their code. ;-/
16:33technomancyisn't that pretty much the only way to write good extensible software?
16:33technomancyI mean unless your main host language is flexible enough
16:33jcromartieno that's the point hiredman
16:33technomancythat's the same model as mozilla and emacs, the only large programs I can stand using on a daily basis.
16:33jcromartiejonabbey: but they're back to Scheme
16:33jonabbeysmart
16:34jonabbeylots of folks are using Lua for that sort of thing.. Civ 4 was done with Python
16:34jcromartiePLT (Racket) hosted in C++
16:34jcromartieyeah I worked in Lua full time for a while... it's not almost too loose I think
16:34jcromarties/not//
16:34sexpbot<jcromartie> yeah I worked in Lua full time for a while... it's almost too loose I think
16:35technomancythere are really only three ways to write large programs: use a host language that's both flexible and fast enough, embed a flexible language in a fast one, or write software that isn't flexible
16:35jonabbeythat's awefully nice
16:35jonabbeys/we/w/
16:35sexpbot<jonabbey> that's awfully nice
16:35technomancybut that's not really relevant to the question of what defines a dsl
16:36edwA DSL is a language that's specific to a domain.
16:36jonabbeyi'm investigating clojure for precisely that reason. i've got a reasonably large Java system I've been working on for the last fifteen years, and it's gotten ridiculous, trying to code the business logic in Java
16:37ibdknoxedw: or, in other words, at the point at which the primary nouns in use are no longer that of the core language, you have a dsl
16:37jonabbeydoing it declaratively in Clojure and then having a modest constraint evaluation engine is going to be so much better
16:37pjstadigtechnomancy: ambrose is supposedly from your user group
16:38edwibdknox: I think my main point is -- and it may not be quite explicit -- is that some people, specifically Ruby people, overthink DSLs.
16:38lpetit"fluent APIs" in java are the closest thing I would call "java internal DSLs"
16:38pjstadigbut then his bio says he's from western australia?
16:38ibdknoxedw: agreed.
16:39technomancypjstadig: yeah, I have no idea who he is
16:40technomancymade me feel bad like, "oh, man I suck at remembering peoples' names" but then it was like "ah; vindicated."
16:41edwI think Pike and Kernighan call them "little languages" in Practice of Programming. Insecure people, however, regularly couch ideas in terms most obscure.
16:46dnolenjonabbey: excellent tough little book.
16:46ataggarthas anyone recently used autodoc to update a new-contrib lib?
16:46jonabbeyi read your recommendation for it on the core.logic page
16:47jonabbeyi did just a bit of prolog back in school, but i haven't touched it in 20 years. i'm looking forward to getting reacquainted.
16:51dnolenjonabbey: I'm still sorting through its insights 8 months later. I recommend pairing it with a proper Prolog book since TRS is a bit abstract at times.
16:51jonabbeyhave any recommendations?
16:53dnolenjonabbey: The Art of Prolog, Prolog for Artificial Intelligence Programming seem highly recommended. I have the later and like it.
16:54amalloyibdknox: i'm reading over the ai challenge stuff. looks really neat. any idea when the clojure support and starter package are liable to get included?
16:55amalloy(that was you who put together the starter package, right?)
16:55ibdknoxit was
16:55ibdknoxI'm not sure
16:55ibdknoxI submitted a pull request
16:55ibdknoxbut I haven't heard anything back yet
16:55ibdknoxfwiw you can play locally
16:55ibdknoxwhich is worthwhile
16:55edwI liked the Art of Prolog. Beautiful too.
16:55ibdknoxsince there's quite a lot to do before you'd even have a chance being competitiv
16:55ibdknoxe
16:56amalloyibdknox: to do that, i clone your fork of the repo? i don't see any evidence of local-play options on the actual site
16:56ibdknoxfor example, the starter packs are not supposed to track individual ants (per their request)
16:56ssiderishello, I find myself writing this very often (apply hash-map (apply-concat (map (fn ...) a-hash-map))), where the fn returns a 2-member vector
16:57ssiderisis there a shorther way to express this?
16:57ibdknoxamalloy: you need the tools, sec I'll get you a link
16:57ssideris(I could define it myself I suppose)
16:57amalloyssideris: ##(into {} '[[a b] [c d]])
16:57sexpbot⟹ {a b, c d}
16:57jonabbeylooks like Prolog for AI 4th edition comes out 12 August.
16:57dnolenjonabbey: I just started looking over this, http://www.mtome.com/Publications/PNLA/prolog-digital.pdf, seems quite good as well even if you're not interested in natural language analysis.
16:57ibdknoxamalloy: http://aichallengebeta.hypertriangle.com/using_the_tools.php
16:58ssiderisamalloy: thanks, that's very handy
16:58ibdknoxamalloy: note that you'll need to change the paths inside of the play_one_game command, for some reason they're pointing to a slightly wrong location
16:58jonabbeythanks, dnolen
16:59rimmjob_I'm a novice with just a few months of python experience and i want to learn lisp, should i start with SICP or just start learning clojure?
16:59edwOr there's merge, amalloy (& ssideris), correct?
16:59pjstadig,(into {} (map (fn [[k v]] [k (inc v)]) {:a 1 :b 2}))
16:59clojurebot{:a 2, :b 3}
16:59pjstadigssideris: ^
17:00pjstadigoh my bad
17:00pjstadigi'm too late
17:00amalloypjstadig: feh. for is nicer there
17:00ibdknoxrimmjob_: I think it depends on why you want to learn lisp
17:00amalloy&(into {} (for [[k v] {:a 1 :b 2}] [k (inc v)]))
17:00sexpbot⟹ {:a 2, :b 3}
17:00pjstadigamalloy: sure was just writing something quick and literal
17:01ssideristhanks pjstadig and amalloy, my code just got a little shorter
17:01amalloyedw: yeah, maybe so. ##(apply merge {} [[:a 1] [:b 2]])
17:01sexpbot⟹ {:b 2, :a 1}
17:01dnolenrimmjob_: if you want to learn Clojure, get a Clojure book or just start hacking away. SICP is a long and roundabout (tho rewarding) trip.
17:02rimmjob_ok ty
17:02edwrimmjob_: I heartily second the advice of dnolen.
17:06amalloyibdknox: play_one_game looks right to me
17:06ibdknoxmaybe they fixed it then :)
17:10ibdknoxamalloy: to run a bot exactly the way the server will you would do: ./play_one_game.sh "java -Xmx500m -cp /usr/share/java/clojure.jar:. clojure.main MyBot.clj"
17:11ibdknoxamalloy: note that all paths in that need to be absolute, a ~/ won't work
17:12amalloyibdknox: i understand what you mean, but ~/ *is* an absolute path: it's equivalent to /home/foo/
17:12ibdknoxamalloy: fair enough, it won't get expanded :-p
17:12amalloy(the shell does that expansion, rather than the kernel, but ~ is absolute and . isn't)
17:13jonabbeyfound a copy of The Art of Prolog through Amazon, yay
17:14ibdknoxamalloy: ah, my mistake
17:16amalloyibdknox: it looks like this is all still in beta, but i can't find any timeframes mentioned. any idea when the competition officially starts or ends?
17:17ibdknoxnone has been given, though it seems to be ramping up some
17:18ibdknoxit's fun to just play around with though
17:20ibdknoxamalloy: my asking on their IRC channel has yielded me no valid results
17:33amalloyibdknox: and what's the deal with https://github.com/ibdknox/aichallenge/commit/a31a04d96964ba3cb4f0b34e717fd2d5293ced37#diff-2 ? their toolkit supports clojure, but you added a fix to the classpath?
17:34ibdknoxamalloy: it doesn't include the current directory
17:34ibdknoxso the inclusion of ants.clj doesn't work
17:34amalloyright. so in theory i could submit a clojure bot to them now, but i'd have to put it all in one file?
17:34ibdknoxin theory, yeah
17:34amalloyk
17:39hiredmanspeaking of single file bots
17:39hiredmanhttps://gist.github.com/27733 my first gist
17:46ejacksonjust read about backtype, woah !
17:46ejacksonthose guys are amazing
17:46ejacksonand now they are aquired !
17:46ejacksoni (very selfishly) hope they still release Storm.
17:49dnolenejackson: sounds like that's the plan.
17:53ohpauleezyeah, that was awesome news about BackType
17:53ohpauleezdnolen: I'll be moving back to NYC in September, so I look forward to seeing you at user groups!
17:55tufflaxhiredman about your randth, there is rand-nth already if im not mistaken
17:56brehauttufflax: that gist is from 2008 isnt it?
17:57tufflaxoh didnt realize
17:57amalloyi was thinking the stone age
17:57amalloyhaving a five-digit gist is like owning mike@aol.com
17:57tufflaxhehe
18:08seancorfieldreading the docs for agents... send and send-off sound suspiciously similar... can someone provide a simple explanation of their real differences?
18:08seancorfieldboth return the agent immediately according to the docs
18:08amalloyseancorfield: send-off doesn't use the threadpool
18:08seancorfieldsend runs in a thread from a thread pool; send-off runs in a separate thread
18:09seancorfieldamalloy: yes, but i'm missing the subtlety of what that really means
18:09amalloyconsider two uses for agents. (1) serializing access to a log file, (2) incrementing an "event counter"
18:09seancorfieldboth run "subsequently", both return the agent immediately...
18:09seancorfield'k... keep going...
18:10amalloyif you used threadpool threads for (1), the threadpool would get exhausted as a bunch of threads block on IO
18:10amalloyand adding new tasks would block
18:10amalloyif you created a whole new thread for each action in (2), you'd drown your operating system in threads
18:10seancorfieldah, so the threads available to send are limited but the threads available to send-off are not?
18:10amalloyindeed
18:10seancorfieldgotcha... thanx...
18:11seancorfieldwhat about pmap? it doesn't say whether it uses separate threads or the threadpool...
18:11ohpauleezit uses the threadpool
18:12seancorfieldthanx
18:12ohpauleeznp
19:11seancorfieldif i just want to fire off an async process and forget it, what's the most idiomatic way
19:11seancorfieldi could use an agent... but that seems a bit wrong if i don't care about its value...
19:11hiredman(future ...) is used a lot
19:12seancorfieldhmm, that says it caches the value... isn't that... wasteful?
19:13seancorfieldi probably want to fire off tens of thousands of processes over a period of a few minutes
19:13hiredman*shrug* it's an object, it'll get gc'ed
19:14hiredmanseancorfield: if you use your own threadpool (which is not a bad thing to know about, excutors, threadpools, and futures) what you get back when you submit a job is a Future
19:14hiredmanand a clojure future is a java Future
19:16seancorfieldah, ok... good to know
19:16hiredmanif you are doing 10's of thousands of jobs you may want to instead look at queueing up jobs and having some fixed number of threads consuming from the work queue
19:20seancorfieldinteresting... the thread name reported by a log event in a future is clojure-agent-send-off-pool-24 :)
19:21seancorfielddoesn't 'pool' indicate a thread pool is being used there?
19:21hiredmanthe futures are backed by the same threadpool that send-off uses
19:21hiredmancorrect
19:21seancorfieldbut that threadpool can grow unlimited amounts?
19:21hiredmanbut it is not a fixed size threadpool
19:21hiredmancorrect
19:21seancorfieldcool
19:22hiredmanbut I doubt you'll want 10's of thousands of threads
19:22seancorfieldindeed
19:22seancorfieldso i might use an agent and send for now to keep things under control
19:23hiredman:(
19:23hiredmanI hate it when people use agents for that
19:23seancorfielddon't worry, i'll go look at threadpool, executors and so on later
19:23seancorfieldi just want a proof of concept to test my ideas without spending too much time on implementation details
19:23seancorfieldi didn't want to use agents in the first place
19:24hiredmanlook, for a poorman's executor just use a linkedblockingqueue+(future (while true (do-something (.take lbq))))
19:33seancorfieldthanx hiredman that does look nice and simple and after reading the docs, easy to use
19:33seancorfieldyou'd rather i did something better tho' right?
19:34hiredmanan lbq+future is acceptable
19:34hiredmanthe 'Please stand firm against Steve Yegge's "yes language" push' thread on the mailing list really needs to die
19:35technomancyhiredman: time to start a "Please stand firm against 'Please stand firm against Steve Yegge's "yes language" push' thread" thread.
19:35hiredmanI haven't read any of it
19:35technomancywish I could say the same
19:36hiredmanI just have to keep deleting it
19:36technomancysounds like you need a better mail client
19:36hiredmanwell you can already tell it is going to be all noise no signal just from the subject
19:37hiredmanjust people writing essays about nothing at all, no code or any other useful artifacts to show for it
19:38technomancy"clojure is what you feel in your heaaaaaaaaart" 𝅘𝅥𝅮
19:38hiredmanyes
19:38hiredmanI mean, correct me if I am wrong (since tl;dr)
19:39hiredman"When Your Heart Finds Clojure: The Rich Hickey Story"
19:42seancorfieldat least i finally got james keats to say in one sentence what he was writing essays about... and it appears it is just "noise" and no real signal
19:42seancorfieldso you were right there hiredman :)
19:44hiredmansee, and I didn't have to read the thread to figure that out
19:45TcepsaHow can I tell whether I'm using Marmalade as a package repository for ELPA in Emacs?
19:45Tcepsa(I promise this is relevant to Clojure; I'm trying to get clojure-jack-in working; right now it says there's no match when I try to use it)
19:46technomancyTcepsa: C-h v package-archives should show you if it's configured as a source
19:47technomancyTcepsa: you may need to do M-x package-refresh-contents and reinstall if you upgraded from an old package.el
19:47Tcepsatechnomancy: No match for that variable, so I'm guessing... no. I'll try adding it to my init.el (I'm using the Emacs Starter Kit from a year or so ago, so I'm guessing it wasn't part of it back then)
19:49technomancyTcepsa: http://bit.ly/pkg-el23 is the latest package.el that works with emacs 23
19:49Tcepsatechnomancy: Thanks, I'll give that a shot
19:54technomancyok, I really don't want to be a dick, but http://groups.google.com/group/clojure/msg/7c6195e926ee142a
20:01amalloytechnomancy: but most of those threads were started in the last couple weeks, *after* this "stand firm" thread started! i conclude that there is a causal relationship
20:02dnolen_technomancy: that post is just offensive.
20:02technomancy$kill it
20:02sexpbotKILL IT WITH FIRE!
20:03dnolen_technomancy: not you, I mean the person you're responding to of course.
20:03technomancydnolen: heh; of course. =)
20:03amalloyi am happy to contemn people who use words like contemning
20:07TcepsaI for one appreciate the reminder of the nifty stuff that continues to be added ^_^
20:09technomancyI left out slingshot because apparently it hasn't been announced on the mailing list yet, wonder what scgilardi's master plan for that is.
20:09technomancyoh, he's not here. subtle ping plan foiled.
20:10amalloytechnomancy: practice makes perfect. you'll get someone's attention someday
20:10technomancyhehe
20:10TcepsaSwitching to the newer version of package.el made the clojure-jack-in command show up in Emacs, but apparently I'm missing lein jack-in. Searching the Web has not yielded info on where to find it; is it supposed to be included in leiningen 1.6.1?
20:11hiredmanTcepsa: it actually comes from swank-clojure
20:11technomancyTcepsa: "lein plugin swank-clojure 1.4.0-SNAPSHOT" should get it, but it could get confused if you use it in a project that has an older swank in project.clj
20:11Tcepsahiredman: I'm using swank-clojure 1.3.1. D'oh!
20:12technomancyTcepsa: actually that should do it. where is it installed?
20:13Tcepsatechnomancy: Wherever `lein plugin install swank-clojure 1.3.1` put it? (Will try to get you more helpful response, but that's how I got it)
20:14technomancyno, that's fine. "lein help" doesn't show jack-in?
20:15TcepsaIt's in ~/.lein/plugins
20:15Tcepsa"lein help" doesn't show jack-in
20:16Tcepsa("lein version" says 1.6.1)
20:16seancorfieldif i did lein plugin install ... to add a plugin, is there a command to uninstall it?
20:17seancorfieldor do i just go delete some files?
20:17technomancyseancorfield: I think there is an uninstall, but I always just use rm
20:17technomancyTcepsa: that is... bizarre.
20:17TcepsaOh wait, maybe it's because the project I'm trying to use it with is using an old version, like you said about 20 lines ago /facepalm
20:18technomancyjust nix it out of project.clj and re-run deps
20:19seancorfieldtechnomancy: yup plugin uninstall exists and works :)
20:19TcepsaGot it. So if it's in .lein/plugins it's automatically included for all projects?
20:19technomancyTcepsa: ja
20:21technomancyIMO swank-clojure doesn't belong in project.clj any more now that there are user-level plugins
20:21technomancy:dev-dependencies are for things that are necessary to make the tests pass, not things you use for your own convenience.
20:21Tcepsatechnomancy: Shiny!
20:24TcepsaOh that's weird. The jack-in task runs, but it looks like I have issues with... clojure.pprint?
20:24Tcepsa(run-hooks 'slime-load-hook)
20:24TcepsaException in thread "main" java.lang.VerifyError: class clojure.pprint$loading__4410__auto__ overrides final method meta.()Lclojure/lang/IPersistentMap; (pprint.clj:4)
20:24Tcepsa
20:25technomancythat looks like an AOT version mismatch issue
20:25technomancycan you require clojure.pprint from a repl?
20:26TcepsaCan't start REPL with lein repl (Exception in thread "main" java.lang.VerifyError: class clojure.java.shell$loading__4410__auto__ overrides final method meta.()Lclojure/lang/IPersistentMap; (NO_SOURCE_FILE:1))
20:26TcepsaAttempting raw Clojure repl
20:27technomancygist project.clj?
20:27TcepsaAck, nevermind, I'm using clojure-1.1.0.jar in this project
20:28TcepsaUpgrading might help with the issue?
20:28technomancyyeah... I haven't officially dropped support for 1.1 yet, but there's really no good reason to stick with it as far as I know.
20:29gfrlog`technomancy: 11 is a prime?
20:30technomancycompelling
20:30arohnerClass clojure.lang.Compiler$NewExpr can not access a member of class Foo with modifiers "public"
20:30arohnerwhat does that mean?
20:31Tcepsatechnomancy: Woo hoo! Hacks and glory await! XD
20:31amalloyarohner: i'd guess that you're trying to access Foo/bar when bar is a public non-static member of class Foo, rather than a public static?
20:32arohneramalloy: I'm trying to call the constructor, hence the newExpr
20:33hiredmanmy bet would be something like a non-public constructor
20:33Tcepsatechnomancy: Thanks for all your help ^_^ Now I'm going to give slamhound a try; it also looks fantastic!
20:33hiredmanthe 'with modifiers "public"' bit just being there to confuse things
20:33technomancyTcepsa: sure
20:33arohnereyeballing the source, and the output of (show) both that the constructor is public
20:33arohnerI'm doing (Foo. "a string" 5)
20:34hiredmanand where is Foo? does it extendthing, what does the constructor do?
20:36hiredmanextend anything
20:36arohnerfoo is in a jar in lib/. it extends nothing, it doesn't do anything unusual
20:37arohnerthe one weird thing about it is it didn't have dots in a java package
20:37arohneri.e. it's just Foo, not com.bar.Foo
20:38hiredmanand you are doing this at the repl?
20:38arohneryeah
20:43Tcepsaarohner: Just out of curiosity, how did you import it? (i.e. How do you import something without a package? Or would that be with a nil package?)
20:43arohnerTcepsa: I did (import 'Foo), and it didn't throw an exception
20:44arohnernow I can do (show Foo), and see what I expect
20:44hiredmanick, that is a class in the anonymous package
20:44TcepsaAh, got it. (Lisp may not have syntax, but its macros sure do)
20:44hiredmanthrow it back
20:44amalloyhiredman: the default package
20:45hiredmandefault
20:45hiredmanright
20:45amalloybut yeah, that is seriously gross. all kinds of shit will break on that
20:45hiredmandisgusting
20:46arohnerok, I'll try moving it into a sane package format
20:46arohnerthanks
21:08Tcepsatechnomancy: Regarding your earlier comments about "things in dev-dependencies are to make tests pass" would it probably be better to do "lein plugin install slamhound 1.1.1" rather than include it in project.clj as a dev-dependency? (Is this something that would have been more appropriate for me to put in as a GitHub issue? Or should I clone the project, change the README, and submit a pull request?)
21:36amalloy,`[! & a]
21:36clojurebot[sandbox/! & sandbox/a]
21:36amalloyanyone know where the code is that causes & to not get namespace-qualified there?
21:36hiredmanin the reader
21:36hiredmansyntax quote is all in the reader
21:37hiredmanand it is ugly
21:37amalloyhiredman: yeah, i've been looking through syntazQuote but i can't find the relevant bit
21:38arohnerit would be so awesome if clojure could load .java files directly
21:38arohnerwould that be possible as a special classloader?
21:38hiredmanarohner: no
21:39hiredmanyou would need to turn .java into bytecode first
21:40arohnerhiredman: well yes. but what if your classloader ran javac and spat out the bytes? that seems possible in theory
21:41hiredmanarohner: the classloader is spitting out bytes? why?
21:41arohnersorry, bytecode
21:41hiredmanwhy is it spitting out bytecode?
21:41TcepsaSounds like a job for JIT compilation!
21:41arohnerisn't that the interface? I thought the classloader's job was to convert a classname into a stream of bytecode
21:41hiredmanclassloaders generally load bytecode from somewhere (hence "loader") they don't write them anywhere
21:42arohnerso the interface on classloader is essentially, return the stream of bytecode for a given class, given its name
21:43arohnerit seems possible to write a classloader that looks for a file with the same name under src/, run javac on it, and return that stream of bytecode
21:44amalloycertainly that is possible
21:44gfrlogI would expect an IDE written in/for java would want similar capabilities
21:44amalloyall things are possible
21:45arohneramalloy: yes, but how much work is it? does the naive implementation work?
21:46amalloyprobably not
21:51arohnerhttp://www.ibm.com/developerworks/java/library/j-jcomp/index.html
21:58chouserI think it's been done. Java source REPL type things
21:58arohnerchouser: I'm sure it has. I just want clojure to have it
22:02chouserwhy would it be worth anyone's time to create such a thing?
22:03arohnerchouser: to avoid the compilation overhead when modifying a project that contains clojure and java code
22:03chouserIf someone else insists on creating java, I hope they are nice to me and provide a tidy bytecode .jar with appropriately declared dependencies.
22:03arohnerchouser: me too, but it doesn't always work that way
22:15Tcepsachouser: Say I'm working in a Java-only shop, but I'm using Clojure (and the REPL) to do some prototyping and experiment with a Java class that I'm trying a new technique with. It'd be nice to be able to pull changes I make to the class directly into the REPL rather than having to exit the REPL, run ant, fire the REPL back up, and restore my environment.
23:20dnolen_so lein 1.6.1 doesn't work w/ 1.3.0-beta1 ?
23:23^^im getting a nullpointer exception and i dont get why. could someone please look at the code: http://pastebin.com/4v3CkpCv ? if i call the verts function inside the let, i get a nullpointerexception and when i call the outside function, i dont
23:23^^(i know the code is still incorrect even without that problem)
23:24hiredman,(macroexpand '#(1))
23:24clojurebot(fn* [] (1))
23:24^^oh right
23:25^^thanks... :S
23:25dnolen_what's the easiest way to downgrade lein?
23:30hiredmandnolen_: get the patch http://dev.clojure.org/jira/browse/CLJ-673 applied to clojure!
23:32hiredmanif you remove the -Xbootclasspath bit from the lein script it will work
23:36dnolen_hiredman: I removed that still borked.
23:36hiredmanstacktrace?
23:37dnolen_https://gist.github.com/1068860
23:37hiredmanthe bootclasspath is actually only an issue if lein itself is running on 1.3 (which it isn't) so a failure on a project running 1.3 is interesting
23:38hiredmanthis is from running lein deps?
23:38dnolen_hiredman: yup
23:38dnolen_but none of the tasks seem to work, same trace
23:39hiredmanhuh
23:39dnolen_lein help is also garbled, https://gist.github.com/651a36bce975869b4fc0
23:39hiredman1.6.0?
23:39dnolen_1.6.1
23:41hiredmanwhat jvm?
23:41dnolen_OpenJDK 7, looking at switching it to 6
23:41hiredmanon osx right?
23:42hiredman(thought I fixed this already)
23:42dnolen_upgrading to latest 7, work on system JDK 6
23:42dnolen_s/work/works
23:42sexpbot<dnolen_> upgrading to latest 7, works on system JDK 6
23:43hiredmanactually just what are the values for (System/getProperty "os.name") and (System/getProperty "os.arch")
23:43dnolen_"Mac OS X" "x86_64"
23:44hiredmanlein is most likely missing them, I had a similar problem, the openjdk 7 build I have reports "Darwin" as the osx, and that was missing
23:44hiredmanhuh
23:44hiredmanthats there
23:44dnolen_trying latest 7
23:45dnolen_works
23:45dnolen_I was OpenJDK 7 from May I think.
23:45hiredmanweird
23:45hiredmandifferent values for the system properties?
23:46dnolen_no
23:46hiredmanfuh
23:46hiredmandunno