#clojure log - Aug 08 2010

The Joy of Clojure
Main Clojure site
Google Group
IRC
List of all logged dates

1:02 technomancy: jlf`: ICMP_ECHO_REPLY

1:17 maravillas: that's some crazy latency, technomancy

1:17 perhaps you should upgrade your network from avian carriers

1:18 technomancy: IPoACv6!

1:18 maravillas: i guess that is technically an upgrade :)

1:20 * technomancy o O ( "IPoAC has been successfully implemented, but for only nine packets of data, with a packet loss ratio of 55% (due to user error), and a response time ranging from 3000 seconds(~54 minutes) to over 6000 seconds(~1.77 hours)." )

1:20 technomancy: yow

1:26 eh; ICMP_ECHO_REPLY retracted; headed to sleep.

1:38 slyrus: evening

1:53 SandGorgon: was 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

1:59 kwertii: are there any non-defunct efforts to get Clojure running on Android?

2:31 arbscht: SandGorgon: polymorphic dispatch

2:31 SandGorgon: arbscht, thanks!

2:37 vIkSiT: hmm, 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)

2:37 (this is with a lein compile)

2:37 lein 1.2.0, clj 1.2.0 master snapshot

2:55 technomancy, around?

2:55 I have a lein question re some 1.2.0 errors I've been facing.

2:55 hoeck: vIkSiT: that means that this particular namespace does not exist

2:56 vIkSiT: hoeck, ah, yes - I'm now trying to figure out - which version is everyone using? It seems to be a complete mess..

2:56 for instance, a couple of mongodb libs I'm tyring to use work with 1.2.0-beta1 but not master-snapshot

2:56 but master-snapshot is needed for some other lib

2:56 sigh

2:56 dependency hell!

2:56 hoeck: vIkSiT: my personal workaround is to not use clojure.contrib :(

2:57 vIkSiT: hoeck, hmmmm

2:57 thats quite a lot of functionality gone :)

2:57 hoeck: at a first glance, it looks like contrib.json is not c.c.json.write and c.c.json.read

2:58 no, not

2:58 vIkSiT: hoeck, which versions do you recommend using then?

2:58 no?

3:00 hoeck, 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

3:00 compile works fine

3:00 lein jar works fine

3:00 uberjar doesnt

3:00 hoeck: and your project depends on c.c?

3:01 vIkSiT: well, I was using contrib.sql and some string utils, but lets for a minute assume I can dump them..

3:01 (I probably could)

3:01 hoeck: a lot of functionality I have used is now in core: pprint, io etc.

3:01 vIkSiT: hoeck, http://paste.lisp.org/display/113306

3:01 ah i see

3:02 hoeck, so thats the problem now - I've gotten rid of all c.c functions to check

3:02 and an uberjar still fails

3:02 hoeck: and the libs you're using do not require c.c ?

3:02 vIkSiT: hmm

3:03 that I need to check

3:03 sigh, or what if they were relying on 1.1.x

3:03 damn

3:04 hoeck: not shure, I'm not a dependency expert :P

3:04 vIkSiT: hehe

3:04 "as of congomongo 0.1.3, Clojure 1.2 and Clojure-contrib 1.2 are required. "

3:04 eeeh

3:05 hoeck, are you using 1.2.0-master-snap, or beta1?

3:05 hoeck: all I hope is to have a stable clojure-1.2 and that all major libs are 1.2 compatible :) soon

3:05 vIkSiT: (and which is recommended)

3:05 amen

3:05 hoeck: still 1.2-master but very "betaesk"

3:06 but I'm not using that many 3rdparty libs

3:06 vIkSiT: (you mean 1.2.0-master-snapshot?)

3:06 hoeck, hehe I'm only using one

3:06 I guess I might have to fall back on c.c.sql and some rdbms (ugh)

3:08 hoeck: no, c.c.json should work

3:12 vIkSiT: hoeck, oh i meant congomongo not working..

3:12 hrm weird

3:12 even after removing that

3:13 defn: madison square clabango?

3:16 LauJensen: huh? :)

3:16 That was a blast from the past

3:16 defn: haha! LauJensen remembers!

3:17 danlarkin's fabled project madison square clabango

3:17 LauJensen: Sure - Madison Square Clabango was supposed to be the next big web-thing for Clojure

3:17 defn: the app that never was

3:17 vIkSiT: Caused by: java.lang.NullPointerException at org.apache.maven.artifact.ant.AbstractArtifactTask.diagnoseError(AbstractArtifactTask.java:596)

3:17 hmm

3:17 hoeck, this is looking to be a mvn error perhaps

3:17 LauJensen: vIkSiT: No it wasnt due to NPE, danlarkin simply dropped the project I think

3:17 and clabango.com is no more :(

3:17 defn: :(

3:18 LauJensen: i just remember it being sort of a running joke in here

3:18 and wanted to bring it back

3:18 vIkSiT: hehe

3:18 interesting name though

3:18 LauJensen: ,it was a running joke, when suddenly...

3:18 clojurebot: java.lang.Exception: Unable to resolve symbol: it in this context

3:18 LauJensen: ~suddenly

3:18 clojurebot: BOT FIGHT!!!!!111

3:18 LauJensen: sigh, clojurebot forgot

3:18 vIkSiT: lol

3:19 LauJensen: It used to be when somebody said 'suddenly' it would exclaim 'CLABANGO'

3:19 ,suddenly

3:19 defn: ah yes i remember that :)

3:19 clojurebot: java.lang.Exception: Unable to resolve symbol: suddenly in this context

3:19 defn: ,suddenly

3:19 clojurebot: java.lang.Exception: Unable to resolve symbol: suddenly in this context

3:19 vIkSiT: hmm, so does someone else have ideas on : http://paste.lisp.org/display/113306

3:19 I'm trying to do a lein uberjar

3:20 defn: LauJensen: what OS do you use, Ubuntu??

3:20 vIkSiT: er, wrong lisppaste

3:20 LauJensen: defn: Arch Linux

3:20 defn: LauJensen: I like your WM

3:20 vIkSiT: http://paste.lisp.org/display/113306

3:20 defn: the turtle graphics windows look nice

3:20 LauJensen: Yea I like it too, a lot

3:20 vIkSiT: oh is the same. never mind

3:20 LauJensen: defn: ah thats old, thats actually shot on Ubuntu

3:20 Its just MetaCity is a new theme

3:20 defn: ah, okay :)

3:21 i use xmonad

3:21 so i dont get much candy anymore

3:21 vIkSiT: xmonad? thats pretty hardcore (haskell cfg files)? :)

3:21 LauJensen: I run Awesome, pretty much the same thing, just with more lua :((((((((((

3:22 defn: it's not that hardcore really

3:22 i didnt really write it from scratch

3:22 it's mostly a copy and paste + mimicry job

3:22 LauJensen: vIkSiT: and since Haskell is so immutable, windows cannot move :(

3:22 defn: lol

3:22 vIkSiT: LOL

3:22 defn: yeah no side effects allowed

3:22 vIkSiT: hehe

3:22 defn: no dragging and dropping

3:22 etc.

3:23 LauJensen: yea, and windows could close cause theyre 'lazy' :(

3:23 s/could/wont/

3:23 sexpbot: yea, and windows wont close cause theyre 'lazy' :(

3:23 defn: LauJensen: :D

3:23 LauJensen: ok enough with the Haskell jokes :) All of that applies to Clojure as well

3:24 defn: yeah but with clojure, windows /can/ move because you can have mutable things if you want to

3:24 with haskell, no choice about it

3:25 vIkSiT: hehe

3:28 npoektop: is there a snapshot for 1.1 documentation?

3:28 vIkSiT: hmm, so is everyone here using 1.2.0-beta1?

3:28 or master-snapshot?

3:29 LauJensen: vIkSiT: Im usually running of master-snapshot

3:29 raek: I use 1.2.0-RC2

3:30 but haven't used that on a project with many dependencies, though

3:32 vIkSiT: ah I see

3:32 LauJensen, does that play well with 3rd party libs?

3:33 LauJensen: vIkSiT: Yea - Never had any problems

3:33 vIkSiT: LauJensen, weird i'm running to a lot of issues with a simple lein uberjar

3:34 http://paste.lisp.org/display/113306#1 - with a project.clj like that

3:34 and http://paste.lisp.org/display/113306

3:34 LauJensen: vIkSiT: what happens if you run lein clean then lein compile ?

3:37 vIkSiT: LauJensen, sec, checking again

3:37 LauJensen, usually lein jar works fine too

3:37 its just uberjar which has a problem

3:38 LauJensen: Uberjar 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

3:38 vIkSiT: hmm

3:38 ok, lein clean and compile work fine

3:39 uberjar fails

3:39 http://paste.lisp.org/display/113306#2

3:39 and these are the imports : http://paste.lisp.org/display/113306#3

3:41 LauJensen: at org.apache.maven.artifact.ant.AbstractArtifactTask.execute(AbstractArtifactTask.java:682)

3:41 vIkSiT: yes indeed

3:41 LauJensen: Thats your NPE, which is in trying to fetch dependencies I believe

3:41 vIkSiT: sorry - whats an NPE btw?

3:42 LauJensen: Null Pointer

3:42 Some data is missing somewhere

3:42 vIkSiT: aah :)

3:42 LauJensen, what kind of data might this be?

3:46 LauJensen: Im not sure since lein deps runs without errors I assume? You might want to post something on the lein issue list about this

3:46 and perhaps try with different versions of the dependencies to narrow it down to one

3:48 vIkSiT: ah okay.

3:49 I'll probably send out an email about this then to the list

3:49 thanks for the help though!

3:49 LauJensen: np

3:58 raek: anyone have a recommendation for a a gedit-like text editor for windows? (desired feature: unix newline support)

4:11 LauJensen: raek: notepad++

4:11 Im actually not a 100% sure that it has correct newline support, but I'd be surprised if it didnt

4:12 flintf: raek komodo edit

4:12 it's like a better version of notepadd++ and it has unix newline support

4:12 that's actually one of the main reasons I like it: I use both linux and windows

4:13 and KE runs on both, and I can open up files in either

4:14 LauJensen: raek: but is there a problem with emacs on Windows?

6:03 bortreb: I think that using the clojure repl would be much nicer than using bash

6:03 and that it would be possible to make it very convienent with a few macros

6:04 what do you guys think?

6:04 I'm thinking something like lancet, that "imports" every system defined function so that it can be used in s-expressions

6:05 and a little state to hold environment variables

6:06 and finally, some way to make (rm :r :f

6:06 "*.txt")

6:06 work

6:29 defn: a cookie goes to whoever can tell me the composer who wrote a beautiful, somber symphony while in a concentration camp

6:32 LauJensen: That has to be Henryk Górecki

6:40 defn: LauJensen: thank you so much!

6:40 LauJensen: wait - I got a cookie? :)

6:40 defn: Im not sure its him, if its important you should look it up

6:41 defn: LauJensen: I was thinking it was Messiaen's Quatour pour la fin du temps

6:41 LauJensen: nono, it's him! I've been trying to google for it but it is not easy. Thanks!

6:41 LauJensen: k, np :)

6:42 Whats that emacs mode, which switches major mode depending on where the cursor is?

6:43 defn: I don't know, but that sounds cool...

6:43 LauJensen: this is a bit of emacs bling, but it can be sort of neat... http://www.emacswiki.org/emacs/PulseRegion

6:43 LauJensen: yea, so when you're in an html file and you're going through a JS snippet, it switches to javaascript mode

6:44 defn: LauJensen: 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

6:44 (which would also be neat)

6:44 arbscht: LauJensen: mumamo?

6:45 LauJensen: arbscht: yea thats sounds right

6:54 evanrmurphy: Hi. 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?

7:03 arbscht: evanrmurphy: can you paste your project.clj somewhere?

7:04 fliebel: Hey, 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.

7:05 evanrmurphy: arbscht: Thanks for responding. http://pastebin.com/K72FKgJa

7:06 raek: evanrmurphy: if you have changed the versions of the dependencies, try doing a lein clean

7:06 i think swank-clojure usually goes under dev-dependencies

7:06 arbscht: evanrmurphy: you want swank-clojure in :dev-dependencies. see the example in the docs

7:06 raek: but I'm uncertaint what difference that makes

7:07 evanrmurphy: arbscht: ahh :dev-dependencies, *not* :dependencies. Is that what you mean?

7:08 arbscht: evanrmurphy: yes, see the example configuration at http://github.com/technomancy/leiningen/

7:11 evanrmurphy: arbscht: looks like I had other things missing, i.e. dependencies for ant and maven. Working on these now and will report back. Thanks.

7:14 arbscht: evanrmurphy: 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

7:14 evanrmurphy: incidentally, clojure 1.2 RC2 is available

7:15 evanrmurphy: Well, I made it a dev-dependency, but then "lein clean" complained. Maybe I needed to clean before changing the dependencies?

7:16 ah nevermind, i think it was my mistake

7:19 arbscht, raek: swank is serving now, thank you much! ^_^ Now I need to try it with slime...

7:20 Is 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?

7:21 arbscht: evanrmurphy: yes, and maybe in the next version of leiningen :)

7:21 evanrmurphy: if you use an editor that does snippets or templates, that might help

7:24 evanrmurphy: arbscht: 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.

7:29 arbscht: evanrmurphy: I cannot imagine how that would work, and complicating what is a straightforward convention in an already tricky process (build) bears a bad smell :/

7:33 evanrmurphy: 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

7:36 evanrmurphy: arbscht: I could be missing something, but I would think you could do something like http://clojure.pastebin.com/uvUzMbxW

7:36 and then use swankproj for any defproject you want to autoinclude swank-clojure

7:37 except the rest parm in that isn't right. do I need a & before body, and maybe the [ ] vector brackets around it?

7:38 that's neat to hear preference memory is in discussion for 1.3

7:40 there we go: http://clojure.pastebin.com/dJ18a1zS I'll have to try it out soon and see if it works. :)

7:50 bortreb: I think that using the clojure repl would be much nicer than using bash

7:50 I think that using the clojure repl would be much nicer than using bash

7:50 and that it would be possible to make it very convienent with a few macros

7:50 what do you guys think?

7:51 evanrmurphy: bortreb: you mean in general?

7:51 Is there anything lists can do that vectors can't in clojure?

7:54 bortreb: :evanmurphy yeah in general

7:55 evanrmurphy: bortreb: I would love to be using a lisp instead of shell

7:55 bortreb: the trick I think would be to get compact representations for navagating files

7:55 and convienent ways to call out to other processes

7:56 evanrmurphy: working through the jvm, is that even possible?

7:56 bortreb: I'd also like to be able to modify the repl-prompt

7:56 I think so

7:57 but I'm not sure -- we could have a *current-directory* ref and use apache's exec to call commands in whatever directory we want

7:57 evanrmurphy: in 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.

7:58 bortreb: how does it work in arc? in clojure you can do (sh "rm" "-rf" "whatever") for example

7:59 and it will kill whatever from wherever you launched the repl

7:59 evanrmurphy: it's kinda like that. you can already do that in clojure?

8:00 bortreb: yes, it's in clojure.contrib.command-line

8:01 the one in command line forces the repl thread to wait untill the entire command finishes, then spits out all the output in a list

8:01 evanrmurphy: well 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

8:01 bortreb: and it can't change directories

8:03 evanrmurphy: maybe you could simulate directory changes by having "cd" adjust a var representing the current dir.

8:04 (don't know why i qualified with maybe, theres no reason you couldn't ;)

8:05 bortreb: I modified the contrib version to be interactive here : http://gist.github.com/513950

8:06 evanrmurphy: if 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)

8:06 bortreb: but it's still not quite as convienent as bash for simple things: for example (sw "rm" "*.txt") doesn;t work

8:06 that would be cool, but should I put strings through wildcard expansion too?

8:07 apache's command-line parse doesn't understand wildfcards

8:08 evanrmurphy: I wish I knew more about apache-commons. It would seem simpler to me just to go through clojure's sh

8:09 bortreb: I would love to be able to run (rm :r :f "*.txt") -- that's a great idea

8:09 evanrmurphy: thanks :)

8:10 bortreb: but, clojure's sh uses a similar thick

8:10 and also fails for wildcards

8:11 I hope this doesn't work...

8:11 ,(clojure.contrib.command-line/sh "pwd")

8:11 clojurebot: java.lang.ClassNotFoundException: clojure.contrib.command-line

8:12 evanrmurphy: i've noticed people prefixing the comma to talk to the clojurebot, is that all that is?

8:12 ,(+ 1 1)

8:12 clojurebot: 2

8:12 bortreb: yep

8:12 --> (+ 1 2)

8:12 silveen: $(+ 1 1)

8:12 sexpbot: This command is old. Use -> now. It's a hook, so it can evaluate anything, even stuff that doesn't start with parentheses.

8:13 silveen: ->(+ 1 1)

8:13 sexpbot: => 2

8:13 bortreb: -> (sh "pwd")

8:13 sexpbot: java.lang.Exception: Unable to resolve symbol: sh in this context

8:13 evanrmurphy: ,(#'(+ 1 %1) 2)

8:13 clojurebot: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to clojure.lang.Symbol

8:13 evanrmurphy: oops

8:13 ,(#(+ 1 %1) 2)

8:13 clojurebot: 3

8:14 bortreb: -> (clojure.contrib.shell-out/sh

8:14 sexpbot: java.lang.Exception: EOF while reading

8:14 bortreb: -> (clojure.contrib.shell-out/sh "pwd")

8:14 sexpbot: java.lang.ClassNotFoundException: clojure.contrib.shell-out

8:14 evanrmurphy: ,(defn foo [x] (+ 1 x))

8:14 clojurebot: DENIED

8:14 evanrmurphy: ah, the buck stops there

8:14 bortreb: yay for it not being silly

8:15 evanrmurphy: yeah, 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

8:15 bortreb: so, do you think that wildcard expansion is good or would it be batter to do something like (rm :r :f (file-seq .)) ?

8:16 heh, what shell would it use though?

8:16 what if it's running on windows?

8:18 evanrmurphy: hm yeah, that's good too :)

8:18 rys: yeah, shell globs aren't standard

8:18 evanrmurphy: you're right, the wildcard stuff wouldn't be very portable

8:19 except that java's so developed there's probably libraries to talk from java down to every popular shell people use

8:20 bortreb: well then what would you think that the lisp repl equivalent of rm *.txt should be?

8:21 the best I can come up with is (rm (file-filter "." #".*.txt"))

8:22 it has to be easy to type and short but still lispy..

8:24 maybe (rm #".*.txt) and have rm be a multimethod that does "the right thing" when you send it regexes?

8:25 evanrmurphy: i'm too new to clojure to have the idioms down (maybe you can help me there)

8:26 in arc i'd be attracted to doing something like (each f "." (rm f)) to remove all files in the current directory

8:26 bortreb: rm -- 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?

8:26 evanrmurphy: in clojure do you do each with for and the :each keyword or something?

8:28 bortreb: for is just the sequence monad, or list comprehension, in clojure

8:28 so I guess it already does :each by default?

8:28 rhudson: ,(doc dorun)

8:28 clojurebot: "([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."

8:29 evanrmurphy: it's tricky because systems programming is necessarily imperative, but clojure seems to wanna stay away from that

8:30 bortreb: how is it necessarly imperative?

8:30 evanrmurphy: (although i'm such a newb here, please excuse that sweeping generalization)

8:30 because you're manipulating the state of your filesystem

8:30 bortreb: I guess because it's mostly file-system stuff, and that is a source of state?

8:30 evanrmurphy: yep

8:31 rhudson: was that a hint to me? ;)

8:32 rhudson: Yes, although doseq might be even more appropriate -- it gives you a binding (as in for) for each element of a seq

8:32 [ appropriate => useful for what you're doing ]

8:32 evanrmurphy: thanks

8:32 bortreb: but doesn't for already do that ?

8:32 raek: for is lazy

8:33 (doseq ...) is the same as (dorun (for ...))

8:33 bortreb: I feel like doseq is something you wrap a for in if you want it to be realized right then and there,

8:33 also not quite, because dorun will loose the head of the seq

8:33 rhudson: ,(doc doseq)

8:33 clojurebot: "([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."

8:33 raek: (doseq [x (range 10)] (println x))

8:33 (for [x (range 10)] (inc x))

8:34 bortreb: nm

8:34 I thought doseq gave you the sequence back.....

8:34 raek: when you use doseq, you care about the side-effects

8:34 no, that's what for does

8:34 doseq always return nil

8:35 dorun forces every element of a sequence and discards the result

8:35 ,(println "test")

8:35 clojurebot: test

8:36 raek: ,(let [x (map println (range 10))] 1)

8:36 clojurebot: 1

8:36 bortreb: raek: do you think a clojure shell would be good or is it not clojue's cup of tea?

8:36 raek: nothing was printed, since no part of the lazy sequence returned by map was forced

8:37 well, I have no idea

8:37 ,(let [x (doall (map println (range 10)))] 1)

8:37 clojurebot: 1

8:37 0 1 2 3 4 5 6 7 8 9

8:41 evanrmurphy: bortreb: regarding what we said earlier about portability, i think an initial project shouldn't even worry about that

8:42 it's ok to have non-portable features. If you try to run a linux command that windows doesn't have, it should complain

8:43 bortreb: yeah -- that makes sense

8:44 and regarding it being stateful -- so what? s-expressions are orthogonal to statelessness and I think they would work better with complex shell commands

8:47 evanrmurphy: the 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.

8:47 that would be one approach anyway

10:04 Blue-Fox: hi

10:42 notsonerdysunny: how 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:42 how can I make my slime recognize ".clj" files as the "lisp" files...

10:44 raek: notsonerdysunny: have you installed clojure-mode?

10:45 notsonerdysunny: (add-to-list 'load-path "/home/sunil/work/download/clojure/git/clojure-mode/")

10:45 (require 'clojure-mode)

10:45 above is the contents of my init.el .. should I do anything else?

10:45 *.xemacs/init.el

10:46 raek: notsonerdysunny: are you able to start clojure-mode with M-x clojure-mode?

10:47 notsonerdysunny: no I am not able to do that...

10:48 raek: i'm sorry.. I got to go now

10:49 I'm sure someone else here can help you

10:49 good luck!

10:50 notsonerdysunny: just a last question .. I followed the instructions for emacs for configuring xemacs ..

10:50 should the procedure be different?

10:50 (I did not find the corresponding instructions for xemacs..)

10:50 thanks raek :)

11:01 pdk: (doc lazy-cons)

11:01 clojurebot: Gabh mo leithscéal?

11:34 technomancy: anyone thinking about lispy shells needs to try eshell (elisp)

11:35 it does a really good job of feeling shell-like but still being very lispy

11:35 it lets you treat it like a shell, but if it detects a lisp form it executes it

11:48 Bahman: Hi all!

11:51 pdk: yknow

11:51 if you add an A in that username and change man to men

11:51 we could all be letting the dogs out

11:53 technomancy: you say that like it's a good thing.

11:54 pdk: well do you prefer the dogs barking

11:54 rhudson: (doseq [dog dogs] (let-out dog))

11:55 pdk: and then we'll be singing about how we can't trace the thread we ran that in rhudson

11:55 rhudson: :)

12:00 Bahman: :-)

12:14 ttmrichter: Hey, Bahman.

12:17 Bahman: Yo ttmrichter!

13:39 * technomancy ponders the advisability of having a function that reduces with a different arity of itself.

13:43 defn: technomancy: like (defn foo ([x] ...) ([x & xs] ...)) ?

13:45 technomancy: defn: yeah, like http://github.com/technomancy/leiningen/commit/e451e12b552ccf82102990bf0e8ee9f44c8516d8#L0R135

13:45 not sure if I should regret that now

13:46 defn: + ;; This could be a separate defn, but I can't think of a good name for it...

13:46 How about (defn make-groups* ...) ??

13:47 technomancy: eh; not a clear improvement. they both indicate they are two sides of the same coin.

13:47 * defn nods

13:47 technomancy: I guess the star makes it obvious which one is meant to be called externally.

13:47 defn: yeah im not sure about that... I mean it looks okay to my eye, but it is an interesting question

13:48 ive used the star in the past to do just that

13:49 actually i usually make the function* the internal one, and the (defn function) the external

13:49 it seems to cut down on confusion a bit

13:49 technomancy: yeah, I guess if you defn- it then it doesn't clutter the namespace

13:49 other than visually

13:50 did you guys see this? http://github.com/maravillas/lein-multi

13:50 I think that's going to be pretty important for the future as the number of versions of Clojure increases.

13:50 defn: no, but i have now :)

13:50 yeah that's nice

13:50 it's been a problem I've been dealing with from 1.1.0 -> 1.2.0

13:51 technomancy: the scala folk have been troubled by it quite a bit from what I hear

13:51 defn: growing pains

13:51 technomancy: given that they named their 3.0 release 2.8 by accident.

13:51 defn: oops! :)

13:53 technomancy: "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:56 maravillas: that's it, i'm firing the marketing department

13:59 technomancy: i did want to ask you how important you feel supporting certain other tasks is, particularly pom and uberjar

14:03 technomancy: maravillas: 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:03 good stuff. =)

14:04 maravillas: good enough for me, yagni it is

14:07 Blue-Fox: is a german irc channel there?

14:19 hoeck: Blue-Fox: #clojure.de

14:19 Blue-Fox: thank you

14:28 LauJensen: Good morning all

14:28 technomancy: UGT!

14:29 LauJensen: Thats right baby :)

15:14 fielcabral: Hello. How do you write fn docstrings that span multiple lines?

15:16 qbg: You put returns in them :)

15:18 hoeck: fielcabral: just like the ones in clojure.core, e.g.: http://github.com/richhickey/clojure/blob/master/src/clj/clojure/core.clj#L1755

15:19 fielcabral: I was trying \ or _ :-)

15:20 Raynes: hoeck: For future reference, it's at http://github.com/clojure/clojure now.

15:21 hoeck: Raynes: right, I was just crawling my url history :)

15:21 Raynes: Oh. Wasn't sure if that was the case, or if you just didn't know. :p

15:23 LauJensen: Raynes: You sure run a tight ship

15:23 :)

15:23 Raynes: o.o

15:25 hoeck: Raynes: so is that old repo still working or do I have to update my git config?

15:26 Raynes: hoeck: The old repo isn't updated anymore.

15:26 hoeck: I thought that github.com/clojure is just a link to richhickey/clojure ?

15:26 oh ok

15:26 Raynes: github.com/clojure/clojure is a fork of richhickey/clojure

15:26 hoeck: Raynes: thanks then :)

16:03 technomancy: poll: user-level Leiningen plugins go in ~/.lein or ~/.lein/plugins?

16:04 raek: what else goes in ~/.lein ?

16:04 technomancy: the only other thing so far is init.clj

16:04 there could be more in the future, but I can't think of anything right now.

16:06 raek: I wouldn't mind if they go in ~/.lein/plugins

16:06 technomancy: yeah, I guess explicit is good

16:07 kencausey: agreed

16:08 technomancy: cygwin suggestion: check CLASSPATH is non-empty before passing it to cygpath

16:08 or check for error from cygpath

16:09 technomancy: kencausey: sure

16:10 Blue-Fox: gn8

16:15 LauJensen: technomancy: Im am so much looking forward to a dead simple lein install for Windows - hows that coming?

16:16 technomancy: LauJensen: someone said they would work on it, then they said they wouldn't.

16:16 still waiting for volunteers.

16:17 LauJensen: oh - I completely understand them, but I really need it to blog about the one-size fits all install for Clojure :)

16:17 technomancy: maybe you could help find a Windows user to fix it. =)

16:17 they are hard to find these days.

16:17 LauJensen: Maybe - I've heard of one in north Russia actually, I could try to locate him

16:18 Last seen beating his keyboard with a blue background and white text on his laptop, dunno what it was about

16:23 technomancy: anyone 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:24 details here: http://groups.google.com/group/leiningen/browse_thread/thread/b3c91f5fb3d45b94

16:26 LauJensen: technomancy: 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:26 technomancy: LauJensen: right... you don't have any clojure shell projects because this functionality doesn't exist yet. =)

16:26 LauJensen: Thats not why

16:27 technomancy: well not for you, but in general why nobody writes them.

16:27 it's a pain right now.

16:29 LauJensen: Like I said - I can wait a week, go hack! :)

16:29 technomancy: UOC which uberjar fix have you put in ?

16:29 technomancy: if you uberjar without any AOT then the deps jars don't get included in the uberjar

16:29 but there's really no point to uberjar if you don't AOT at least a -main fn

16:31 LauJensen: ok - 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:31 technomancy: yeah, he probably misspelled his :main ns or didn't understand that he needed to have one

16:32 LauJensen: He might have mispelled I didnt check, but he did have there

16:32 But you're above version 1.0, why arent you running flyspell ?

16:32 technomancy: also fixed a bug where it didn't complain about ns misspellings

16:32 hehe

17:35 clojurebot: lein uberjar bug is usually when you don't have a :main specified correctly: http://groups.google.com/group/leiningen/msg/d0a36ae9b92ab1f1

17:35 clojurebot: Ik begrijp

17:59 jlf`: 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:01 qbg: Why are *jure name no longer allowed in lein 1.2?

18:01 jlf`: 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:03 technomancy: jlf`: eep

18:03 rhudson: qbg: I think lein has abjured -jure names since 1.1

18:04 technomancy: rhudson: no, it's new in 1.2

18:04 qbg: Does someone really hate *jure names?

18:04 rhudson: apparently

18:06 qbg: I'll admit that "typejure" is probably a terrible name, but still...

18:07 rhudson: I think you're right about that :)

18:10 technomancy: show me a good *jure name and I might add an exception. =)

18:19 lozh: /usr/dict/share/words gives injure and perjure as the only likely candidates

18:21 qbg: There is also conjure, but that is already taken

18:22 neotyk: injure +1

18:23 lozh: clojure's intercal interop library

18:24 qbg: That name makes sense...

19:07 rplevy: I'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:08 technomancy: clojurebot: restfn?

19:08 clojurebot: ant clean and rebuild contrib

19:09 technomancy: rplevy: usually that means you've got .class files compiled with an older version of clojure.

19:16 rplevy: technomancy: 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:16 technomancy: rplevy: likely in a dependency

19:57 rplevy: technomancy: 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:15 I 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:23 pdk: ,(binding [x 1]) x)

20:23 clojurebot: java.lang.Exception: Unable to resolve var: x in this context

20:23 pdk: ,(binding [x 1] x)

20:23 clojurebot: java.lang.Exception: Unable to resolve var: x in this context

20:24 qbg: You need to declare x first

20:24 ,(binding [max 5] max)

20:24 clojurebot: 5

21:13 defn: hello all

21:29 Raynes: defn: Evening.

21:42 rplevy: what would you think a library called "pastjure" would do?

21:42 [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:45 arbscht: rplevy: it would provoke the wrath of technomancy ;)

22:39 puredanger: If 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:43 brweber2: puredanger don't you want (proxy X [] (foo ([s] (...) [s1 s2] (...) ) ) ?

22:44 puredanger with one more closing paren at the end of course :)

22:45 puredanger take two: (proxy X [] (foo ([s] (...)) ([s1 s2] (...))))

22:46 man, I can't type tonight...

22:46 puredanger: brweber2: that last is where I started but that complained at me ...don't have that handy though

22:48 brweber2: puredanger class-and-interfaces - a vector of class names

22:48 puredanger take three: (proxy [X] [] (foo ([s] (...)) ([s1 s2] (...))))

22:48 puredanger: brweber2: heh, right - not worried about that part though

22:54 brweber2: grr, trying to test but apparently I deleted my custom clj script at some point recently

23:01 brweber2: puredanger have it, I'll create a gist, just one second....

23:03 http://gist.github.com/514863

23:03 puredanger http://gist.github.com/514863

23:04 puredanger: brweber2: thx!

23:04 brweber2: puredanger sure, np

23:17 puredanger 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:20 puredanger: brweber2: well, I believe the impls are held in a map keyed by method name, so that would make sense

23:26 amalloy: what's the idiomatic way to convert true/false into nil/not-nil? (when x true) works but seems silly.

23:50 spewn: ,(true? nil)

23:50 clojurebot: false

23:50 spewn: amalloy: Is that what you meant?

23:54 amalloy: no, the opposite

23:54 i have true or false, and want to turn false into nil

23:55 spewn: Oh, sorry. Misread.

23:57 arbscht: ,(or false nil)

23:57 clojurebot: nil

23:57 amalloy: aha

23:58 exactly what i was looking for, though it's not much prettier than what i had *chuckle*

Logging service provided by n01se.net