#clojure logs

2008-11-22

00:00danleii'm not sure, if i understand your question
00:00danleisomething like this?
00:00danlei(macroexpand '(with-binding [x 5]
00:00danlei (print x)))
00:00danleisorry
00:00danlei(defmacro with-binding [[var val] & body]
00:00danlei `(binding [~var ~val]
00:00danlei ~@body))
00:00danlei(which would be rather useless, i guess)
00:03arohnersort of.
00:03arohnerThe list of symbols is in an array, and I'm having a hard time getting the symbols into the binding array without getting evaluated
00:04arohnerlisppaste8:
00:04arohnerlisppaste8: url
00:04lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
00:04lisppaste8arohner pasted "expectation" at http://paste.lisp.org/display/70871
00:05arohnerI'm trying to write an expectation test framework
00:05arohnerthat works, but you'll notice it looks similar to the source of binding
00:06danleihm
00:06duck1123clojurebot: git?
00:06clojurebotI don't understand.
00:08duck1123clojurebot: git is http://github.com/kevinoneill/clojure/tree/master
00:08clojurebotYou don't have to tell me twice.
00:08duck1123clojurebot: git?
00:08clojurebotgit is http://github.com/kevinoneill/clojure/tree/master
00:08arohnerI would like to use ~@thread-bindings#, but I don't think I can do that because it's a gensym'd variable
00:09duck1123clojurebot: logs?
00:09clojurebotHuh?
00:09duck1123clojurebot: logs is http://clojure-log.n01se.net/
00:09clojurebotOk.
00:10duck1123clojurebot: wiki?
00:10clojurebotExcuse me?
00:10duck1123clojurebot: wiki is http://en.wikibooks.org/wiki/Clojure_Programming
00:10clojurebotOk.
00:13duck1123clojurebot: compojure?
00:13clojurebotExcuse me?
00:13duck1123clojurebot: compojure is http://github.com/weavejester/compojure/tree/master
00:13clojurebotRoger.
00:14duck1123clojurebot: ties?
00:14clojurebotI don't understand.
00:14duck1123clojurebot: ties is http://www.bitbucket.org/achimpassen/clojure-ties/wiki/Home
00:14clojurebotOk.
00:15duck1123clojurebot: programming clojure is http://www.pragprog.com/titles/shcloj/programming-clojure
00:15clojurebotYou don't have to tell me twice.
00:15duck1123clojurebot: programming clojure
00:15clojurebotprogramming clojure is http://www.pragprog.com/titles/shcloj/programming-clojure
00:17duck1123clojurebot: todo?
00:17clojurebotHuh?
00:17duck1123clojurebot: todo is http://richhickey.backpackit.com/pub/1597914
00:17clojurebotOk.
00:19duck1123clojurebot: project euler is http://clojure-euler.wikispaces.com/
00:19clojurebotOk.
00:19duck1123clojurebot: enclojure?
00:19clojurebotI don't understand.
00:20Chouserit'd be pleasant to have these all on a web page somewhere.
00:20duck1123clojurebot: enclojure is http://enclojure.org/
00:20clojurebotOk.
00:20hiredmanclojurebot: how much do you know?
00:20duck1123I figure these are all links that will be handy to have in the future
00:21hiredmanI wonder if I roke him
00:21hiredman(doc defmethod)
00:21clojurebotCreates and installs a new method of multimethod associated with dispatch-value.
00:21arohneryeah, but it would be nice if we could also link to it from the group, or wiki, etc
00:21Chouserduck1123: I'm not disagreeing, I just think it'd be nice to be able to scan the whole list.
00:33hiredmanclojurebot: how much do you know?
00:33clojurebotI know 17 things
00:41technomancyclojurebot: botsnack
00:41clojurebotbotsnack is delicious. (nom nom nom)
00:42technomancyclojurebot: botsnack is <reply>thanks; that was delicious. (nom nom nom)
00:42clojurebotYou don't have to tell me twice.
00:42technomancyclojurebot: botsnack
00:42clojurebotthanks; that was delicious. (nom nom nom)
00:48amageein clojure, how can i make a function foo, which calls bar, which calls foo?
00:49hiredmanlisppaste8: url
00:49lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
00:51lisppaste8hiredman pasted "closure counter thing" at http://paste.lisp.org/display/70873
00:52hiredmanthat has a function c, that returns a function, that calls c
00:56danleiwhat's most idiomatic clojure for zipping? (zip '(a b c) '(1 2 3)) -> (a 1 b 2 c 3)
00:57hiredman(doc interleave)
00:57clojurebotReturns a lazy seq of the first item in each coll, then the second etc.
00:57danleiperfect
01:00danleiclojurebot: zipping is <reply>see interleave
01:00clojurebotRoger.
01:02gnuvince_danlei: that's not zipping
01:02gnuvince_danlei: zipping would return ((a 1) (b 2) (c 3))
01:03danleihm
01:03danleiok
01:03danleihas it a name?
01:03danlei. o O (interleaving) =)
01:04danleiclojurebot zipping is
01:04danleiclojurebot: zipping is
01:04clojurebotHuh?
01:04danleihm
01:04gnuvince_(map vector [:a :b :c] [1 2 3])
01:04hiredmanlose the is
01:04danleihow to delete something?
01:04danleiclojurebot: loose zipping
01:04clojurebotI don't understand.
01:04hiredmanclojurebot: zipping is not what you think it is
01:04clojurebotOk.
01:05danleignuvince_: thanks, interleaving was what i wanted
01:05hiredmanclojurebot: zipping?
01:05clojurebotzipping is not what you think it is
01:17Chouserclojurebot: zipping is <reply>
01:17clojurebotAck. Ack.
01:17Chouserclojurebot: zipping?
01:17danleiclojurebot: asdf
01:17clojurebotExcuse me?
01:18Chouserclojurebot: zipping is <reply>try (map vector ...)
01:18clojurebotOk.
01:18Chouserclojurebot: zipping?
01:18clojurebottry (map vector ...)
01:18Chouserheh, was afraid I'd killed him
01:18danlei=)
01:18danleiclojurebot: botsnack
01:18clojurebotthanks; that was delicious. (nom nom nom)
01:45rzezeskiI'm reading PCL right now, and in the CD database example it uses a "defvar" to define a global variable *db* and then uses "push" to add data to the var. The "push" function seems to mutate *db*. To imitate this in Clojure i naively did "(defn add-record [cd] (def *db* (cons cd *db*)))". I know this is bad, so what is a more idiomatic way?
01:49hiredmanrzezeski: http://blog.thinkrelevance.com/2008/9/16/pcl-clojure-chapter-3
01:50hiredmanclojurebot: pcl -> clojure is http://blog.thinkrelevance.com/2008/09/16/pcl-clojure
01:50clojurebotAck. Ack.
01:50rzezeskiperfect! thank you sir!
01:53hiredmanclojurebot: lisp is <reply>Lisp isn't a language, it's a building material.
01:53clojurebotRoger.
03:27sgrahamcan anyone suggest a short way to write (range \a \z)?
03:28hiredmanuh
03:28hiredmanthat is pretty short to begin with
03:29hiredmanwait
03:29hiredmanI get it now
03:29sgrahambut it doesn't work.. :) that's what i want to write, but range only works on Number
03:29hiredman(map char (range 97 123))
03:30sgrahamhmm, not too bad. the 97/123 is a bit random looking, but..
03:30sgrahamthanks!
03:31hiredman(map char (range (int a) (inc (int z))))
03:32hiredmanuh
03:32hiredman\a and \z of course
03:32sgrahamyup, gotcha, thanks
04:04Lau_of_DKTop of the morning gents
05:01whotheheckamihi Lau
05:41ole2Hello
05:41ole2I get an exception when i start slime: core.clj:88: Unable to resolve symbol: *e in this context
05:42ole2the repl seems to work , but emacs keeps polling
05:42ole2Had someone the same problem?
06:57Lau_of_DKMorning rhickey. Just wondering. What was your primary motivation for choosing Subversion over Git ?
07:00rhickeyLau_of_DK: I didn't choose subversion as much as SourceForge, and, git wasn't available there nor popular when I started Clojure. Subversion still leads in IDE integration
07:00Lau_of_DKOk, thanks
07:06Lau_of_DKrhickey: I guess on the upside, using Magit I can still handle the entire SVN straight from Emacs, using it as Git locally, and automatically converting back to SVN if I need to commit anything
07:11Chousukeheh
07:23Lau_of_DKYou laught infidel? :)
07:23Lau_of_DKs/laught/laugh
07:30ChousukeLau_of_DK: nah, git is my favourite SVN client too
07:35Lau_of_DKhehe, nice way to put it! :)
07:51fandahello all!
07:51Lau_of_DKHey fanda ! :)
07:52fandaI am testing Clojure predicates now
07:52fandaand have question about fn?
07:52fandauser=> (fn? (fn [x] (* 2 x)))
07:52fandatrue
07:53fandathing is, fn? also returns true for vector, map, set, symbol and keyword
07:53fanda(fn? {:a 1}) => true
07:53fanda(fn? #{1 2}) => true
07:53fanda(fn? 'abc) => true
07:53fanda(fn? [1 2]) => true
07:53fanda(fn? :a) => true
07:53danlei({:a 1] :a)
07:53Lau_of_DKclojure/fn?
07:53Lau_of_DK([x])
07:53Lau_of_DK Returns true if x implements IFn. Note that many data structures
07:53Lau_of_DK (e.g. sets and maps) implement IFn
07:54Lau_of_DK
07:54danleis/]/}
07:54fanda:-)
07:55danleiLau_of_DK: botsnack
07:55Lau_of_DKdanlei: nom nom nom
07:55danlei:)
07:55fandaok then - vector, map, set, keyword is understandable then
07:56fandawhat about symbol?
07:57Lau_of_DKWhat about it fanda ?
07:58fandait is strange to me that it also implements IFn
07:58Lau_of_DKYes it does seem a bit strange to me also
07:58fandafor example map-keyword:
07:58fanda(:b {:a 1 :b 2}) => 2
07:58fanda({:a 1 :b 2} :b) => 2
08:00fandamap-integer:
08:00fanda(1 {1 :a 2 :b}) => java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn (NO_SOURCE_FILE:0)
08:00fanda({1 :a 2 :b} 1) => :a
08:01fandamap-symbol:
08:01fanda('a {'a 1 'b 2}) => 1
08:01fanda({'a 1 'b 2} 'a) => 1
08:01fandaso I guess this is it :-)
08:01Lau_of_DKit?
08:02fandamaps are functions of their keys... and backwards if key is keyword or symbol, they have fn to retrieve a value from a map
08:02fanda(my guess)
08:03fandaany objections to this theory?
08:03fanda:-)
08:04Lau_of_DKNo it sounds fantastic
08:09Chousukedon't forget sets
08:11fandayes, yes
08:11fandaok, thanks for help
08:15Lau_of_DK(send-off *agent* #'behave))
08:15Lau_of_DK
08:15Lau_of_DKThis seems to me like a change from the original behave that Rich included in his ants.clj
08:15Lau_of_DKCan someone explain the syntax #'behave in this fn ?
08:16danleiit's a reader macro for var
08:18Lau_of_DKdanlei, thx
08:36vdrabHi all. I'm learning about clojure and I found the clojure version of Norvig's spelling corrector quite impressive. Benchmarking it seems a bit disappointing though... maybe I'm doing something wrong?
08:37vdrabrunning the code as found on the clojure wiki took 5sec. to execute, compared to python's 1sec.
08:38vdrabI thought that was just the JVM startup, but when I increased the text file (big.txt) to three times that size, python still does it in 3 seconds while clojure dies with out of memory errors after 55 secs.
08:39rhickeyvdrab: are you benchmarking the load time or the lookup time? The only time that matters is the lookup time, as any online spell corrector wouldn't load the dictionary each lookup
08:39vdrabrhickey, I just took the code as is: create the word dictionary and do just one lookup ("speling")
08:40vdrabI know that's not how you would run a real spelling corrector, but I thought it was a fair benchmark
08:41vdrabmaybe some settings I used were not optimal
08:41vdrabI used the java -server option
08:42vdrabdid this on a macbook pro with 4Gb memory, btw
08:43rhickeyvdrab: You could just be benchmarking slurp
08:43vdrabthat's possible
08:43vdrabbut the text file I used is only 19Mb... would that be problematic for slurp?
08:43rhickeyNorvig has some test data I think, you could use that to benchmark the correctors on, well, correcting
08:44rhickeyFor memory, use Java's -Xmx option
08:45vdraboh, ok.
08:45Chousukeslurp isn't that smart. it just produces one huge string, doesn't it?
08:47Lau_of_DKI believe it does
08:47ChousukeI find that using a lot of laziness can overload the heap too.
08:47Chousukewith large data at least.
08:47Lau_of_DKYea, and it can cause great slowdowns as well
08:48vdrabjust tried with -Xmx512m... it now runs in about 18.8 secs
08:48vdrabwhich is consistent with 5secs runtime for the original big.txt file
08:49Lau_of_DKvdrab: whats the Python time on the same file ?
08:49Lau_of_DKAnd can you exclude boot times from your bench ?
08:49Chousukemaybe use duck streams or something instead of slurp?
08:50rhickeyvdrab: you still are effectively timing the startup of a program. No one would run that script in order to spell correct "speling"
08:50vdrab1sec for the original (load the data + do one lookup), 3 secs for three times bigger data file (simply "cat big.txt big.txt big.txt > a")
08:51rhickeyIf Python can load the fie 5x as fast, but spell corrects 5x as slow, well...
08:51vdrabrhickey: I understand that. I realize the main purpose of that program was to demonstrate clojure's expressiveness... I just wanted to see how it handled larger data...
08:52Lau_of_DKI know that CGrande has some succes retrieving stats from a 40GB Apache Log with Clojure, that ran in 16 - 17 minutes as I recall
08:52Lau_of_DKI think you can review the code on clj-me.blogspot.com
08:52vdrabLau_of_DK: thanks, I'll have a peek
08:53rhickeyvdrab: I don't think you could conclude much of anything from that script, since the lookup code is hardly exercised at all
08:54vdrabthat's true. Like I said, this was in no way meant to be a knock on clojure...
08:55Lau_of_DKvdrab: I dont think anybody took it like that :)
08:55rhickeyright, just be wary of microbenchmarks
08:55vdrab:) point taken.
08:56rhickeyat least with Clojure you have access to very good Java profiling tools when it matters for a real program
08:57Lau_of_DKrhickey: now you stuck your hand in it :) Where does one go to get started with the Java Profilers?
08:57Chousukethe spelling corrector first reads the file into a single string, then lowercases that string :P
08:57ChousukeI'm pretty sure there's something to be optimised. :)
08:57Lau_of_DKhaha
08:58vdrabChousuke: but that's exactly what the python code does too
08:59rhickeyLau_of_DK: I use YourKit: http://www.yourkit.com/, and there's: http://java-source.net/open-source/profilers
08:59Lau_of_DKrhickey: cool, thanks
09:01Lau_of_DKI think when I spawned my REPL this morning, I actually made it ready for JSwat, does anyone have a Quick How-To, so I can hook it up ?
09:02vdrabin the spelling corrector, the dictionary map is built in one fell swoop with reduce... If one had to build it up gradually as the program runs, what would be the idiomatic way to do that? would each assoc be wrapped in a dosync? I'm still trying to wrap my head around the immutability idea.
09:05Chousukevdrab: you would simply return the new dictionary and forget the old one.
09:05Chousukeyou wouldn't change the old dictionary, you'd just stop using.
09:05Chousukeit
09:05vdrabChousuke: and bind the new dictionary to the same name as the old one?
09:06vdrabor thread it through the program with each function call?
09:06Chousukethe latter I suppose.
09:06Chousukeredef'ing names is not idiomatic
09:06rhickeyvdrab: no, keep the dictionary in a ref and (dosync (alter dict assoc k v)) when you need to update it
09:07vdrabrhickey: thanks, that's what I thought... sending global state throughout your program with each function call would get old really fast.
09:08Chousukevdrab: you could also structure your program so that each function returns the new state
09:09danleiis there a way to list the methods of java classes/objects at the repl? (something like mop:specializer-direct-methods)
09:09ChousukeI think someone on the group used java reflection to do that.
09:09vdrabChousuke: maybe for small scripts like the spelling corrector thing... I'd dread to have to do that for large programs though...
09:10Chousukevdrab: well, yeah
09:10Chousukevdrab: refs to the rescue :)
09:10vdrabso it seems :)
09:10Chousukeor agents.
09:10blackdog_danlei, http://groups.google.com/group/clojure/browse_thread/thread/b26410a2a52e62b0/96ed91f823305f02?lnk=gst&amp;q=user.clj#96ed91f823305f02
09:11blackdog_first post from chouser has what you want i think
09:11danleiblackdog_: thank you
09:12blackdog_and bill clementson has a good post on his blog about integrating that and javadoc in emacs
09:13danleiblackdog_: wow, great
09:13danleiblackdog_: thanks a lot
09:13Lau_of_DKspeaking of. Did you guys try out cgrand's Javadoc ?
09:14blackdog_danlei, http://bc.tech.coop/blog/
09:17rhickeyLau_of_DK: For Jswat: start clojure with -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888
09:17rhickeyIn JSwat, say new session
09:17rhickeyset up clojure.jar in the jars section, src/clj in the sources section
09:18rhickeyin tools, options, general section set stepping excludes clojure.lang.*
09:18rhickeythen session, attach, localhost, port 8888
09:19rhickeyopen src/clj/clojure/core.clj and set a breakpoint in, say, merge-with
09:19rhickeythen in your repl call merge-with, you should break in JSwat, and be able to step
09:19Lau_of_DKFantastic
09:19Lau_of_DKThanks alot rhickey
09:20rhickeyvariables in the lower right will show you let locals
09:20rhickeyand args
09:21rhickeystep over/into will nav you around and between .clj files
09:21rhickeyMy only wish was that the locals window had smart display of collections
09:22rhickeye.g. displaying their contents rather than the implementation by default
09:22rhickeyit works really well in general, though
09:25Lau_of_DKIt looks cool, I think this might eleminate many of my complaints about the stack trace messages
09:28Lau_of_DKI cant help but wonder if JSwat is implemented in Emacs somewhere
09:54Lau_of_DKrhickey: Im getting a "Missing local variable information", any idea why ?
09:56blenkethow do i do to add new javalibs so i can import them in clojure?
09:57blenketand how do i import just sourcefiles?
09:57Lau_of_DKWhich then changed to "Current thread not set"
09:57rhickeyLau_of_DK: look at the call stack on the left, you're probably in some JDK code - you can exclude that for stepping too
09:58blackdog_blenket, the easiest way is to stick all the jars you want in a single dir and access it w -Djava.ext.dirs=$JARS
09:58blackdog_where $JARS is you dir
09:58blackdog_that's in your java command line
10:00Lau_of_DKrhickey: Sorry didnt mean to be rude, but it seems my entire system shutdown when I tried to rerun my code
10:29Lau_of_DKrhickey: the callstack is empty. I know I have a function thats silently failing, why isnt JSwat notifying me?
10:36Lau_of_DKAlso, I tried to set a breakpoint in hash-map in boot.clj, and it doesnt break when I run it
10:47blenketblackdog: uh ok and on windows?
10:47blackdog_no idea
10:47blenketwhere would i put the: w -Djava.ext.dirs=$JARS
10:47Lau_of_DKIm not sure JSwat reads .clj files as source ?
10:47blackdog_oh yes that should work
10:47blenketuh java command line?
10:47blackdog_java -Djava.ext.dirs=/my/jar/dir ....
10:48blenketblackdog_ : and thats sets the path forever?
10:48blackdog_yes, you can add new jars and it'll pick them up on restart
10:49rhickeyLau_of_DK: yes it does, if you configure your source root in Sessions/Settings/Sources, and have your cljs in proper classpath-conforming directories
10:49blenketand it doesnt mess with my normal jaba-path?
10:49blackdog_correct
10:49Lau_of_DKrhickey: All the clojure source is /src/clj and so on, but my own file is just /lau/projects/file.clj
10:50Lau_of_DKThats a no go I take it?
10:50rhickeyLau_of_DK: no Java tooling is going to work without classpath-conformant stuff
10:51Lau_of_DKrhickey: good to know. So my own structure for all my little programs should be ~/projects/stress-test/src/clj/main.clj
10:51Lau_of_DKAs an example ?
10:52rhickeyLau_of_DK: it has nothing to do with src/clj and everything to do with my.namespace.lib being in my/namespace/lib.clj, somewhere in the classpath and in the path you give as sources
10:53danleione easy way to get a class' method name seems to be: (map #(:name (bean %)) (.getMethods (class (String.))))
10:53danleiwhy can't i do (.getMethods String), even if (class? String) -> true
10:54rhickeydanlei: http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b
10:54danleirhickey: thanks
10:57duck1123clojurebot: jswat?
10:57clojurebotHuh?
10:57duck1123clojurebot: jswat is <reply>For Jswat: start clojure with -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888
10:57clojurebotRoger.
10:57duck1123clojurebot: jswat?
10:57clojurebotFor Jswat: start clojure with -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888
10:59blenketjava -Djava.ext.dirs=C:/javaprogs/
10:59blenketbut that doesnt work
10:59blackdog_i think on windows it's \
10:59blenketnah
11:00blenketunless java is epcial
11:00blackdog_i have no idea
11:00blackdog_yes it's \ and ; inbetween
11:01blenkethow?
11:01blackdog_java -Djava.ext.dirs=..\Libs -cp ..\Src\Utils;..\Src\Accounts clojure.lang.Repl %1
11:03blenketuh ok i dot know what to put in the dirs and all
11:13blenketcome on wtf how hard can it be to put up a simple explanaation on the clojrue homepage on how to use java libs on windows?
11:14Chousukeisn't there something on the wiki
11:14Chousukeif there isn't, make an edit :P
11:15ChousukeIt seems most people using clojure right now are not using windows :/
11:15rhickeyblenket: http://www.ibm.com/developerworks/library/j-classpath-windows/
11:16rhickeyone of a million articles you can find by googling: java classpath windows
11:18blenketThe classpath is one of the most complex and infuriating parts of the Java� platform, but mastering it is essential to becoming a professional Java programmer. In this article, Elliotte Rusty Harold lays out the intricacies of the classpath and sourcepath and shows you how to master them on Windows. If you use UNIX or Mac OS X, see the companion article.
11:19blenketseriously, cant we just delete JAVA from history?
11:19blenketit is just a f----in classpath
11:21Chousukedo you have a point here?
11:21Chousukeyes, the java classpath system is complex. it's also very flexible.
11:21danleidem erfolg hat der herrgott den schweiss vorangestellt ;)
11:22danleiroughly: first sweat, then enjoy
11:24rhickeydanlei: google translate said: the success God has preceded the weld
11:25danleirhickey: well, if i had to translate it word-by-word: god preceded success with sweat, so ... yes
11:26danlei weld?
11:27blenketyeah i but german bueraucrats get a boner out of JAVA
11:27danleiah .. schweissen = welding, schweiss = sweat
11:27danlei=)
11:28rhickeyblenket: I'm sorry you are frustrated, but there are a lot of help resources available
11:28danleiwell, we're as much all buereaucrats, as americans are all cowboys, i guess :) and besides, i've never done anything with java, before i heard about clojure. (a few days ago)
11:28danlei=)
11:30rhickeylet's try to stay productive and constructive, folks
11:30danleii had toubles with the classpath too, i made it run by first getting a minimal setup to work (basically just the clojure-jar-file via -cp, then improved upon that
11:33blenketi have clojure working
11:33blenketand i can use (Math/pow 5 3)
11:33blenketfor example
11:33blenketbut if i download a new lib, lets say ImageJ or JAI, where to put it and how to run i dont get.
11:34blenketif i want to use JAVA-libs, should they be compiled or should I use the sourcefiles?
11:34blenketie, .java files or .jar files?
11:34duck1123jar files
11:34danleiwell, under linux you can add to a path by adding : in between, if you find out that char under win (";"?), you can then add the path to the jar file to the path you pass via -cp
11:34Chousukeblenket: you can put the jar file anywhere. clojure will find it if you add it to your classpath
11:34duck1123you could use .classfiles, but that just gets messy
11:35duck1123I think it's ; under win
11:35Chousukeie. java -cp clojure.jar;path/to/mylib.jar;other.jar clojure.lang.Repl
11:35ChousukeI think there are some shortcuts so you can just specify "every jar from this directory" or something but I don't know them.
11:35blenketand why isnt there a dir in c:/Program Files/java/ where i cna just stick them and they work?
11:35danleibtw, iirc options start with / under win, but i'm not really sure about that
11:35danleiso maybe its /cp
11:35Chousukeblenket: you can make one.
11:36danlei*it's
11:36duck1123there are plenty of scripts that'll add all jars in a folder to your classpath then run clojure
11:36blenketcan i add stuff do my classpath in .emacs?
11:36blenketwhere i have the path to the REPL?
11:36duck1123yes
11:36Chousukeblenket: yeah you can
11:37duck1123look at: http://paste.lisp.org/display/70611 for an example
11:37ChousukeI have this (in (custom-set-variables ...) ): '(swank-clojure-extra-classpaths (when (file-directory-p "~/opt/classpath") (directory-files "~/opt/classpath" t ".jar$")))
11:39Chousukeyou should be able to use something similar
11:39danleiif nothing works, you could still experiment with add-classpath from the repl
11:40duck1123the script that compojure uses to load the repl is also pretty nifty
11:40duck1123clojurebot: compojure?
11:40clojurebotcompojure is http://github.com/weavejester/compojure/tree/master
11:44lisppaste8blentek pasted "clasppath" at http://paste.lisp.org/display/70885
11:45blenketso ther ei can add:
11:45blenket(list (some-path))
11:45blenket?
11:46ChousukeConsider using slime
11:46Chousukeit's much nicer.
11:46duck1123blenket: one note, I highly suggest you get the latest release from svn
11:46blenketand how do i convert a .java-file to .jar?
11:47Chousukeblenket: a .jar file contains a directory hierarchy of compiled java classes
11:47blenketurk
11:47Chousukeusually, you don't need to do anything for libraries
11:47danleiblenket: did you try (add-classpath "path/to/jar"), just to get it up and running? (it's not the right thing, but for a start ...)
11:47Chousukethey come with a jar
11:48Chousukeor at least an ant build script that make a jar for you
11:48blenketbut if i write ,y own Java-class and want to use it for clojure?
11:48Chousukejust add the dir it is in to your classpath
11:48duck1123most downloaded javalibrarys will build the jar file you as part of their ant build process
11:48Chousukenote that it must be compiled.
11:48Chousukeand remember that java projects must honor a certain directory structure
11:54blackdog_awayrhickey, I think is deprecating add-classpath
11:54rhickeyadd-classpath is only for repl
11:55danleii just mentioned it to get him up and running, then he could've calmed down and do it right
11:56danlei(and those classpaths really /are/ confusing, if you're not used to them / read up on them)
11:58rhickeyI think -Djava.ext.dirs=/my/jar/dir is the simplest advice
11:58askentask"C:/Progra~1/ImageJ/ij.jar"
11:58rhickeyget a lib, stick in .my/jar/dir
11:59askentaskuser=> (add-classpath "C:/Progra~1/ImageJ/ij.jar")
11:59askentaskjava.net.MalformedURLException: unknown protocol: c
11:59askentaski tried to add it to .emacs
11:59askentaskdidnt work
11:59danleitry file:///
11:59askentaskwhere?
11:59danleirepl
11:59askentaskyes but
12:00askentaskuser=> (add-classpath "file:///C:/Progra~1/ImageJ/ij.jar")
12:00askentask?
12:00askentasknil
12:00askentaskuser=> (add-classpath "file:///C:/Progra~1/ImageJ/ij.jar")
12:00askentasknil
12:00askentaskuser=>
12:00askentaskis that good?
12:01duck1123add-classpath always returns nil
12:01duck1123it's kinda confusing in that respect
12:01danleii'm not on windows, but nil is ok
12:03askentaskand then?
12:03askentaskhow do i use it?
12:03danleiwell, that should be it
12:03askentaskit retusn nil for a file that doesnt exist too
12:03danleijust import whatever jou have in that jar
12:03askentaskso i have no idea if it worked
12:03danlei*you
12:04askentaskshould i really call it like that?
12:04askentask(add-classpath "file:///C:/Progra~1/ImageJ/ij.ja")(add-classpath "file:///C:/Progra~1/ImageJ/ij.ja")
12:04askentaskoops 2 times
12:04danleii'm on linux and did:
12:04duck1123if you don't get class not found errors, it worked :)
12:04danlei(add-classpath "file://home/danlei/coding/project/")
12:04danlei
12:04askentaskso 2 or 3 / ?
12:04danleiif it's a jar, you append it to the path .../.../blah.jar
12:04danleinot sure
12:04danleitwo for me under linux
12:05danleigive it a try
12:06danleiquick google showed: file:///c:/.../...
12:13fandahello! does anybody want to try real-time multi-user text editing? :-)
12:14fanda[software is completely free for non-commercial use]
12:14fandait is called MoonEdit
12:14fandahttp://moonedit.com/indexen.htm
12:15fandasee the movie:
12:15fandahttp://moonedit.com/meditor.mov
12:15fandawe could use it just for fun...
12:16fandait works under Windows, Linux and FreeBSD
12:20fandadownload your client from here:
12:20fandahttp://moonedit.com/down.htm
12:20fandainstall/run and File - Join - Join File...
12:21fanda* File name = "hello_world.txt"
12:21fanda* Remove history = Yes
12:21fandaJOIN
12:22jaanfanda: http://etherpad.com/
12:25fandalooks very promising, jaan!
12:25fandathey are full now, but I will surely come back :-)
12:25fandahttp://etherpad.com/ep/beta-signup
12:25Chouserfanda: written in Clojure?
12:26rhickeyChouser: my question exactly
12:26Chouseror maybe has Clojure syntax highlight and indent support?
12:26fandaChouser: no no, I wish it could be - it would actually be one of the applications, I would try - if I knew more about networks and Java libraries
12:28fandaI don't think there is any syntax highlighting
12:31jaanfanda: there is also Gobby, which is also cross platform and it seems to be in active development. also seems to have syntax highlighting http://gobby.0x539.de/trac/
12:37fandathanks, jaan
12:39fandaGobby is covered under the GPL (General Public License). Can I use it to edit CPL code???
12:40fandaI mean - products which I create with GPL should be GPL, right?
12:41fanda(sorry for little offtopic discussion)
12:41fandaI would like to somehow synchronize source code editing efforts and sometimes do this even real-time :-)
12:46fandaanybody willing to try MoonEdit or Gobby?
12:46fandaI have MoonEdit running with open hello_world.txt file :-)
12:57Chouserfanda: I'm pretty sure that in general you can use GPL projects to create non-GPL code, you just can't *change* GPL projects by adding non-GPL code and then distributing the results.
13:00fandaChouser: Thanks for explanation.
13:00jaani have a question about zip-filter.xml. all the examples seem to retrun value, is it possible for it to return somekind of reference to the element, just like xpath does? I hope i didnt ask anything extremely stupid :)
13:09Chouserjaan: no, it's a good question.
13:10Chouserall the examples use 'text' or (attr ...) to get a plain-text result
13:12Chouserif you don't use one of those, you'll get a list of zip nodes, each of which encapsulates the whole document tree while pointing a particular element
13:12Chouserfrom a zip node you can use 'zip/node' to get the XML element itself, of you can use any of the other zip functions to make "change", navigate to elsewhere in the document tree, or whatever.
13:17jaanaaaa. ok. click. now it fits together in my head, thanks!
13:17Chouseroh, great.
13:17jaanwhile at it, i
13:17jaanerr
13:19jaani found this line in the begging of the xml.clj file "(def xml->)" is this something like forward declaration?
13:19Chouserjaan: exactly
13:21rhickeythere is now declare for that, to make it clearer
13:22Chouserrhickey: you'd prefer declare even for a single item?
13:22rhickeyyes please
13:23rhickeydeclare says - I'm going to def this for real later
13:23rhickey(def x) says, I'm going to bind this at some point, but leave the root unbound
13:24Chouserok
13:24larrytheliquidthe :arglists format uses a trailing ? for optional arguments (ie: this? orthis?) , is there convention to specify OR logic? (ie: this? orthis? ;; but at least one)
13:28rhickeylarrytheliquid: nothing special for that, no
13:58Lau_of_DKGood evening fellow Lisperz
13:59Lau_of_DKjavaQuestion: I need JSwat to understand where my source is. Im told that for it to do so, I must follow the Java naming convention. Normally, I would place my file in /home/lau/projects/file1.clj. Assuming its a single-file program. Am I correct in assuming that for JSwat to understand my structure, I now need to put everything in /home/lau/projects/lbj/core/program1/src/clj/file1.clj, assuming the namespace is lbj.core.program1 ?
14:02rhickeyLau_of_DK: no, src/clj was an example before - what matters is that the dir structure correspond to the namespace: i.we. /lbj/core/program1.clj is in some dir that is on the classpath, and that same dir is set in JSwat as a source dir
14:02Lau_of_DKOh I see
14:02Lau_of_DKThanks, I'll try that out
14:03rhickeyput it here: /home/lau/projects/lbj/core/program1/file1.clj
14:03rhickeyset this as a source dir: /home/lau/projects/, and on the classpath
14:03Lau_of_DKAlright
14:13Lau_of_DKSo, Ive set it up like above. ~/projects/lbj/core/langdon/langdon.clj, Ive added ~/projects to the classpath, and as a sourcepath in JSwat. This didnt give anything. I tried started the file with (ns lbj.core.langdon) and it didnt change anything. I tried adding a breaker in both langdon.clj and in boot.clj, neither of which got caught in JSwat. What can I be doing wrong ?
14:14Lau_of_DK(note: If I pause from JSwat, the REPL pauses, so its attached correctly)
14:14rhickeyboot.clj?
14:15rhickeywhat's that?
14:15Lau_of_DKIts actually the one you wrote in /src/clj/
14:15rhickeycore.clj?
14:16Lau_of_DKNo, I havent updated since those "Interim update, dont use" started
14:16Lau_of_DKIm (really) hoping thats not related to this issue?
14:16rhickeyall advice I've given you is for currrent
14:16Lau_of_DKDid you just announce that the latest release wouldnt include .clj files and only compiled ones?
14:16rhickeyJSwat did work before, but the paths are different
14:17rhickeyalso avoid ~ in Java
14:17Lau_of_DKI use the full path, just for ease of typin
14:17Lau_of_DKg
14:17duck1123_has anyone tried using jdee to debug clojure projects?
14:25danlarkinclojurebot: where are you?
14:25clojurebothttp://gist.github.com/27733
14:28duck1123_why is that on gist and not an actual project?
14:31Lau_of_DKrhickey: in r1111 you change (method) to (.method), whats gained ? And does this change (.method class) like (.pow (bigint 4) 2)?
14:32danlarkinduck1123: ask hiredman :)
14:35ChousukeLau_of_DK: that's only for todo
14:35Chousukeer
14:35Chousukedoto* :P
14:36Lau_of_DKphew
14:36ChousukeLau_of_DK: and requiring the . for methods allows you to use clojure fns in doto as well.
14:36Lau_of_DKupdates are scary
14:39danlarkinclojurebot: clojurebot?
14:39clojurebotclojurebot is wacky!
14:43duck1123clojurebot: clojurebot is self referential
14:43clojurebotAck. Ack.
14:51Lau_of_DKIs there a command within Clojure which will give me the revision #?
14:51Chousukeno.
14:52Lau_of_DKI knew it
14:52Lau_of_DKThe new SVN broke my REPL
14:52Lau_of_DKThats why you should never update!
14:54Lau_of_DKWhy does swank throw java.lang.Expcetion: No such namespace: clojure, no such namespace: swank
14:55Lau_of_DKOr more to the point, how do I fix it ?
14:58Chousukeupgrade your swank
14:58Chousukeupgrade everything :P
15:03danlarkinupgrade it all!!
15:15arohnerrhickey: last weekend I had a macro question, and you mentioned something about how fns could not be serialized in a macro closure. Can you explain that a little more?
15:15Lau_of_DKOk, its working
15:15Lau_of_DK:)
15:16Lau_of_DKTypical american update system: UPDATE EVERYTHING FOR THE PRICE OF 1, FREE STEAKS INCL.
15:17danlarkin:)
15:20Lau_of_DKYes, this new updates definately mangles my classpath in some way, like before I had /lbj/core/utils/util.clj, which imported with (use 'lbj.core.utils), now I have to move utils.clj up one dir
15:21rzezeskiSomeone help me understand something...
15:21rzezeskithis works... (map (fn [ms] [(:name ms) (:age ms)]) '({:name "ryan" :age 25} {:name "bob" :age 30}))
15:21rzezeskithis doesn't... (map #([(:name %) (:age %)]) '({:name "ryan" :age 25} {:name "bob" :age 30}))
15:22arohner#( includes an extra paren
15:23arohnerso (fn [x] (foo x)) => #(foo x)
15:23arohnersorry, => #(foo %)
15:23arohnerso when you write #([stuff]), => ([stuff])
15:24arohnerthat wasn't as clear as I'd like
15:24rzezeskisorry, but I still don't see my extra paren
15:25arohnerok, let's build up the example
15:25arohner['a 'b] is an array literal
15:25rzezeskiok
15:25arohnerarrays can be functions of their arguments
15:25arohner(['a 'b] 0)
15:25arohner=> a
15:26rhickeyrzezeski: from:http://clojure.org/reader #(...) => (fn [args] (...))
15:26rhickeyyour ... is a vector
15:26arohnerbut (['a 'b]) does not work, because you didn't tell it what index to retreive
15:27arohner(fn [x] (foo x)) => #(foo %)
15:27arohner#(['a 'b]) => (['a 'b])
15:29arohnernm, I'm wrong
15:29rzezeskiyea I'm not following
15:29rzezeskihow bout I state what I'm trying to accomplish
15:29rhickey#(...) => (fn [args] (...))
15:29rhickeysubstitute for ... in both forms above
15:30arohnerwait, I was right
15:30arohnerI only thought I was wrong :-)
15:30rhickeynot exactly right
15:31rhickey#([%1 %2]) => (fn [x1 x2] ([x1 x2]))
15:31rzezeskiI want to take a list/seq of maps, and create a sequence of vectors containing the values, but I want the values to be in a certain order (hope that makes sense)
15:33Lau_of_DKrhickey: Last try. Ive updated everything. Ive moved the file in /home/lau/projects/lbj/core/langdon.clj. Ive added clojure.jar to the classes, and src/projects to the sources. Ive attached the process. Once it attached it shows alot of 'dynamic' classes in the left hand side, and thats basically it. I can open up my langdon.clj and set breakpoints, but they never break. Anything missing from that description ?
15:33rzezeskirhickey: I feel like I understand #(...) => (fn [args] (...)) If you look at my two examples, didn't I substitute everything correctly? Could someone correct my actual example to show me what I'm doing wrong
15:33rhickey#(vector (:name %) (:age %))
15:34rhickey#([(:name %) (:age %)]) is not the same thing
15:34rzezeskithis works like a charm ... (map #(vector (:name %) (:age %)) '({:name "ryan" :age 25} {:name "bob" :age 30}))
15:35rzezeskirhickey, ok can you explain to me why that isn't the same thing? or did you guys already do that? :)
15:35arohner#() includes a function call
15:35rhickey#([%1 %2]) => (fn [x1 x2] ([x1 x2])) note how the vector is in parens, i.e. it is called
15:36rhickey#(...) => (fn [args] (...)), the ... ends up in a parens
15:36Lau_of_DKrhickey: hold your horse
15:36Lau_of_DKI called my main func at the bottom of langdon.clj and used load-file from the repl, this did the trick. But can you explain why ?
15:38rhickeyLau_of_DK: no
15:38rzezeskirhickey, I think I finally get it. It's going to end up treating the vector as a function?
15:39rhickeyrzezeski: right
15:39rhickey#() encloses a call, not a body
15:40rhickeymakes that call the body of a fn
15:41rzezeskigot it, so if I really didn't want to use "vector" I could also do "(map #(identity [(:name %) (:age %)]) '({:name "ryan" :age 25} {:name "bob" :age 30}))" but that doesn't really buy me anything
15:41rzezeskithx for the help
15:41hiredmanjust map first
15:42hiredmaner
15:42hiredmanwait
15:42hiredmanmaybe just call seq un it
15:43hiredmanuser=> (seq {:h :a})
15:43hiredman([:h :a])
15:44hiredmanugh, it is obviously too early for me
15:47Lau_of_DKLets say I have a 5x10 grid that I need to walk. I have a hunch that (for [x (range 10)] (for [y (range 5)] (if (pos? (cell x y)) do something))) wont fly. What will ?
15:48arohnerif you just want to construct a list of positive elements, for will work
15:50arohner(for [x (range 10) y (range 5) :when (pos x y)] (cell x y)) should return a list of positive cells
15:50arohnerif you need side effects, you can use doseq
15:50arohneror (dorun (for [] (do ...)))
15:50Lau_of_DKarohner: the trick is not to get positive cells. But a for loop with uneven (ie 10x5 and not 10x10) doesnt run very well
15:50rhickeyarohner: to your fn question, basically any forms that end up in code must have a print/read representation so they can be stored in bytecode. I didn't have a print/readable renditions of fn objects, now I do, as long as they are not closures
15:51arohnernow I do = post AOT changes?
15:51rhickeyarohner: yes
15:53arohnerrhickey: thanks
15:53Lau_of_DKWhy have we started using vectors in loops like doseq?
15:53arohnerLau_of_DK: what do you mean, 'run very well'?
15:54Lau_of_DKarohner: it doesnt do just 10x5, when y has reached 5, it runs for another 5 to match the x (10)
15:55arohner(for [x (range 3) y (range 2)] [x y])
15:55arohner
15:55arohner=> ([0 0] [0 1] [1 0] [1 1] [2 0] [2 1])
15:56arohnerLau_of_DK: the vector in doseq is to be consistent with let, binding, for
15:57rhickeyalso, doseq now has all the power of for - multiple seqs, :when/:while
15:58Lau_of_DKSweet, feels abit like CL :)
15:58rhickey(doseq [x (range 3) y (range 2)] (println x y))
15:59rhickeydo we can stop explaining dorun :)
15:59Lau_of_DKhehe
16:31Lau_of_DKIt seems that somewhere along the way, agents calling themselves went from (send-off *agent* self) to (send-off *agent* #'self) ... why ?
17:04ChouserLau_of_DK: some older code used #'self
17:04ChouserI don't think it's required anymore, because of how vars are resolved
17:05Lau_of_DKChouser: I noticed it in the ants.clj in the GoogleGroup, its updated recently i
17:05Lau_of_DKI think
18:09hiredmanhttp://groups.google.com/group/clojure
18:53larrytheliquidis there a built in function to map a group of elements? ie: (group 2 [1 1 2 2 3 3]) => [[1 1] [2 2] [3 3]]?
18:53Chousukepartition?
18:54AWizzArdlarrytheliquid: group is not available as far I know
18:55AWizzArdbut partition comes close
18:55Chousukepartition discards the remainder if the seq if it isn't evenly divisible though,
18:55larrytheliquidChouser & AWizzArd: partition will work, thanks
18:55AWizzArdif the number of elements in your collection is divisible by the n by which you want to group then partition works fine.
18:55larrytheliquidcool, ty
18:55Chousukewriting your own shouldn't be too difficult either
18:56AWizzArdright
18:56larrytheliquidyeah, just want to minimize duplicating whats already in core
19:49notallamais there a way to increase my stack size in java? or just the heap?
19:50notallamai could also make my algorithm suck less, but both woud be nice.
19:53dthomasIs there some way to get Clojure to give me better backtraces? Or do I need some tool for that, like JSwat?
19:54dthomasRight now I just get a single line like: java.lang.ClassCastException: java.net.URL cannot be cast to java.lang.String (NO_SOURCE_FILE:0)
19:59Chouserdthomas: (.printStackTrace *e)
19:59Chousernotallama: there's a command-line switch
20:00Chousernotallama: http://www.caucho.com/resin-3.0/performance/jvm-tuning.xtp
20:03notallamathanks
20:47hiredmanugh
20:47hiredmanhow do I make a regex pattern that matches a '.'
20:47Chouser#"\.'
20:47Chouser#"\."
20:48hiredmanhmmm
20:48hiredmanworks on my clojure from svn head
20:48hiredmanbut not the one on my machine at home
20:48Chouseryep, seems ok.
20:48Chouseroh, yeah, if it's old enough -- #"" details changed
20:49hiredmanugh
20:50Chouserfor the old format, I'd try #"\\." but no promises
20:50thearthur(use 'org.gnufoo.unit-test.unit-test) --> Could not locate org/gnufoo/unit_test/unit_test.class or org/gnufoo/unit_test/unit_test.clj on classpath: ??? its turning '-' into '_' in the file names
20:50thearthuris this on purpose?
20:50Chouserthearthur: yes. file and class names should have _ instead of -
20:50thearthurwhy is this?
20:51ChouserJava doesn't allow - in class names.
20:51hiredmanclojurebot: - is _
20:51clojurebotOk.
20:51hiredmanclojurebot _ is -
20:51hiredmanclojurebot: _ is -
20:51clojurebotAck. Ack.
20:51thearthurok. I dont know java, so thanks for the help, sorry bout the siily ?
20:51danlarkinclojurebot: _?
20:51clojurebot_ is -
20:52Chouserthearthur: no prob. Most languages don't all - in names; they treat it as subtraction
20:52Chouser"don't allow"
20:54thearthuri downloaded unit-test from gnufoo.org and am trying to use it. could this ever have worked?
20:54thearthurwith \- in the names?
20:54Chouserthearthur: oh! hm.
20:56thearthurchanging the \- to \_ did infact make it start working
20:57fyuryuI have some/lib/one.clj and some/other/two.clj on my classpath. Compiling the first goes ok. But compiling the second (which :uses/:requires the first one) gives me NoClassDefFoundError: some/lib/one$myfun__99 exception.
20:58fyuryuanyone ever encountered something like this?
20:58Chousukefyuryu: you need to add the classes dir to your classpath
20:58Chouserthearthur: do you have instructions that say to use 'use'? Perhaps it could be made to work using load-file instead of chaing the filenames
20:59Chousukefyuryu: A while ago I was getting weird errors compiling clojure itself because the build result directory wasn't in my classpath :/
21:00ChousukeI think clojure thinks that the lib should be compiled but can't find the classes and then breaks.
21:00Chousukeor something weird.
21:01ChousukeI really don't know why it happened and whether it should be treated as a bug or not.
21:02fyuryuhm, I checked again and added it to classpath, to be sure. but it still throws NoClassDefFoundError
21:02Chousukehmm.
21:03ChousukeI think you should ask on the group
21:03Chouserfyuryu: from what you described, it ought to work. So the problem is most likely in some detail you didn't describe.
21:04Chouserfyuryu: can you paste both files with their full path names and the classpath you're using?
21:05fyuryuChouser: yeah, I'm affraid it's something obvious too, the function it complains about was private initially, but changed that and it didn't help
21:07fyuryuI'll try to isolate it. The files are too big to paste
21:07Chouserok
21:12thearthurwhy would you use refer instad of use?
21:13Chouser'refer' brings names in from a namespace that's already loaded. 'use' loads the .clj first if needed.
21:14fyuryuChousuke: bingo, that was it. ok, I added the classes dir to both libs to classpath (this time in my script which launches clojure)
21:14thearthurdose refer have any advantage over use?
21:15fyuryuweird, when I only had the parent dir on classpath, compilation of the first lib went ok, even the classes dir was automatically created
21:17danlarkinoh this is annoying... (= "a" \a) == false
21:18Chouser(= (first "a") \a) and (= "a" (str \a))
21:50larrytheliquid(use 'my-lib) works fine when all the code is in <classpath>/my-lib/my-lib.clj, but id like to break the code up into separate files. i did so and used (load-file "lib/my-file.clj") in my-lib.clj, but then when i try to (use 'my-lib) i get FileNotFoundException: lib/my-file.clj
21:54wlrChouser: do you agree that after (require '[some.long.verbose.namespace :as slvn]) it would be nice to be able to (in-ns 'slvn) and get prompts like slvn> ?
22:02fyuryudoes the AOT compilation currently supports a "main" method or is this only for genclass (or the standalone compiler)?
22:03fyuryujust went through posts on the group and I'm slightly confused
22:12fyuryuby supporting "main" method I mean (defn main [args] ...) in a file and then being able to run it from the command line (java -cp ... my.lib)
22:15Chouserwlr: hm, it doesn't seem like it should ignore the alias
22:15Chouserfyuryu: yes, AOT supports main without needing :genclass
22:16Chouserfyuryu: you must have a (defn -main ...)
22:21fyuryuChouser: ok, thanks
22:41cooldude127well, i'm making my attempt to port on lisp's non-determinism macros to clojure
22:50Chousercooldude127: great!
22:52cooldude`yeah, it's only like two macros to get the basics working
22:53cooldude`just gotta make sure they work
22:53cooldude`also there's dealing with the fact that clojure doesn't have mutability, so i have to use refs
22:54thearthurwhats clojure for (flatten [[123][123]] ) --> ( 1 2 3 1 2 3)?
22:55cooldude`thearthur: my first guess is it's write it yourself
22:55cooldude`i don't think it's builtin
22:58briancarperseq-utils in clojure-contrib has flatten.