#clojure logs

2010-02-14

01:03piccolinoIs there some way to test if a vector has a certain element in it?
01:04hiredman.contains
01:04hiredman,(.contains [1 3] 3)
01:04clojurebottrue
01:05piccolinoThanks.
01:13piccolinoOh, that only works on vectors.
01:21hiredmanpiccolino: no, the .contains method is part of the interface for java Collections, works on any Collection
01:21hiredman,(.contains '(1 2 3) 3)
01:21clojurebottrue
01:21hiredman,(.contains (seq '(1 2 3)) 3)
01:21clojurebottrue
01:21piccolinoHm, I had tried it on a map.
01:23zaphyrhow do i specify a void return value in a :methods section?
01:24hiredman,(instance? java.util.Collection {})
01:24clojurebotfalse
01:24hiredman,(instance? java.util.Collection (seq {}))
01:24clojurebotfalse
01:24hiredmanon
01:24hiredman,(instance? java.util.Collection (seq {:a 1}))
01:24clojurebottrue
01:25hiredmanzaphyr: did you try void?
01:26zaphyrno. :)
01:26hiredmanI don't recall for sure, but I would try it
01:28no_mindis clojure google group moderated ?
01:28zaphyrhiredman- instant win. ta :)
01:35hiredmanno_mind: yes
01:36hiredmangoogle groups apparently have a pretty serious spam problem for people who don't read them via gmail
01:53no_mindok, that is why my post did not appear :)
01:55hiredmanit used to be only the first post had to be approved, but spam spoofing addresses of group members started to show up
02:24defnAnyone here use libcurl with clojure at all?
04:01zaphyrhmm. weirdness. i am trying to :use a regular clojure namespace within a :gen-class namespace
04:01zaphyrcompilation works fine- but when i try to instance it i get error: java.lang.NoClassDefFoundError: Could not initialize class ui.action (ui.clj:21)
04:03Chousukehow are you instantiating it?
04:03zaphyr(ui.action. title)
04:03Chousukeis that the full namespace? :/
04:04zaphyryep
04:04zaphyri know, that's a naughty namespace :)
04:04Chousukeand you have the classes/ dir in your classpath and all?
04:04zaphyryep
04:04Chousukehm
04:04zaphyri can even disassemble it with javap
04:04zaphyrthe class *is* there
04:05Chousukedid you define the init function?
04:05zaphyryep
04:05zaphyri'm doing some magic in post-init
04:05zaphyrnp ;)
04:05Chousukehmm. :/
04:06zaphyrhttp://paste.lisp.org/display/94930
04:06zaphyrthat's the code for ui.action
04:06zaphyri switched the :use to a :require to see if it made any difference, which it didn't :S
04:08zaphyrhttp://paste.lisp.org/display/94931
04:08zaphyrthat's the contents of ui.util
04:08zaphyr(a truly horrible function that could probably be a one liner, yea yea :))
04:10Chousukehmmh :/
04:11ChousukeI wish the error message were a bit more descriptive
04:12Chousukecan you try instantiating the thing in a repl and then print the whole stacktrace?
04:12Chousukethough since it's a NoClassDefFoundError it's probably some classpath gotcha
04:13Chousukeand by the way, the actionPerformed method has a potential race
04:13zaphyrhttp://paste.lisp.org/display/94932
04:13zaphyroh really?
04:13zaphyroh, of course
04:14Chousukeyou should do (when-let [x @(.state this)] (x))
04:14zaphyrfixed, ta
04:15zaphyrnow i suppose i will see if i can put together a minimal example of this weirdness...
04:15Chousukeyou did restart slime after you compiled the namespace, right?
04:15zaphyrseveral times :S
04:16ChousukeI wonder what that ui$eval... thing is :/
04:16Chousukelooks like a single-segment namespace :P
04:16zaphyr;)
04:16zaphyrit is, horrors, it's in (ns ui)
04:16Chousukehm
04:17zaphyrmaybe i should stick another directory up there
04:17Chousukeyou should
04:17Chousukesingle-segment namespaces can cause weird problems.
04:19ChousukeI doubt changing it will actually fix your problem, but at least it's not so evil anymore :)
04:22zaphyrnup. same old.
04:22zaphyrbut, at least i can sleep at night now
04:46zaphyrhmm. kids? don't use single level namespaces. that does seem to cause the issue
05:07ordnungswidrig1moin
06:29LauJensenGood afternoon team
06:33zaphyrbleh. anyone else find that (javax.swing.SwingUtilities/invokeAndWait #(javax.swing.JFileChooser.)) from the slime repl hangs everything dead?
06:33zaphyr(under win32 at least)
06:35LauJensenehm... you said 'hang' and 'windows'.....
06:35zaphyr=P
07:36underdevis there a way that i can coerce a list of symbols to return a list of strings with each string the textual value of the symbol?
07:36underdevie autoquote, or barewords
07:37Chousuke,(map str '(foo bar))
07:37clojurebot("foo" "bar")
07:37StartsWithK(map name sym-seq)
07:38Chousukename will leave out the namespace portion
07:42Kenny164Hi all
07:43Kenny164I'm having troubles with getting enlive to work in emacs, looked like a classpath error, but its ok on the clj?
07:56underdevthanks guys\
08:02underdevspeaking of emacs (i don't know enlive), i picked up the oreilly emacs extension book for $5 +s/h, there are more for that price if anyone wants one
08:03underdevits like tcl, one of the great things is that one can purchase an entire library for $3 a book
08:05Kenny164yeah, I think i'll be getting a few books, heh, I could do with them, google's letting me down badly (too much cruft)
08:06underdevoic, enlive is clojure
08:06underdevoooh, neat
08:06Kenny164yeah, another clojure library
08:07Kenny164for webscraping. I've used lxml for this sort of work in python, but thought i'd try dipping into clojure
08:11underdevreally love some of pythons libs (pygnents + moinmoin ftw), but never really loved python
08:11underdevpygments*
08:13Kenny164my love for python started fading when i tried going async
08:14Kenny164this time last week I wasn't even aware of the GIL
08:34LauJensenFun to look at the search terms which generates traffic, like "work clj but no emacs" or "scala tutorial" :)
08:35underdevyou should google bomb your site for "scala tutorial"
08:35underdevthe world will thank you
08:36underdeveventually
08:45Chousukedoes anyone know how to properly build Clojure using maven? neither mvn compile nor mvn install seem to do anything useful :/
08:45Chousukemvn install creates an empty jar and puts it in the local repository :P
08:46ikitatant
08:47ikitatthe pom.xml doesn't seem to be configured for a build
08:47Chousukethat's what I'm wondering.
08:48Chousukeit's just that leiningen uses maven and I'd like to have it use my own version of 1.2.0-snapshot :P
08:48Chousukeand I would like to know how to use maven to build and install one.
08:48ikitatclojure-contrib is being built with maven
08:49Chousukethese tools thoroughly confuse me.
08:49ikitatyou can use mvn install-file or something like that
08:49ikitatit'll put the jar into your local repo
08:50ChousukeI'll try that.
08:50ikitatmvn install:install-file
08:50ikitathttp://maven.apache.org/plugins/maven-install-plugin/usage.html
08:54Chousukehm, looks like it worked.
08:54ikitatChousuke: you can probably just mvn install:install-file -Dfile=clojure.jar -DpomFile=pom.xml
08:54Chousukethese tools are way too flexible :P
08:55ikitatmaven can be really frustrating at first
08:55ikitatthen again, making a custom build.xml can be frustrating too
09:39Chousukeikitat: maybe you just need to bind *out* to something
09:42ikitatshould all libraries print errors then bury specific exceptions into more general exceptions?
09:43ikitatwe shouldn't expect running a database command to print anything
09:44Chousukeperhaps not.
09:44ikitateven if it does fail, just let the sqlexception propegate
09:45ikitatbut even then, it jams the sqlexception into exception and throws! That (I think) is bad form as it is unecessarily hiding detail
09:45ChousukeI wonder why it's wrapping the exception though.
09:45ikitatit's using throwf from c.c.except
09:46ChousukeSometimes Clojure needs to wrap things in RuntimeException to get around checked exception limitations but hm.
09:46ikitatthat's not the case here, because you can throw and catch an sqlexception just fine (even though it is a checked exception)
09:46ikitatbut wait, there is more
09:47ikitatc.c.sql expects that *err* has a .println method (which isn't really part of the contract for *out* and *err*)
09:48Chousukeactually I think it is.
09:49Chousuke(doc *err*)
09:49clojurebot"; A java.io.Writer object representing standard error for print operations. Defaults to System/err, wrapped in a PrintWriter"
09:49Chousukehmm
09:49ikitatso it defaults to printwriter which has .println
09:49ikitatbut java.io.Writer doesn't have a .println
09:50ikitatwith all of that, I think c.c.sql is making a few incorrect assumptions
09:50ChousukeYou could post on the group about it.
09:51Chousukethis rant will probably be missed by all the relevant people :)
09:51ikitatit's a good idea, I'm going to print out a contributor agreement too so I can submit a patch too
09:51ikitat:)
09:52Chousukeheh
09:52ikitatI dunno, I think the irc logs contain more useful info than the group most days :)
09:52ChousukeWell, yeah
09:52Chousukebut it's still easy to miss important bits
09:53ikitatI'll write it up in a moment
09:53underdevdisclojure's intertweets are very good too
09:54underdevtbatchelli, if you are here, THANK YOU
09:54ikitat"Discussions aren't available right now. We're sorry. Try again shortly."
09:54ikitatdoh
10:01underdevanyone know a way to get slime-repl clojure to report errors in its own buffer instead of opening another one?
10:02underdevor open the error replace its own buffer with the error instead of knocking out my clojure file's buffer?
10:02underdevor freaking anything but the default behavior???!?!
10:42konrHaha, I'm addicted to -> and ->>. Is it bad style to use them all the time?
10:44Chousuke:P
10:47ikitatuhg, google groups just swallowed my post :P
11:27ikitatgoogle groups says my post was successful but doesn't display it!?
11:27ikitatthings are not going my way today
11:32qbgikitat: It be undergoing moderation
11:32qbg*it might be
11:35no_mindikitat, the group is moderated
11:36ikitatah, too bad google groups didn't mention that when I submitted :P
12:02konrIs there a way to run (foo) and if it raises an exception, return "bar"?
12:04Chousuke(try (foo) (catch Exception e "bar))
12:04Chousukeoops, missing quote :P
12:05ChousukeI want paredit on irc :(
12:06konrhaha thanks!
12:17avarushi
13:04hamzaguys, assuming i have the following two vectors [:a :b :c] [1 2 3] how can i turn this into [:a 1 :b 2 :c 3] ?
13:04Chousuke,(interleave '[a b c] [1 2 3])
13:04clojurebot(a 1 b 2 c 3)
13:05hamzaChousuke: thanks a lot...
13:37wglAny users of slime for clojure using the latest version? I am getting odd hangs with the 2010-01-14 version.
13:37jlillyI'm actually having issues with slime / clojure as well. Getting a "not connected" error.
13:39wgljlilly: I went back to the 2009-06-05 version and it seems to be working so far.
13:39jlillythx, I may try that.
13:40ikitatthe latest in ELPA seems to be 20091016 which is working well for me
13:41jlillyhmm. thinking my issue is slime moreso than clojure. :-/
13:42jlillym-x slime apparently fixed it.
13:43qbgStarting SLIME tends to help
13:43jlilly:-P
13:44qbgMy only issue is that I need to add clojure to slime-lisp-implementations, even though swank-clojure should do that automatically.
13:53bosieanyone knows what i have to do to get a proper REPL console in Terminal.app under macosx?
13:53ikitatjava -cp clojure.jar clojure.main
13:53bosieikitat: yea but pressing the cursor results in 'user=> ^[[A'
13:54ikitatrlwrap or jline will help with that
13:54ikitathttp://clojure.org/getting_started shows usage with jline
13:57bosieikitat: interesting
13:58bosieikitat: worked. thanks.
14:53RaynesIoke's git repo is insanely large.
14:54RaynesUnreasonably large. :|
14:57ChousukeRaynes: does it contain binaries or something? :/
14:57RaynesChousuke: It must. It's like 300+ mb.
14:59Chousukehm
15:10bosieis there a site/tutorial explaining how one would group functions in lisp/clojure?
15:15ikitatbosie: clojure uses namespaces for grouping functions
15:15ikitatbosie: you can look at the code in clojure-contrib for some good examples
15:15bosieikitat: thanks
15:19ChousukeI suppose the functions of a single namespace should share a common "theme"
15:21sethsa namespace seems more like a layer than a group
15:21sethssince cyclic dependencies aren't supported
15:24Rayneschouser: You and fogus aren't writing fast enough for my taste. Get busy. :p
15:48LauJensenAgreed - Raynes, play the banjo to get them started!
15:48Raynes;)
15:51ordnungswidrig1Is maven the next best alternative to leiningen for multi-project builds?
15:53RaynesLeiningen is the best alternative to Leiningen when you can't use Leiningen.
15:54Chousuke:P
15:56iceyI'm not sure which version of clojure I should be speficying in my project.clj. If I use 1.1.0-new-SNAPSHOT, congomongo doesn't work. If I use 1.1.0-master-SNAPSHOT, "lein compile" has problems. Which version are you guys using?
15:56patrkrisdoes anyone know where the source code for lein-nailgun can be found?
15:57RaynesI use 1.2.0-master-SNAPSHOT, but I don't have any dependencies that require I don't.
15:57iceyRaynes: is that fairly stable right now?
15:58Raynesicey: I suppose so. It's just snapshots of the current git repositories.
15:59iceyhmm, gonna give that one a go and see what happens :D
16:03iceyyeah, it looks like congomongo is picky about the clojure version it has available
16:03LauJensenordnungswidrig1: Had a look at Clojuresque, the Gradle plugin ?
16:04ordnungswidrig1LauJensen: not yet.
16:05ordnungswidrig1LauJensen: but I sounds like a good idea
16:05LauJensenHave a look at kotka.de/blog
16:08iceyhummm... it looks like I must have been doing something wrong. I reconfigured for 1.1 master, ran lein clean, lein deps and lein compile and now everything is working well together
16:09iceyi can only imagine how painful this would have been without lein though; definitely happy it's around
16:17LauJensenOne great thing about it is the simplicity. I'm regularity putting my blogpost code in lein projects, because people can get the code, get the deps and run it in less than a minute
16:29iceyLauJensen: Actually, one of your blog postings is what made me take another look at lein :D
16:29LauJensenReally - Why ?
16:31iceyBecause it looked really nice and easy to create the uberjar (from the reddit clone post)
16:31iceyI don't know anything about javaland, so it was attractive to me that it took care of it all
16:31LauJensenah ok
16:32LauJensenYes actually thats an insane amount of deployment power you get in about 10 lines of lein
16:32LauJensen"10 leins" :)
16:32iceylol; yeah.. between clojars / lein deps and the deployment story, it makes for a very compelling reason to use it
16:33technomancyordnungswidrig1: someone has some patches to leiningen for multi-module builds, but they won't be merged until after the 1.1.0 release
16:34ordnungswidrig1hmm, how can I pass a bindig into a fn definition?
16:34ordnungswidrig1(def x nil)
16:34ordnungswidrig1(trace "X" ((binding [x "X"]
16:34ordnungswidrig1 (fn [] x))))
16:34ordnungswidrig1this gives "nil"
16:34ordnungswidrig1technomancy: ok, thanks.
16:36technomancyis there anything like elisp's "provide" function that will cause "require" to know that an ns has already been loaded?
16:36technomancyeven if the file corresponding to it may not have been required?
16:40sunkencitywhere can I find a list of predicates in clojure? looking for something like "atom" in common-lisp, how can I check that? Not a sequence?
16:42technomancy,(filter #(re-find #"\?$" (name (first %))) (ns-publics 'clojure.core))
16:42clojurebot([keyword? #'clojure.core/keyword?] [chunked-seq? #'clojure.core/chunked-seq?] [instance? #'clojure.core/instance?] [sequential? #'clojure.core/sequential?] [fn? #'clojure.core/fn?] [nil? #'clojure.core/nil?] [string? #'clojure.core/string?] [sorted? #'clojure.core/sorted?] [false? #'clojure.core/false?] [true? #'clojure.core/true?] [odd? #'clojure.core/odd?] [symbol? #'clojure.core/symbol?] [future-done? #'clojure.core/fu
16:42technomancysunkencity: ^
16:42morphlingsunkencity: coll? is true for collections
16:42sunkencitytechnomancy: thanx!
16:45sunkencitymorphling: thanx, coll works fine!
17:02piccolinoI am all out of ideas on my problem here. Anyone see anything I don't? http://gist.github.com/304292
17:05chousertry 'next' instead of 'rest', just for kicks.
17:05piccolinoYeah, I already did, it gives the exact same result.
17:09RaynesOh no. The dreaded NullPointerException.
17:09ordnungswidrig1,(binding [g 1] ((fn [] g)))
17:09clojurebotjava.lang.Exception: Unable to resolve var: g in this context
17:10chouserpiccolino: you're sure the NPE is from the recur?
17:10ordnungswidrig1,(binding [g 1] ((fn [] g)))
17:10clojurebotjava.lang.Exception: Unable to resolve var: g in this context
17:10ordnungswidrig1ups
17:10ordnungswidrig1sorry.
17:10piccolinoWell, the actual stack trace has clojure.lang.Reflector.invokeNoArgInstanceMember(Reflector.java:263) at the top, and the next thing down the stack is blah$wrap_result__11091.invoke.
17:11piccolinoAnd I have done println debugging to where if I change it to (do (println "Test") (recur ...)) that Test prints.
17:11piccolinoSo I think that is something from the recur. Though like I said, if I execute either clause separately right before, they work fine.
17:12chouserI bet it's coming after the recur. if remaining-kvs is empty, (.getFamily kv) will throw
17:13piccolinoAhhhhh.
17:13piccolinoYeah, you're right.
17:13piccolinoI need to do that if (nil? kv) test sooner.
17:14ordnungswidrigpiccolino: that's nice spot for an if-let
17:14piccolinoI'd never even heard of if-let. Lemme look that up.
17:16ordnungswidrigare var bindings thread local?
17:16chouseryes
17:18ordnungswidrighmm, so how can I solve the following problem: given a lib with a local var *config* and a with-config macro which expands to a binding [*config* …]. The lib is called from a jetty thread and does not receive it's binding.
17:18technomancyordnungswidrig: take a look at bound-fn
17:19piccolinoWow, I cannot even figure out how to use if-let.
17:20ordnungswidrigpiccolino: (if-let [kv (first remaining-kvs] (recur …) (kv-map))
17:21piccolinoOK, so the test is also the assigned value?
17:21ordnungswidrigpiccolino: (if-let [x foo] (bar x) (baz x)) is (let [x foo] (if x (bar x) (baz x))
17:21ordnungswidrigpiccolino: yes
17:21piccolinoOK, thanks.
17:25piccolinoWonderful, it's all working. Thanks guys.
17:25ordnungswidrigbound-fn to the rescue!
17:25ordnungswidrigthanks
17:25ordnungswidrigme - sleep - now.
17:26bosieanybody knows why, all of a sudden, i get this: http://gist.github.com/304306
17:28ikitatclojure-contrib is not in your classpath?
17:28AWizzArdbosie: (System/getProperty "java.class.path")
17:29bosieAWizzArd: results in the right path
17:29Raynesbosie: It's been renamed.
17:29Raynesc.c.seq I believe.
17:29Rayneshttp://groups.google.com/group/clojure-dev/browse_thread/thread/49068754a8c2efb9#
17:29piccolinoHm, transients are apparently not collections. I was not expecting that.
17:31AWizzArdRaynes: good info, thx
17:31RaynesI got bit in the ass by the rename a few days ago.
17:32technomancytransients are collections
17:33technomancythey're just not persistent
17:33piccolinocoll? returns false.
17:34bosieikitat: crap, i don't know why but it wasn't there
17:34technomancyright; coll? also checks for persistence
17:34technomancy(doc coll?)
17:34clojurebot"([x]); Returns true if x implements IPersistentCollection"
17:34piccolinoAh.
17:34piccolinoIs there some way to ask "Can I run map on this?"
17:34technomancyit's a bit unexpected though if you don't read the docstring
17:35technomancypiccolino: probably sequential?
17:35technomancymaybe not; it doesn't return true for arrays
17:36piccolinoWell, I guess you can't run map on transients anyhow.
17:36technomancyit also doesn't work for strings, which you can map
19:02fanaticoI'm writing a macro to turn (named-map :x :y :z) => (zipmap [:x :y :z] [x y z]). Right now I have http://gist.github.com/304345. This works for vars, but eval doesn't see local bindings. Any way to get around this?
20:00underdevoic, you press 0 at the exception and slime-repl clojure restores the previous buffer
20:00underdevvn
20:09iceynoob question - i grabbed a jar from clojars (jbcrypt); and lein pulled it down with no problems. but i can't seem to (use) it the same way i do every other jar.
20:10iceyis there a way to determine the name i should be using instead of the .jar name?
20:10icey(i get Could not locate jbcrypt__init.class or jbcrypt.clj on classpath: )
20:11ikitaticey: jbcrypt is a java lib or clojure lib?
20:12iceyikitat it's a java lib
20:12ikitatso you don't want to 'use' it you want to 'import' it
20:12iceyahhhh
21:16piccolinoJust wondering: Is there something about how transients work that means it doesn't make sense to define something like ISeq for them?
21:17hiredmanyes
21:17hiredmantransients are almost the antithesis of sequences
21:18hiredmansequences are generally lazy, transients are not, sequences are immutable, transients are not, etc
21:36piccolinoOh I know, but it just seems like it's very limiting to not be able to step through the contents of one. I didn't mean ISeq itself, maybe something like ITransientSeq, just so you could call map and stuff on them.
21:41hiredmanpiccolino: uses reduce
21:42hiredmaner
21:42hiredman*shrug*
21:44piccolinoYeah, I tried that too
21:44piccolinoAh well
22:29jlillyhey folks. is there something like elisp's prog block which allows me to execute multiple things for a statement.
22:29qbgdo
22:29jlillyie: (if (mycond) (XXXX (statement 1) (statement 2)) (else block)
22:29jlillyso XXXX = do?
22:29qbg,(doc do)
22:29clojurebotExcuse me?
22:29ikitatdo is a special form no?
22:29ikitatbut do would do it :)
22:30ikitatit'd be cool if (doc special-form) would work
22:31hiredmanit does at the repl where it is special cased by doc
22:31jlillyalso.. are there style guidelines for clojure code?
22:31hiredmanactually at the repl it just gives you a url
22:31ikitathiredman: really, I could have swore that didn't work
22:33ikitatjlilly, maybe this https://www.assembla.com/wiki/show/clojure/Clojure_Library_Coding_Standards
23:05technomancyjlilly: there's a good one that's more general (scheme/CL-focused) at http://mumble.net/~campbell/scheme/style.txt
23:06technomancystill lots of good notions in there
23:20jasapphttp://paste.lisp.org/display/94966
23:20jasappwhat would be the best way to do that?
23:21jasapplate I've gotten the impression that anaphora is bad, but I'm used to using it from cl
23:22jasapplately
23:23dakronewhat's the right way to cast nil to a different object type in Clojure?
23:23jasappwhat different object type do you have in mind?
23:24dakroneimplementing this java line: tagger = new PosTagger(model,(Dictionary)null);
23:25dakroneif I do nil without casting, can't find matching ctor
23:25arbschtjasapp: anaphora in CL is probably bad style too. in either case, it might be better to let the caller provide a symbol for binding
23:26arbscht(foo [y] (inc y))
23:26jasappahh, ok
23:26jasappbad style in CL?
23:27arbschtjasapp: yes, it is just as confusing in any lisp, imo
23:27jasappthat one guy from allegro used it everywhere
23:27slyphonmultimethods...wow
23:28jasappaif if I remember correctly
23:28jasapparbscht: I think I'm starting to agree with you though
23:28arbschtwell, there is no consensus on good CL style ;) in CL it is common to see things like (with-output-to-string (s) (foo s))
23:31qbgdarkrone: Applying a type hint to nil might work
23:31yuukiIs there a way to create cyclical objects in clojure?
23:32yuukifor intance, a list that contains itself?
23:32jasappyuuki: I remember hearing no, but that was quite some time ago
23:32qbgyuuki: Why do you want that?
23:33yuukiI'm implementing a language that can be recursive, so I want to have a piece of code point to its enclosing block
23:33qbgAnyways, a reference type should be able to store a reference to itself
23:35qbgSo you want the function to exist in its environment?
23:36yuukihmm, I think I'm going about it in the wrong way
23:40dakroneqbg: I don't remember how to apply it to nil, [#^Dictionary nil] gives me errors
23:40qbgTry something like (let [foo nil] ... #^Dictionary foo ...)
23:42qbgHmm, alternatively, try quoting nil
23:48tomojwhy would you want a reference type to refer to itself? that sounds awesome
23:49tomojI get a stack overflow error trying to make an atom refer to itself :(
23:49qbgAre you printing it?
23:50qbg,(let [foo (atom nil)] (reset! foo foo) nil)
23:50clojurebotnil
23:50tomojah, yeah, I guess I tried to print it
23:51tomojis there any reason to do that, though?
23:51tomojseems cool, but I can't imagine a use
23:53qbgWell, how about an atom that holds a vector that also contains the atom?
23:55qbgThat way you could hold on to old state, but have the current state available and settable.