#clojure logs

2011-05-09

00:01zrilak6am, time to hit the proverbial sack... big thumbs up to all you wonderful folks
00:01tomojhuh, I hadn't heard of that one
00:01clojurebotCool story bro.
00:02tomoj"This in-depth look also shows Ruby and Python developers that Closure is just as expressive and sophisticated with one added advantage"
00:02tomojBAH
00:03brehautthe typo?
00:03tomojdidn't even notice that, but, damn, yeah
00:03tomojI BAH at "just as"
00:03amalloyalso "one" added advantage
00:03amalloywhat advantage is that? the advantage of "having lots of advantages"?
00:04tomoj"all the resources of the JVM"
00:04tomojthat ugly (though often quite useful) thing strapped to our backs
00:04TheMoonMasterlol
00:05tomojbad analogy, it's the foundation I suppose
03:08markomanHi guys. I have this kind of situation: (do 1 (for [r (range 2 4)] r)) -> (2 3) but I need result to be (1 2 3)
03:09markomanis there some way to add first clause on do to the beginning of the sequence?
03:10markomanagain this is simplified example with numbers. actually numbers are vectors
03:12markomanmaybe this being more real example: (do [1] (for [r (range 2 4)] [r])) which should return ([1] [2] [3])
03:14_mstmarkoman: I think you want (lazy-seq (cons [1] (for [r (range 2 4)] [r])))
03:15raekmarkoman: as _mst pointed out, you can use 'cons' to add something to the beginning of a sequence
03:16raekyou probably don't want to use (do x y z) here, since what it does is to evaluate x y z (in that order) and then throw away x and y and return z
03:19markomanok, i was trying to use merge instead of do at some point cause i figured do gives only the last evaluation
03:20raekyou can use concat if you want to glue together the results of multiple sequence expressions
03:20markoman(cons [1] (for [r (range 2 4)] [r])) is not enough here? why need for lazy-seq?
03:20raek,(cons (range 2 4))
03:20clojurebotjava.lang.IllegalArgumentException: Wrong number of args (1) passed to: core$cons
03:20raek,(cons 1 (range 2 4))
03:20clojurebot(1 2 3)
03:21raek,(concat [1] (range 2 4))
03:21clojurebot(1 2 3)
03:22raekmarkoman: lazy-seq is not needed here, but is good to use if you are going to generate a longer sequence (for example, 'for' uses it internally to be able to process infinite sequences)
03:26markomanthanks, got it working
04:17tufflax,`(abc `(def))
04:17clojurebotDENIED
04:17tufflax&`(abc `(def))
04:17sexpbotjava.lang.SecurityException: You tripped the alarm! def is bad!
04:17tufflax&`(abc `(de))
04:17sexpbot⟹ (clojure.core/abc (clojure.core/seq (clojure.core/concat (clojure.core/list (quote clojure.core/de)))))
04:18tufflaxwhat's with the seq, concat and list?
06:56SLLCLLsup
06:57SLLCLLwhy does this http://pastebin.com/Biyf0Tfi produce a stack overflow when run with (sieve (range 2 1000000))
07:00SLLCLLI thought lazy-seq was supposed to prevent that
07:24SLLCLLwhy does this http://pastebin.com/Biyf0Tfi produce a stack overflow when run with (sieve (range 2 1000000))
07:32raekSLLCLL: it happens because you end up building up a big nested (remove ...) expression
07:32SLLCLLhm....
07:33raekin order to take the first element of one remove, it needs to take the first element of the next remove, and so on
07:33SLLCLLah....
07:33raekwhen a lazy-seq is forced, it creates a stack frame
07:33SLLCLLwell how should I do it
07:34raekSLLCLL: a workaround is to put doall around the remove call
07:34SLLCLLok
07:34raekthen you will actually filter out one number each iteration
07:35raek*all numbers divisible by next-prime
07:36SLLCLLseems to work slow :)
07:36raekthe larger input sequence you have, the more filtering needs to be done at each step...
07:39SLLCLLunfortunately time macro stops working
07:40raekSLLCLL: since the resuling seq is lazy, you need to wrap the expression in (doall ) to time the whole thing
07:41raekSLLCLL: also, this problem seems to be a common one :) http://stackoverflow.com/questions/2992123/clojure-avoiding-stack-overflow-in-sieve-of-erathosthene
07:41SLLCLL:)
07:41raekand http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/
07:41SLLCLLis there a difference between mod and rem fns
07:42clojurebotclojure-mode is an Emacs mode for Clojure, found at git://github.com/jochu/clojure-mode.git
07:43raekSLLCLL: yes, they behave differently for negative numbers
07:44SLLCLLsince I throw an error for negative numbers, which is faster for positive cases
07:47neotykHi *
07:48SLLCLLthere's something wrong with this sieve
07:48neotykdo you guys get slow performance out of maven-clojure-plugin?
07:49SLLCLLif I take 100 from sieve of 1million it takes 6 seconds.... if I try to take all then it take 10 min (and still not finished)
07:49SLLCLLthat's illogical, after doing first 100 primes the remaining sequence should be pretty short with so many numbers eliminated
08:12neotyk`anyone knows status of https://github.com/stuartsierra/new-clojure-maven-plugin ? is it usable, ready to bu used?
08:12neotyk`s/bu/be/
08:20SLLCLLsince that sieve operated slowly as hell I created a new one
08:20SLLCLLhttp://pastebin.com/PzsneVjf
08:20SLLCLLI use no recursion yet it has stack overflow
08:21SLLCLLoh wait
08:21SLLCLLit was same thing
08:21SLLCLLhad to put doall in front of remove....
08:26neotyk`to answer my own question, new-clojure-maven-plugin is not able to test yet
08:29cemerickneotyk`: I think it'll be a while before it catches up.
08:34neotyk`cemerick: I found out that problem was not c-m-p but rather my code :-/
08:34cemerickneotyk`: my condolences :-)
08:34cemerickc-m-p is pretty tight
08:35cemerickAbout the only thing it's missing at this point is nREPL support, but that's minor.
08:49SLLCLLman
08:49SLLCLLwhy is this so slow
08:51SLLCLLhttp://pastebin.com/7PRQ9912 take 1500 seconds to do (time (do (sieve (range 2 1000000)) nil))
08:51SLLCLLffs why
08:58chouserO(n^2), allocates memory for a seq and an Integer object for each number examined, etc.
08:59SLLCLLWell of course it's O(n^2), any naive sieve impl is probably
08:59SLLCLLbut I guess this could be about 100 times faster in java
08:59SLLCLLjust creating a boolean array and crossing out numbers
09:00SLLCLLwhich is same basic algorithm
09:00SLLCLLexcept i'm using filter here
09:01chouserSLLCLL: well, you could try using an array and crossing out numbers in Clojure too
09:01chouserI think you'd find it to be significantly faster
09:02SLLCLLwith the absence of c style for loops that kind of code usually gets excessively ugly
09:02SLLCLLkind loses the point of using clojure in the first place
09:03chousercrossing out numbers from a fixed-sized array means that to "filter" 7, for example, only every seventh item in the array is touched at all
09:03SLLCLLi see your point
09:03chouserusing filter like this means that to filter out 7, every single item in the seq is mod'ed
09:03SLLCLLmoded?
09:04chouserand of course the difference between the two styles gets more and more dramatic the higher you go
09:04SLLCLLI thought it just said (rest seq) if predicate pans out
09:04chouserelim-multiples looks at every element of coll
09:05SLLCLLgotcha.... I shouldn't use clojure for tight algorithms
09:05chouserheh, well, that's not quite what I said
09:05SLLCLLI guess I could code it in java and call it from clojure
09:05chouseryou could. or you could do in clojure what you would do in java.
09:06chouserfor(i = 0; i < 10; ++i) {...} / (loop [i 0] (when (< i 10) ... (recur (inc i)))
09:07chouserI think I might agree with "don't use seqs for tight number-processing algorithms"
09:08SLLCLLbut practically everything in clojure results in seqs
09:08SLLCLL(or vectors which seem just as slow)
09:10jolypractically everything in Java results in objects, but I'd use primitives for these calculations, loop indices, etc
09:10jolyuse what fits best
09:10chouserClojure has pretty good support for dealing with Java arrays, even arrays of primitives which would be a good choice for a sieve of Erotosthenes
09:16TimMcchouser: Is that the sexy version of the sieve of Eratosthenes?
09:18chouserheh
09:18SLLCLLthis version
09:18SLLCLLhttp://pastebin.com/a2xYvEw8
09:18SLLCLLisn't actually a sieve
09:18SLLCLLcalculates each number separately
09:19SLLCLL50000 times faster than that sieve
09:19chouserthe previous version wasn't actually a sieve of Eratosthenes either.
09:19SLLCLLgo figure
09:19oelewapperkethat's not a sieve
09:19oelewapperkeoh right :-p
09:19oelewapperkethat looks like a very, very slow way of calculating primes
09:20gfrlogI just constructed a lazy, iterative, efficient sieve
09:20SLLCLLlooks slow
09:21SLLCLLcalculated primes in first million in 0.034 msec
09:21gfrloghttps://gist.github.com/962508
09:23SLLCLLI don't really get these map implementations :P
09:23gfrlogmine?
09:23SLLCLLor cgrands :)
09:23SLLCLLboth confuse me
09:24gfrlogI cannot find cgrand in the irc history :(
09:29oelewapperkeSLLCLL: that function restarts it's prime list from scratch on every iteration
09:29oelewapperkeSLLCLL: bit of a stretch to call that efficient imho
09:30SLLCLLit is
09:30SLLCLLbut like I said
09:30SLLCLL50000 times faster than sieve I build that basically uses filter to remove multiples
09:30SLLCLLfrom a sequence of all examined numbers
09:30gfrlogaddition is always much faster than division
09:31SLLCLLwhat does that mean?
09:31gfrlogsieve uses only addition. trial division uses lots of division
09:32gfrlogat the processor level, addition is some 50 times faster typically, I think
09:32SLLCLLmy sieve used modulus
09:32SLLCLL:P
09:32SLLCLLmy bad :P
09:32gfrlogmodulus is division
09:32SLLCLLwell it should still have many many times fewer divisions
09:32gfrlogI suppose I can't comment further without seeing either of them
09:36oelewapperkeSLLCLL: presumably that's because clojure is copying the array around like crazy
09:36oelewapperkeI'm not actually sure how to write an efficient sieve in clojure
09:37SLLCLLwrite it in java then call from clojure :P
09:38gfrlogoelewapperke: https://gist.github.com/962508 ?
09:39cemerickSLLCLL: first result on Google for "clojure sieve of eratosthenes" FWIW http://clj-me.cgrand.net/2009/07/30/everybody-loves-the-sieve-of-eratosthenes/
09:40dnolenSLLCLL: I don't see why you can't just implement the Java algorithm in Clojure, esp if you're willing to try 1.3.0 alphas or master branch. The only perf difference you should see will be around the fact that Clojure only supports 64 bit arithmetic.
09:40dnolen64 bit primitive arithmetic I mean.
09:40SLLCLLI know cemerick but I just can't understand his version
09:41cemerickSLLCLL: Fair enough, but I'm not sure if that warrants punting to Java. +1 to dnolen above, as well.
09:42SLLCLLtbh I'm just not good enough
09:42cemerickWhere's your fighting spirit man? :-P
09:43SLLCLLI stumble around a fair bit when trying to use unchecked ops
09:43SLLCLLwhen I try to use them I don't gain performance generally (due to my lack of knowledge)
09:44gfrlogit looks like cgrand's version will hold the entire set of primes in memory?
09:44SLLCLLbut my stupid version that checks every number just outdid version of someone I know
09:44SLLCLLso I'm happy with that
09:45cemerickSLLCLL: A saying of mine: "Clojure demands that you raise your game, and pays you back for doing so."
09:46SLLCLLfunny thing... this guy I beat has a lot of experience in web development, has done several projects, has some startups and I'm just a junior developer at some random company
09:47cemerickgfrlog: yes
09:47gfrlogokay
09:47ejacksondnolen: is your native-deps plugin for leiningen still the way to go for native dependencies ?
09:48cemerickgfrlog: probably not a problem unless you had some serious objectives :-)
09:48dnolenejackson: probably not for long, technomancy is folding into lein it sounds like.
09:48dnolenejackson: but for now yes.
09:48gfrlogcemerick: well I wouldn't be putting that into production... :)
09:48technomancydnolen: actually it's already in =)
09:48technomancyif you're running lein from git
09:48dnolentechnomancy: sweet!
09:48ejacksontechnomancy: I'll do that then :)
09:49gfrlogcemerick: it would be embarrassed next to my production version of fib
09:49ejacksondnolen, technomancy: thanks.
09:52gfrlogcemerick: but isn't performance tho whole point of the discussion?
09:54technomancyejackson: it doesn't support transitive native deps yet, but I'm hoping to have that in before the release
09:54ejacksontechnomancy: I think my deps are all direct, hope so :)
09:55technomancyyeah, it's an edge case for sure.
09:57cemerickgfrlog: retaining primes doesn't impact perf; it's not good if you plan on going prime-hunting in a serious way, but it's irrelevant given the limits we've been holding to (i.e. < 1e6 or whatever).
09:58gfrlogah; was not aware of limits
09:58cemerickgfrlog: small primes seemed to be what SLLCLL was aiming for
09:59gfrloggatcha
09:59cemerickFWIW, I wasn't saying cgrand's impl was the best possible — just that it was easily available and pedagogically useful
09:59gfrlogs/gatcha/gotcha
09:59sexpbot<gfrlog> gotcha
09:59gfrlogright
09:59SLLCLLhm
09:59SLLCLLcan I use aset in combination with map
09:59cemerickgfrlog: If you're confident in your impl, you should blog it and see how it fares in the wild. :-)
10:00gfrlogokay
10:00gfrlogcemerick: http://gfredericks.com/gfrlog/posts/90 :)
10:01dnolenSLLCLL: ? use aset on a map?
10:01cemerickgfrlog: ah, you're prepared! :-)
10:01gfrlogfor once
10:01cemerickgfrlog: a tgz?!?
10:01cemerick:-O
10:02gfrlogyes I'm so sorry
10:02cemerickGet thee a github repo.
10:02gfrlogokay one sec
10:03cemerickgfrlog: how fast is your impl (up to 1e6, say)
10:03gfrlogis that the first million primes or all primes below a million?
10:03cemerickbelow a million, sorry
10:04gfrlogcemerick: https://github.com/fredericksgary/lazy-prime-sieve
10:05SLLCLLno... use map macro with aset
10:05gfrlogcemerick: 1500 msec
10:06cemerickgfrlog: thanks; so, I'm getting 2.4s with yours vs. 1.4s with cgrand's. #slowmacbookpro
10:06gfrlogyeah, I would think mine would get the edge assymtotically
10:06cemerickgotcha
10:06gfrlogs/assymtotically/correct-spelling
10:06sexpbot<gfrlog> yeah, I would think mine would get the edge correct-spelling
10:06cemerickha
10:07dnolenSLLCLL: do you mean the map fn? if so, if you're going for perf I would not use map, dotimes if you want some equivalent to a Java for loop.
10:07gfrlogcemerick: since it only holds in memory the primes up to the square root of whatever you're doing
10:07cemerickright; functionally constant space
10:08gfrlogyeah, until you get up into the septillions and such
10:08SLLCLLyeah seems that anything but extremely ugly implementations using just loop recurs is slow as hell
10:08cemerickgfrlog: you should update the post with a link to your github repo
10:09oelewapperkegfrlog: that code is still horribly slow here
10:09gfrlogoelewapperke: why can I not tab-complete your name?
10:10oelewapperkegravity: no clue ...
10:10TimMcgfrlog: worksforme
10:10gfrlogTimMc: and everybody else's name works for me
10:11jarpiainSLLCLL: there's a few more versions at http://groups.google.com/group/clojure/browse_thread/thread/c26922a0e3e99f69/
10:11gfrlogmaybe my client has a hard-coded oelewapperke exception
10:11gfrlogoelewapperke: what did you test it on?
10:11gfrlogby which I mean what range, not what hardware
10:11TimMcjava.lang.OelewapperkeException
10:12gfrlogyeah I've had to catch that one a few times
10:12oelewapperkegfrlog: my own machine
10:12oelewapperkeno offence but 3s for primes < 1000000 is horribly, horribly slow
10:12gfrlogoelewapperke: you did primes up to a million?
10:12dnolenSLLCLL: heh, quite subjective. Performance is a practical concern, you should expect practical solutions.
10:13gfrlogoelewapperke: like I said early, I was going for asymptotic behavior. So mine will go up to trillions and quadrillions, while the other implementations will run out of memory
10:13gfrlogs/early/earlier
10:13sexpbot<gfrlog> oelewapperke: like I said earlier, I was going for asymptotic behavior. So mine will go up to trillions and quadrillions, while the other implementations will run out of memory
10:14gfrlogdifferent emphasis
10:15oelewapperkegravity: otoh it has this problem : http://xkcd.com/761
10:15oelewapperkeI mean gfrlog
10:15mat1Is there a way in clojure to mimic the behavior of ## from c macros?
10:15gfrlogoelewapperke: it's okay, I've gotten used to answering to gravity now
10:16gfrlogoelewapperke: given that all of this stuff is theoretical in the first place, I'm not sure what your criticism is
10:18oelewapperkegfrlog: I was kinda looking for an actual fast sieve implementation in clojure. To see how it's done
10:18oelewapperkegfrlog: I'm starting to think there isn't any
10:18dnolenoelewapperke: I've been talking about how it can be done for quite a while now.
10:18SLLCLLwell whatever you do it's still gonna be 10 times slower than java
10:19dnolenSLLCLL: doubtful.
10:19gfrlogwhich will be 3 times slower than C
10:19cemerickholy hell
10:19SLLCLL:)
10:19SLLCLLnah java is only 1.4 times slower than C on average
10:19cemerickoelewapperke: what's "fast" for you?
10:20gfrlogpeople do not switch to clojure because it is faster than other things
10:20SLLCLLthat's true
10:20cemerickgfrlog: sure it is: I can build X a whole lot faster in Clojure than in Java. ;-)
10:20SLLCLLbut the reason I switched to java was because it wasn't too bad comapred to C++
10:20oelewapperkecemerick: it's about a million operations @ 2.6 ghz on my laptop ... so about 0.3s ?
10:20gfrlogcemerick: but...that's not clojure being faster
10:21SLLCLLwhen it was twice as slow it was acceptable
10:21dnolengfrlog: that's not true, I certainly switched to Clojure because it was faster than the other dynamic langs, and the potential to get Java perf w/o all the headaches.
10:21gfrlogdnolen: I recant
10:21SLLCLLclojure unfortunately ( if you program idiomatically) is 4-200 times slower than java
10:21gfrlogsome people switch to clojure because it is faster than other things
10:22cemerickgfrlog: "faster" is just as semantically dubious as "better"
10:22gfrlogcemerick: I object
10:22fliebelIt'd be funny if languages did reverse-moore, getting half as fast every year.
10:22SLLCLLlisp is pretty fast
10:22SLLCLLunfortunately it doesn't have java libraries
10:22gfrlogfliebel: and simultaneously development time does a reverse-reverse-moore?
10:23gfrlogcemerick: okay I updated it
10:24cemerickgfrlog: ah, fabulous
10:24fliebelgfrlog: I hope so :) Maybe we should just state something like this, and make it self fulfilling.
10:24SLLCLLmy beef with clojure is that unless I hand optimize it, it's usually like 40 times slower than java
10:24gfrlogby 2030 all projects will be completed in under 1 second, and the mental effort involved will require resting for a decade
10:24dnolenSLLCLL: I often have large swaths of elegant Clojure code whose performance doesn't really matter, and other swaths of code that I beat into the ground until I see Java perf. Most languages don't afford both kinds of thinking.
10:25gfrlogMy beef with Java is that even if I go way awkwardly out of my way to program in a functional style, it's still stupider than clojure
10:26SLLCLLI have yet to beat anything down to java perf
10:26dnolenSLLCLL: well you haven't been programming Clojure long enough to know how. Not surprising.
10:26SLLCLLmy java code is good without any effort to think in terms of performance
10:27SLLCLLI almost never have to refactor java code to gain performance
10:27cemerickThis Java thing sounds pretty great. I should go check it out sometime.
10:28SLLCLLC# is better :P
10:28dnolenSLLCLL: but your Java code is not safe the way idiomatic Clojure code is either.
10:28SLLCLLthat's true I suppose
10:29klangoelewapperke: http://fupeg.blogspot.com/2009/11/clojures-primes-shootout.html is the best sieve I've been able to find ..
10:29SLLCLLbut for instance... a majority of lists I use never leave the method... so majority of the time thread-safety and non-mutability don't present an advantage
10:29dnolenSLLCLL: interoperability.
10:30SLLCLLmost clojure core functions (map, filter, reduce) do lazy sequences which seem to be quite slow
10:30dnolenClojure libraries have a greater ability to be shared w/o multithreading fears.
10:31dnolenSLLCLL: lazy sequences aren't slow if you know what they're good for. mutually recursive algorithms being a good example.
10:31cemerickSLLCLL: seqs currently imply boxing, and ops over boxed numbers are slower than ops on primitives.
10:32SLLCLLso what should I emit? vectors, lists, seqences?
10:32dnolenSLLCLL: it easy to encode an aglorithm that would blow the stack in Java in a lazy-sequence, and it's going to be very fast.
10:33cemerickSLLCLL: You need to understand them, and use them appropriately. There's no blanket recommendation that can be reasonably made.
10:33gfrlogdnolen: I think any such algorithm you would do in java without using an explicit collection
10:33ejacksondnolen or technomancy: using the latest checkout and just running lein deps does create the native directory and calling (System/getProperty "java.library.path") yields "...../native/macosx/x86_64" correctly. However, when I try calling a function from the jar utilising the native lib I get a Cannot load JRI native library (NO_SOURCE_FILE:0). Any ideas what's wrong here ?
10:34SLLCLLif you have to know when to use them, why are they the default in some of the most used functions?
10:34SLLCLLas gfrlog pointed out, in java you just do iteration and you don't blow stack
10:34dnolenSLLCLL: if you're not doing primitive stuff why not use them?
10:34SLLCLLok
10:34dnolenSLLCLL: except iteration doesn't compose that well.
10:35SLLCLLthat's true
10:35SLLCLLmy sieves that compose sequence operations were slow as hell though
10:35SLLCLLslowest of them all
10:35technomancyejackson: if you can put together a simple repro case opening an issue would be great.
10:35technomancyejackson: also: do you get the same thing with the native-deps plugin?
10:36ejacksontechnomancy: I'll check with naitve-deps plugin and come back to you.
10:36gfrlogSLLCLL: I think the idea is that most of the time slow is fine, and the code-safety/simplicity are a more valuable tradeoff
10:36gfrlog5% of the time you can speed it up enough with clojure tricks. the other 5% of the time you don't use clojure.
10:36ejacksontechnomancy: I'm attempting to bring this back to life: https://github.com/jolby/rincanter
10:38dnolenejackson: and you actually have a native lib dir in your project after running native-deps ?
10:38ejacksondnolen: yeah, it has the .jnilib there (I checked)
10:39dnolenejackson: hmm.
10:39ejacksondnolen - I need to install ant to get your native-deps plugin going, yeah ?
10:40dnolenSLLCLL: hmm didn't think so.
10:40dnolenoops ejackson I mean.
10:41ejacksondnolen: dammit. with the plugin I get java.lang.NoSuchMethodError: org.apache.tools.ant.util.FileUtils.getFileUtils()Lorg/apache/tools/ant/util/FileUtils; (core.clj:1)
10:42ejacksonwhen I try invoke lein deps
10:42dnolenejackson: what version of ant do u have?
10:43ejacksondnolen: Apache Ant(TM) version 1.8.2 compiled on February 28 2011
10:43dnolenejackson: huh, same here. did you try with a different native project?
10:44ejacksonnope, can you point me to one please ?
10:45dnolenejackson: investigating w/ Penumbra
10:45ejacksoni'll try too
10:47technomancythe version of ant installed by your package manager shouldn't ever be on the classpath
10:47technomancyejackson: try the plugin with lein 1.5 rather than the latest git
10:48ejacksontechnomancy: will do.
10:49gfrlogis ^:private the same thing as #^{:private true}?
10:49ejacksontechnomancy: same issue with the plugin. lein-stable version is
10:49ejacksonLeiningen 1.5.0 on Java 1.6.0_24 Java HotSpot(TM) 64-Bit Server VM
10:49dnolenejackson: Penumbra works w/ native-deps 0.5 just fine.
10:49dnolenejackson: how are you testing rincanter?
10:50ejacksongit clone .....
10:50ejacksonlein deps
10:50ejacksonlein test
10:50ejackson(after updating the project.clj to 1.2.0)
10:51dnolenhuh, is github down for anyone else?
10:51ejacksonyup, its just vanished on me
10:52fliebelnope
10:52ejacksonactually. now back
10:53fliebelsweet, I just redid a piece of clojure written when 1.2 was a snapshot. Everything is so much simpler now.
10:57ejacksondnolen: updating that project.clj file to more current stuff: https://gist.github.com/962673
10:57fliebelIs there anything sweet outside old contrib for command line arguments?
10:58chouserfliebel: maybe something nice in javaland?
10:58ejacksonthen running lein-stable native-deps invokes your plugin, but the native dir is not created
10:58technomancyjava people have this nasty habit of expecting a single dash before full-word arguments.
11:01dnolenejackson: something else is pulling in ant, that's the problem.
11:01ejacksondnolen: aaah, gotcha !
11:01dnolenI removed autodoc from the dev-deps, and changed swank-clojure to 1.3.0
11:01ejacksondnolen: i dropped both
11:01dnolenrm -rf lib, and then lein deps, lein native-deps, which then works.
11:02technomancyautodoc is rather confused about what it needs to declare =\
11:02fliebelchouser: ah, jargs. What is this syntax about? I mean, the space. Parser.Option debug = something
11:02ejacksondnolen: can you lein test for me ?
11:02dnolenyou need to erase lib, if ant is in there it breaks lein.
11:02dnolenejackson: ah ok, yeah I see the JRI bug now.
11:03ejacksondnolen: is your native dir populated ?=
11:04dnolenejackson: yes, but I note that there is not JRI.jar in lib itself, that is suspect.
11:04SLLCLLhow would I paralelize something in clojure
11:04ejacksondnolen: hmmm.....
11:04SLLCLLfor instance earlier I had a seqence and I checked each number separately for being a prime, how would I check 8 numbers at the same time
11:05dnolenejackson: oops, no I see it.
11:05ejacksonif I use the git version of leiningen, and lein deps, I do get a JRI.jar
11:05chouserfliebel: I don't even know what you're talking about. :-)
11:06SLLCLL(defn primes [n] (filter prime? (range 3 (inc n)))) <- how can I paralelize running prime?
11:06zippy314I have ref of a has that generates a stack overflow when printed on the repl because it includes an item that points back to the top level ref. How can I override the printing behavior of the repl to get around this?
11:06SLLCLLI've tried pmap but it ended up using 2 cores out of 4
11:09dnolenejackson: the rincanter code is a bit ... odd.
11:09ejacksondnolen: Do you think there is any charm for me to build JRI from source myself and see if I can make any headway.
11:09ejacksondnolen: aaah.
11:10zippy314like this:
11:10zippy314,(let [z (ref {})] (dosync (alter z assoc :z z)))
11:10clojurebot{:z #<Ref@1bc6f41: {:z #<Ref@1bc6f41: {:z #}>}>}
11:11zippy314wow. On my repl (emacs slime to swank clojure) that throws a stack-overflow.
11:14S11001001zippy314: set *print-level*?
11:14dnolenejackson: k, (System/loadLibrary "jri")
11:14dnolenejackson: Library not loaded: /Library/Frameworks/R.framework/Versions/2.10/Resources/lib/libR.dylib
11:15dnolenit looks like its looking for that.
11:15ejacksonaaaaah
11:15ejacksonis your R_HOME set ?
11:15dnolenejackson: no, don't know anything about R really :)
11:15ejacksondnolen: ignore me, mine is and I get the same
11:16dnolenit's looking for 2.10, I see I have 2.12
11:16ejacksondnolen: aaaaaaaaaaaaaah
11:16zippy314S11001001: That does the trick! Thanks.
11:16ejacksonme too
11:16ejacksoni'd JUST seen that :D
11:18ejacksondnolen: and that works.
11:18dnolenejackson: nice.
11:18ejacksonI'll see if I can find the hardcoded link
11:19ejacksondnolen: thanks for you help on this, I really appreciate it
11:19dnolenejackson: np, good to know it's not a native-deps thing.
11:19ejacksonyes, I apologise for casting that shadow on its good name :)
11:19dnolenha!
11:21ejacksonnow the question is where has the OA hidden the source for jriengine :)
11:28ogrimShould libraries be licensed under the Eclipse Common Licence as Clojure is?
11:29technomancyogrim: it isn't legally required or anything, but it's nice.
11:31ogrimtechnomancy: I'm pretty sure I've read it somewhere, but I cannot find any official recommandation :)
11:32Fossiit makes using things easier ofc
11:36raekogrim: one thing to watch out for is that GPL:ed code can't be combined with EPL:ed code (the GPL does not allow it). LGPL should be fine though, I think.
11:37ogrimthanks a lot! I will probably be using the ECL for my masters project
12:57seancorfieldmornin'
12:57dnolenSLLCLL: seive as fast as Java, https://gist.github.com/962877
12:57dnolenand w/ some macro fu, it's not even all that ugly.
12:59dnolenSLLCLL: will only work on 1.3.0 of course.
13:00dnolenSLLCLL: actually I cheated, it's actually faster than Java because of my identical? check.
13:00dnolenif that's removed, same perf as Java w/o long arithmetic.
13:00dnolensorry w/
13:05amalloydnolen: i plan to invent a product, and rather than actually implement it, just tell you it's slower than it would be in java
13:05amalloyso don't change anytime soon
13:10TimMcdnolen: Even Clojure 1.2, passing around lots of primitives?
13:11dnolenTimMc: ?
13:11fliebelamalloy: Will your product be in amalloy-utils?
13:11dnolenTimMc: my gist would be tedious in 1.2, because of lack of *unchecked-math* and tedious type hinting.
13:12TimMcOK
13:14amalloyfliebel: yeah, and i'll start charging $20 per git clone so i can finally make some money on (insert future brilliant product here)
13:33fliebelStrange, how I would use a Java lib last updated in 2005, while hesitating to use anything Clojure from last year.
13:44dysingerCAKE!
13:44dnolenhttps://gist.github.com/962877, sieve updated with idiomatic use of areduce. I'm not sure how much more idiomatic this little fast snippet of Clojure could be.
13:44pyrhi guys, what would you say is the best way to schedule a serialised access to a possibly non thread safe object
13:44pyri use agents for that
13:45pyrbut i always get bugged by the fact that the agent's value is of no use
13:46chouserpyr: that's probably the best as of today. keep your eyes open for news about pods, though.
13:47pyrpods ?
13:47pyra clojure 1.3 thing ?
13:49fliebelWhat about classic locking?
13:49fliebelchouser: I thought pods where about transients, not about random unsafe mutable data.
13:50amalloypyr: make the agent's value be the unsafe resource itself?
13:50pyryeah, that's what i do :)
13:51dnolenfliebel: transients are unsafe mutable data they're not supposed to leak out of the construction site.
13:51pyrfliebel: sure
13:51amalloy(send agent #(doto % (.write 10)))
13:51pyramalloy: yep
13:51amalloyit's a usage of agents recommended by JoC, so it gets my seal of approval
13:53pyrgood to know
14:18dnolenhuh, anybody tried to mess w/ InvokeDynamic on OpenJDK 7 OS X before?
14:28technomancydnolen: headius had some links in his tweets, but it may have been a while back
14:28dnolentechnomancy: funny enough I just came across one of his gists. Yeah looks like all the old InvokeDynamic stuff floating around on the web is not obsolete.
14:28dnolens/not/now
14:28sexpbot<dnolen> technomancy: funny enough I just came across one of his gists. Yeah looks like all the old InvokeDynamic stuff floating around on the web is now obsolete.
14:32scottjany libraries that take a date and give you one of those short descriptions like "a week ago" or "about 3 months ago"
14:33scottjdon't see anything for that in clj-time or joda but might have missed something
14:33fliebelscottj: I suspect these are to case-specific to have a general implementation, but I'd love to be wrong.
14:34fliebelI remember Twitter releasing a lot of their stuff lately, maybe there is something in there>
14:34technomancyscottj: isn't that often done client-side these days?
14:35TimMctechnomancy: To allow caching?
14:35technomancyyeah, and I think if you do it client-side you can avoid storing TZ data as part of your account records?
14:35scottjtechnomancy: yeah I've seen js ones http://ejohn.org/blog/javascript-pretty-date/
14:35amalloyscottj: you could steal the one sexpbot uses
14:36amalloy$seen rhickey
14:36sexpbotrhickey was last seen quitting 1 week and 2 days ago.
14:36fliebelI hoped you'd find one here: http://twitter.github.com/commons/apidocs/index.html#com.twitter.common.util.DateUtils
14:36TimMctechnomancy: Well, intervals may be TZ-independent, but the client still has to make sure to use the same TZ as the provided dates.
14:38dnolenwow, InvokeDynamic was first mentioned by Gilad Bracha in fall 2005.
14:46Raynesscottj: https://github.com/cognitivedissonance/sexpbot/blob/master/src/sexpbot/utilities.clj For sexpbot's implementation. I worked really, really hard on... getting amalloy to write that for me. :>
15:02fliebelWhat is the preferred settings storage format? XML, Clojure, JSON, YAML?
15:05hiredmanfliebel: support both clj and json together is pretty easy, and json provides nice interop with other tools
15:05technomancydepends on who's writing the settings
15:06fliebelme
15:06technomancyyeah, use clojure then
15:06fliebelBut I also realized I already have email header style settings in another place, so it's proably going to be that.
15:06fliebelcode reuse ftw
15:08hiredman:(
15:08technomancy,((comp clojure.java.io/read-string clojure.java.io/slurp clojure.java.io/resource) "clojure/test.clj")
15:08clojurebotjava.lang.Exception: No such var: clojure.java.io/read-string
15:08technomancyoops
15:08hiredmanuse java properties then
15:09technomancy,((comp read-string slurp clojure.java.io/resource) "clojure/test.clj") ;; <= re-use
15:09clojurebotjava.lang.IllegalArgumentException: No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil
15:09technomancywat
15:09technomancywfm
15:10amalloytechnomancy: jvm permissions. he can't open files
15:11technomancysecurity policy stuff?
15:11amalloyyeah
15:11amalloy,(.exists (java.io.File. "test"))
15:11clojurebotjava.security.AccessControlException: access denied (java.io.FilePermission test read)
15:13fliebelhiredman: The properties thing sound like what I want. Now I just need to find a reader that can read up to an empty line.
15:15hiredmanno, you need to read the javadocs
15:15fliebel:)
15:15amalloyjava properties, really? sends shivers down my spine. if you want something that doesn't interop well you might as well use native clojure structures, which will be easy to work with
15:15amalloyif you want something that interops well, use json. problem solved
15:15fliebelamalloy: I want something that goes nicely together with markdown.
15:17amalloywhat. why would you want that. you want the user-facing and machine-friendly versions of your config file to be the same?
15:17fliebelit'll be like "title: blah \n tags: foo, bar \n\n # markdown #"
15:18technomancyamalloy: well I used resource in order to get at the file in the jar
15:23ordnungswidrighow can I detect how often a stm tx is retried?
15:33amalloytechnomancy: fwiw i wouldn't expect resource permissions to be any more lax. ssl private certs could be stored in the jar, for example, so if you aren't trusted to read files you probably shouldn't read jars either
15:33Lemur13is there some way I could merge sorted sequences
15:34Lemur13for instance (1 8 10 34) + (2 4 6 9 10 22) = (1 2 4 6 8 9 10 22 34)
15:34technomancy(doc into)
15:34clojurebot"([to from]); Returns a new coll consisting of to-coll with all of the items of from-coll conjoined."
15:35amalloyLemur13: sounds like you want just the merge half of a merge-sort
15:35Lemur13yes
15:35Lemur13also eliminating doubles
15:35Lemur13duplicates
15:35amalloyuh, then something that is not a merge-sort at all :P
15:35Lemur13:D
15:35Lemur13well I can make a fn I guess
15:36amalloyLemur13: you can maintain a sorted-set
15:36amalloyif you can avoid doing the work of sorting the second sequence elsewhere, and move that effort to the sorted-set, it should be at least as efficient as sorting then merging
15:37Lemur13the sequence is pre-sorted
15:41fliebelOkay, Clojure settings it'll be.
15:43fliebelLemur13: Check merge* for the merge part of a merg-sort https://gist.github.com/951553
15:44Lemur13btw
15:44Lemur13is using peek and pop on sequences ok
15:44Lemur13or should I be always using first and rest
15:44fliebel&(peek (list 1 2 3))
15:45sexpbot⟹ 1
15:45chouserpeek/pop don't work on seqs, but using them on lists is perfectly ok
15:45fliebelFirst and rest are the way to go for lists.
15:46fliebelsquares? ( I was kind of surprised to see that pee work)
15:46fliebel*peek
15:47chouserfliebel: peek/pop use the (probably somewhat misnamed) IPersistentStack interface, which is explicitly supported by lists, queues, and vectors
15:48fliebelOh, right. And PersistentQueues also implement the lis thing, right? I found this in clojureatlast the other day.
15:49chouserI believe we have a little chart in "joy" to help you choose
15:49chouser,(pop ())
15:49clojurebotjava.lang.IllegalStateException: Can't pop empty list
15:49chouser,(rest ())
15:49clojurebot()
15:49chouseretc
15:50fliebelUhm, the book is in my reading queue :)
15:50chouser:-)
16:04arohnertechnomancy: are there any clever solutions for lein projects that have both regular dependencies and dev-dependencies?
16:04markoman_how can i convert "67" string to long?
16:05cemerick,(Long/parseLong "67")
16:05clojurebot67
16:05cemerickmarkoman_: ^
16:05technomancyarohner: I played with the notion of letting dev-dependencies inject code into the project process. too clever and not obvious though.
16:06markoman_thanks :)
16:07arohnertechnomancy: thanks. I'll keep thinking about it. I have a lein plugin (to daemonize a process) that needs to call code in the runtime child. In my case, it might not be too bad to just jam the code in eval-in-project's init section
16:07technomancyarohner: you could take it from the commit before I removed it from lein if you feel like taking a walk on the crazy side =)
16:08technomancyhttps://github.com/technomancy/leiningen/commit/f8831ed80f3982b67d44e048541ca238e3b6c9fe
16:09arohnertechnomancy: interesting. a simpler solution for me would allow a dev-dependency to create an additional normal dependency. or vice-versa
16:09arohnerif I could do that, a normal lein deps would fix my issues
16:09technomancy:both-dependencies? heh.
16:10technomancyif it's just clojure code that needs sharing and you know there's not chance of collision, that inject code may be feasible.
16:10scottjAre war files/servlets not supposed to start up long-running threads for cron-like jobs (reporting, polling, sending updates)? Adding a future to an init method on a servlet causes tomcat to complain about vars not being freed and tomcat quickly runs out of memory, not sure if separate threads not tied to responding to http requests have to be put in separate app.
16:10technomancyI don't want to include it in lein because the chances of collision are too high
16:11S11001001scottj: due to unloading/reloading the webapp?
16:13scottjS11001001: I think I experience even on the first load.
16:14mefestoscottj: is it a permgen error?
16:14scottjmefesto: yeah
16:14mefestoscottj: on jboss i've had some trouble with that and had to increase the perm size
16:14mefestoscottj: clojure creates many classes which eat up perm mem
16:15scottjS11001001: do you know what happens to a running future when an app gets reloaded?
16:15tomojlolwtfbbq https://gist.github.com/eb2f4c6b6daaff8c4bb4
16:15tomojrelevant bit: https://gist.github.com/f8f1e3c6e06b2f1d0d6a
16:15scottjmefesto: so it's fine to have a servlet start up several background threads for various tasks not responding to requests?
16:16scottjmefesto: and is init method the place to do it?
16:16mefestoscottj: not sure. i believe the springframework uses a job scheduler called quartz which does something like that
16:16S11001001scottj: no idea, but it's easy to clean them up manually in a servletcontextlistener that calls shutdown-agents
16:16mefestobut i don't really know so i don't want to lead you down the wrong path
16:17tomojoh.. is that one of the things they fixed in 1.2.1, I hope, desperately?
16:19hiredmanmefesto: evaling code (actually compiling) is the only thing that generates classes, so unless you are doing that, which seems unlikely
16:20tomojyes indeed :D
16:21mefestohiredman: just a guess. expanding the perm size fixed the issue for me
16:22hiredmansome containers like tomcat have known issues with permgen size
16:23mefestoyeah, especially if your app uses hibernate which a lot of java webapps do
16:30mefestoscottj: this thread might be of interest: http://groups.google.com/group/clojure/browse_thread/thread/b9e64ea3807b6c58/8703ddceb307ec0a?lnk=gst&amp;q=permgen#8703ddceb307ec0a
16:39mefestohiredman: im confused. when does compiling *not* happen in clojure?
16:40hiredmanmefesto: it doesn't happen at runtime
16:40hiredmanit happens at most once per compilation unit, unless the compilation unit does something like call eval
16:40mefestohiredman: isn't it compiled to bytecode at runtime unless explicitly aot'd?
16:40hiredmanonce
16:41technomancyyo dawg, &c.
16:41hiredmanso (def a (fn [a] ...)) that function is compile once, and (a) just runs the compiled function, and (a) runs the compiled function again
16:41mefestohiredman: right, that is what i thought
16:46micahmartintechnomancy: Any more thoughts on putting recent Leiningen releases on Clojars?
16:47gfrlogdoes ring parse query params, or is that done by jetty?
16:47technomancymicahmartin: no, I haven't thought through the implications of turning leiningen into a library
16:47micahmartingfrlog: Jetty does the querystring parsing
16:48gfrlogah hah. kay thanks.
16:48technomancyI'm still not sure why you don't leave the parts that need to be in leiningen in the plugin
16:48micahmartintechnomancy: If there's no harm in it... I could really use a recent release.
16:49micahmartinWell, I think they are still in the plugin... but when running my plugin through the shell wrapper, leiningen isn't in the classpath.
16:50technomancycan't the shell wrapper just call lein for some tasks?
16:51micahmartinYeah... and pay the price of two JVM boots
16:51technomancynot if the shell wrapper just has a list of which tasks go to which tool
16:51micahmartinBut what's more... I can't test my code that uses leiningen stuff... cuz the existing library is out of date.
16:51technomancythat's how it handles rlwrap right now
16:51technomancythat's what :eval-in-leiningen is for
16:52micahmartinDo you mean I should edit the shell wrapper script?
16:53micahmartinI guess I need to research :eval-in-leiningen...
16:53technomancysure, the shell wrapper can dispatch plugin tasks to the plugin and non-plugin tasks to your own tool.
16:54tufflaxI want to make a game. I've read a few times about developing with the application running, and that it's the lisp way to do things. That sounds good but how do I actually do it? The repls I've used blocks while computing stuff. I mean, do set it up "manually" using two threads or is there some kind of standard?
16:54tufflaxs/blocks/block
16:54sexpbot<tufflax> I want to make a game. I've read a few times about developing with the application running, and that it's the lisp way to do things. That sounds good but how do I actually do it? The repls I've used block while computing stuff. I mean, do set it up "manually" using two threads or is there some kind of standard?
16:58micahmartintechnomancy: The shell wrapper it generated... is there a simple way to specify use a custom shell script?
16:58S11001001tufflax: that's usually the easiest, though it depends on how easy it is for you to start your stuff from the repl
16:58arohnertechnomancy: why is the handler argument to eval-in-project deprecated? is there any other way to modify the Java object before it's run?
16:59micahmartinAlso... this still doesn't answer the need to unit test my code that uses leiningen.
16:59tufflaxS11001001 you mean 2 threads?
17:01S11001001tufflax: yeah
17:02S11001001I mean, you've got a main function, maybe that sits in a UI loop, so instead of (main-) say (future (main-)) at the repl
17:02S11001001but if you're trying to test a webapp inside of tomcat proper, for example, then that's something entirely different
17:04technomancymicahmartin: yeah, sure; lemme see
17:04tufflaxS11001001: OK. thank you!
17:05technomancymicahmartin: it's :shell-wrapper {:bin "bin/foo"}, which gets called with format, so put %s %s in for the classpath and -main namespace.
17:07technomancyarohner: the only use I knew for altering the Java object was to change the classpath. did you have something else in mind?
17:08arohnertechnomancy: yes, I want to call (.setSpawn java true). Let me see if that works, first
17:10micahmartintechnomancy: cool thanks. What about testing my code? Anyone who's building a plugin has got to be in the same situation.
17:10micahmartin... can't unit test code that uses leiningen directly.
17:12technomancymicahmartin: testing plugins with :eval-in-leiningen has worked well for me
17:14technomancyis that not working?
17:14micahmartinI haven't tried it because it I typically don't run tests using lein command
17:15technomancyit will also make repls and swank sessions run in the lein process
17:22lnostdalhi guys.. is the latest swank-clojure (from git) known to work with the latest slime (also from git)?
17:24technomancylnostdal: known to not work
17:24lnostdalok, thanks
17:28micahmartintechnomany: Looking at Leiningen source code... I think I see where you're going with :eval-in-leiningen... I'm gonna mull this over during my commute home.
17:35pjstadigtechnoutilitarian!
17:35lnostdaldowngrading slime at the moment, but perhaps emacs is too new also? .. i'm using 24.0.50.1
17:36technomancylnostdal: that's what I'm on. it's the version of slime that it's picky about; see the swank-clojure readme
17:38lnostdali can't see anything specific about slime version there, i think .. just that it should be newer than the one usually provided by distros
17:38rcgtechnomancy: "... or the technoone" - technospock is always right
17:38rcgscnr
17:39technomancyrcg: but of course
17:39technomancylnostdal: the version you want is on marmalade-repo.org, or you can look on my github fork of slime if you want to do it by hand.
17:41lnostdaltechnomancy, your repo works .. awesome; thank you ..... :) .. (i like knowing what the hecks going on; so just git and simple non-auto-type tools to begin with)
17:42technomancysure, suit yourself
18:06arohnertechnomancy: (.setSpawn java true) works (on OSX and linux at least). Should I just use handler, or would you like a different patch for eval-in-project?
19:11_ViWhen I use "(use 'my.namespace :reload-all)" second time (after changing the source) in "lein repl" it fails to output error message if there is error. How to get the error message?
19:24dnolennew blog post: Lispers know the value of everything and the cost of nothing, http://dosync.posterous.com/lispers-know-the-value-of-everything-and-the
19:24KirinDave_Void style.
19:26hiredmanit makes me feel like I have a handle on the cost of things, until I look at the macro expansion of the logging macros from contrib logging
19:44seancorfieldbay area clojure user group tonight - who's going?
19:50hiredmanI have a test run that will take from now till the heat death of the universe, so not going anywhere in seattle, let a lone in the bay
19:51Deranderhiredman: you are one hour from me
20:06carllercheWhat do people do when editing java files? Do you jump to an IDE or use emacs? (the java mode seems to be pretty bad)
20:06hiredmanwhy would I edit java files?
20:08carllerchei still have java I need to use and don't feel like rewriting it in clojure yet
20:32zrilakI can't Java in Emacs, seriously. Java requires much more information on screen than what I can get from Emacs, and CEDET etc. don't even come close to what you get in modern, mature IDEs, let alone refactorings. Java is just like that, it wants heavy scaffolding around the code.
20:33justinlillyzrilak: if you find an acceptable solution, I'd give you money.
20:33zrilakActually I'm doing pretty fine in IntelliJ IDEA + La Closure -- just a few percent of what Emacs does, but enough for comfortable work
20:33justinlillynot sure how much.. but definitely some.
20:34zrilakA solution to what exactly? :)
20:35justinlillyI want eclipse/intellij for emacs, basically.
20:35zrilakeh.
20:35zrilakoh hey, how about Emacs for IDEA? That might be doable
20:35justinlillyactually eclipse has a reasonable emacs mode
20:35zrilakbetter than IDEA's, in fact
20:36justinlillyyep. emacs+ is what its called. 3rd party.
20:36zrilakyeah, it even supports marks, IIRC
20:36zrilakand kill ring
20:37justinlillyyep. Still not the same though. Totally lacks the ability to write a little function to do some repetitive task.
20:38zrilakthe solution is easy
20:38zrilakrewrite Emacs in Clojure i.p.o. ELisp, and hook it up to Eclipse/IDEA's windowing system instead. O:-)
20:39zrilakoh, and assign extra meta keys for all those IDE-specific bindings
20:39hiredmanI opened intellij the other day, saw it opened class files, never having written elisp before I wrote a mode and hook for file loading that opened a buffer with the javap output when you open a class file in emacs
20:40hiredmanthe hook took about an hour, the mode (syntax hilighting) took a few days to figure out
20:40zrilaksounds cool
20:40hiredmanhttps://github.com/hiredman/javap-mode/blob/master/javap.el
20:41hiredmanhttp://www.thelastcitadel.com/images/javap-mode.png
20:41hiredmanin intellij you just get method signatures when you open a class file
20:42zrilakobligatory "I like the color theme"
21:03dnolenhiredman: that javap.el thing is pretty cool.
21:03hiredmanthanks, I am very proud of it given it is my first elisp :)
21:18joshua__Hey, what is infinity in Clojure?
21:19tomoja double?
21:20tomojis that a trick question?
21:20Raynes&Double/POSITIVE_INFINITY
21:20sexpbot⟹ Infinity
21:20Raynesjoshua__: ^
21:20joshua__Raynes, Thanks
21:21joshua__tomoj, Nope. I thought there was a Clojure specific Infinity.. =/
21:22tomojhuh, didn't realize that prints unreadably
21:22tomojer.. unevalably?
21:23tomoj..readably but wrongly
21:23dnolen&Float/POSITIVE_INFINITY
21:23sexpbot⟹ Infinity
21:26Dumas=