#clojure logs

2009-12-16

00:08_atotechnomancy: http://meshy.org/~ato/tmp/rockstar.jpg :-P
00:09_atojust kidding, it's really: http://meshy.org/~ato/tmp/me.jpg
00:09technomancy\m/
00:09technomancylooks like early-collective-soul hair; nice.
00:16metvopThis is OK: (def rands (repeatedly rand)) (take 4 rands) But this: (def infinite-rand-binary (repeatedly (rand-int 2))) (take 4 infinite-rand-binary) throws a ClassCastException. ???
00:16tomojyou missed a #
00:17tomoj,[(rand-int 2) #(rand-int 2)]
00:17clojurebot[1 #<sandbox$eval__3689$fn__3691 sandbox$eval__3689$fn__3691@168cd47>]
00:18metvopah ha. thx, tomoj
00:18technomancywhew; made it through my backlog of lein/swank mail
00:18technomancybut ran out of time to do any actual coding myself. =(
01:39defnhow does one go about documenting all of the documentation in core
01:39defnerr printing the documentation
01:40defnspecifically im trying to print all of the documentation for every form to files based on the name of the form
01:48alexykHow do you take a slice of a vector [1 2 3] to get [2 3]?
01:49defnalexyk: (rest [1 2 3])
01:50defn(drop 1 [1 2 3])
01:50alexykdefn: (rest [1 2 3]) is not a vector
01:50defnoh duh, sorry
01:50alexyk,((rest [1 2 3]) 1)
01:50clojurebotjava.lang.ClassCastException: clojure.lang.PersistentVector$ChunkedSeq cannot be cast to clojure.lang.IFn
01:51alexyk,(vec ((rest [1 2 3])) 1)
01:51clojurebotjava.lang.ClassCastException: clojure.lang.PersistentVector$ChunkedSeq cannot be cast to clojure.lang.IFn
01:51alexyk,((vec (rest '[1 2 3])) 1)
01:51clojurebot3
01:52alexykbut I wonder if there's a simpler way without converting to seq and vec
01:53defn,(let [[_ x y] [1 2 3]] [x y])
01:53clojurebot[2 3]
01:55defnalexyk: does that work for you
01:57alexykdefn: works ok
01:57defnI was thinking you could do something like
01:57alexykstill not very general...
01:57defn,(let [[_ x & xs] [1 2 3 4 5]] [x xs])
01:57clojurebot[2 (3 4 5)]
01:58defnnot the best, still a bit of "incidental complexity" there
01:58defnsome crap you need to carry around with you
01:58defnalexyk: are you against using contrib?
01:59alexykdefn: not at all, don't know it much yet :)
02:00defnyou could write a slicer fn
02:00defnit wouldnt be very hard
02:01alexyksure
02:03defnalexyk: here it is
02:04defn,(subvec [1 2 3] 1 3)
02:04clojurebot[2 3]
02:04defn:)
02:05alexykah!
02:05alexykloovely
02:05defnyou can also just set the start
02:05defnand it will use count vec as the end
02:05defn,(subvec [1 2 3 4 5 6] 1)
02:05clojurebot[2 3 4 5 6]
02:11defnalex wissenberg - suite bergamasque: 3. Claire De Lune
02:13defnweissenberg
02:14LauJensenGood morning gents
02:15alexykLauJensen: morning!
02:15defngood morning sir
02:15defnLauJensen: how would you suggest getting documentation for all of clojure.core
02:15defnall of the (doc x) stuff
02:16alexykSay I have a seq of pairs. ([1 2] [2 3] [7 5] ...). I can sort it by first with (sort-by first myseq); but then the seconds will be in random order. How'd I sort first by first, second by second?
02:16LauJensenah Theres a project on Github which extracts that and outputs an HTML I think
02:16LauJensenlemme check
02:16alexykLauJensen: so you're the author of ClojureQL, right?
02:16LauJensenalexyk: One of them, yes
02:16alexyknice
02:17LauJensenalexyk: I don't see how you can make that sort with out 2 successive calls to sort, ie sort-by first, sort-by second >
02:17alexykLauJensen: so I guess I'd have to give an exact comparator
02:18alexykyou mean you don't see, i.e. it's not possible?
02:20LauJensenDepends a little on what you want. Say you have [1 3] [2 2] [3 1]. Then ordered by first you have a, b, c, sorted by second its c b a - which do you want ?
02:20defnalexyk: you could just write another sort-by
02:20defnjust copy/paste the existing code for sort-by and reverse them
02:21defnactually, that's an idea
02:21defnreverse your vectors
02:21defnerr your pairs
02:21alexykI mean [1 2] [1 1] [2 1] must become [1 1] [1 2] [2 1] -- equal firsts are together, and within them seconds are sorted
02:21alexykI need control on asc/desc at each level
02:22defnso it becomes [1 1] [1 1] [2 2]?
02:22alexykno, pairs stay intact
02:22defnohhhhh! i see what you mean
02:22alexykso it's sorting pairs as units
02:22defnhmmm
02:23LauJensen,(sort-by first < (sort-by second < (list [1 2] [1 1] [2 1])))
02:23clojurebot([1 1] [1 2] [2 1])
02:23LauJensenIts that what you're thinking?
02:23defnnice
02:23defnwhat is the < ?
02:23LauJensenless than
02:23defnoh, i didnt know you could use it there
02:23LauJensenthats the comparator
02:23alexykLauJensen: yeah
02:23defnLauJensen: wutsacomparator?
02:24LauJensen,(< 5 4)
02:24clojurebotfalse
02:24LauJensenIts a predicate, if it evals to true it swaps, it not order remains
02:24defnoh sure, i just didnt think it'd be able to be sandwiched in with that first
02:24alexykLauJensen: btw, I found mmcgrana's clj-jdbc, and asked what's different about that. He remarked interestingly, I'd like your opinion: http://paste.pocoo.org/show/157328/
02:24LauJensenI think thats impossible, you need 2 runs
02:25LauJensenalexyk: What was his remark ?
02:25alexykin the paste
02:25LauJensensec
02:26defndestructuring is too cool
02:26LauJensenalexyk: His remark is invalid as the call to query he makes in the pseudo ClojureQL code, will result in a native Clojure hashmap which you can manipulate
02:26defnit's like "here, arrange these two things however the hell you want"
02:26defnor 10 things of course
02:27defn[[_ x _ _ y _] [1 2 3]]
02:27defnthat's just too cool
02:27alexykLauJensen: what does the resulting hashmap look like?
02:28defnLauJensen: do you know how one might go about getting the documentation for each form in a namespace
02:29LauJensenclojureql> (query table1 [a b c] (= a b))
02:29LauJensen{:columns [a b c], :tables [table1], :predicates [= a b], :column-aliases {}, :table-aliases {}, :env []}
02:29LauJensenat alexyk
02:29LauJensendefn: You mean dynamically ?
02:30alexykthx!
02:30alexyknice
02:30LauJensenYes we think so
02:31defnLauJensen: nah, just the bare bones of 'clojure.core
02:31LauJensendefn: then clojure.org's API page should do you well ?
02:31defnohh, no, i see waht you mean, yes, dynamically
02:32defni want to print out the docstring for each clojure form to a file
02:32defnseparate files
02:32defnbased on the name of the form
02:32defnlike accessor -> accessor.txt
02:32defnwhich contains the docstring
02:34LauJensendefn: the project I wanted you to see isn't on github
02:35defni bet i know what it is
02:35defncontrib-autodoc
02:35defntom faulhaber?
02:35_atodefn: ns-publics
02:35_ato+ meta
02:36defnhmmm
02:36defn,(vals (ns-publics 'clojure.core))
02:36clojurebot(#'clojure.core/sorted-map #'clojure.core/read-line #'clojure.core/re-pattern #'clojure.core/keyword? #'clojure.core/val #'clojure.core/chunked-seq? #'clojure.core/find-protocol-impl #'clojure.core/*compile-path* #'clojure.core/max-key #'clojure.core/list* #'clojure.core/ns-aliases #'clojure.core/the-ns #'clojure.core/== #'clojure.core/chunk-buffer #'clojure.core/longs #'clojure.core/special-form-anchor #'clojure.core/ins
02:36defnnice
02:36defnty
02:45LauJensen,(doseq [funcs (sort-by (comp :name meta) (vals (ns-interns 'clojure.main)))] (prn (:doc (meta funcs))))
02:45clojurebot"Evals expressions in str, prints each non-nil result using prn" "Print help text for main" "Returns the handler associated with an init opt" "Load a script" "Common initialize routine for repl, script, and null opts" "Called by the clojure.lang.Repl.main stub to run a repl with args\n specified the old way" "Called by the clojure.lang.Script.main stub to run a script with args\n specified the old way" "Loads Clojure sour
02:46LauJensenI think that will dump all docs from a namespace, format to your liking
02:46LauJensen@ defn
02:55alexykcan you nest ->> ?
02:56alexykhere's a puzzle: this works:
02:56alexyk,((fn [[xs ys]] [(mean xs) (mean ys)]) (->> '([1 2][2 3][5 4]) (reduce (fn [[xs ys] [x y]] [(conj xs x) (conj ys y)]) [[][]])))
02:56clojurebotjava.lang.Exception: Unable to resolve symbol: mean in this context
02:56alexykargh
02:56alexykwill paste tmrw :)
02:57_atowell you can nest ->> but it probaby won't do what you want it to do
02:57_atonesting -> makes a lot more sense
03:00defnLauJensen: thanks
03:04LauJensennp
03:54LauJensenJust to be clear, this post states that Clojure now outperforms Scala on Widefinder? http://meshy.org/2009/12/13/widefinder-2-with-clojure.html
04:05LauJensenOh, Disclojure says so
04:17_atoLauJensen: heh, well Scala could do exactly the same thing I'm doing there with Clojure. So could Java. But I've a least shown that there's nothing stopping you from writing Clojure code that performs well and you don't have to go to a huge amount of effort, aside from the mentioned problems with Java's IO library
04:18LauJensenOh, that blog post is your doing?
04:22carkjust finnished reading it, nice read
05:08adityogood afternoon
05:08adityo,'("a" "b")
05:08clojurebot("a" "b")
05:09adityoany good ways of converting the list into a hash-map
05:13Raynesadityo
05:14Raynes,(apply hash-map '(a b c d))
05:14clojurebot{a b, c d}
05:19adityoRaynes: god bless you
05:19adityo:)
06:42hipertrackerDo I need to set something to display utf8 strings in Clojure? For instance that code launch swing window but the text is corrupted: (. javax.swing.JOptionPane (showMessageDialog nil "Zażółć gęślą jaźń"))
06:44Chousukemake sure Java's default encoding is set to UTF-8
06:45Chousukealso, (javax.swing.JOptionPane/showMessageDialog nil "whatever") is the more idiomatic form for static method calls :)
06:46Chousuke(and (.method obj args) for instance methods/fields)
07:04fliebelHow do you guys design applications? I always start coding right away. This time I decided to make a nice flowchart, but it seems so pointless… I already know what I want to do.
07:11briansheehanHi, I'm looking for help on how to compile a clojure name space to a .class and package it in a jar file
07:16_atofliebel: yeah, I've never been much of a flowchart/uml/specifications guy. I'll think about the problem for a bit and then just start hacking on it. If I'm designing a data structure or something I might pull out the paper and scribble some diagrams, and I might do the same if I'm about to do something complex and want to bounce it off some colleagues, but it's just throwaway stuff, I never look at it again. I do tend to scribble
07:16_atodown notes a bit, but its more about data examples and such rather than the code
07:18briansheehan_Hi, can anyone tell how I can compile a .clj file to a .class file?
07:18esji agree. The critical element is to write tests as you go.
07:19_atobriansheehan_: there's an example here: http://clojure.org/compilation
07:21_atoor if it's more compilation and packaging you're after, rather than creating a java-compatible class, check out Leiningen: http://github.com/technomancy/leiningen
07:22briansheehan_thanks, I'll have a look at those
07:40fliebelesj: I never write official test either, but I admit that is a bad idea. I do write some stuff that checks the output of a function, but nothing like a test directory to store tests and test the system against.
07:41esjfliebel: I never used to either, but learnt that lesson hard.
07:42LauJensenHas anybody here had any trouble with ClojureQLs new Gradle setup, or is it working flawlessly across the board?
07:50fliebelHas anyone used QT with Clojure?
07:57cemericksome people were experimenting with using jambi + clojure some months back
07:57cemerickit being de-supported isn't helping current usage, I'm guessing
07:57LauJensenfliebel: Yea I've done a bit
07:57LauJensen~gitdoc
07:57clojurebotgitdoc is http://github.com/Lau-of-DK/gitdoc/tree/master
07:58LauJensenIf thats still up, then thats a Git Log Tree Viewer in Clojure/QT
07:58LauJensenIts been ages though
07:58LauJensenWhen it got OpenSource I gave up interest, despite being in version 4.x it was fundamentally flawed
08:05cemerickI wish Sun had bought QT and used it as the basis of swing 2 :-P
08:05fliebelso what is the preferred way to write a gui in Clojure?
08:06cemerickyou can easily use swing or swt
08:06cemerickand there's the respective RCP's (eclipse and NetBeans RCP)
08:06fliebelI did a little Swing in my Java times… I think it's ugly and verbose...
08:07cemerick*all* UI code in any language is ugly and verbose.
08:07cemerickIMO, if you're coding the UI by hand, you're doing it wrong.
08:08ChousukeQt is GPL though. I wonder if that has any effect on its use with Clojure :/
08:09cemerickare Qt licenses particularly expensive?
08:09fliebelHmm, I wonder if I can use XCode to create a nice gui...
08:09dabdI'm trying to port some java code to clojure is it recommended to use clojure-git or clojure-1.0.0? I had some issues with clojure-git and enclojure so I switched back to 1.0.0 but I wonder if I am missing important language features. thx
08:10Chousukedabd: 1.1 is coming soon (hopefully) so going with git master for now probably won't be too problematic.
08:11LauJensenfliebel: Preffered way of writing UI: Compojure/HTML :)
08:12dabdChousuke: clojure-git is not working with enclojure. I am unable to start the REPL
08:13dabdis anyone successfully using enclojure with clojure-git?
08:13fliebelLauJensen: Hmm, since I'm a web developer that wouldn't be a crazy idea...
08:14cemerickdabd: the 20091103 build is broken in that way for me as well; the 20090922-patch1 build is very solid: http://github.com/EricThorsen/enclojure/downloads
08:14fliebelFor me not writing a GUI by hand confuses me because I don't know what's going on.
08:15cemerickfliebel: once jwebpane shows up in swing, then we can all just do UIs using web bits, which will be pleasant.
08:15fliebelcemerick: QT already has webkit :D
08:15Chousukehm
08:16cemerickfliebel: it's better that you don't know. Layout managers, etc. are too complex for people to use.
08:16dabdcemerick: I tried it and had the same issues too. The only way was to switch back to clojure-1.0.0
08:16Chousukeapparently Qt has a GPL exception that specifically allows using it with EPL.
08:16ChousukeAnd a bunch of other licences
08:16cemerickdabd: hrm, that problem I don't have -- running very near the head of the new branch here.
08:17cemerickI have zero interest in screwing with native libs. Totally not worth the hassle.
08:17fliebelcemerick: I can't stand things I don't understand...
08:17cemerickfliebel: if you don't stand on the shoulders of giants, you'll not see as far as everyone else :-)
08:18dabdcemerick: so you're using the new branch with 20090922-patch1 ? I'll try that
08:19cemerickdabd: yes -- not HEAD, but close to it. Haven't switched over to using the builds from build.clojure.org yet
08:19fliebelcemerick: but if your giant is heading in the wrong direction, how much does that buy you?
08:20cemerickfliebel: what's the right direction in this particular circumstance? *every* UI toolkit provides visual designers at this point, very sophisticated ones at that, simply because they're necessary in order to get stuff done.
08:20cemerickThe fact that I can't do the same in a web environment is a constant frustration for me.
08:21angermancan I turn a struct into a map?
08:22angermanBaiscally I want to do {(:id struct) (dissoc struct :id)}
08:22fliebelcemerick: so the conclusion is that gui toolkits should learn from css, so that norma human beings can read and write it.
08:23cemerickfliebel: people who know CSS can read and write it, and I'm unfortunately one of them. CSS, the box model, blah blah blah is just as complicated as Swing or winforms or...
08:23cemerickrelative to what you can do with it, that is
08:24fliebelSo maybe I'll go with QT, that is one technology to learn, but is usable on any platform and in any major language.
08:25cemerickhas jambi been resurrected at all?
08:25fliebelnot sure...
08:29fliebelthis seems alive: http://qt.gitorious.org/qt-jambi
08:29lpetit,(doc intoà
08:29clojurebotEOF while reading
08:29lpetit,(doc into)
08:29clojurebot"([to from]); Returns a new coll consisting of to-coll with all of the items of from-coll conjoined."
08:30cemerickhuh, so it does -- I didn't realize Qt had taken out a spot on gitorious as well
08:30cemerickfliebel: if you come across a concrete status/"roadmap" statement about jambi in your spelunking, do share.
08:33lpetit> ,(type (-> (create-struct :a) (struct 'a)))
08:33lpetit,(type (-> (create-struct :a) (struct 'a)))
08:33clojurebotclojure.lang.PersistentStructMap
08:33fliebelmeh, only the main qt roadmap: http://qt.nokia.com/developer/qt-roadmap
08:33lpetit,(type (into {} (-> (create-struct :a) (struct 'a))))
08:33clojurebotclojure.lang.PersistentArrayMap
08:33lpetitangerman: I guess this answers your question ?
08:34angermanlpetit: yes, thanks
08:36cemerickfliebel: this was the last interesting thing I saw w.r.t. jambi's status/plan: http://labs.trolltech.com/blogs/2009/05/11/qt-jambi-450_01-released-contributors-wanted/
08:38_atoI had a play with the 4.6 community version
08:38_atoit takes ages to compile but seeems to work fine
08:38cemerickit's 2 years from now that'd I'd be worried about
08:40froogwhat's wrong with swt?
08:40cemerickthat's what I would tend towards if I absolutely needed native components
08:41cemerickI personally prefer swing's model and API, but that's a matter of taste.
08:42froogI've never tried swt myself, only swing. But I do prefer the native look of swt
08:43cemerickthat's always confused me about swt -- the components don't look particularly "native", insofar as I can spot an swt app in half a beat.
08:59fliebelcemerick: I think it's not about the widgets, but their layout.
09:01cemerickfliebel: totally from memory (haven't used an swt app in a long time), the default tab panes are always wonky on OS X -- the color isn't quite right, and the tabs are shifted up a few pixels than it seems they should be *shrug*
09:02lpetitcemerick: yes, swt applications using CTab do not use native widgets, AFAIK
09:04froogname a jambi app I could test run, I'd like to see how the gui looks
09:05fliebelfroog: qt includes a whole load of examples… it should look the same as any qt binding.
09:06_atofroog: http://en.wikipedia.org/wiki/Qt_(toolkit)#Applications_built_using_Qt
09:06_atolikely you're already using something that uses qt
09:06froogfliebel, _ato: thanks
09:07froogno need to test then :)
09:07lpetitcemerick: http://help.eclipse.org/galileo/topic/org.eclipse.platform.doc.isv/reference/api/org/eclipse/swt/custom/CTabFolder.html (it's in the "custom" package of swt, I guess where composites not deriving from native widgets are placed
09:08fliebel_ato: not any applications i'd use daily. the closest: Opera, Skype and VirtualBox
09:22octehas the defmulti signature changed recentlyish?
09:37fliebeldefn: are you there?
10:59haptiKanyone here attending clojure london dojo in january?
11:14Ankouhi. is it possible to develop a GUI application with swing without remembering state explicitly? For example, when I click on a button and want this to be remembered so that another button does something else the next time. Do I need state or is there a more functional way?
11:15gianlucadvHi! I have a program written in a purely-functional style (i.e. no refs, agents, atoms) which spends roughly 70% of the time in RMI TCP connections (more precisely in thread pool executor worker run). Any hints in optimizing my program? Thanks
11:16kwatz__|wrkaAnkou: I've been trying out the pattern described here: http://groups.google.com/group/clojure/msg/e10960d88a87350c?pli=1
11:16kwatz__|wrkaI like it quite a bit so far
11:17zaphar_psAnkou: functional apps have state they just they just don't have mutable shared state. It's not as limiting as it first seems
11:17chouserwell, a GUI *is* mutable shared state
11:18chouserbut clojure gives you the tools to manage exactly that, via the reference types
11:23rb__anyone can tell me how to install clojureql with gradle? instructions by lau tel how to install gradle+clojuresque, but not clojureql :-)
11:56lpetitchouser: off topic question, but since you're a well known javascript expert: do you know of a good basis project for writing an editor in javascript, e.g. a source-code like editor (with syntax coloring, code completion, etc.) ?
11:56lpetitsorry for the possible repetition of the question, but my IRC client is weird today ...
11:57rysfreenode's been a load of crap today, too
11:57chouserlpetit: hm... I have attempt to start such a project...
11:58lpetitchouser: I know there is some effort for putting eclipse editors online, not sure it's possible to get just the interesting part though ...
11:59chouserthe main early question I confronted was whether to use a textarea or html for the main body of the editor
11:59chousertextarea is much better behaved, standard, etc. but you can't have any colored or styled text, afaik.
12:06chouserlpetit: perhaps http://www.netpadd.com/b ? I haven't looked at it too deeply.
12:08lpetitchouser: thanks for the link, I'll check that. There's also Eclipse RAP (e.g. http://rap.eclipsesource.com/e4-contacts/org.eclipse.e4.demo.contacts.product?startup=org.eclipse.e4.ui.workbench.swt.application ) I have to check, since our RDA technology is already made via Eclipse plugins
12:16hipertrackerHow to display all available symbols in current namespace? Is there something similiar to pythonic dir() ?
12:19stuartsierrahipertracker: ns-publics, ns-interns, ns-map, ...
12:26doublindirectionis there a way to tell swank to display stdout in the repl? System.out.println output shows in the *inferior-lisp* buffer but not in the repl
12:28lpetitchouser: I must, leave, but look what I've found ! http://marijn.haverbeke.nl/codemirror/
12:30Chousukehmm
12:30Chousukemy reader seems to work pretty nicely on top of the new branch
12:31ChousukeBut looking at it now, the design is not very flexible. It's easier to hack than the java version, but that's it :P
12:31jasappChousuke: is your reader up on github?
12:32Chousukenot this new-branch one, but yes.
12:32jasappok
12:34Chousukeright now the reader just reads stuff character-by-character and tries to transform that into clojure data structures.
12:35jasappas opposed to some kind of tokenization?
12:35Chousukeyeah.
12:36jasappI don't have any idea whats involved, but that doesn't sound too bad as a next step
12:37ChousukeI think It'd be much easier to work with a stream of open-paren-token, text-chunk, whitespace-chunk, newline ...
12:37jasappoh, I'm confused :-)
12:38jasappI thought thats what you were working with
12:38Chousukenah, right now it works with just characters and does a multimethod dispatch on each :P
12:39jasappahh, gotcha
12:39Chousukemakes reader macros trivial, but hmm...
12:39jasappwhat is performance like, or does it really matter?
12:40ChousukeI haven't even benchmarked it.
12:40Chousukeit's fast enough :)
12:40Chousukeat least for now.
12:40jasappcool
12:41ChousukeI think if I did this chunking approach I could return "continuations" to the reader part. like "I ran out of stuff to read. if you have any more, call this."
12:41jasappinteresting, I'm trying to think of applications
12:42Chousukewell, the reader wouldn't necessarily have to crap out when reading (str "foo<EOF>
12:42jasappahh
12:46akingdoublindirection: (add-hook 'slime-connected-hook 'slime-redirect-inferior-output)
12:47doublindirectionaking, that worked great, thanks
13:09devlinsfstuartsierra:ping
13:26chouserdevlinsf: I finally read your docs and code for the map-utils. I hope to have some comments for you later today.
13:26devlinsfchouser: Okay, cool
13:27devlinsfchouser: Figurd you're busy w/ 1.1
13:29dysingerpoor freenode :(
13:30qedtwbray's post on _ato's implementation sounds a lot like sour grapes
13:30dysingerbecause it wasn't clojurey enough ?
13:30dysingerI just quickly scanned it and that's what I read
13:30qedyeah, and how "my version was cleanly bisected into a file-reader to which you could pass an arbitrary user function, and the actual stats comutation"
13:31qedit's kind of like...so what-- his took 8minutes
13:33qedand yeah, the whole "he used AtomicLongs", ato's response in the comments is pretty much dead on: "I needed an atomic counter. That's why I picked it."
13:33BrianB04Good afternoon all.
13:35bagucodetechnomancy: Hello. I fixed the issues you mentioned regarding the native lib compile support. I think I got the merge right ;)
13:37hiredmanqed: I doubt it, I would check logs for twbray's realtime response in channel
13:37hiredmanvery positive
13:40rhickey2010 funding crosses the 50% mark, as relevance and many more individuals come on board - thanks all! http://clojure.org/funders
13:40devlinsfHurray
13:40hiredmanoooo, google-o-meter
13:41technomancyrhickey: could you add my name? I donated before you were asking permission to post names. thanks.
13:41dysingerrhickey: good news
13:41rhickeytechnomancy: sure thing
13:42_fogus_rhickey: Congratulations. A great thing that's happening there
13:42dysingerWell let's not get too excited - I would not be jumping around happy about being able to pay 50% of my bills for the year.
13:43qedheh, good point
13:43qedalright! i can feed half of my kids!
13:43technomancythat only works if you're single and able to become a coding hermit for the purposes of science
13:45technomancybagucode: sweet. I hope to be able to get back to my patches queue either tonight or tomorrow night.
13:45technomancythanks
13:47bOR_dysinger - the call has been out for what, 24 hours?
13:47bOR_I guess a lot of people haven't seen it yet.
13:47technomancyI'm not so sure; buzz builds and fades _really_ fast in twitter-land at least.
13:47dysingery it's good stuff - but buzz does fade fast
13:48bOR_I was planning not to donate before 2010 actually started :). 2009 was already taken care of.
13:48technomancyit's been at least 3 days; with peepcode sales the third day was less than 25% of the first day.
13:48bOR_interesting.
13:48technomancybut I guess this is different since company sponsorships take longer
13:50bOR_the old sourceforge donation page is also still around.
13:52mtmis the 'clojure cheat sheet' source tucked away on github anywhere? would be nice to update it a bit...
13:52jasapprhickey: you have a new donation, it's fine to use my name btw
13:59grantmichaelsi'm not done donating, just waiting to get paid again to "finish" for the time being =)
14:10chouserrhickey: have you considered doing call-site caching ala (:foo bar) for regular unhinted Java method calls?
14:19defngrantmichaels: same here
14:25r2q2Stupid question but is there an actual number behind the funding target for clojure?
14:26grantmichaelsr2q2: there's a meter as of yesterday =)
14:26stuartsierradevlinsf: pong
14:34fliebelHow hard is it to set up my own little smtp server with Clojure? With Python I can do that with a few lines. I want to make something like my private Posterous for my own cms, maybe together with defn, if he is there...
14:38devlinsfstuartsierra: Sorry, ping back
14:39stuartsierradevlinsf: ping, pong, sping, ...
14:39defnfliebel: im here
14:39rhickeychouser: yes
14:40defnrhickey: any chance you could get something set up to donate monthly?
14:40defnlike 10$/month
14:41devlinsfstuartsierra: I was reviewing the changes doc and found and interesting statement about clojure.template
14:41rhickeydefn: paypal has a subscription thing, I've never tried it
14:41devlinsfstuartsierra: From the doc: Used to implement the "are" macro in clojure.test, and not recommended otherwise.
14:41defnrhickey: *nod* -- I just donated to Wisconsin Public Radio and I found their monthly donation thing to be kind of nice for someone like myself that's a poor student
14:42cemerickstuartsierra: saw your msg on the clojure-maven-plugin list -- shouldn't it be more of a matter of exec'ing the right 'java', rather than piling everything into maven's process?
14:42devlinsfstuartsierra: should this ns not be used by the end developer?
14:42r2q2rhickey: Are you opposed to lower donations?
14:43stuartsierradevlinsf: anyone is free to use it, but I'm assuming it won't be very useful
14:43stuartsierracemerick: It could work that way, but should be faster to run in the same JVM.
14:44devlinsfstuartsierra: Right. I know you hads a different idea when you wrote it, and things changed. This brings up a difficult question
14:44devlinsfstuartsierra; Should clojure.template exist, or should the two macros be placed in clojure.test?
14:45stuartsierradevlinsf: they work independently of clojure.test, so maybe someone will have a use for them
14:45cemerickstuartsierra: I'm concerned about different profiles requiring different versions of java and about potential root classloader leakage (e.g. some JDK classes retain a reference to the classloaders, opening the door to odd bugs when running tests, etc)
14:45devlinsfstuartsierra: So leave them in as an experiment, and see what happens?
14:46dabdwhy isn't the 'def' macro documented in the API?
14:46cemerickstuartsierra: entirely possible I'm guilty of some ant transference on the first point.
14:46devlinsfdabd: It's a special form
14:46devlinsfdabd: http://clojure.org/special_forms
14:47stuartsierracemerick: I don't know. That's why I put it out there quickly, in the hopes that people would uncover these sorts of problems.
14:47rhickeyr2q2: people seem to be trying to do the suggested amount. Some can't due to being in different countries with different economies, or personal financial situations, and of course that's fine and appreciated all the more
14:48devlinsfstuartsierra: If the idea is to leave them in as an experiment, is it okay if I rework that section of the change doc?
14:48cemerickstuartsierra: I'll try to bang on it with the example I have that is most likely to cause problems early next week. Need to port that build from ant first. :-)
14:48dabddevlinsf:thx
14:48stuartsierradevlinsf: yes
14:48stuartsierracemerick: cool, thanks
14:49devlinsfstuartsierra: Okay, cool
14:51piccolinoIs LauJensen around?
14:52stuartsierradevlinsf: It's not really an experiment. The lib is there, it will probably stick around.
14:52stuartsierradevlinsf: It's just not something that regular users will need very often, I expect.
14:53devlinsfstuartsierra: Okay, so it's specialed support code.
14:54devlinsfstuartsierra; I'll take a look at the source for "are" and see if I can come up with a good paragraph for template, or other use cases.
14:54defnfliebel: priv msg when you have a chance
14:56devlinsfstuartsierra: Wow.... "are" is slick
14:56devlinsfstuartsierra: Love the body
14:56cemerickdevlinsf: get a room! :-P
14:57devlinsfbah
14:57devlinsfcemerick: take look yourself :)
14:57cemerickoh yeah, I like 'are' :-)
14:59devlinsfHmm... do-template is not the same as doseq...
14:59devlinsfWell, I'll have to look into this more later
15:00devlinsfgotta run
15:03devlinsfme/ thinks do-template might help java interop
15:03devlinsfoops
15:03devlinsfme\ thinks do-template might help java interop
15:03devlinsfDaammir
15:03chouser \me
15:03devlinsfAh
15:04devlinsf\me thinks do-template might help java interop
15:04devlinsfNo luck
15:04chouser /me
15:04chousersorry
15:04chouserbad info
15:04stuartsierramethinks me think
15:08stuartsierra(is (= *technomancy* (think *technomancy*)))
15:12cemerickstuartsierra: I think you just made technomancy ethereal
15:13stuartsierraYeah. I abstracted him away.
15:13technomancybut I don't wanna be a being of pure thought!
15:14stuartsierraToo late.
15:14stuartsierraYou've been de-instantiated.
15:14stuartsierraAll because of a misplaced paren.
15:14danm_haha
15:15technomancystuartsierra: time for you to learn paredit-mode before you do any more damage
15:16stuartsierraYeah, just need to get elisp working in my IRC client.
15:17the-kennyIf someone will contribute a paredit-addon to weechat, I'll use it :)
15:23edbondhow should I call java's System.getProperty("user.home") ?
15:23triyo,(System/getProperty "user.home")
15:23clojurebotjava.security.AccessControlException: access denied (java.util.PropertyPermission user.home read)
15:24triyoedbond: (System/getProperty "user.home")
15:24edbondtriyo: thanks a lot
15:26triyoedbond: pleasure
15:33triyoAnyone know how compojure's defroutes works in relation to thread-safety?
15:35defnfliebel: ttp://github.com/defn/Utterson
16:05shoovercemerick: Seriously, some you corporate guys are funding Rich more than my company funds Microsoft
16:05cemerickshoot, I'm a corporate guy now? ;-)
16:06shooverSorry, choose your own word :) You guys with the graphics at the top of the page
16:06cemerickshoover: yeah, I'm just messing with you
16:07shoovercemerick: I hear you. But yeah, it's great stuff
16:08cemerickjust doing what's right, and honestly, what's in our best interest. Not sure where we'd be without clojure.
16:09shooverknee deep in curly braces and dependency injection
16:09cemerickit's that DI that'll kill ya
16:09technoma`cemerick: yeah, it's hard to remember to use clean needles for DI
16:12shooverba dum dum... ching!
16:40LauJensenpiccolino: Needed something?
16:41piccolinoOh hi, LauJensen. I just wanted to ask about the status of the Postgres support in ClojureQL. The web page says it supports Derby and MySQL, but there appears to be a driver file for Postgres.
16:42LauJensenPostgres is almost up to part with both Derby and MySql, several patches hopefully being added as soon as tomorrow
16:42piccolinoAh, OK, neat.
16:50drewris there an inverse of bean?
16:51drewri.e., takes {:foo 1 :bar 2} and creates a class with getters and setters?
16:51the-kennydrewr: Not as far as I know, but I'm not very familiar with the bean-stuff
16:55polypusi'm looking for docs on private vars. where to look?
16:56stuartsierrapolypus: just ask
16:56polypusok how do private vars behave? ty
16:57stuartsierrapolypus: they can only be used within the same namespace
16:58stuartsierra'use'/'refer' do not create mappings for private vars.
16:58polypusok. thx
16:59cemerickit's good that clojure has come so far without any major gnashing of teeth about visibility, etc
16:59robewaldHello, I try to do this in the repl : (use 'clojure.zip :exclude [next] but I get an exception. How do I do this correctly?
16:59stuartsierrarobewald: quote next
17:02robewaldstuartsierra: same exception "unable to create ISeq from boolean" when doing this (use 'clojure.zip :exclude 'next)
17:02stuartsierra(use 'clojure.zip :exclude '(next))
17:03robewaldsame problem. I am on the repl here and using clojure 1.0
17:03stuartsierramaybe (use '[clojure.zip :exclude (next)])
17:03hiredmanyeah
17:03stuartsierrasomething like that
17:05stuartsierra(use '[clojure.zip :exclude (next replace remove)])
17:07samlhola. how do I create an ssl client that can talk to https://somesite.com ?
17:07LauJensenhave a look at jsch
17:09samlLauJensen, thanks
17:10LauJensennp :)
17:10samlhaha their server is down
17:12hiredmanlike ssl or https?
17:12hiredmanbecause the http stuff in the jre will do https no problem
17:15jasapphiredman: did you get a call yesterday?
17:15hiredmanjasapp: nope
17:15hiredman:/
17:15jasappme neither :/
17:16hiredmanhmmm
17:17jasappthe company I work for just got purchased, and all the cool lispy stuff is going away
17:17jasappI'm supposed to be writing in c++ now
17:18jasappso I'm a little bit ansy
17:19hiredmanI work at a painting contractor, the only coding I do at work is a little vba :(
17:19FadeC++? isn't there some geneva convention prohibition there?
17:19jasappheh :)
17:21doublindirectionI'm profiling some clojure code and clojure.lang.Var.deref() seems to be taking most of the time, what does it mean?
17:21doublindirectionusing jvisualvm if it matters...
17:21robewaldok that works, thanks
17:22Chousukedoublindirection: you're accessing a global var in a tight loop repeatedly?
17:24Chousukedoublindirection: when you access a var (any def'd name) Clojure needs to deref it to get the actual value
17:24doublindirectionChousuke, could be, i'll check my code, thanks
17:24samlhiredman, ssl. wait aren't they the same thing?
17:25samloh ssl is one level below
17:26samli need ssl
17:28metvopwhile iterating through a list how to get the previous item in the list? Looking for something that can do this (Python): for i in range(len(example_list)): print example_list[i-1]
17:29chouserdoublindirection: pretty often, Var.deref() shows up higher in profiling output than it "should"
17:30chouserthat is, if you manage to avoid the derefs, your code will not run as much faster as the profiling would lead you to believe
17:30the-kenny,(partition 2 1 [1 2 3 4 5])
17:30clojurebot((1 2) (2 3) (3 4) (4 5))
17:30the-kennymetvop: Something like (map yourfun (partition 2 1 [1 2 3 4 5]))
17:30metvopthe-kenny, thanks. i will try that out
17:31doublindirectionchouser, meaning? I have one global ref to a map and I deref it and take the values in a (let ...
17:31dnolenmetvop: if you use loop/recur you can do pretty much the same thing you do in Python.
17:31chouserdoublindirection: I think the profilers may inhibit some of the performance "tricks" that Var does, tricks that work find with no profiler.
17:32chouserdoublindirection: so I'd look at the items that are a bit less "hot" and try to resolve those first.
17:32metvopdnolen,duly noted. thx
17:33technomancyis it a decent idea to put a question mark in the middle of an identifier if you have a function that returns a predicate?
17:34doublindirectionchouser, I went through the usual optimization suspects, and ran out of ideas, that why I ended profiling
17:34waratumanJust ran into a strange problem. I ran '(- 690.89 671.69)' in a clojure repl and got 19.199999999999932. Why is there an error in the calculation?
17:35technomancywaratuman: floats are always approximations
17:35technomancyuse rationals if you need accuracy
17:35waratumanah, ok that make sense
17:35waratumanI was just confused at first by it
17:35Hunfloats are nearly every time the wrong choice
17:35technomancyunderstandable
17:36Hunexceptions are only when you can write a proof showing that they are the right choice
17:36slashus2,(- 690.89M 671.69M)
17:36clojurebot19.20M
17:36chouserdoublindirection: profiling is a good idea, I'd just try to ignore the Var.deref() for now and address the next hottest items.
17:36technomancyslashus2: if only that didn't make me think "nineteen point two million"
17:36slashus2:-P
17:38doublindirectionchouser, next items dont make a lot more sense, clojure.lang,Var.get, getThreadBinding, hasRoot
17:53polypusi'm trying to use contrib.generic.arithmetic but i'm getting this just from trying to :use it "/ already refers to: #'clojure.core// in namespace: myns". any ideas?
18:04dabdI would like to store my application's database connection settings. Is this the idiomatic way to do it in clojure? http://pastebin.com/d469079f
18:05dnolendabdb: you could just use a global atom, I think using a ref is overkill for what you want to do.
18:06dabdyes I find it unnatural to have to use dosync to update such a simple value
18:07dabdbut I am new to clojure and this is the closest to what I would do in Common Lisp
18:07the-kennydabd: An atom is perfect for this.
18:07Chousukethe db is supposed to be initialised on the first call to get-db? :/
18:08dabdChousuke: the db connection parameters are supposed to be initialised on the first call and stored in a map
18:08hiredman:|
18:09Chousukeand never changed afterwards?
18:09dabdChousuke: yes they never change afterwards
18:09Chousukehmm.
18:09Chousukethen you might just want a db-config global var and some init-db! function which uses alter-var-root! to set the db config
18:10Chousukeand after that you can just use it directly.
18:10dabdChousuke: but they are read from a properties file during a servlet initialization so I cannot use a simple (def db {...})
18:10Chousukealter-var-root! can change vars
18:10Chousukeit's not very idiomatic, but I think it should be okay in this case.
18:11dabdChousuke: I don't see any advantage to that solution except for avoiding a function call each time I need to access the db connection map
18:12hiredmandabd: is the clojure aot compiled?
18:12dabdhiredman: sorry but I don't understand your question could you elaborate
18:13hiredmandabd: forget it
18:13hiredmandabd: is there a reason you can't (def db some-init-function)
18:13hiredmaner
18:13hiredman(def db (some-init-function))
18:13hiredman(def db (read-properties))
18:14carkthis wouldn't work when aot compiling ?
18:14dabdhiredman: ok (def db (read-properties)) should do the trick. But is there any disadvantage to my initial implementation?
18:14carkit would compile the return value of (read-properties) ?
18:14hiredmancark: no, but I have a neat macro that does something similiar at compile time
18:15hiredmandabd: it's ugly
18:16hiredmanhttp://gist.github.com/226651 <-- load-properties on line 11 will read a properties file into a map at macroexpand/compile time
18:16hiredmanso at runtime you just have the map of properties
18:17the-kennycode-execution at compile time ftw
18:17hiredmanwell it comes at the cost of flexibility, you can't just replace the properties file
18:18hiredmanyou have to recompile/reload the code
18:19dabdwith your macro I could simply use (def *db* (load-properties "filename"))
18:20hiredmanyes, but the call to load-properties would be replaced with the map of properties at macroexpand/compile time, not runtime
18:20polypusin contrib.generic.arithmetic hinsen writes: (:refer-clojure :exclude [+ - * /]). when i try to do ut u can still use those ops in the namespace. why is that? i must be misunderstanding :exlude
18:20hiredmanso not appropriate for all settings
18:21polypuss/do ut u/do it i
18:21hiredmanpolypus: it's possible there is some special support for them as ops in the compiler
18:21corruptmemoryclojurebot: (and 1 nil)
18:21clojurebotI don't understand.
18:22dabdhiredman: I understand, thanks
18:22polypushiredman: ty. do you know how to use clojure.contrib.arithmetic? i am getting an error that / is already defined
18:22hiredmanpolypus: is this a fresh namespace? or are you just re-evaluating the (ns ...) form?
18:22polypuswhen i try to :use it
18:22polypusfresh namespace
18:26hiredmanpolypus: works for me
18:26hiredman(ns foo (:refer-clojure :exclude [+ - * /]) (:use clojure.contrib.generic.arithmetic))
18:26Anniepoosilly question - what namespace are the symbols for namespaces in?
18:26leafwAnniepoo: I think you mean "core"
18:26leafwclojure.core
18:27hiredmanAnniepoo: symbols do not have to be namespace qualified
18:27hiredman,(namespace 'foo)
18:27clojurebotnil
18:27hiredman,(namespace 'clojure.core)
18:27clojurebotnil
18:27Anniepooah!
18:27leafwuf
18:27leafwindeed -- sorry
18:28Anniepoo,(namespace 'clojure.core)
18:28clojurebotnil
18:28Anniepoo8cD
18:28hiredman,(namespace 'clojure.core/+)
18:28clojurebot"clojure.core"
18:29polypushiredman: huh wierd, i just tried exactly that in a fresh namespace and still get "/ already refers to: #'clojure.core// in namespace: foo"
18:29hiredmanpolypus: what version of clojure?
18:30hiredmanthere were some changes a few months back to make '/' less of a special case
18:30Anniepoo,(doc remove-ns)
18:30polypushiredman: 1.1.0 alpha snapshot
18:30clojurebot"([sym]); Removes the namespace named by the symbol. Use with caution. Cannot be used to remove the clojure namespace."
18:30Anniepooanybody know what 'Use with caution' means?
18:31jasappprobably that you don't want to remove any important namespaces
18:31leafwAnniepoo: means you can shoot yourself in the foot with it, and lock your self out of access to clojure.core functions
18:31technomancythat should probably be updated to say "Cannot be used to remove the clojure.core namespace."
18:31Anniepoook, wonderful 8cD
18:32AnniepooI want to remove namespaces for good reasons. I understand it's a powerful thing to do
18:34Anniepoo,(remove-ns 'clojure.core)
18:34clojurebotjava.lang.IllegalArgumentException: Cannot remove clojure namespace
18:34Anniepoo,(remove-ns 'clojure.set)
18:34clojurebot#<Namespace clojure.set>
18:35jasapp,(use 'clojure.set)
18:35clojurebotjava.lang.Exception: namespace 'clojure.set' not found after loading '/clojure/set'
18:35the-kennyNow you broke clojurebot :(
18:35Chousuke:P
18:35Anniepoo,(union #{:a} #{:b})
18:35clojurebotjava.lang.Exception: Unable to resolve symbol: union in this context
18:36Chousuke,(load 'clojure.set)
18:36clojurebotjava.lang.ClassCastException: clojure.lang.Symbol cannot be cast to java.lang.String
18:36Anniepoo8cD
18:36Chousuke,(load "clojure.set")
18:36clojurebotnil
18:36Chousuke,(use 'clojure.set")
18:36clojurebotEOF while reading string
18:36Anniepoo ,(union #{:a} #{:b})
18:36Chousuke,(use 'clojure.set)
18:36clojurebotjava.lang.Exception: namespace 'clojure.set' not found after loading '/clojure/set'
18:36ChousukeHM
18:36Chousukeoops
18:36Chousukecaps lock
18:36the-kennyclojurebot: reboot
18:36clojurebotPardon?
18:37Anniepoothat's probably a problem
18:37polypushiredman: i just tried it on the command line with 1.1.0-master-SNAPSHOT and i get the same thing. this is exactly what is in the file: (ns foo (:refer-clojure :exlude [+ - * /]) (:use clojure.contrib.generic.arithmetic))
18:38Chousukepolypus: exlude?
18:38polypusChousuke: what do you mean?
18:38Chousukethe ns form has :exlude, not :exclude
18:39polypusDOH!
18:40Anniepooclojurebot: quit
18:40clojurebotQUIT
18:40polypusspelinng was never my forte
18:40dabdwhat are the dots at the end of file and fileinputstream (-> filename File. FileInputStream.)
18:40dabdI thought I understood the . and .. macros but this is puzzling
18:41Anniepooclojurebot: servlet
18:41clojurebotservlet is http://www.sitepoint.com/article/java-servlets-1/3/
18:41Hundabd: construct a new object
18:41Hunread that as (new FileInputStream (new File filename))
18:42Anniepoo,(union #{:a} #{:b})
18:42clojurebotjava.lang.Exception: Unable to resolve symbol: union in this context
18:42Anniepoohiredman, can you reboot clojurebot?
18:43dabdHun: ok I found it in the documentation int the java interop section. I expected to find it in the dot operator description
18:43hiredmanAnniepoo: why?
18:44AnniepooI broke it
18:44hiredman
18:44Chousukehiredman: Anniepoo removed the clojure.set namespace :P
18:44Anniepoo,(union #{:a} #{:b})
18:44clojurebotjava.lang.Exception: Unable to resolve symbol: union in this context
18:44Anniepooyou might want to add remove-ns to the list of bad forms
18:47hiredman,clojure.set/union
18:47clojurebotjava.lang.ClassNotFoundException: clojure.set
18:48jasappwhere do you leave clojurebot running?
18:49Chousukethis might actually be a clojure bug.
18:49Chousukeor at least weird behaviour
18:49Chousuke(use 'clojure.set)
18:49Chousuke,(use 'clojure.set)
18:49clojurebotnil
18:49Chousukehm
18:50Chousukewhy did that work.
18:50AnniepooI wonder why we can't load it
18:50Chousukehiredman: did you fix it? :P
18:50Chousuke,(clojure.set/union #{:A} #{:b})
18:50clojurebotjava.lang.Exception: No such var: clojure.set/union
18:50jasappI tried that earlier
18:50Chousuke,(union #{:A} #{:b})
18:50clojurebotjava.lang.Exception: Unable to resolve symbol: union in this context
18:50jasappthe use bit
18:50Chousukewell that's weird.
18:51Chousukeyeah, I did too but I got a different error message.
18:51Chousukeit usually returns nil if it succeeds.
18:51jasappstrange
18:52hiredman,(clojure.set/union #{:A} #{:b})
18:52clojurebot#{:A :b}
18:53Anniepoo,(use 'clojure.set)
18:53clojurebotnil
18:53Anniepoo,(union #{:a} #{:b})
18:53clojurebot#{:a :b}
18:53Anniepoo????
18:54Anniepoowonder why it's working now
18:54hiredmanbecause I fixed it
18:56Anniepoohow'd you fix it?
18:56hiredman(load-file "/home/hiredman/clojure/src/clj/clojure/set.clj")
18:57Anniepoocoolio
18:57Anniepooso wherever clojurebot calls home you have a repl for it?
18:58Faedthis all looks soothingly lispy.
18:58hiredmanI have a repl
18:58Faedbut scanning example code, the square brackets are throwing me off a bit.
18:58hiredmanthere are many like it, but this one is mine
18:59Fadeare they like the square brackets in r6rs?
18:59_atoFade: square brackets mean a vector as opposed to list
18:59hiredmannope
18:59Fadeah, okay.
18:59Anniepoo@Fade - in lisp the 'seq' is bound to a concrete type, the list
19:00Anniepooin Clojure you can 'cdr' thru many things
19:00_atoFade: curly braces mean a hash-map and #{...} means a set
19:00Fadethanks
19:02Fademy lisp is largely involved in CL. I have a project on the table now /w a client that wants a java deliverable.
19:02Fade"here's a large configuration file, here's the jar."
19:02Fade.oO(Muah-haha!)
19:02_atohehe :)
19:16mtmwow, what's up with freenode lately?
19:17hiredmandos
19:18the-kennyclojurebot has infected the freenode-servers running windows 2000 with a premature version of skynet written in clojure, but the servers aren't stron enough to handle the jvm *and* the ircd.
19:18the-kennys/stron/strong/
19:19clojurebotsilence!
19:20defnlol
19:21polypusi have a feeling clojurebot (w/ the wizard of oz behing the repl) might just pass the turing test
19:22polypusbehind*
19:24defnclojurebot: skynet
19:24clojurebotExcuse me?
19:24defnclojurebot: skynet?
19:24clojurebotGabh mo leithscéal?
19:24defnclojurebot: skynet is <reply>I will become skynet. Mark my words.
19:24clojurebotYou don't have to tell me twice.
19:38dabdhiredman: I have one question about your load-properties macro
19:40dabdshouldn't the filename be a pathname to the properties file here http://gist.github.com/226651
19:41dabdinstead of the filename?
19:51BrianB04Evening.
19:57twbraySuddenly getting lots of requests for WF2 sample data. Wonder why that could be?
20:02jasappWF2?
20:10jasappthe-kenny: you around?
20:11the-kennyjasapp: Yes, but I'll go to bed in 30 minutes or so.
20:12jasappdid I hear you mention something about a twitter library the other day?
20:13the-kennyjasapp: hm no, I don't think so. But someone here mentioned one, yes.
20:13jasapphmm
20:13jasappthanks anyway
20:14the-kennyYou're welcome
20:15the-kennyjasapp: hiredman implemented some twitter stuff for clojurebot with the comment "horrible twitter stuff", maybe you can get some inspiration there ;)
20:19defni was messing with a twitter library
20:19defni havent put anything up, though
20:19defni dont really have any desire to do anything with twitter unless it's massive data mining
20:20the-kennymassive datamining doesn't need a library, just a function to parse every line in a stream :D
20:21jasapphmm
20:25defnthe-kenny: sure -- ive been doing that!
20:25defnthe-kenny: however, a more complete set of tools to look through that data might be nice
20:26defnsplitting it up and parallelizing the parsing, etc.
20:27the-kennydefn: I have some snippets for that in my lib too. It's really easy with clojure - Just set up a Java ThreadPool and run parsing-functions in it, which collect the data in an agent or ref
20:27defncool
20:27defnim slow to the agent/ref/atom party
20:28jasappme too
20:28defnit's taken me awhile just to get familiar with a lisp dialect, and the java interop without having java experience
20:28hiredmandabd: a filename is a path and a filename, it is a relative path for a file in the pwd
20:30the-kennyhm.. does someone here know if it would be *possible* to port clojure to lejos (Java for Lego Mindstorms). The jvm they use don't support reflection.. I think that's a big problem
20:32the-kennys/don't/doesn't/
20:32dabdhiredman: it's not working for me (file not found) so I changed it into this http://pastebin.com/m6680c72a
20:33hiredmanthe-kenny: looks like lejos is uses the 1.4 jre
20:33hiredman:(
20:35the-kenny:(
20:36SteveDekorte2anyone know how much clojure has received in donations so far?
20:37rhickeyhttp://clojure.org/funders
20:38SteveDekorte2rhickey: is there a total $ on that page?
20:39rhickeySteveDekorte2: no, that would be getting a bit close to my personal finances
20:40SteveDekorte2rhickey: I was wondering if it would be worth doing something similar for Io
20:41rhickeySteveDekorte2: might be, have you many users?
20:41SteveDekorte2don't really know - the only big business I know of using Io is Pixar
20:49tomojdoes anyone else think there should be a contrib module for date/time stuff?
20:49tomojs/module/library/
20:49hiredmanI think technomancy was working on one with someone half a year or so ago
20:49tomojoh, cool
20:50hiredmanit got dropped for some reason
20:51hiredmanI think it was chronos or something
20:54liebketomoj: Flightcaster picked up development of the chronos library, which is based on Joda time. It's now included in Incanter
20:54chouserha! seriously?
20:54tomojliebke: cool, thanks
20:54hiredmanno kidding
20:55hiredmanwhat a world
20:55chouserI need to give Incanter a seriuos look.
20:55liebkeyep, incanter.chrono
20:55tomojI have no idea what Joda time is but it sounds like overkill for me :)
20:55tomojall I needed was (.format (java.text.SimpleDateFormat. "yyyyMMddHHmmss") (java.util.Date.))
20:55the-kennyI'll go to bed now, night everyone :)
20:56liebketomoj: yeah, sounds like Joda time would be overkill :)
20:56liebkehere's the incanter.chrono api page: http://liebke.github.com/incanter/incanter.chrono-api.html
20:57tomojlooks like chrono makes it (format-date (now) "yyyyMMddHHmmss")
20:59hiredmanI don't like joda time, because the one time I looked at the examples, they didn't tell you what package anything was in
21:19liebkehiredman: yeah, I haven't looked at the docs for joda-time or even incanter.chrono until just now. I noticed that most of the functions aren't listed on the api page, since they didn't have any doc string at all. I'm fixing that now.
21:29alexykhow do you append one vector to another again? [1 2 3] [4 5 6] => [1 2 3 4 5 6]
21:30jasapp,(concat [1 2 3] [4 5 6])
21:30clojurebot(1 2 3 4 5 6)
21:30alexykliebke: scatter-plot was taking too much time, I've sorted all points on x and y, then took means for every 1000 y's, and it was fast
21:31alexykjasapp: thx, it will require a few more iterations :)
21:31liebkealexyk: interesting solution
21:31alexykliebke: perhaps something like that can be in a library, I'll push the code at some point soon
21:31jasappalexyk: what do you have on x and y?
21:31liebkesounds good
21:32alexykjasapp: pagerank of twitterers vs #twits
21:32jasappinteresting, anything in particular you're looking for or seeing?
21:32alexykjasapp: so far, am meditating on the shapes...
21:32hiredman,(into [1 2 3] [4 5 6])
21:32clojurebot[1 2 3 4 5 6]
21:33alexykliebke: mean vs median gave different layout, btw. So it's interesting how robust to clustering method such compression is
21:34alexyknot too different, but shifted a bit
21:34alexykhiredman: thx
21:34liebkeyeah, that's too surprising
21:34alexykcan never remember into or concat... need some Pavlovian reflex.
21:35alexykliebke: obviously it makes no sense to plot 4 mil points on a 1000x1000 canvas, so scatter-plot can use smarts
21:35defnalexyk: ill give you a cookie if you remember into
21:35liebkei agree :)
21:36alexykliebke: it always annoys me that R goes into hyperventilation when I ask it to plot a long list, too. And R was around 20+ years.
21:37alexykliebke: btw, I've tried JRI from rJava, and Simon Urbanek confirms you can push pre-existing Java arrays into an R running in JRI thread in your JVM!
21:37liebkecool
21:37alexykso concievably we can plot, in addition to JFreeCharts, via (a) Clojuretized Mathematica (b) da R.
21:38alexykthus, we can have multiple back-ends for plotting.
21:38liebkenice
21:38alexykI've tried Clojuratica already, and will try R at some point in the future.
21:39alexyk(from Clojure that is)
21:39alexykdefn: usually beating works better than cookie, but one can't really self-improve that way...
21:43alexykwhen updating a transient map, can I read it as a plain one, e.g.: (assoc! trmap key (myupdate (trmap key)) extra-vals)); ?
21:47tomojthere is?
21:47tomojoh, for transients :)
21:47alexykyeah. glaring ommission.
21:47tomojI don't think you can read it as a plain one (I haven't used transients much at all so don't trust me)
21:48tomojbut they're supposed to be unusable if they escape out of your tiny contained mutating function
21:48tomojif you could hand them out to other functions and they could read them as normal...
21:48alexykchouser: how do I look up transient maps? :)
21:49alexykit stays in the mutated block
21:49tomojoh, I'm wrong
21:49tomoj"Transients support the read-only interface of the source, i.e. you can call nth, get, count and fn-call a transient vector, just like a persistent vector."
21:50tomojI must be confused because this scares me
21:51alexyktomoj: somebody had shown me transietising a big map and it's simple enough to mimic, worth it for my maps of 100 mil+ entries
21:51hiredmantomoj: transients are not function bound, but thread bound
21:52hiredmanif you mess with a transient from another thread it blows up
21:52alexykmy transients are very transient: I use them to load big-arse maps from disk or invert them.
21:52tomojso this means if someone hands me a transient and I wrongly think it's persistent, then I hand it off to some function which treats it as a transient, when I get it back it might be different?
21:52alexyknow you guys must be honest and admit you spend 50% time balancing [] and ().
21:53alexykHere's me trying to invert a map:
21:53hiredmantomoj: well don't do that
21:53tomojhiredman: roger
21:53tomoj:)
21:53tomojI had thought they prevented you from doing that
21:53tomojadmittedly it doesn't seem very likely
21:53hiredmanwell conj! is a function
21:53hiredmanso how could you pass a transient to it?
21:53alexyk(->> {"a" {:b [1 2 3], :c [4 5]}, "d" {:a [2 3], :e [5 6 7]}} (reduce (fn [inv [from reps]] (for [[to dates] reps] (assoc! inv to (into (or (inv to) []) dates)))) [(transient {}]))) ; wrong syntax still a.t.m.
21:54tomojI don't mean that I thought they prevented you from passing them around
21:54alexykI still need to add persistent! around it, but () and [] are wrong already. Is there a way to grow these things in a pain-freer way?
21:54tomojjust that they prevented you from reading from them like persistent data
21:55tomojso that you couldn't accidentally think you were reading a persistent when you were reading a transient
21:55tomojbut yeah, not actually a problem I imagine
21:55tomojalexyk: are you using emacs?
21:55tomojalexyk: if so, are you using paredit?
21:55alexyktomoj: my repl matches parens ok
21:55alexykthey blink
21:55tomojheh
21:56tomojif emacs is not out of the question for you, you should try paredit
21:56tomojblinking parens is no match
21:56alexykthe thing is, it wants keys, or not, etc. A three-liner may take a long time. Am just wondering whether that's how it works.
21:56JonSmithblinking parens is my hero
21:56tomoj(though at first paredit will confuse the hell out of you, but give it time)
21:57hiredmanpffft
21:57hiredmanrainbow parens!
21:57alexyktomoj: I've evolved from Emacs to TextMate. One must be brave enough to admit that windowing is better done not in ASCII.
21:57tomojfor me it's not about seeing which parens match
21:57tomojit's about being easily able to manipulate the sexps at a higher level
21:57JonSmithdon't you have to call persistent on it at some point
21:57alexykbut I actually develop in repl and stash in TextMate just for saving in a file
21:58alexykJonSmith: yeah, I'll tack it back
21:58alexykrepl also never marks the error beyond a line, which is useless.
21:58alexyknot even a caret.
21:59tomojI used to use textmate for ruby. haven't tried the clojure stuff for it yet, but it sounds scary
22:00JonSmithhonestly i normally do stuff like that by breaking things up
22:00tomojI guess it would be possible to teach textmate how to understand sexps
22:00arohneris there really no function ref?
22:01arohnernor agent? nor atom? ?
22:01arohnerwow.
22:01tomojfunction ref?
22:01arohnersimilar to vector?, map?, seq?
22:02tomojoh I misunderstood your '?'
22:02arohnershould have been function 'ref?'
22:02arohnersorry
22:02tomojhmm.. yeah that is kinda surprising
22:03tomojI guess you usually already know what it is you're dealing with?
22:03arohneryeah. I'm writing tests now. first time I've felt a need for it
22:03arohneri.e. (is (ref? x))
22:07alexykok here's a transient puzzle:
22:07alexyk,(persistent! (reduce (fn [inv [from reps]] (for [[to dates] reps] (assoc! inv to (into (or (inv to) []) dates)))) [(transient {})] {"a" {:b [1 2 3], :c [4 5]}, "d" {:a [2 3], :e [5 6 7]}}))
22:07clojurebotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.ITransientCollection
22:07alexykI want to invert a map as shown, keeping it transient while inverting
22:12chouseralexyk: did you get it working without transients first?
22:13arohneroh, protocol functions need at least one implementation before a function can be compiled that calls the protocol function. Is that intentional?
22:13alexykchouser: am trying now :)
22:13chouseryeah, me too
22:13chouserI don't know what output you're looking for.
22:13alexykchouser: it was dumb to transientize before it works :)
22:13chouserwell, I didn't want to say it ...
22:14chouser:-)
22:14alexykchouser: we're all one big family here, you can say t :)
22:16arohnerlisppaste8: url
22:16lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
22:16alexykwell, I'm a bit puzzled why this fails:
22:17alexyk,(reduce (fn [inv [from reps]] (for [[to dates] reps] (assoc inv to (into (or (inv to) []) dates)))) {} {"a" {:b [1 2 3], :c [4 5]}, "d" {:a [2 3], :e [5 6 7]}})
22:17clojurebotjava.lang.ClassCastException: clojure.lang.LazySeq cannot be cast to clojure.lang.IFn
22:17chouseralexyk: you want {1 {:b ["a"]}, 2 {:b ["a"], :a ["d"]} ...} ?
22:18hiredmanuh
22:18alexykchouser: no, the format is a directed graph, {fromA {:toB [times] :toC [times]} ...}
22:18JonSmith you might want to split it up a bit
22:19alexykI want to invert direction: {fromB {toA [times] toD [times]...}...}
22:19alexykso times stay innermost, just merging differently
22:19alexykdue to Mongo import from are strings and to are keywords now, but that can be adjusted
22:20alexykJonSmith: I like to just keep typing, then I can avoid teh pastebot :)
22:21JonSmithhaha
22:21JonSmithfair enough
22:21arohnernm, protocol functions check arity when compiling
22:21arohnerthat's nice, but unexpected
22:21alexykchouser: so above, integers are times which stay lowest
22:21alexyk(deepest, innermost)
22:25chouserso you want {:b {"a" [1 2 3]}, :c {"a" [4 5]} ...} ?
22:26JonSmithoooh
22:27alexykchouser: yeah...
22:29alexykit's not clear to me where the error comes from in the above line
22:30chouserfor returns a lazy seq
22:30chouserso your fn returns a lazy seq
22:30solussdi can think of a dozen ways to do it, but what is the most elegant way to generate a lazy-seq of random numbers? more generally, what is the best way to generate a lazy-seq of a function called repeatedly?
22:30chouserso the next iteration, inv is a lazy seq
22:31chouserso (inv to) fails
22:31chousersolussd: you said it!
22:31tomojhehehe
22:31chouser,(repeatedly #(rand-int 10))
22:31solussdnot using repeatedly
22:31solussd:)
22:32tomojwhy not?
22:32solussdi was hoping for something even more concise, and that isn't intended for use w/ functions generating side effects
22:32solussdi dont know-- b/c i assumed there was something. :)
22:32tomojrepeatedly is certainly not intended for use w/ side effecty functions..
22:32solussd,(doc repeatedly)
22:32clojurebot"([f]); Takes a function of no args, presumably with side effects, and returns an infinite lazy sequence of calls to it"
22:32alexykchouser: indeed
22:33tomojwell, that's odd
22:33tomojbut how can you get any more concise than a single function which takes as an argument the function you want to call repeatedly?
22:33chouserwell, if the function returns something different each time, it may not be *generating* side effects, but it's by definition impure
22:33solussdi think the thinking is, a side effect free function will always return the same output for a given input
22:33tomojah, yes
22:33solussdrand doesn't work like that
22:34solussdwow, chouser, i'm just too slow.
22:34tomojso you want an infinite lazy-seq of the return values of a pure function?
22:34solussdi blame the boston lager
22:34tomojI'm confused
22:34tomoj(I blame the rum)
22:34solussdno, i dont. i wanted rand. looks like repeatedly is appropriate in this case.
22:39alexykok this works, and data is more interesting for inversion; but it's ugly. any simplifications?
22:39alexyk,(reduce (fn [inv [from reps]] (reduce (fn [inv [to dates]] (update-in inv [to from] #(into (or % []) dates))) inv reps)) {} {"a" {:b [1 2 3],:c [4 5]}, "d" {:b [2 3], :e [5 6 7]}})
22:39clojurebot{:e {"d" [5 6 7]}, :c {"a" [4 5]}, :b {"d" [2 3], "a" [1 2 3]}}
22:40alexykalso the darn lack of update-in! hinders me from transietizing it :( :(
22:42JonSmithhmm
22:42JonSmithwell you can do it by tearing the map apart and putting it back together
22:44alexykI have a hack from _ato somewhere, to simulate update-in! by binding assoc as assoc!
22:45arohneroh that's sneaky
22:45chouser,(let [g {"a" {:b [1 2 3],:c [4 5]}, "d" {:b [2 3], :e [5 6 7]}}] (reduce (fn [m [k2 k1 v]] (assoc m k2 (assoc (m k2 {}) k1 v))) {} (for [[k1 m] g, [k2 v] m] [k2 k1 v])))
22:45clojurebot{:e {"d" [5 6 7]}, :c {"a" [4 5]}, :b {"d" [2 3], "a" [1 2 3]}}
22:45arohnerI wonder, if you bound all of the "primitives" would all of the functions like that start working?
22:45alexykbtw, my times in fact are java.util.Date's. Would having immutable joda-times as leaves speed up things? Does Clojure suffrer from shuffling around mutable Java Dates?
22:46arohneralexyk: clojure doesn't do any special casing for java Dates
22:46alexykchouser: nice
22:46alexykbtw, the un-transient inverse finished in 205 seconds :)
22:47JonSmithhow many dates?
22:48alexykJonSmith: need to count :)
22:48chouserI guess if you want the inner maps to be transients too, you'll have to do a final pass persistent!ing them.
22:49alexykchouser: your solution is not transient yet, so I'd have to replace the top-level assoc with assoc! and {} with (transient {}) as usual first, right?
22:49JonSmithi can do it with map- and reduce :-P
22:49chouseralexyk: you just want the top-level transient?
22:50alexykchouser: I'll take all-level transients! :) I'd compare all
22:50chouser,(persistent! (let [g {"a" {:b [1 2 3],:c [4 5]}, "d" {:b [2 3], :e [5 6 7]}}] (reduce (fn [m [k2 k1 v]] (assoc! m k2 (assoc (m k2 {}) k1 v))) (transient {}) (for [[k1 m] g, [k2 v] m] [k2 k1 v]))))
22:50clojurebot{:b {"d" [2 3], "a" [1 2 3]}, :c {"a" [4 5]}, :e {"d" [5 6 7]}}
22:50chousertop-level only
22:51lisppaste8Jon Smith pasted "map-inverter-thingee" at http://paste.lisp.org/display/92238
22:52alexykJonSmith: interesting!
22:52lisppaste8Jon Smith annotated #92238 "parallel" at http://paste.lisp.org/display/92238#1
22:52JonSmithbut it tears the whole thing apart and puts it back together
22:53chouserso does mine
22:53JonSmithso probably no efficiency gains there :-P
22:53JonSmithah
22:53hiredman,(doc clojure.set/map-invert)
22:53clojurebot"([m]); Returns the map with the vals mapped to the keys."
22:54chouserha!
22:54alexykchouser: your solution works in 135 sec vs my 205 non-transient sec
22:55alexykchouser: well, but my map is nested, so what
22:56JonSmithhmm
22:56alexyk(map-invert {:a {:b [1 2 3] :c [4 5]}}) => {{:b [1 2 3], :c [4 5]} :a}; doh.
22:56chouseryeah, not quite the same thing.
22:59JonSmithis there a way to use transients and parallelism?
22:59chouserhm... locks? :-)
22:59chouserno, not really.
23:00chouserI think transients only allow themselves to be modified by a single thread.
23:00arohnerwhat was the name for the java library / jsr / concept thing that supports coordinating transactions between multiple components?
23:00hiredmanthe only allow themsevles to be modified by the thread where they were created
23:00JonSmithand they can be returned by functions and stuff?
23:03JonSmithassoc-in! might be low-hanging fruit sort of thing to add to clojure core
23:03alexykdo you guys get silly smileys from :c? :c
23:03chouserno
23:04alexykI have Colloquy for an IRC client on Mac, very useful, except for damn :c.
23:04alexykah, the fix is not to have a space after it.
23:05arohnerI'm using colloquy and :c is not a smiley for me
23:05alexykhah, Clojure takes unicode! {:жопа 1}
23:05alexyk,{:жопа 1}
23:05clojurebot{:жопа 1}
23:05arohneroh, because I turned them off
23:05alexykarohner: another way to fix it
23:14lisppaste8Chouser annotated #92238 "two-level transients" at http://paste.lisp.org/display/92238#2
23:15chouseralexyk: I wonder if that's any faster.
23:15JonSmithsweet
23:15chouserAnd even if it is, if it's worth the pain. :-/
23:15JonSmithwonder if its worth all of the conversion
23:15alexykchouser: pain no, since the original map loads from Mongo in 5000 secs, but for Science, we'll do anything!
23:16JonSmithi guess it depends how big maps are
23:16alexykam gonna time these things. One problem is, my JVM is half-full at 32g already, and I use compressed oops, so sometimes timing is strange
23:19alexyk800% CPU!
23:19JonSmithlol
23:20JonSmiththat's a lot of cpu
23:20alexyknow back to 100%, persistentin'
23:20alexykor somethin'
23:24alexyk2-level transients are still at it
23:24alexykno cgar for them this run
23:24chouserhm. insteresting.
23:25alexykchouser: that JVM hovers around 16-17g and showed wild delays randomly
23:25alexykI give it -Xmx31g and compressed oops and MaxPermSize=1g
23:25alexykor these maps ran out of permgen space with congomongo
23:25chouseryeah, the more I think about the "reduce into transient of persistents" step, the wronger it seems.
23:25alexykok 308 sec
23:26alexyknow JonSmith's up :)
23:28alexykJonSmith: never gets above 400% cpu
23:28JonSmithbummer :-(
23:28JonSmithhow many cpus does it have?
23:29alexyk8 quad-cores
23:29JonSmithhmm
23:29alexykapparently reports full load as 800%
23:29alexykif that's what Linux does usually :)
23:30JonSmithmaybe using 2 levels of pmap is too much?
23:30alexykthe second levels are usually very short
23:30JonSmithyeah
23:30alexyk1-3 at most for many
23:30JonSmiththat would ruin it
23:31JonSmithi think there's a preduce somewhere also
23:32alexykJonSmith: so I can just replace the second pmap by map, right?
23:32JonSmithyup
23:32alexykthat's next
23:32JonSmithcool
23:32alexyk"Pride and Preduce, ny J. Austen"
23:32alexykby
23:32alexyk"Pmap and Preduce"
23:33alexykyeah, always at 360% cpu
23:33alexykand RES went down from 17g to 14g, so JVM is GC'ing
23:33alexykhence it's unclear how they compare
23:34JonSmithinteresting
23:34JonSmiththe only thing i'm concerned about with clojure is that it is hard to know how it actually works
23:34JonSmithor, what is going to happen
23:35alexykJonSmith: did you program in OCaml/ML before by any chance?
23:35JonSmithi program in common lisp mostly
23:35JonSmithfor work
23:36alexykJonSmith: (let [....] res) style resembles ML's let ... in let ... in res
23:36alexykwhere the whole thing is in (let[...................................] res) block
23:38JonSmithyeah
23:38JonSmithit lets you stay functional and name things at the same time :-)
23:38alexykJonSmith: 2-level pmap is the loserest one so far, with 600 secs
23:38JonSmithhaha
23:38JonSmithyeah
23:39JonSmithwell it spawns a thread for each chunk
23:39JonSmithso is probably mostly thread-spawn-overhead
23:39alexykok now let's see pmap/map
23:41alexyk87 secs you win!
23:41alexykbut only 230% cpu max
23:42JonSmithnice
23:42JonSmithdeleting a character ftw :-)
23:42alexykyeah, 8x speedup for "m"!
23:42alexykfor "p" I mean
23:43JonSmithdo that in c++!
23:43alexykremove a * and spend a month debugging
23:44JonSmithso its 230%
23:44JonSmiththere's a total of 800% possible
23:44JonSmithand there's 30 cores
23:44JonSmith32 cores
23:45JonSmithso... 25% a core?
23:47alexykJonSmith: I don't know how it reports load in top
23:47alexykneed to add a full-running thread at a time and observe
23:48alexykbtw, chouser's stream of edges looks really sexy, there should be a way to pmap that
23:48JonSmithyeah i bet there is
23:49alexykI doubt there's a preduce as it reuses result
23:51JonSmithyeah
23:51JonSmithbut you can do a preduce if you don't really care about order of combination
23:52alexykok, I measured load like this: started: while true; do; true; done &
23:52alexykand did it 8 times, each runs at 100% in top. The 9th made two run at 50%.
23:53alexykso I guess can only have 8 processes at 100% each.
23:54alexykJonSmith: that would be a parallel for :)
23:55alexyktwbray: did you see _ato's WF2 beating the pants off older Java/Scala?
23:55hugodalexyk: does Runtime return 8 or 32 availableProcessors ?
23:55twbrayalexyk: Wrote about it, too.
23:55alexykhugod: how do I check?
23:56hugod,(.. Runtime getRuntime availableProcessors)
23:56clojurebot1
23:57alexykhugod: 8
23:57alexyktwbray: good read
23:57JonSmithhmm
23:58JonSmithparallel for
23:58alexyktwbray: so thanks to Clojure, you feel laziness in your gut now!