#clojure logs

2010-08-08

01:02technomancyjlf`: ICMP_ECHO_REPLY
01:17maravillasthat's some crazy latency, technomancy
01:17maravillasperhaps you should upgrade your network from avian carriers
01:18technomancyIPoACv6!
01:18maravillasi guess that is technically an upgrade :)
01:20technomancyyow
01:26technomancyeh; ICMP_ECHO_REPLY retracted; headed to sleep.
01:38slyrusevening
01:53SandGorgonwas watching a rich hickey lecture on clojure-in-clojure (http://vimeo.com/9090935). I could'nt make out the dispatch mechanism in Java that clojure is based on - was it "bimorphic dispatch" ? could'nt find any results on google either
01:59kwertiiare there any non-defunct efforts to get Clojure running on Android?
02:31arbschtSandGorgon: polymorphic dispatch
02:31SandGorgonarbscht, thanks!
02:37vIkSiThmm, has anyone seen an error like this before : java.io.FileNotFoundException: Could not locate clojure/contrib/json__init.class or clojure/contrib/json.clj on classpath: (coerce.clj:1)
02:37vIkSiT(this is with a lein compile)
02:37vIkSiTlein 1.2.0, clj 1.2.0 master snapshot
02:55vIkSiTtechnomancy, around?
02:55vIkSiTI have a lein question re some 1.2.0 errors I've been facing.
02:55hoeckvIkSiT: that means that this particular namespace does not exist
02:56vIkSiThoeck, ah, yes - I'm now trying to figure out - which version is everyone using? It seems to be a complete mess..
02:56vIkSiTfor instance, a couple of mongodb libs I'm tyring to use work with 1.2.0-beta1 but not master-snapshot
02:56vIkSiTbut master-snapshot is needed for some other lib
02:56vIkSiTsigh
02:56vIkSiTdependency hell!
02:56hoeckvIkSiT: my personal workaround is to not use clojure.contrib :(
02:57vIkSiThoeck, hmmmm
02:57vIkSiTthats quite a lot of functionality gone :)
02:57hoeckat a first glance, it looks like contrib.json is not c.c.json.write and c.c.json.read
02:58hoeckno, not
02:58vIkSiThoeck, which versions do you recommend using then?
02:58vIkSiTno?
03:00vIkSiThoeck, because now, i switched out c.c - and during a lein jar/uberjar, end up getting a weird Exception in thread "main" java.lang.NullPointerException (NO_SOURCE_FILE:0) error
03:00vIkSiTcompile works fine
03:00vIkSiTlein jar works fine
03:00vIkSiTuberjar doesnt
03:00hoeckand your project depends on c.c?
03:01vIkSiTwell, I was using contrib.sql and some string utils, but lets for a minute assume I can dump them..
03:01vIkSiT(I probably could)
03:01hoecka lot of functionality I have used is now in core: pprint, io etc.
03:01vIkSiThoeck, http://paste.lisp.org/display/113306
03:01vIkSiTah i see
03:02vIkSiThoeck, so thats the problem now - I've gotten rid of all c.c functions to check
03:02vIkSiTand an uberjar still fails
03:02hoeckand the libs you're using do not require c.c ?
03:02vIkSiThmm
03:03vIkSiTthat I need to check
03:03vIkSiTsigh, or what if they were relying on 1.1.x
03:03vIkSiTdamn
03:04hoecknot shure, I'm not a dependency expert :P
03:04vIkSiThehe
03:04vIkSiT"as of congomongo 0.1.3, Clojure 1.2 and Clojure-contrib 1.2 are required. "
03:04vIkSiTeeeh
03:05vIkSiThoeck, are you using 1.2.0-master-snap, or beta1?
03:05hoeckall I hope is to have a stable clojure-1.2 and that all major libs are 1.2 compatible :) soon
03:05vIkSiT(and which is recommended)
03:05vIkSiTamen
03:05hoeckstill 1.2-master but very "betaesk"
03:06hoeckbut I'm not using that many 3rdparty libs
03:06vIkSiT(you mean 1.2.0-master-snapshot?)
03:06vIkSiThoeck, hehe I'm only using one
03:06vIkSiTI guess I might have to fall back on c.c.sql and some rdbms (ugh)
03:08hoeckno, c.c.json should work
03:12vIkSiThoeck, oh i meant congomongo not working..
03:12vIkSiThrm weird
03:12vIkSiTeven after removing that
03:13defnmadison square clabango?
03:16LauJensenhuh? :)
03:16LauJensenThat was a blast from the past
03:16defnhaha! LauJensen remembers!
03:17defndanlarkin's fabled project madison square clabango
03:17LauJensenSure - Madison Square Clabango was supposed to be the next big web-thing for Clojure
03:17defnthe app that never was
03:17vIkSiTCaused by: java.lang.NullPointerException at org.apache.maven.artifact.ant.AbstractArtifactTask.diagnoseError(AbstractArtifactTask.java:596)
03:17vIkSiThmm
03:17vIkSiThoeck, this is looking to be a mvn error perhaps
03:17LauJensenvIkSiT: No it wasnt due to NPE, danlarkin simply dropped the project I think
03:17LauJensenand clabango.com is no more :(
03:17defn:(
03:18defnLauJensen: i just remember it being sort of a running joke in here
03:18defnand wanted to bring it back
03:18vIkSiThehe
03:18vIkSiTinteresting name though
03:18LauJensen,it was a running joke, when suddenly...
03:18clojurebotjava.lang.Exception: Unable to resolve symbol: it in this context
03:18LauJensen~suddenly
03:18clojurebotBOT FIGHT!!!!!111
03:18LauJensensigh, clojurebot forgot
03:18vIkSiTlol
03:19LauJensenIt used to be when somebody said 'suddenly' it would exclaim 'CLABANGO'
03:19LauJensen,suddenly
03:19defnah yes i remember that :)
03:19clojurebotjava.lang.Exception: Unable to resolve symbol: suddenly in this context
03:19defn,suddenly
03:19clojurebotjava.lang.Exception: Unable to resolve symbol: suddenly in this context
03:19vIkSiThmm, so does someone else have ideas on : http://paste.lisp.org/display/113306
03:19vIkSiTI'm trying to do a lein uberjar
03:20defnLauJensen: what OS do you use, Ubuntu??
03:20vIkSiTer, wrong lisppaste
03:20LauJensendefn: Arch Linux
03:20defnLauJensen: I like your WM
03:20vIkSiThttp://paste.lisp.org/display/113306
03:20defnthe turtle graphics windows look nice
03:20LauJensenYea I like it too, a lot
03:20vIkSiToh is the same. never mind
03:20LauJensendefn: ah thats old, thats actually shot on Ubuntu
03:20LauJensenIts just MetaCity is a new theme
03:20defnah, okay :)
03:21defni use xmonad
03:21defnso i dont get much candy anymore
03:21vIkSiTxmonad? thats pretty hardcore (haskell cfg files)? :)
03:21LauJensenI run Awesome, pretty much the same thing, just with more lua :((((((((((
03:22defnit's not that hardcore really
03:22defni didnt really write it from scratch
03:22defnit's mostly a copy and paste + mimicry job
03:22LauJensenvIkSiT: and since Haskell is so immutable, windows cannot move :(
03:22defnlol
03:22vIkSiTLOL
03:22defnyeah no side effects allowed
03:22vIkSiThehe
03:22defnno dragging and dropping
03:22defnetc.
03:23LauJensenyea, and windows could close cause theyre 'lazy' :(
03:23LauJensens/could/wont/
03:23sexpbotyea, and windows wont close cause theyre 'lazy' :(
03:23defnLauJensen: :D
03:23LauJensenok enough with the Haskell jokes :) All of that applies to Clojure as well
03:24defnyeah but with clojure, windows /can/ move because you can have mutable things if you want to
03:24defnwith haskell, no choice about it
03:25vIkSiThehe
03:28npoektopis there a snapshot for 1.1 documentation?
03:28vIkSiThmm, so is everyone here using 1.2.0-beta1?
03:28vIkSiTor master-snapshot?
03:29LauJensenvIkSiT: Im usually running of master-snapshot
03:29raekI use 1.2.0-RC2
03:30raekbut haven't used that on a project with many dependencies, though
03:32vIkSiTah I see
03:32vIkSiTLauJensen, does that play well with 3rd party libs?
03:33LauJensenvIkSiT: Yea - Never had any problems
03:33vIkSiTLauJensen, weird i'm running to a lot of issues with a simple lein uberjar
03:34vIkSiThttp://paste.lisp.org/display/113306#1 - with a project.clj like that
03:34vIkSiTand http://paste.lisp.org/display/113306
03:34LauJensenvIkSiT: what happens if you run lein clean then lein compile ?
03:37vIkSiTLauJensen, sec, checking again
03:37vIkSiTLauJensen, usually lein jar works fine too
03:37vIkSiTits just uberjar which has a problem
03:38LauJensenUberjar should only generate a manifest and then bundle dependencies... Its hard to see how an NPE in that process wouldn't be due to either a fault in the dependency declaration or an internal bug in lein
03:38vIkSiThmm
03:38vIkSiTok, lein clean and compile work fine
03:39vIkSiTuberjar fails
03:39vIkSiThttp://paste.lisp.org/display/113306#2
03:39vIkSiTand these are the imports : http://paste.lisp.org/display/113306#3
03:41LauJensen at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:682)
03:41vIkSiTyes indeed
03:41LauJensenThats your NPE, which is in trying to fetch dependencies I believe
03:41vIkSiTsorry - whats an NPE btw?
03:42LauJensenNull Pointer
03:42LauJensenSome data is missing somewhere
03:42vIkSiTaah :)
03:42vIkSiTLauJensen, what kind of data might this be?
03:46LauJensenIm not sure since lein deps runs without errors I assume? You might want to post something on the lein issue list about this
03:46LauJensenand perhaps try with different versions of the dependencies to narrow it down to one
03:48vIkSiTah okay.
03:49vIkSiTI'll probably send out an email about this then to the list
03:49vIkSiTthanks for the help though!
03:49LauJensennp
03:58raekanyone have a recommendation for a a gedit-like text editor for windows? (desired feature: unix newline support)
04:11LauJensenraek: notepad++
04:11LauJensenIm actually not a 100% sure that it has correct newline support, but I'd be surprised if it didnt
04:12flintfraek komodo edit
04:12flintfit's like a better version of notepadd++ and it has unix newline support
04:12flintfthat's actually one of the main reasons I like it: I use both linux and windows
04:13flintfand KE runs on both, and I can open up files in either
04:14LauJensenraek: but is there a problem with emacs on Windows?
06:03bortrebI think that using the clojure repl would be much nicer than using bash
06:03bortreband that it would be possible to make it very convienent with a few macros
06:04bortrebwhat do you guys think?
06:04bortrebI'm thinking something like lancet, that "imports" every system defined function so that it can be used in s-expressions
06:05bortreband a little state to hold environment variables
06:06bortreband finally, some way to make (rm :r :f
06:06bortreb"*.txt")
06:06bortrebwork
06:29defna cookie goes to whoever can tell me the composer who wrote a beautiful, somber symphony while in a concentration camp
06:32LauJensenThat has to be Henryk Górecki
06:40defnLauJensen: thank you so much!
06:40LauJensenwait - I got a cookie? :)
06:40LauJensendefn: Im not sure its him, if its important you should look it up
06:41defnLauJensen: I was thinking it was Messiaen's Quatour pour la fin du temps
06:41defnLauJensen: nono, it's him! I've been trying to google for it but it is not easy. Thanks!
06:41LauJensenk, np :)
06:42LauJensenWhats that emacs mode, which switches major mode depending on where the cursor is?
06:43defnI don't know, but that sounds cool...
06:43defnLauJensen: this is a bit of emacs bling, but it can be sort of neat... http://www.emacswiki.org/emacs/PulseRegion
06:43LauJensenyea, so when you're in an html file and you're going through a JS snippet, it switches to javaascript mode
06:44defnLauJensen: that's cool -- i was imagining a regional thing, like you split your buffer into left and right regions, and when the cursor is on the left you're in X mode, and vice versa
06:44defn(which would also be neat)
06:44arbschtLauJensen: mumamo?
06:45LauJensenarbscht: yea thats sounds right
06:54evanrmurphyHi. I'm trying to get swank/slime set up with lein in clojure, but "lein swank" returns "That's not a task. Use "lein help" to list all tasks." I'm using lein 1.2.0, which has supposedly fixed the typical issue causing this, I already have swank-clojure 1.2.1 listed in my project.clj, and "lein deps" got swank-clojure-1.2.1.jar into lib/. Any suggestions?
07:03arbschtevanrmurphy: can you paste your project.clj somewhere?
07:04fliebelHey, I'm seeking to write an email server in Clojure. What would be the best way to do this? I found there are aleph and saturnine, both wrapping around Netty, and I just found James, which is a Java mail server. What are my options? Another thing is that I just read something about IO+treads being faster than NIO, but I'm not yet writing apps at a scale where that matters I think.
07:05evanrmurphyarbscht: Thanks for responding. http://pastebin.com/K72FKgJa
07:06raekevanrmurphy: if you have changed the versions of the dependencies, try doing a lein clean
07:06raeki think swank-clojure usually goes under dev-dependencies
07:06arbschtevanrmurphy: you want swank-clojure in :dev-dependencies. see the example in the docs
07:06raekbut I'm uncertaint what difference that makes
07:07evanrmurphyarbscht: ahh :dev-dependencies, *not* :dependencies. Is that what you mean?
07:08arbschtevanrmurphy: yes, see the example configuration at http://github.com/technomancy/leiningen/
07:11evanrmurphyarbscht: looks like I had other things missing, i.e. dependencies for ant and maven. Working on these now and will report back. Thanks.
07:14arbschtevanrmurphy: I don't think you need to depend on those ant and maven items for swank. just specify your swank-clojure item as a dev-dependency
07:14arbschtevanrmurphy: incidentally, clojure 1.2 RC2 is available
07:15evanrmurphyWell, I made it a dev-dependency, but then "lein clean" complained. Maybe I needed to clean before changing the dependencies?
07:16evanrmurphyah nevermind, i think it was my mistake
07:19evanrmurphyarbscht, raek: swank is serving now, thank you much! ^_^ Now I need to try it with slime...
07:20evanrmurphyIs the swank-clojure dev-dependency something I need to include in every project I do? If so, can that boilerplate be automated/internalized by lein?
07:21arbschtevanrmurphy: yes, and maybe in the next version of leiningen :)
07:21arbschtevanrmurphy: if you use an editor that does snippets or templates, that might help
07:24evanrmurphyarbscht: Couldn't I just create a macro to generate a defproject with my common depenencies? I'm new to clojure (coming from arc), so you can tell me if that makes sense or not.
07:29arbschtevanrmurphy: I cannot imagine how that would work, and complicating what is a straightforward convention in an already tricky process (build) bears a bad smell :/
07:33arbschtevanrmurphy: if you mean to modify leiningen to remember your preferences, then that's along the lines of what's being discussed for lein 1.3
07:36evanrmurphyarbscht: I could be missing something, but I would think you could do something like http://clojure.pastebin.com/uvUzMbxW
07:36evanrmurphyand then use swankproj for any defproject you want to autoinclude swank-clojure
07:37evanrmurphyexcept the rest parm in that isn't right. do I need a & before body, and maybe the [ ] vector brackets around it?
07:38evanrmurphythat's neat to hear preference memory is in discussion for 1.3
07:40evanrmurphythere we go: http://clojure.pastebin.com/dJ18a1zS I'll have to try it out soon and see if it works. :)
07:50bortrebI think that using the clojure repl would be much nicer than using bash
07:50bortrebI think that using the clojure repl would be much nicer than using bash
07:50bortreband that it would be possible to make it very convienent with a few macros
07:50bortrebwhat do you guys think?
07:51evanrmurphybortreb: you mean in general?
07:51evanrmurphyIs there anything lists can do that vectors can't in clojure?
07:54bortreb:evanmurphy yeah in general
07:55evanrmurphybortreb: I would love to be using a lisp instead of shell
07:55bortrebthe trick I think would be to get compact representations for navagating files
07:55bortreband convienent ways to call out to other processes
07:56evanrmurphyworking through the jvm, is that even possible?
07:56bortrebI'd also like to be able to modify the repl-prompt
07:56bortrebI think so
07:57bortrebbut I'm not sure -- we could have a *current-directory* ref and use apache's exec to call commands in whatever directory we want
07:57evanrmurphyin arc and plt-racket, there's a handy command to drop into the underlying system and run commands. I don't know if clojure has something like that, but I imagined it wouldn't just because of limitations of java.
07:58bortrebhow does it work in arc? in clojure you can do (sh "rm" "-rf" "whatever") for example
07:59bortreband it will kill whatever from wherever you launched the repl
07:59evanrmurphyit's kinda like that. you can already do that in clojure?
08:00bortrebyes, it's in clojure.contrib.command-line
08:01bortrebthe one in command line forces the repl thread to wait untill the entire command finishes, then spits out all the output in a list
08:01evanrmurphywell unless i misunderstood your idea, that seems like the only foot in the door you need to start building a cool dsl for systems programming in clojure
08:01bortreband it can't change directories
08:03evanrmurphymaybe you could simulate directory changes by having "cd" adjust a var representing the current dir.
08:04evanrmurphy(don't know why i qualified with maybe, theres no reason you couldn't ;)
08:05bortrebI modified the contrib version to be interactive here : http://gist.github.com/513950
08:06evanrmurphyif you just write a few macros to get past all the pesky double-quotes for the sh command, you could do stuff like: (rm :r :f whatever)
08:06bortrebbut it's still not quite as convienent as bash for simple things: for example (sw "rm" "*.txt") doesn;t work
08:06bortrebthat would be cool, but should I put strings through wildcard expansion too?
08:07bortrebapache's command-line parse doesn't understand wildfcards
08:08evanrmurphyI wish I knew more about apache-commons. It would seem simpler to me just to go through clojure's sh
08:09bortrebI would love to be able to run (rm :r :f "*.txt") -- that's a great idea
08:09evanrmurphythanks :)
08:10bortrebbut, clojure's sh uses a similar thick
08:10bortreband also fails for wildcards
08:11bortrebI hope this doesn't work...
08:11bortreb,(clojure.contrib.command-line/sh "pwd")
08:11clojurebotjava.lang.ClassNotFoundException: clojure.contrib.command-line
08:12evanrmurphyi've noticed people prefixing the comma to talk to the clojurebot, is that all that is?
08:12evanrmurphy,(+ 1 1)
08:12clojurebot2
08:12bortrebyep
08:12bortreb--> (+ 1 2)
08:12silveen$(+ 1 1)
08:12sexpbotThis command is old. Use -> now. It's a hook, so it can evaluate anything, even stuff that doesn't start with parentheses.
08:13silveen->(+ 1 1)
08:13sexpbot=> 2
08:13bortreb-> (sh "pwd")
08:13sexpbotjava.lang.Exception: Unable to resolve symbol: sh in this context
08:13evanrmurphy,(#'(+ 1 %1) 2)
08:13clojurebotjava.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol
08:13evanrmurphyoops
08:13evanrmurphy,(#(+ 1 %1) 2)
08:13clojurebot3
08:14bortreb-> (clojure.contrib.shell-out/sh
08:14sexpbotjava.lang.Exception: EOF while reading
08:14bortreb-> (clojure.contrib.shell-out/sh "pwd")
08:14sexpbotjava.lang.ClassNotFoundException: clojure.contrib.shell-out
08:14evanrmurphy,(defn foo [x] (+ 1 x))
08:14clojurebotDENIED
08:14evanrmurphyah, the buck stops there
08:14bortrebyay for it not being silly
08:15evanrmurphyyeah, I'm not sure about the wildcards. Will have to check out how sh works. I'm surprised it doesn't just pass whatever string you give it down to the shell
08:15bortrebso, do you think that wildcard expansion is good or would it be batter to do something like (rm :r :f (file-seq .)) ?
08:16bortrebheh, what shell would it use though?
08:16bortrebwhat if it's running on windows?
08:18evanrmurphyhm yeah, that's good too :)
08:18rysyeah, shell globs aren't standard
08:18evanrmurphyyou're right, the wildcard stuff wouldn't be very portable
08:19evanrmurphyexcept that java's so developed there's probably libraries to talk from java down to every popular shell people use
08:20bortrebwell then what would you think that the lisp repl equivalent of rm *.txt should be?
08:21bortrebthe best I can come up with is (rm (file-filter "." #".*.txt"))
08:22bortrebit has to be easy to type and short but still lispy..
08:24bortrebmaybe (rm #".*.txt) and have rm be a multimethod that does "the right thing" when you send it regexes?
08:25evanrmurphyi'm too new to clojure to have the idioms down (maybe you can help me there)
08:26evanrmurphyin arc i'd be attracted to doing something like (each f "." (rm f)) to remove all files in the current directory
08:26bortrebrm -- removes (file-str arg) from *current-directory* if arg is string or (filter (re-matches (.getName %) REGEX) (file-seq..... etc if it's a regex?
08:26evanrmurphyin clojure do you do each with for and the :each keyword or something?
08:28bortrebfor is just the sequence monad, or list comprehension, in clojure
08:28bortrebso I guess it already does :each by default?
08:28rhudson,(doc dorun)
08:28clojurebot"([coll] [n coll]); When lazy sequences are produced via functions that have side effects, any effects other than those needed to produce the first element in the seq do not occur until the seq is consumed. dorun can be used to force any effects. Walks through the successive nexts of the seq, does not retain the head and returns nil."
08:29evanrmurphyit's tricky because systems programming is necessarily imperative, but clojure seems to wanna stay away from that
08:30bortrebhow is it necessarly imperative?
08:30evanrmurphy(although i'm such a newb here, please excuse that sweeping generalization)
08:30evanrmurphybecause you're manipulating the state of your filesystem
08:30bortrebI guess because it's mostly file-system stuff, and that is a source of state?
08:30evanrmurphyyep
08:31evanrmurphyrhudson: was that a hint to me? ;)
08:32rhudsonYes, although doseq might be even more appropriate -- it gives you a binding (as in for) for each element of a seq
08:32rhudson[ appropriate => useful for what you're doing ]
08:32evanrmurphythanks
08:32bortrebbut doesn't for already do that ?
08:32raekfor is lazy
08:33raek(doseq ...) is the same as (dorun (for ...))
08:33bortrebI feel like doseq is something you wrap a for in if you want it to be realized right then and there,
08:33bortrebalso not quite, because dorun will loose the head of the seq
08:33rhudson,(doc doseq)
08:33clojurebot"([seq-exprs & body]); Repeatedly executes body (presumably for side-effects) with bindings and filtering as provided by \"for\". Does not retain the head of the sequence. Returns nil."
08:33raek(doseq [x (range 10)] (println x))
08:33raek(for [x (range 10)] (inc x))
08:34bortrebnm
08:34bortrebI thought doseq gave you the sequence back.....
08:34raekwhen you use doseq, you care about the side-effects
08:34raekno, that's what for does
08:34raekdoseq always return nil
08:35raekdorun forces every element of a sequence and discards the result
08:35raek,(println "test")
08:35clojurebottest
08:36raek,(let [x (map println (range 10))] 1)
08:36clojurebot1
08:36bortrebraek: do you think a clojure shell would be good or is it not clojue's cup of tea?
08:36raeknothing was printed, since no part of the lazy sequence returned by map was forced
08:37raekwell, I have no idea
08:37raek,(let [x (doall (map println (range 10)))] 1)
08:37clojurebot1
08:37clojurebot0 1 2 3 4 5 6 7 8 9
08:41evanrmurphybortreb: regarding what we said earlier about portability, i think an initial project shouldn't even worry about that
08:42evanrmurphyit's ok to have non-portable features. If you try to run a linux command that windows doesn't have, it should complain
08:43bortrebyeah -- that makes sense
08:44bortreband regarding it being stateful -- so what? s-expressions are orthogonal to statelessness and I think they would work better with complex shell commands
08:47evanrmurphythe thin macro layer atop sh (or whatever) to allow (rm :r :f whatever) could be a good start, and you could grow it into a system that takes more advantage of seqs, etc.
08:47evanrmurphythat would be one approach anyway
10:04Blue-Foxhi
10:42notsonerdysunnyhow do i make my slime recognize my .clj files are the one that slime should treat as lisp files so that I can use all the amazing slime stuff.. It has all the features if I rename the file as .lisp
10:42notsonerdysunnyhow can I make my slime recognize ".clj" files as the "lisp" files...
10:44raeknotsonerdysunny: have you installed clojure-mode?
10:45notsonerdysunny (add-to-list 'load-path "/home/sunil/work/download/clojure/git/clojure-mode/")
10:45notsonerdysunny (require 'clojure-mode)
10:45notsonerdysunnyabove is the contents of my init.el .. should I do anything else?
10:45notsonerdysunny*.xemacs/init.el
10:46raeknotsonerdysunny: are you able to start clojure-mode with M-x clojure-mode?
10:47notsonerdysunnyno I am not able to do that...
10:48raeki'm sorry.. I got to go now
10:49raekI'm sure someone else here can help you
10:49raekgood luck!
10:50notsonerdysunnyjust a last question .. I followed the instructions for emacs for configuring xemacs ..
10:50notsonerdysunnyshould the procedure be different?
10:50notsonerdysunny(I did not find the corresponding instructions for xemacs..)
10:50notsonerdysunnythanks raek :)
11:01pdk(doc lazy-cons)
11:01clojurebotGabh mo leithscéal?
11:34technomancyanyone thinking about lispy shells needs to try eshell (elisp)
11:35technomancyit does a really good job of feeling shell-like but still being very lispy
11:35technomancyit lets you treat it like a shell, but if it detects a lisp form it executes it
11:48BahmanHi all!
11:51pdkyknow
11:51pdkif you add an A in that username and change man to men
11:51pdkwe could all be letting the dogs out
11:53technomancyyou say that like it's a good thing.
11:54pdkwell do you prefer the dogs barking
11:54rhudson(doseq [dog dogs] (let-out dog))
11:55pdkand then we'll be singing about how we can't trace the thread we ran that in rhudson
11:55rhudson:)
12:00Bahman:-)
12:14ttmrichterHey, Bahman.
12:17BahmanYo ttmrichter!
13:43defntechnomancy: like (defn foo ([x] ...) ([x & xs] ...)) ?
13:45technomancydefn: yeah, like http://github.com/technomancy/leiningen/commit/e451e12b552ccf82102990bf0e8ee9f44c8516d8#L0R135
13:45technomancynot sure if I should regret that now
13:46defn+ ;; This could be a separate defn, but I can't think of a good name for it...
13:46defnHow about (defn make-groups* ...) ??
13:47technomancyeh; not a clear improvement. they both indicate they are two sides of the same coin.
13:47technomancyI guess the star makes it obvious which one is meant to be called externally.
13:47defnyeah im not sure about that... I mean it looks okay to my eye, but it is an interesting question
13:48defnive used the star in the past to do just that
13:49defnactually i usually make the function* the internal one, and the (defn function) the external
13:49defnit seems to cut down on confusion a bit
13:49technomancyyeah, I guess if you defn- it then it doesn't clutter the namespace
13:49technomancyother than visually
13:50technomancydid you guys see this? http://github.com/maravillas/lein-multi
13:50technomancyI think that's going to be pretty important for the future as the number of versions of Clojure increases.
13:50defnno, but i have now :)
13:50defnyeah that's nice
13:50defnit's been a problem I've been dealing with from 1.1.0 -> 1.2.0
13:51technomancythe scala folk have been troubled by it quite a bit from what I hear
13:51defngrowing pains
13:51technomancygiven that they named their 3.0 release 2.8 by accident.
13:51defnoops! :)
13:53technomancy"for running tasks against multiple dependency sets." kind of undersells it. "for testing against multiple versions of Clojure at once" is less accurate but helps you understand "yes, you should be using this plugin!" =)
13:56maravillasthat's it, i'm firing the marketing department
13:59maravillastechnomancy: i did want to ask you how important you feel supporting certain other tasks is, particularly pom and uberjar
14:03technomancymaravillas: I'm interested mostly just in the deps/test aspect of it. Others might come up with new creative uses for things like pom or uberjar, but at this point I'd go with a yagni.
14:03technomancygood stuff. =)
14:04maravillasgood enough for me, yagni it is
14:07Blue-Foxis a german irc channel there?
14:19hoeckBlue-Fox: #clojure.de
14:19Blue-Foxthank you
14:28LauJensenGood morning all
14:28technomancyUGT!
14:29LauJensenThats right baby :)
15:14fielcabralHello. How do you write fn docstrings that span multiple lines?
15:16qbgYou put returns in them :)
15:18hoeckfielcabral: just like the ones in clojure.core, e.g.: http://github.com/richhickey/clojure/blob/master/src/clj/clojure/core.clj#L1755
15:19fielcabralI was trying \ or _ :-)
15:20Rayneshoeck: For future reference, it's at http://github.com/clojure/clojure now.
15:21hoeckRaynes: right, I was just crawling my url history :)
15:21RaynesOh. Wasn't sure if that was the case, or if you just didn't know. :p
15:23LauJensenRaynes: You sure run a tight ship
15:23LauJensen:)
15:23Rayneso.o
15:25hoeckRaynes: so is that old repo still working or do I have to update my git config?
15:26Rayneshoeck: The old repo isn't updated anymore.
15:26hoeckI thought that github.com/clojure is just a link to richhickey/clojure ?
15:26hoeckoh ok
15:26Raynesgithub.com/clojure/clojure is a fork of richhickey/clojure
15:26hoeckRaynes: thanks then :)
16:03technomancypoll: user-level Leiningen plugins go in ~/.lein or ~/.lein/plugins?
16:04raekwhat else goes in ~/.lein ?
16:04technomancythe only other thing so far is init.clj
16:04technomancythere could be more in the future, but I can't think of anything right now.
16:06raekI wouldn't mind if they go in ~/.lein/plugins
16:06technomancyyeah, I guess explicit is good
16:07kencauseyagreed
16:08kencauseytechnomancy: cygwin suggestion: check CLASSPATH is non-empty before passing it to cygpath
16:08kencauseyor check for error from cygpath
16:09technomancykencausey: sure
16:10Blue-Foxgn8
16:15LauJensentechnomancy: Im am so much looking forward to a dead simple lein install for Windows - hows that coming?
16:16technomancyLauJensen: someone said they would work on it, then they said they wouldn't.
16:16technomancystill waiting for volunteers.
16:17LauJensenoh - I completely understand them, but I really need it to blog about the one-size fits all install for Clojure :)
16:17technomancymaybe you could help find a Windows user to fix it. =)
16:17technomancythey are hard to find these days.
16:17LauJensenMaybe - I've heard of one in north Russia actually, I could try to locate him
16:18LauJensenLast seen beating his keyboard with a blue background and white text on his laptop, dunno what it was about
16:23technomancyanyone have an opinion as to whether Lein 1.3 should be delayed another week in order to add support for projects that can be installed with shell script wrappers?
16:24technomancydetails here: http://groups.google.com/group/leiningen/browse_thread/thread/b3c91f5fb3d45b94
16:26LauJensentechnomancy: It sounds like a cool addition, but I really dont have any Clojure shell ops that I use regularily, so I have no need - On the other hand, I can wait a week for 1.3
16:26technomancyLauJensen: right... you don't have any clojure shell projects because this functionality doesn't exist yet. =)
16:26LauJensenThats not why
16:27technomancywell not for you, but in general why nobody writes them.
16:27technomancyit's a pain right now.
16:29LauJensenLike I said - I can wait a week, go hack! :)
16:29LauJensentechnomancy: UOC which uberjar fix have you put in ?
16:29technomancyif you uberjar without any AOT then the deps jars don't get included in the uberjar
16:29technomancybut there's really no point to uberjar if you don't AOT at least a -main fn
16:31LauJensenok - Was a guy in here earlier, viksit I think, who got an NPE when compiling an Ubjerar, compile and jar both worked. We didnt figure out why so I suggested he post it to you
16:31technomancyyeah, he probably misspelled his :main ns or didn't understand that he needed to have one
16:32LauJensenHe might have mispelled I didnt check, but he did have there
16:32LauJensenBut you're above version 1.0, why arent you running flyspell ?
16:32technomancyalso fixed a bug where it didn't complain about ns misspellings
16:32technomancyhehe
17:35technomancyclojurebot: lein uberjar bug is usually when you don't have a :main specified correctly: http://groups.google.com/group/leiningen/msg/d0a36ae9b92ab1f1
17:35clojurebotIk begrijp
17:59jlf`technomancy: i encountered a slime bug that i initially thought was specific to the clojure backend but it turned out to exhibit with sbcl too
18:01qbgWhy are *jure name no longer allowed in lein 1.2?
18:01jlf`dabbrev-expand fails at the repl in some cases because the "user> " prompt has the intangible property which evidently prevents goto-start-of-abbrev from detecting the space therein as a word boundary
18:03technomancyjlf`: eep
18:03rhudsonqbg: I think lein has abjured -jure names since 1.1
18:04technomancyrhudson: no, it's new in 1.2
18:04qbgDoes someone really hate *jure names?
18:04rhudsonapparently
18:06qbgI'll admit that "typejure" is probably a terrible name, but still...
18:07rhudsonI think you're right about that :)
18:10technomancyshow me a good *jure name and I might add an exception. =)
18:19lozh/usr/dict/share/words gives injure and perjure as the only likely candidates
18:21qbgThere is also conjure, but that is already taken
18:22neotykinjure +1
18:23lozhclojure's intercal interop library
18:24qbgThat name makes sense...
19:07rplevyI'm not sure if this is related to the same issue technomancy mentions above, but I've been having trouble building an uberwar using the lein war plugin. The error I am getting is Exception in thread "main" java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V
19:08technomancyclojurebot: restfn?
19:08clojurebotant clean and rebuild contrib
19:09technomancyrplevy: usually that means you've got .class files compiled with an older version of clojure.
19:16rplevytechnomancy: in my project.clj, I am using version "1.2.0-master-SNAPSHOT" of clojure and contrib and I have been running lein clean and lein deps before compiling, a few times. I wonder where it would find old class files...
19:16technomancyrplevy: likely in a dependency
19:57rplevytechnomancy: I'm somewhat fuzzy on what the right next step would be, but I found that doing a local lein install of leiningen-war with the project file modified to depend on clojure & contrib 1.2, and then linking to that jar in my project's lib, allowed me to run the uberwar task without getting the stale classes error.
20:15rplevyI created this issue http://github.com/alienscience/leiningen-war/issues/issue/1 though maybe I need to do something differently and the project is fine. Not sure what the answer is.
20:23pdk,(binding [x 1]) x)
20:23clojurebotjava.lang.Exception: Unable to resolve var: x in this context
20:23pdk,(binding [x 1] x)
20:23clojurebotjava.lang.Exception: Unable to resolve var: x in this context
20:24qbgYou need to declare x first
20:24qbg,(binding [max 5] max)
20:24clojurebot5
21:13defnhello all
21:29Raynesdefn: Evening.
21:42rplevywhat would you think a library called "pastjure" would do?
21:42rplevy[ok so I finally bothered to authenticate a nickname on IRC and now I'm Mr. IRC all of a sudden ;) I forgot how useful and also fun it is... ]
21:45arbschtrplevy: it would provoke the wrath of technomancy ;)
22:39puredangerIf I proxy an interface that has two methods foo(String) and foo(String, String), do I want (proxy X [] (foo [s] (...) [s1,s2] (...))) or just (proxy X [] (foo [s1,s2] (...))) ... or something else?
22:43brweber2puredanger don't you want (proxy X [] (foo ([s] (...) [s1 s2] (...) ) ) ?
22:44brweber2puredanger with one more closing paren at the end of course :)
22:45brweber2puredanger take two: (proxy X [] (foo ([s] (...)) ([s1 s2] (...))))
22:46brweber2man, I can't type tonight...
22:46puredangerbrweber2: that last is where I started but that complained at me ...don't have that handy though
22:48brweber2puredanger class-and-interfaces - a vector of class names
22:48brweber2puredanger take three: (proxy [X] [] (foo ([s] (...)) ([s1 s2] (...))))
22:48puredangerbrweber2: heh, right - not worried about that part though
22:54puredangerbrweber2: grr, trying to test but apparently I deleted my custom clj script at some point recently
23:01brweber2puredanger have it, I'll create a gist, just one second....
23:03brweber2http://gist.github.com/514863
23:03brweber2puredanger http://gist.github.com/514863
23:04puredangerbrweber2: thx!
23:04brweber2puredanger sure, np
23:17brweber2puredanger interestingly if you proxy two interfaces with the same method they have to have the same implementation from what I can tell... it might even ignore type hints, seems to be based on name and arity alone
23:20puredangerbrweber2: well, I believe the impls are held in a map keyed by method name, so that would make sense
23:26amalloywhat's the idiomatic way to convert true/false into nil/not-nil? (when x true) works but seems silly.
23:50spewn,(true? nil)
23:50clojurebotfalse
23:50spewnamalloy: Is that what you meant?
23:54amalloyno, the opposite
23:54amalloyi have true or false, and want to turn false into nil
23:55spewnOh, sorry. Misread.
23:57arbscht,(or false nil)
23:57clojurebotnil
23:57amalloyaha
23:58amalloyexactly what i was looking for, though it's not much prettier than what i had *chuckle*