#clojure log - Jun 08 2010

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

0:00 danlarkin: see javadoc for FileWriter: http://java.sun.com/javase/6/docs/api/java/io/FileWriter.html

0:10 livingston: is there a way to call a private static method on a java class?

0:12 Raynes: livingston: http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/java_utils.clj#L208

0:12 mmarczyk: vIkSiT: here's my take on level-order: http://gist.github.com/429607

0:12 wall-hack-method, currently in c.c.java

0:13 Raynes: mmarczyk: You're too late. HAH!

0:13 mmarczyk: Raynes: darn :-P

0:13 livingston: how's your meaning-extraction project coming along?

0:13 Raynes: I used it back in the stone ages when sexpbot was a Pircbot.

0:13 livingston: cool, yeah all's I want is the function at line 340 here: http://jena.cvs.sourceforge.net/viewvc/jena/jena/src/com/hp/hpl/jena/rdf/arp/NTriple.java?view=markup

0:17 livingston_: I have to get irc unblocked at work... (stupid clint doesn't even last 5 minutes)

0:17 mmarczyk: mostly I'm just working on get a boat-load of bio knowledge extracted from stupid text-file formats into a triple (rdf) store.

0:18 mmarczyk: livingston_: yeah, I remember -- that's why I'm asking :-)

0:18 stupid formats or not, the project seems fascinating

0:19 for your question, (require '[clojure.contrib.java :as j]) (j/wall-hack-method clojure.lang.LispReader :matchNumber [String] nil "123")

0:20 is an example

0:20 :matchNumber is a private static method -- like the one you're trying to get at

0:20 livingston_: I'm getting my kb together (enough) so hopefully I can share the work with others. the rdf interaction has been going ok, I hope to release that code to the wild soon - have to get the lawyers to ok EPL.

0:20 mmarczyk: you could also use classes from java.lang.reflect directly, but wall-hack-method is prettier

0:21 oh, cool

0:21 if you can manage that, it'll be interesting to look at

0:21 dcnstrct: question: does the JVM work well on multi-core systems ? I've heard rumors that it starts to crap out once you're dealing with more than 6 cores.

0:22 livingston_: does System.out not go to *out* ?

0:23 dcnstrct: we have 32+ core machines here - I think they do ok, although I haven't used them much so I don't know if people are really going massively parallel with them.

0:23 mmarczyk: *out*'s docstring says that's the default

0:24 dcnstrct: check these guys out: http://www.azulsystems.com/blogs

0:24 I believe they've got some monster machines running JVMs

0:25 livingston_: well... that wall-hack compiled and called but I didn't see any output :(

0:25 mmarczyk: "The Azul "bare metal" Java platform allows applications to scale effortlessly to consume 100s of GBs of memory and CPUs."

0:25 -- from their "about us" page

0:26 dcnstrct: thnx this is good ammo to fire back @ propaganda spewing haskell nerd friend. O.o

0:26 mmarczyk: livingston_: well, that output's going wherever your JVM's stdout is

0:26 livingston_: rebinding *out* (perhaps to send it to swank instead) won't change that

0:28 dcnstrct: I like Haskell, but I'm not sure it has an edge here quite yet :-)

0:29 then again, what do I know... we're all screwed in the presence of propaganda-spewing Erlang nerd friends anyway ;-)

0:30 Raynes: While the Haskell community is a very nice community, they seem to be quite harsh towards any language that isn't Haskell.

0:30 mmarczyk: oh, he's gone... I always notice this *after* writing the final response :-(

0:31 livingston_: hmm.. not good, this completely vanishes (.println System/out "foo")

0:31 mmarczyk: Norman Ramsey is just (/ 1 (count haskell-community)) part of the Haskell community ;-)

0:31 Raynes: mmarczyk: Not him, silly.

0:31 mmarczyk: Raynes: oh? hm, I suddenly realise that actually he might not be harsh towards other languages, he seems to be a polyglot :-)

0:32 Raynes: mmarczyk: I've watched them rag Lisp in #haskell at least 5 times over the last 6 months.

0:32 More than one.

0:32 mmarczyk: Raynes: have you tried hanging out on comp.lang.lisp at all? ;-)

0:32 Raynes: mmarczyk: Of course not! :p

0:32 mmarczyk: Raynes: good :-)

0:35 livingston_: my experience is that this sends output to the terminal the JVM was started from, if any

0:36 livingston_: it's slime that's screwing me.

0:36 mmarczyk: livingston_: try "lein swank" in an empty project, then (.println System/out "foo") at the REPL should send "foo" to that terminal

0:36 livingston_: well not really

0:37 the fact that *out* is bound to System/out does not mean that System/out is bound to *out*

0:37 livingston_: how do I temporarily change what System.out points to (not *out*)

0:37 mmarczyk: yes that's exactly what's happening, slime has injected itself as a middle man

0:37 mmarczyk: I suppose CL's swank implementations might capture all output... swank-clojure only captures the Clojure streams, iirc

0:38 tomoj: System.out is final

0:38 livingston_: but I need the output that is going to System.out (maybe this isn't possible) but basically I want to bind over System.out

0:38 tomoj: uh oh so that means no dice for me, right?

0:38 tomoj: I think so, but I'm not sure

0:39 the only possibly way I could think of would be to have a tiny wrapper script which intercepts java's stdout and somehow hands it back to some clojure stuff, which sounds... unpleasant

0:39 but there may be some easier way

0:39 livingston_: http://measuringmeasures.blogspot.com/2010/01/agony-of-clojurehadoop-logging-and-how.html

0:39 ^ has some discussion on it.

0:40 System/setOut perhaps

0:43 mmarczyk: hm, interesting

0:43 tomoj: wat

0:44 mmarczyk: that blog entry

0:44 livingston_: geeze even that didn't do it, and worse I called System/setOut without caching the old value ... not sure what that just did to me... stupid side effects

0:44 tomoj: I mean, how can there be a System/setOut when System/out is final??

0:45 mmarczyk: but is it really?

0:45 http://java.sun.com/javase/6/docs/api/java/lang/System.html

0:45 ^ there's no indication of that here

0:46 apparently setOut "reassigns the standard output stream" to an instance of PrintStream

0:46 tomoj: yeah

0:46 http://java.sun.com/javase/6/docs/api/java/lang/System.html#out

0:46 "public static final PrintStream out"

0:46 mmarczyk: ooohhh

0:46 right

0:46 sorry.

0:46 tomoj: that's odd

0:46 mmarczyk: (why don't they include the "final" qualifier in the summary at the top?)

0:46 tomoj: maybe I don't remember java as well as I thought I did

0:46 livingston_: well what they said to do, still didn't do the trick

0:48 er, well, it makes it so that clojure can write to the new System/out like they say, but my old java code (that's supposed to be writing to system.out doesn't show up there...

0:48 perhaps it's still my problem with the wall hacked function

0:49 i'll just reimplement the damn thing,.. what's the best way to accumulate string output character by couple of characters?

0:49 mmarczyk: http://blogs.sun.com/nickstephen/entry/java_redirecting_system_out_and

0:50 not sure if this will help, but...

0:50 StringBuilder is good for accumulating stuff into a string

0:51 I think it's a good idea to .trim it before pulling the string out at the end

0:52 otherwise the array it uses won't be GC'd, and it might grow larger than necessary for the string... not sure what's the rate of expanding the array etc. though

0:57 livingston_: well, reduce .replace is going to get me mostly going for right now, as disgusting as that is.

1:06 mmarczyk: hm? I might not have understood what you're trying to do

1:06 livingston_: basically escape a string in n-triple format.

1:08 mmarczyk: $(doc clojure.contrib.string/escape)

1:08 sexpbot: => ------------------------- clojure.contrib.string/escape ([cmap s]) Returns a new String by applying cmap (a function or a map) to each character in s. If cmap returns nil, the original character... http://gist.github.com/429637

1:08 mmarczyk: it only replaces single characters, but the replacement can be a string

1:09 so, you're working with an API which makes a string-escaping function private? :-)

1:09 livingston_: no it's not an api but the functionality was there so I thought I could just grab it.

1:10 in the time I wasted trying to get to it I should have just reimplemented it

1:11 that map function is nice, thanks

1:11 mmarczyk: at least wall-hack-method is a nice function to know

1:11 np :-)

1:12 livingston_: although I still have an issue with hex escaping everything else, but I can probably take the source from that and change the default

1:12 mmarczyk: right

1:21 hiredman: wall-hack-method doesn't exist anymore

1:23 livingston_: so in java this works if ar is an array of char : (ar[i] >= 32 && ar[i] <= 126) but in clojure I can't seem to figure out how to get an ascii code comparison with say the character \c

1:23 hiredman: hm, good to know. it was as the name implies definitely a hack, I'm just going to reimplement the code I wanted to hack to.

1:24 (i was just hoping I could have been done in time to get dinner before 11 at the good burger place, oh well)

1:24 hiredman: well

1:24 it does exist, just got renamed

1:25 livingston_: I guess basically I just need to know how to cast a char to a number (it's ascii code)

1:26 hiredman: ,(<= 32 (int \c) 128)

1:26 clojurebot: true

1:26 hiredman: chars are ints

1:26 the difference is a lie

1:26 livingston_: hiredman: well I'll know what to look for if I need it later for testing.

1:26 cool thanks

1:26 I was just looking at (int _) also but I wasn't sure if that was accurate

1:27 hiredman: just like in java you can cast an char to an int

1:27 livingston_: so that cast is basically free right?

1:27 hiredman: damned if I know

1:27 livingston_: well I won't worry about it then, until the profiler tells me to care

1:32 mmarczyk: hiredman: I'm on 1.2 and I still see wall-hack-method in clojure.contrib.java

1:32 it was gone for a while, but then came back as part of the effort not to break things through gratuitous renaming

1:32 is it gone again now?

1:35 hiredman: dunno

1:36 Raynes: Ignore this little test, a recent update of sexpbot's configuration format might have broken the per-channel blacklisting of the title scraper: http://stackoverflow.com

1:36 hiredman: I wrote the thing, so I just use the original

1:36 Raynes: Goodie. It didn't.

1:37 mmarczyk: hiredman: right. well, it seems likely to stay in 1.2 under it's old name, so let's hope that happens

1:37 livingston_: how can I form a string with the unescaped character #128 in it?

1:37 mmarczyk: Raynes: good to know the cool name's still with us :-)

1:37 (char 128)

1:37 hiredman: ,(str (char 128))

1:37 clojurebot: "€"

1:39 mmarczyk: "\u0080" is also an option

1:39 Raynes: mmarczyk: Huh? :o

1:40 mmarczyk: Raynes: oh, I suddenly noticed your previous msg... it appeared out of nowhere as far as I can tell

1:40 completely changes the perceived meaning of the next one :-P

1:40 livingston_: it keeps getting escaped no matter what I do I keep seeing \200

1:40 mmarczyk: I think I should maybe get some sleep, it's been a long night over here

1:40 livingston_: that's just the printed representation

1:41 you're seeing *one* \, if it was escaped in the string, you'd see two

1:41 "\\200"

1:41 Raynes: :p

1:41 livingston_: I'm realizing maybe my buffer/printer is being too smart...

1:42 mmarczyk: $(read-string (with-out-string (print "\u0080")))

1:42 sexpbot: java.lang.Exception: Unable to resolve symbol: with-out-string in this context

1:42 mmarczyk: $(read-string (with-out-str (print "\u0080")))

1:42 sexpbot: java.lang.SecurityException: Code did not pass sandbox guidelines: ()

1:42 mmarczyk: huh?

1:42 livingston_: DOH

1:42 mmarczyk: ,(read-string (with-out-str (print "\u0080")))

1:42 clojurebot: €

1:42 Raynes: with-out-str is probably not whitelisted.

1:42 mmarczyk: ommission?

1:43 livingston_: ... the i redefined this function but am still calling the old function bug strikes again

1:43 Raynes: Actually, I guess it's StringWriter that needs to be properly whitelisted.

1:43 I don't know, I'll check tomorrow. It's late.

1:44 mmarczyk: right.

1:44 tomoj: livingston_: do you use C-M-x or something like that?

1:46 livingston_: C-c C-k ... but it was even worse than that

1:46 I was calling the one in the old ns and I moved it to a different ns

1:46 tomoj: ah

1:47 livingston_: yeah, this is a sign I should have gone and gotten that burger a *long* time ago.

1:47 tomoj: would be kinda nice to have a "reset the repl to a virgin state and recompile everything" button

1:48 mmarczyk: it's called M-x slime-restart-inferior-lisp ;-)

1:48 followed by (require ' <M-p a couple of times>

1:49 that's under the assumption that a nice require form for all the relevant namespaces is available in the history... otherwise a custom init script would probably be needed

1:49 that's doable with mvn, apparently, I wonder about lein

1:52 livingston_: this is a perpetual problem with any REPL language ... and no what you are proposing isn't a general-purpose solution ;)

1:52 you loose all your state, database connections, etc. etc.

1:52 mmarczyk: right

1:52 livingston_: or ^lose

1:52 mmarczyk: the price to pay for being absolutely sure everything's clean

1:53 I wish stuff from required namespaces would get undefed at the repl

1:53 after disappearing from the namespace

1:53 on the other hand, that could be *very* problematic sometimes

1:54 so for those times, I wish things stay the way they are :-P

1:54 I don't think I'm prepared to offer a general purpose solution :-)

1:54 livingston_: if that's all you want you can mostly get away with un-interning the whole namespace or whatever is the equivalent in clojure

1:55 Raynes: Goodnight, my fellow parentheses fetishists. <3

1:55 mmarczyk: Raynes: sweet bracketed dreams

1:55 remove-ns, yeah

1:56 in fact, that's a good idea

1:57 bind something like C-c C-K to something clever to do (remove-ns ...) followed by C-c C-k

1:57 livingston_: you don't want to do it all the time - kills all you state and defonce's etc.

1:58 mmarczyk: oh sure

1:58 but often enough my namespaces have no state and defonces, just regular functions which get moved around between them

1:58 so that's a simple fix for those simple cases

1:58 tomoj: oh, cool

1:59 I didn't know about remove-ns, thanks

1:59 mmarczyk: yw :-)

1:59 tomoj: I thought you had to loop through the ns-publics and ns-unmap or something silly like that

2:00 zmila: ,(hello world)

2:00 clojurebot: java.lang.Exception: Unable to resolve symbol: hello in this context

2:04 livingston_: hey, thanks for the help -- it's food/bedtime...

2:04 mmarczyk: same here, actually

2:04 bbl

3:13 LauJensen: Morning all

3:15 Raynes: $(with-out-str (println "omg"))

3:15 sexpbot: => "omg\n"

3:15 Raynes: mmarczyk: ^ Fixed that.

3:15 * Raynes goes to sleep for real.

4:19 esj: Morning Parentheratii

4:19 TheBusby: Hoping they'll have T-shirts for that before long

4:21 esj: not sure that alone can support my lisp habit

4:32 tomoj: is parentheratii the plural of parentheratio?

4:34 TheBusby: latin is evil...

4:35 hiredman: I wonder if the driver for the hp blueray drive is on the disc

4:36 LauJensen: tomoj: no its the name of a superhero "Paren The Ratii"

4:36 hiredman: mischan

4:39 tomoj: then what's a ratii?

4:39 esj: I dunno, I'm just making it up as I go along. I sounds like a plural to me, but I never studied latin :)

4:39 tomoj: ah

4:39 esj: i'm basing it off The Illuminatii

4:40 tomoj: ewige blumenkraft

4:40 esj: indeed

4:52 LauJensen: I pronounce you the official #Clojure Ratii

4:54 LauJensen: kthxbye

4:54 Are there any standard libs for porting apps to GAE ?

5:00 npoektop: hi! is it possible to write smth like (do (ns nspace ...) (defn ...))? I need it for tests.

5:03 LauJensen: $(do (ns myns) (defn fn1 [] "hello") (ns user) (myns/fn1))

5:03 sexpbot: java.lang.SecurityException: Code did not pass sandbox guidelines: (#'clojure.core/in-ns #'clojure.core/refer clojure.core def #'clojure.core/in-ns #'clojure.core/refer clojure.core)

5:03 LauJensen: ,(do (ns myns) (defn fn1 [] "hello") (ns user) (myns/fn1))

5:03 clojurebot: DENIED

5:03 LauJensen: oh well, try it locally

5:05 tomoj: do you actually want to create a new namespace?

5:09 npoektop: no, i want to add something to existing namespace

5:13 LauJensen: npoektop: no difference, the code I pasted will work

5:14 npoektop: thank you!

5:14 LauJensen: np

5:15 tomoj: hmm

5:15 so why does in-ns exist?

5:15 LauJensen: ,(doc in-ns)

5:15 clojurebot: "([name]); Sets *ns* to the namespace named by the symbol, creating it if needed."

5:15 tomoj: oh, I see the difference

5:16 (let [foo 'bar] (in-ns foo)) vs (let [foo 'bar] (ns foo))

5:16 the former switches to bar while the latter switches to foo, I think?

5:18 LauJensen: Correct

6:53 powr-toc: Is the current clojure-contrib-1.2.0-SNAPSHOT compatible with clojure-1.2.0-master-SNAPSHOT on build.clojure.org/snapshots??

6:54 I get the dreaded java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V error

7:02 LauJensen: powr-toc: I've never had them fall out of sync, for any other reason than an outdated jar in ~/.m2/

7:02 But it can happen

7:03 powr-toc: LauJensen: so you think I should just nuke some jars in .m2, and rerun mvn?

7:04 LauJensen: powr-toc: what I do is rm -rf ~/.m2, and try again

7:04 I've never had that, not work

7:05 powr-toc: cool... I've had this happen once before too... I don't understand how maven screws up...

7:05 I though -SNAPSHOT should always get the latest version

7:06 LauJensen: powr-toc: if it finds something named -SNAPSHOT in cache, it'll go with that.

7:07 powr-toc: LauJensen: so what should be in my pom? clojure 1.2.0-master-SNAPSHOT and clojure-contrib 1.2.0-SNAPSHOT?

7:07 or do I need contrib 1.1.0-master-SNAPSHOT?

7:08 LauJensen: "1.2.0-SNAPSHOT" will do fine

7:09 for contrib I mean, clojure is "1.2.0-master-SNAPSHOT"

7:09 And those 2 should work together. But as I hinted above, I dont think the update process is automated, so Clojure could be updated sometime before Contrib, which could cause a skew

7:09 powr-toc: :-\

7:10 esj: when running tests from clojure.test via swank in emacs, where do the messages about failures etc go (1.2 snapshot). I just get the final map containing counts.

7:10 LauJensen: esj: using clojure-test-mode ?

7:10 esj: no, straight up. You recommend c-t-m ?

7:11 LauJensen: absolutely - You hit some key, dont remember which ofc, C-c C-; I think, and whichever tests fail, gets highlighted with red background color - couldnt be simpler

7:11 esj: much obliged Lau... I'll get that going right now.

7:11 LauJensen: np

7:19 esj: LauJensen: any idea why its now gets complains about mismatched parens in the (ns ...) (understanding that they do, in fact, match) ?

7:19 no worries if its not a common complaint

7:20 powr-toc: LauJensen: Okay, I just removed my .m2 and have both clojure-1.2.0-master-SNAPSHOT and clojure-contrib-1.2.0-SNAPSHOT in my pom... after downloading the world again I get the same error... It looks like clojure and contrib are out of sync... any ideas on what I can do?

7:20 LauJensen: esj: havent heard of it

7:21 powr-toc: sec, I'll try to replicate

7:21 powr-toc: LauJensen: cheers bud

7:21 esj: k, I'll figure it out and report if its at all interesting

7:24 LauJensen: powr-toc: I nuked .m2/, pulled "1.2.0-master-SNAPSHOT" and "1.2.0-SNAPSHOT", started a repl and imported something from contrib, no errors

7:24 powr-toc: hmm...

7:25 LauJensen: like so

7:25 :dependencies [[org.clojure/clojure "1.2.0-master-SNAPSHOT"]

7:25 [org.clojure/clojure-contrib "1.2.0-SNAPSHOT"]


7:28 powr-toc: LauJensen: my dependencies are the same (except in pom.xml)

7:29 LauJensen: Makes no sense

7:29 Which Repo are you pulling from ?

7:29 Both of mine came from Clojars

7:29 powr-toc: LauJensen: http://gist.github.com/429887

7:29 LauJensen: build.clojure.org/snapshots

7:30 I didn't think clojars containing 1.2 of contrib and clojure

7:30 I thought lein put build.clojure.org/snapshots on the repo path automatically

7:31 server.clj is my file

7:31 LauJensen: [INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from central

7:31 [INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojure-snapshots

7:31 [INFO] snapshot org.clojure:clojure:1.2.0-master-SNAPSHOT: checking for updates from clojars

7:31 Downloading: org/clojure/clojure/1.2.0-master-SNAPSHOT/clojure-1.2.0-master-20100607.150309-85.pom from clojars

7:31 Transferring 1K from clojars


7:31 powr-toc: you think I should remove snapshots as a repo?

7:32 LauJensen: Yea that must be it

7:32 Perhaps build.clojure.org is the one out of sync, but they push both to clojars at the same time... would be nice if clojars could be trusted

7:33 powr-toc: LauJensen: looks like you're right and that they are on clojars after all

7:34 LauJensen: but I still get the same error :-\

7:35 LauJensen: did you remember to nuke .m2 again?

7:36 powr-toc: LauJensen: my project has a lot of dependencies, so I did rm -rf /Users/rick/.m2/repository/org/clojure instead

7:36 LauJensen: that should be good enough right?

7:36 LauJensen: Not sure

7:37 Logic tells me yes, but Maven tells me logic aint so good no more

7:37 powr-toc: LauJensen: there's no other metadata in .m2 that isn't inside the dependency dirs - as far as I can tell

7:37 LauJensen: k

7:38 powr-toc: ok... I'll try downloading the world again (though I did that the first time)

7:38 LauJensen: If that doesnt work I'd try simplying the startup process, only importing what is nescessary to validate the jars

7:39 powr-toc: LauJensen: yeah... shame clojure stacktraces suck so much in these situations

7:39 I can usually read them ok, except for namespace use/requires etc...

7:41 LauJensen: Yea - I'm a little worried about when I meet Rich for the first time, if I'll shake his hand so hard that it crunches, while internally just seeing the line "Exception: NO MESSAGE (SOURCE:0)" :)

7:45 powr-toc: lol

7:46 hmm.. still get the same error :-(

7:49 LauJensen: am I right in thinking duck-streams has been replaced with clojure.contrib.io?

7:49 LauJensen: Yes sir

7:49 powr-toc: that might be my error

7:49 LauJensen: Which is weird, since ducks are funnier

7:50 spariev: more ducks and fishes !

7:50 LauJensen: http://github.com/richhickey/clojure-contrib/blob/master/src/main/clojure/clojure/contrib/duck_streams.clj#L24

7:51 powr-toc: LauJensen: http://scienceblogs.com/notrocketscience/2009/12/ballistic_penises_and_corkscrew_vaginas_-_the_sexual_battles.php

7:51 (it is safe for work btw - I promise!!)

7:51 LauJensen: ehm - I am not clicking that link

7:52 spariev: lol

7:52 LauJensen: Nice try though spam-artist

7:52 Thats the most elaborate spam-trick I've ever seen, going undercover as a Clojurian struggling with Maven ( I mean its very beliveable ) only to post lude links

7:54 rsynnott: LauJensen: possibly some sort of adware built into the client?

7:54 powr-toc: LOL... It's scientific research into the sexual evolution of ducks

7:54 rsynnott: though actually, it's not proper spam

7:54 it's on scienceblogs, which is reputable

7:55 powr-toc: anyway it just adds to the general duck comedy IMHO

7:55 LauJensen: rsynnott: Ok, so you think people who are very taken up with ducks sexuality are reputable? we have a name for them in Denmark as well, but its not 'scientist' :)

7:57 spariev: heh, so that's what they mean by 'Duck IO'

7:57 vu3rdd: I have a small utility function called error which does nothing but throw an exception with a string which is passed to that function. When I define it in the repl, I get this error: "Reflection warning, NO_SOURCE_FILE:1 - call to java.lang.Exception ctor can't be resolved."

7:57 what is ctor?

7:57 powr-toc: spariev: lol

7:58 chouser: "ctor" is short for "constructor"

7:58 Chousuke: LauJensen: :P

7:58 the blog post turned out to be rather interesting.

7:58 vu3rdd: chouser: Thanks. Why do I get this warning?

7:58 Chousuke: though I didn't watch the videos.

7:59 powr-toc: Chousuke: yeah it's a good post

7:59 chouser: vu3rdd: dunno. maybe post that fn somewhere?

7:59 vu3rdd: chouser: sure

8:00 chouser: http://gist.github.com/429915

8:01 chouser: ok, it's just a performance warning.

8:01 vu3rdd: chouser: ok.

8:03 chouser: Clojure can't tell at compile time that 'string' will always be a String -- you might pass in another kind of object. So it compiles code that at runtime will look at the type of the arg and try to find the correct ctor

8:03 If you want to promise to Clojure that string will always be a String, it'll generate faster code and the warning will go away.

8:04 vu3rdd: chouser: Thanks for the explanation

8:05 chouser: np

8:05 vu3rdd: chouser: yes indeed, with type hint it goes away. thanks a lot

8:05 bsteuber: does anyone have experience with a mixed java/clojure project using eclipse?

8:06 my problem is that eclipse doesn't find clojure-definded classes I'm referencing from java

8:07 the maven build itself still works, but these eclipse error messages are pretty annoying

8:12 powr-toc: Do compojure 0.4 and ring 2.2 work with clojure-1.2.0-master-SNAPSHOT and clojure-contrib-1.2.0-SNAPSHOT?

8:15 arohner: powr-toc: compojure 0.4 and ring 0.2.0 work for me here

8:15 powr-toc: I'm using clojure 1.2-20100504

8:29 powr-toc: presumably swank-clojure works with 1.2

8:30 yeah it does

8:40 hmmm... Ok, it looks like compojure.core doesn't work with 1.2.0 of clojure/contrib :-\

8:42 the latest snapshot that is

8:46 LauJensen: powr-toc: If you're not dug in, try Moustache

8:55 For those who care: http://twitter.com/LauJensen/status/15703604050

8:56 There's a little nginx-fu involved, which is cool :)

9:01 qebab: Could anyone tell me if there's any "canonical" event system for clojure (ie. like what twisted is for python)?

9:01 bartj: LauJensen: I am pretty sure I saw links to your blog elsewhere, which resulted in 404

9:02 LauJensen: bartj: where?

9:02 bartj: LauJensen: I know you have re-written your blog completely using Enlive...but why don't the old links resolve?

9:02 LauJensen: bartj: Old links should work just fine

9:02 cemerick: clojure survey response data and accompanying blog post incoming :-)

9:03 LauJensen: uuuh

9:03 bartj: LauJensen: don't remember now...

9:03 cemerick: it's going to be a very busy day on the blogs and twitter :-D

9:03 chouser: qebab: not quite sure what that means, but there are watchers to have functions called when reference objects state change.

9:03 qebab: would that help?

9:05 LauJensen: bartj: try: http://www.bestinclass.dk/index.php/2010/04/prototurtle-the-tale-of-the-bleeding-turtle/

9:05 and keep your eye on the url

9:05 spariev: qebab: is it "evented systems" are you talking about. like twisted or event-machine ?

9:06 if so, you could try jetty or glassfish stuff

9:19 rhickey: so, (defn ^{:static true :ret int} foo [^int x] x) seems like a bit much to say

9:19 could auto-static given any primitive hints, since they are not supported otherwise

9:20 making it: (defn ^int foo [^int x] x)

9:20 chouser: static is for direct binding?

9:20 qebab: sorry, about not replying and thanks for the replies

9:21 rhickey: chouser: well, not direct binding as it is now, but yes, non-dynamic

9:21 qebab: chouser: basically I want to schedule a number of timed events while also listening on possibly a number of sockets without having to do all the dirty work myself

9:21 spariev: I'll take a look, thanks

9:21 chouser: so re-defing is ok, but 'binding' won't work

9:22 rhickey: lpetit suggested defstatic or similar, but I'm concerned about the path from (defn foo [x] ...) to something faster

9:22 chouser: redefs will not be seen by code calling by name without re-eval, as with a macro

9:22 chouser: ok

9:23 spariev: qebab: netty might also be helpful - http://www.jboss.org/netty

9:23 qebab: spariev: thanks :)

9:24 spariev: ahh, that looks exactly like what I need

9:24 chouser: rhickey: are you also addressing a difference there between :rtn and :tag?

9:24 rhickey: separately, the ret types might be allowed to vary per arity. so :tag on fn name insufficient

9:24 candera: rhickey: any concerns about the fact that a type hint will change linking behavior? That seems like the sort of thing that I'll mess up about 100 times before I start remembering it.

9:24 chouser: That is, the type of the thing in the var vs. the type returned by the IFn in the var?

9:24 rhickey: (defn foo ^int [^int x] x) possible, and works for multiple arities

9:25 candera: that was the concern of the person who wanted the error

9:25 chouser: I must have missed a discussion.

9:25 rhickey: I just want something short and easy to remember. If clojure takes more to do this than Java, then fail

9:26 candera: I suppose at the point where you're adding primitive type hints you've crossed over into "you should be able to realize the consequences".

9:26 chouser: I like the return hint on the arg list

9:26 rhickey: candera: well, there is also going to static without primitives, so that still needs to be short

9:27 candera: But at that point it's just ^{:static true}, which isn't as bad. Although longer than Java.

9:27 chouser: (defn ^static foo ^int [^int x] x) scans nicely, but the semantics go all wobbly

9:29 rhickey: chouser: right, I like the ret hint on arglist, but want something better for static

9:29 cgrand: (defn foo ^Object [x] x) triggers static, no?

9:30 rhickey: cgrand: could do, but I'd hate to have to say ^Object

9:30 candera: rhickey: I didn't understand the comment about defstatic/path to something faster. Is there a problem having defstatic be the idomatic form and having a more verbose form as the underlying construct?

9:30 LauJensen: Wouldnt (defn ^int add [x y]...) make a lot of sense ?

9:30 cgrand: ^:static

9:31 rhickey: candera: the thing about type hints in general, is you take something without them and add them. Moving from defn to defstatic is changing something you have, rather than adorning

9:31 candera: Right. I see your point now.

9:32 rhickey: LauJensen: did you see above re: multiple arity?

9:32 there's nothing that says how :tag is to be interpreted. It is just a way to communicate to the compiler. There;s always been a mismatch with :tag on defns as the contents of the var are fns, not what the tag says

9:33 so, (defn ^static foo [] ...) is not inherently bad

9:33 cgrand: a keyword short hand for metadata? ^:foo ^{:foo true}

9:34 LauJensen: rhickey: yea I saw - I just meant in terms of reading, putting the type before the name makes sense

9:34 (to me)

9:34 rhickey: cgrand: how to keep people from wanting multiples of those?

9:34 chouser: rhickey: yes, I know it's always been that way, but there times when it would be useful to specify both the specific type of the IFn and the type of the IFn's return value.

9:35 rhickey: cgrand: e.g. (defn ^:this ^:that ^:the-other foo ...

9:35 chouser: heh. they could stack!

9:35 ^{:this true :that true :the-other true} foo

9:35 cgrand: ^#{:this :that} ;-)

9:36 powr-toc: LauJensen: why do you prefer moustache?

9:36 hoeck: how do I typehint something as an array of strings?

9:37 LauJensen: powr-toc: Read my blogpost on why I implemented bestinclass.dk using Moustache/Enlive :)

9:37 hoeck: ^strings doesn't work, ^{:tag (type (make-array String 0))} neither

9:37 rhickey: begs the question as to what ^{:this true} ^{:that true} fred ought to do. Right now one replaces the other, but should it?

9:38 chouser: hoek: Try #=(type ...) instead

9:38 hoeck: or just ^"[Ljava.lang.String;"

9:38 rhickey: cgrand: I like that ^:foo == {:foo true}

9:39 and if meta literals merged...

9:40 hoeck: chouser: thx, the latter one worked

9:40 rhickey: ^:static ^:awesome foo would work too

9:40 * rhickey needs to implement :awesome

9:41 powr-toc: LauJensen: which post is that?

9:41 a_strange_guy: meta literals already "merge"

9:41 * candera wants a compiler error if I use :awesome on a function that sucks.

9:41 a_strange_guy: but only for the :line keyword

9:41 xD

9:41 powr-toc: LauJensen: best in class has been baked?

9:41 rhickey: ,(meta (quote ^{:this true} ^{:that true} fred))

9:41 clojurebot: {:this true}

9:41 LauJensen: powr-toc: http://bestinclass.dk/index.clj/2010/05/refresh-your-cache--best-in-class-has-been-baked.html

9:42 powr-toc: LauJensen: It doesn't seem to provide any justification for enlive over compojure

9:42 I mean moustache, sorry

9:42 rhickey: (defn ^:static foo ^int [^int x] x) still losing to Java

9:43 LauJensen: powr-toc: Hmm - Ok sorry, I must have mis-remembered, ask me again once Rich figures out how to implement statics :)

9:43 a_strange_guy: ,(meta ^:keywd [])

9:43 clojurebot: {:tag :keywd}

9:44 fogus_: (defstatic foo ^int [^int x] x)

9:44 rhickey: LauJensen: statics work on my machine

9:44 fogus_: see above about the diff between adorning and changing

9:45 fogus_: sorry. late to the game. will read now

9:45 rhickey: fogus_: would be nice to do this only via adorning

9:45 e.g. you start with (defn foo [x] x), then do what to make it fast?

9:45 LauJensen: rhickey: right, I just meant "one discussion at a time" :)

9:46 hoeck: (defn ^[int [int int]] foo [x y] ...)

9:46 rhickey: hoeck: see above re: variable arity

9:47 hoeck: k

9:47 rhickey: so, adding ^:static is not bad for a fn that takes/returns Objects, but seems like extra work once primitives in play

9:47 chouser: defaulting to static when required seems ok.

9:47 Chousuke: maybe you could extend defn to support various shortcut forms like (defn foo ^int [(ints x y z)] ...) hmh

9:48 cgrand: automatic static when primitives args seems sensible to me

9:51 rhickey: anyone want to whip up a patch for ^:keyword == {:keyword true}, and metadata merging, for LispReader?

9:52 cgrand: in which timeframe?

9:52 rhickey: cgrand: nowish

9:52 chouser: hehe

9:54 cgrand: is tehre any use-case for the existing support of keywords as :tag values?

9:55 rhickey: cgrand: I don't think so

9:56 cgrand: ok, the patch is simpler than I thought

9:56 rhickey: claim this if you want to have at it: https://www.assembla.com/spaces/clojure/tickets/375-metadata-literal-enhancements

9:57 chouser: leftmost meta literal wins?

9:58 Chousuke: which way is easier to implement? :P

9:59 chouser: no diff, I think.

9:59 cgrand: chouser: leftmost is easier to implement

9:59 Chousuke: if someone has conflicting keys in metadata literals, they probably deserve weird behaviour :)

9:59 rhickey: chouser: there's no leftmost really, the rules stay the same ^foo whatever adds foo metadata to whatever. If whatever already has metadata, then we merge new metadata. Last merged wins

9:59 but it's not as if ^foo ^bar is a special thing

9:59 still recursive read of next object

10:00 hoeck: what about ^#{:static :public :void} instead of ^:static ^:public ^:void?

10:00 rhickey: hoeck: I'd rather not go there

10:02 biab

10:05 cemerick: Results from the State of Clojure, Summary 2010 Survey http://bit.ly/dtdAwb

10:06 _fogus_: yay

10:06 LauJensen: powr-toc: did you get my priv msg ?

10:11 MrHus: Does anyone know how to make a regex that grabs "expressions". So when you have "this is a string (+ 3 (* 5 5)) with an expression or two (+ 2 3)" it would return ("(+ 3 (* 5 5))", "(+ 2 3)")

10:12 opqdonut: it isn't possible, sorry

10:13 chouser: MrHus: you can't do n-level nesting matching like that

10:13 opqdonut: apparently you can with some extensions, like perl's regular expressions

10:13 chouser: without regex extensions supported (afaik) only by perl

10:13 opqdonut: but not with ordinary ones

10:13 chouser: :)

10:13 chouser: :-)

10:14 MrHus: Perl anything it can't do :P

10:14 chouser: MrHus: if you really wanted a single regex and had a cap on the number of nesting leveels you wanted to handle, perhaps something could be worked up.

10:14 doesn't seem likely to be worthwhile, though.

10:14 a_strange_guy: opqdonut: are the expressions strings or lisp code?

10:14 you could use clojure.walk

10:14 MrHus: strings

10:15 a_strange_guy: then you need to write something a parser...

10:15 MrHus: it would appear so

10:15 opqdonut: you _could_ use read

10:15 pedroteixeira: is there anything similar to immigrate but for java imports?

10:19 _fogus_: cemerick: Clojure is "evil"... are you referring to the Loper OS guy?

10:19 Licenser: MrHus: May i suggest you take a look into walton

10:19 MrHus: Ok

10:19 Licenser: I wrote a code that did exactly that , extracting expressions from a string

10:20 it's no regexp but it is working

10:20 wthidden: does anyone have a repl/break debug package they would like to share?

10:20 MrHus: Got a link having trouble finding it

10:21 Licenser: http://github.com/defn/walton/blob/master/src/walton/core.clj#L38

10:21 MrHus: was just looking for it :)

10:23 cemerick: _fogus_: I was specifically remembering comments I heard at the last ILC as well as in various c.l.l. threads.

10:24 MrHus: Licenser: Thanks it is exactly what I needed

10:25 * Licenser bows

10:25 Licenser: you're welcome

10:25 I love to help at times °°

10:25 chouser: cemerick: very nice writeup, thanks!

10:25 Licenser: why is clojure evil?

10:26 chouser: Licenser: because it's infected with JVM impurities

10:26 _fogus_: cemerick: I see. I suppose the least surprising part was that most did not come from Lisp or Scheme

10:26 Licenser: I did come from ruby, neither java nor Lisp

10:27 cemerick: _fogus_: I knew that would be the case, but if you weren't familiar with the community, I'm not sure that's obvious on spec.

10:27 chouser: I hope it's helpful. :-)

10:27 Licenser: chouser: infected with java impurities, hmm you mean that you can use objects and stuff?

10:27 chouser: cemerick: asking the replacement question was brilliant; the answers, telling.

10:28 Licenser: right, java interop means it's not lisp all the way down.

10:28 _fogus_: chouser, cemerick: Definitely

10:28 Licenser: wel I'm not sure if it is bad that it is not lisp all the way down, I mean if you want that you can use CL right?

10:29 spariev: cemerick: I suppose you were referring to http://www.loper-os.org/?p=42 for "clojure is evil" thing?

10:29 cgrand: rhickey: patch attached

10:29 chouser: almost everybody came from languages imperative and macroless, and almost everybody would move on to a language with at least one or the other.

10:29 noidi: Clojure's evilness is the only reason I'm able to use a 2-year-old language at work right now :P

10:30 chouser: noidi: exactly

10:30 it's not actually "evil", it's just practical.

10:30 spariev: it's the only negative article on Clojure I know of

10:31 cemerick: spariev: that's one example. I've had lots of unpleasant personal encounters with CL folk as well.

10:31 * chouser needs to add no-follow to the irc logs

10:31 Licenser: One thing about CL I did not like was the way beyond fanatical views that you hear from the community, I enjoy cojure a lot since the community is very open - It hink one reason being that it is not 'pure

10:31 noidi: for example yesterday I had to start writing code for reading and writing binary data. A few minutes of googling brought up a brilliant, mature, declarative Java library exactly for that sort of thing: http://preon.sourceforge.net/

10:32 I added a few lines to my pom.xml and I was good to go

10:32 good luck doing that with a 2-year-old "turtles all the way down" language :P

10:32 LauJensen: cemerick: did you post yet?

10:32 cemerick: LauJensen: http://bit.ly/dtdAwb

10:33 LauJensen: yea nvm, just saw your tweeto

10:33 Cool - For the first graph you can actually calculate how many people answered your poll, since 3% make up 6 people :)

10:35 Nice, 62% are appreciating Emacs :)

10:35 spariev: I wish La Clojure were more usable

10:35 rhickey: cgrand: thanks!

10:36 Licenser: LauJensen: not to destroy your world but I think reason for that is that all other options are no fun

10:36 rsynnott: I'm surprised emacs usage is as low as 62%

10:36 LauJensen: Licenser: hehe, 'destroy my world'? :)

10:36 cemerick: LauJensen: you'll likely not like my take on the editors portion, but I think the comments from the survey data is telling.

10:36 rsynnott: and I'm amazed that command line repl is at 30%; presumably there are a lot of masochists :)

10:36 cemerick: rsynnott: I think that might be people just doing lein repl or mvn clojure;repl?

10:36 Licenser: thinking that 62 appricate emacs in opposite to 62% are not patient enough to get over the horrors of oterh ides :P

10:37 stuarthalloway: cemerick: nice writeup. One question: Is "in flux" really true about APIs? More "in growth", no?

10:37 kensanata: Wow, this muckandbrass.com site takes forever to load.

10:37 Did #clojure alone slashdot the server? :)

10:37 cgrand: rhickey: you're welcome

10:37 cemerick: kensanata: nah, it's getting plastered from all over :-)

10:37 LauJensen: kensanata: its a little slow, but try the clojure-driven bestinclass.dk for comparison :)

10:38 cemerick: it's just an aws m1.small, so be generous :-)

10:38 kensanata: It just finished loading! /me goes and read...

10:38 cemerick: stuarthalloway: I think "in flux" is appropriate if you're not following the various goings-on w.r.t. contrib, api migrations, etc.

10:39 * cemerick is glad it's not timing out yet

10:39 cemerick: Being a G-list blogger is a PITA, infrastructure-wise. :-P

10:40 LauJensen: HAHA "The Joy of Clojure is amazing. And Mike Fogus is very handsome."

10:41 Licenser: cemerick: oddly enough 14 people saied they remember when #clojure had only 6 people, that means 8 are lairs!

10:41 cemerick: Licenser: given time zones, that seems about right :-)

10:42 Licenser: cemerick: wait you want to tell me people actually turn off their computers at night?!?!

10:42 noidi: it's nice to see that 18% of the respondents use VimClojure (even though I jumped ship to Emacs myself) -- it's an amazing piece of work

10:42 LauJensen: cemerick: whats a g-list blogger?

10:42 cemerick: as in, D-list celebrity, but I'm not even up to the level of 'D'

10:43 it was supposed to be a joke :-)

10:43 http://en.wikipedia.org/wiki/D-list

10:43 kensanata: Even though I'm a hard-core Emacs user, I must agree that for my work colleagues a slick Eclipse plugin is practically mandatory.

10:44 cemerick: kensanata: for me, as well :-)

10:44 thus, my slight tooling obsession

10:44 LauJensen: cemerick: aah I get it

10:44 cemerick: LauJensen: I think you might be E-level or something ;-)

10:44 stuarthalloway: cemerick: big +1 on paying $500 for a good tool. I would do that for every person on our team.

10:45 LauJensen: kensanata: Emacs gives you the most power, but its important to also cater to people who prefer pretty windows and visuals instead of higher productivity. cemerick you had some thoughts on that right? :)

10:45 cemerick: stuarthalloway: I think I'll start a petition!

10:45 noidi: oh, reading about Clojure development tools reminded me that these instructions are slightly out of date http://www.assembla.com/wiki/show/clojure/Getting_Started_with_Maven

10:45 the version of the swank-clojure package should be 1.2.1

10:46 cemerick: LauJensen: more than a few, of course

10:46 http://muckandbrass.com/web/display/~cemerick/The+Ideal+Clojure+Development+Environment

10:46 noidi: 1.2.0-SNAPSHOT is not found in the defined repositories

10:46 LauJensen: cemerick: waiting for it to load....

10:46 still...

10:46 cemerick: LauJensen: of course, it's not just pretty windows and visuals -- it's actually higher overall productivity, not just text-slinging

10:46 noidi: I even registered to assembla to leave a comment, but apparently you need some privileges for that...

10:46 LauJensen: cemerick: you might want to clone bestinclass.dk :)

10:46 Licenser: cemerick: but a very brilliant post :)

10:46 _fogus_: Has anyone played with the idea of including a very basic "graphical REPL" with the Clojure distro? Would tht even be helpful?

10:46 cemerick: LauJensen: it's a very small box :-)

10:47 LauJensen: cemerick: I very seriously doubt that - Emacs excels on integration, not just the text slinging

10:47 * cemerick sighs

10:47 LauJensen: 'though Im a pragmatist' - sure sure :)

10:47 rhickey: cemerick: great job with the poll - thanks!

10:47 LauJensen: I think you're more in the 'fundamentalist' camp :)

10:47 lpetit: _fogus_: have you looked at the attempts of hiredman ?

10:48 _fogus_: lpetit: I suppose I haven't

10:48 lpetit: _fogus_: don't know the current status of it, though

10:48 cemerick: rhickey: I hope it gets some discussions riled up, and helps with prioritizing your and c/core's work. :-)

10:49 shoover: what's wrong with Enclojure? I thought it was great when I looked at it

10:49 kensanata: I don't know whether "# I have learnt a lot more by asking questions on the IRC then anywhere else...You guys are awesome." is good or bad news. :)

10:49 cemerick: LauJensen: I'm more in the use-what-works-for-you camp, which I think is probably the opposite of fundamentalism

10:49 lpetit: LauJensen: FUDing on graphical IDEs won't make emacs neither more powerful, nor more attractive to newbies :-p

10:49 candera: fogus: I think a GUI EXE that got people started would be great for Windows devs.

10:50 cemerick: shoover: Nothing is *wrong* with enclojure (I've used it for almost as long as I've used clojure). It has rough spots, the editing isn't ideal, and there's all sorts of debugger issues though.

10:50 stuarthalloway: candera: there's a card for that~!

10:50 lpetit: _fogus_: I remember he opened a project on his github account for that

10:50 _fogus_: lpetit: I will check it out

10:50 stuarthalloway: candera: and Russ Olson was working on it -- drive down the street and grab him and help finish it

10:50 shoover: cemerick: I see. I point newbs to it all the time, and I figured it would be higher on the results

10:50 candera: stuarthalloway: Heh. If only someone were paying me to do clojure...

10:51 _fogus_: candera: Yeah really

10:51 candera: But I'll talk to Russ the next time I see him.

10:51 cemerick: shoover: NetBeans is the weakest part of enclojure, which is a systemic problem...and it's possible that it's #3 in terms of Java IDE usage, so that's another hit.

10:51 noidi: _fogus_, have you used Python's IDLE? It's pretty much a "graphical REPL", and it's been bundled with Python for as long as I've been using it (12 years or so)

10:52 _fogus_: Ruby folks seem to universally use the same editor (can't recall the name)... is that appreciably easier to set up than anything that Clojure has to offer?

10:52 cemerick: _fogus_: textmate?

10:52 wlangstroth: lpetit: but I heard that graphical IDEs eat babies - not true?

10:52 _fogus_: noidi: Yes, I've played with it, but it's been a while

10:53 cemerick: That's the one

10:53 cemerick: lpetit: am I wrong that you're the "owner" of ccw?

10:53 _fogus_: TM is a dead-end in a variety of ways

10:53 noidi: it's worth looking into IDLE to see if there's a market for that sort of thing

10:53 lpetit: cemerick: it's fair to say that, I think

10:53 _fogus_: cemerick: except for its ubiquity

10:54 cemerick: _fogus_: well, I'm being quite literal -- it's closed-source, and functionally isn't being developed any further.

10:54 lpetit: cemerick: why the question ?

10:55 cemerick: lpetit: I just popped onto the GC page, and you weren't listed first under "owners" is all.

10:55 dysinger: wlangstroth: that happened to my 1st 2nd child - eclipse ate her

10:55 wlangstroth: I knew it!

10:55 dysinger: I've been using emacs ever since and me 2nd 2nd child is doing well

10:55 _fogus_: It would be nice to have an option like clj --gui that starts a very basic graphical gui providing history, html docs, some basic completion, etc...

10:55 dysinger: CLJIDLE

10:55 shoover: somehow I don't think Rich was expecting 53% web development when he started Clojure... although that could be somewhat included in the caveats mentioned at the top

10:56 _fogus_: cemerick: I see what you mean WRT TM

10:56 lpetit: cemerick: I'm not the initial creator. But it's been a long time (will be two years in september/october) since the initial owner left me the house.

10:56 cemerick: _fogus_: there was a mailing list post from the author that HN linked to last week. Sad state of affairs. :-/

10:56 candera: shoover: There are a number of factors that could explain the web factor. For one thing, you deploy web stuff on your own server, which makes it way easier to justify.

10:56 cemerick: lpetit: Good enough, then. Glad I didn't make a mess of that one. :-)

10:57 candera, shoover note that that question allowed for multiple responses. So really, web dev is just the LCD of all development. ;-)

10:57 rhickey: FAIL in (test-annotations) (test_clojure.clj:92) - aargh!

10:57 stuarthalloway: rhickey: on your box, or in the world?

10:58 shoover: candera: Yes, also: it's such a solid language some people showed up and found so many goodies they forgot they needed concurrency they came for in the first place

10:58 rhickey: stuarthalloway: the aargh ifs for the same line # in test_clojure, whatever the error

10:59 stuarthalloway: rhickey: there was a post about line numbers on clojure-dev this morning ... related?

10:59 _fogus_: candera: I'll join you in cornering Russ at the CAPCLUG. Maybe we can muscle him into finishing. ;-)

10:59 mattrepl: the author has mentioned open sourcing textmate, but probably only out of frustration

10:59 rhickey: stuarthalloway: didn't see

10:59 candera: shoover: Yeah, I actually don't think concurrency is the main selling point. But it works great as bait. :)

10:59 arohner: rhickey: http://groups.google.com/group/clojure-dev/browse_thread/thread/1c2687d40f9b1a6f/0abf8719450457cd?show_docid=0abf8719450457cd

10:59 candera: fogus: I'd hack on it with him during the meeting, but I want to hear your presentation. ;)

11:00 _fogus_: candera: We have a mingle session after my preso correct?

11:01 candera: Whoa! He just sent me an email. Cosmic. I'll see what he has to say.

11:01 * rhickey wades around trying to find test-annotations

11:01 candera: fogus: :)

11:02 fogus: David is also presenting, but there will surely be some time before and after.

11:02 fogus: Although maybe we should arrange a hacking evening or day.

11:02 _fogus_: candera: Let's

11:04 rhickey: really, could FAIL in (test-annotations) (test_clojure.clj:92) be more useless?

11:06 LauJensen: lpetit: agreed

11:08 dysinger: stuarthalloway: met one of you clj co-workers last night. :)

11:08 stuarthalloway: dysinger: don't hire all the good clojure programmers at RailsConf :-)

11:09 korre: is railsconf now?

11:09 dysinger: y

11:09 korre: doing anny clojure talks this year?

11:09 rhickey: ah, test-annotations is in test_clojure/genclass.clj

11:09 dysinger: stuarthalloway: I can't hire them all - only have 3 slots open right now

11:10 there's enough to go around :)

11:10 stuarthalloway: rhickey: does your hammock not implement find-grep-dired?

11:10 dysinger: lol

11:10 rhickey: stuarthalloway: I'm telling you, these reports from test stink, I waste a lot of time on them

11:11 * stuarthalloway walking across room to punch sierra

11:13 stuarthalloway: rhickey: I don't disagree

11:13 * stuarthalloway wonders what unit testing would look like if we could get rhickey angry enough to apply himself to the problem

11:14 noidi: stuarthalloway, btw. is circumspec still under development, or did you stop working on it when you escaped dan north's basement? ;)

11:15 stuarthalloway: noidi: it's dead, at least for me for now. Sierra was going to put some of the good parts in lazy-test

11:16 chouser: before he was hired by some fly-by-night outfit and re-tasked

11:16 cemerick: lol

11:16 chouser: er, I mean by a respectable member of the business community

11:19 * cgrand should fix testcases that fail under windows (or test on another box) so as not to dismiss two new failed tests :-(

11:19 rhickey: cgrand: did ant test work for you on your LispReader patch?

11:21 cgrand: I ran it on windows where several test fails (because of EOL and file separators issues) and didn't spotted the number of failed tests grew from 8 to 10. Mea culpa.

11:25 stuarthalloway: https://www.assembla.com/spaces/clojure/tickets/376-make-sure-tests-pass-on-windows

11:25 chouser: Do we want the reader-supplied :line to overwrite literal metadata of seqs but not symbols?

11:25 I guess that's a separate issue.

11:25 cemerick: stuarthalloway: did you have a straight face when you wrote that? Milestone could be set to *. ;-)

11:26 FWIW, setting up a hudson build slave in a windows VM for build.clojure.org would be a fairly straightforward thing to do.

11:26 stuarthalloway: cemerick: yes. when we do a build box reset we'll do that

11:27 maybe get an android CI build too :-)

11:27 cemerick: ground-breaking :-)

11:27 noidi: Where should I report the error in the "Getting Started with Maven" page in the Assembla Wiki? For some reason editing or commenting on the page is not allowed.

11:28 cemerick: noidi: what's the issue?

11:29 noidi: cemerick, the version number of swank-clojure should be 1.2.1 in the example pom.xml

11:29 1.2.0-SNAPSHOT is not available in the repos that are listed in the pom

11:30 that's one of those tiny things that can be really confusing for newbies

11:31 cemerick: noidi: fixed, thanks

11:31 noidi: great!

11:31 cemerick: noidi: you just need to ask for someone to elevate your status on assembla on the clojure-dev list

11:31 noidi: ok

11:31 cemerick: (assuming you're already a member and have sent in your CA)

11:32 noidi: nope, but I'll keep that in mind :)

11:33 cemerick, is there a reason why you kept the "-SNAPSHOT" suffix?

11:33 1.2.1 is tagged and available on clojars http://clojars.org/swank-clojure

11:34 cemerick: noidi: crud, no. I fixed the fix. Thanks again :-)

11:34 * cemerick waits for his privs to be revoked

11:35 rhickey: does this make sense to anyone? http://gist.github.com/430205

11:36 what does it mean to expected: (instance? ...) and actual: $Proxy2

11:36 ?

11:37 cemerick: shouldn't that not be possible?

11:37 rhickey: I have no idea how to interpret this stuff

11:38 stuarthalloway: target was actually a $Proxy1

11:38 but why?

11:39 are you asking about clojure.test's special case behavior for instance?

11:39 cemerick: perhaps an unprintable parent classname, bad munging?

11:39 stuarthalloway: or about what went wrong to cause it

11:52 rhickey: does out go to someplace special when testing?

11:52 stuarthalloway: rhickey: that is f#$%cking ant, not test

11:53 I run tests from a REPL to avoid Ant's help

11:55 rhickey: http://gist.github.com/430231

11:59 arohner: I have a few clojure functions, foo, bar,baz. Only one of them can be running at a time, because of limitations in mongoDB. Is the best way to accomplish that with 'locking?

11:59 and what's the best way to get a monitor for it to lock?

12:00 a_strange_guy: (def lock (Object.))

12:00 arohner: a_strange_guy: thanks

12:00 a_strange_guy: j.u.c.locks.Mutex also works

12:01 candera: Or you could send the functions to an agent. They'll serialize on it.

12:02 arohner: candera: I want to get the return value of each send. Is there a good way to do that with agents?

12:02 candera: Not really.

12:04 chouser: you could put a watcher on the agent -- guaranteed to get called with each new state

12:04 cemerick: arohner: you could add a watcher to the agent

12:04 dammit :-P

12:04 chouser: hehe

12:04 cemerick: shouldn't I have the time zone advantage?

12:05 candera: It's sort of weird, though. If you really want serialization of activity, locking is probably the way to do it. Unfortunately.

12:05 chouser: cemerick: we're in the same zone. no speaking from the future for you.

12:05 arohner: right, but if I have a watcher, I need some way to get the return value back to the calling function

12:05 cemerick: candera: if there's one agent, a watcher can capture the results in order

12:06 chouser: oh, right. Intuitionally, EDT should end around PA.

12:06 chouser: if you really need synchronous calls, an agent is a poor fit.

12:06 candera: And if you're going to do that, you don't really need to use an agent, right? Watch an atom that a future sets. Although again: blech.

12:06 chouser: cemerick: yeah, we're right on the edge.

12:06 arohner: yeah, it still seems like locking is my best bet

12:07 candera: Cells are your best bet. :)

12:07 arohner: if they were available :-)

12:07 candera: Pfft. Details.

12:09 * _fogus_ remembers a pseudo-cells impl in chapter 12 of some Clojure book

12:09 candera: See above re: available.

12:10 _fogus_: available to early-adopters :p

12:10 candera: Ch 12 is up on MEAP?

12:10 _fogus_: yes

12:10 cemerick: implementing cells is pretty straightforward -- but if people thought clojure stack traces were bad before....whoo.

12:10 :-)

12:11 candera: fogus: Good to know. WTH didn't I hear about this...

12:11 _fogus_: cemerick: I didn't see anyone complaining about the difficulties in debugging cells implementations. :p

12:12 cemerick: that'll be in the Winter 2010 edition, I presume :-)

12:12 _fogus_: heh

12:12 cemerick: That's a constant issue for me with our cells impl....which passes around and partially evaluates lazy seqs, too, so it gets really hairy.

12:14 candera: fogus: OK, I have Chapter 12. Which bit is the cells impl? The contracts stuff?

12:14 _fogus_: cemerick: Ours just calculates baseball batting averages... so no debugging issues here. :-)

12:15 candera: Uhhh, section 12.4 I think. defformula

12:16 candera: 12.3.1 in mine. Got it. Will read: thanks.

12:16 _fogus_: np

12:17 rhickey: cgrand: if you are still looking into the test failures, don't boter. It is a bad test for annotations that depends on the order of things out of a hash-map

12:18 danlucraft: candera: which book is this? Joy or Action?

12:19 cgrand: rhickey: ok, thanks.

12:19 candera: danlucraft: Joy.

12:19 * rhickey wants the last hour of his life back

12:19 danlucraft: candera: good?

12:19 candera: danlucraft: great!

12:20 cgrand: rhickey: I'm sorry to have rushed this patch out

12:21 rhickey: cgrand: I asked for it! But the bug wasn't yours

12:21 danlucraft: candera: oh go on then!

12:21 rhickey: I hate brittle tests

12:25 noidi: have clojure's unit tests caught any regressions that would have been missed without the tests?

12:39 powr-toc: ok well and truly confused... I have compojure 0.4.3-RC working in a lein project but exploding in a mvn project upon a (ns foo (:use [compojure [core :only [wrap!]]))... both are using clojure-1.2.0-master-SNAPSHOT and 1.2.0 of contrib

12:39 anyone any ideas?

12:39 I get a NoClassDefFoundError Could not initialize class compojure.core__init

12:41 but I can see the compojure jar is included in (System/getProperties) :-(

12:42 which is the same jar that lein copies into lib/

12:57 Licenser: cooookies!

13:00 djpowell: hmm - has map got broken in HEAD?

13:00 ,(map vector [1 2 3] [2 4 6])

13:00 clojurebot: ([1 2] [2 4] [3 6])

13:01 djpowell: hmm nevermind

13:01 it isn't working in my current repl - I guess I must have screwed something up in there

13:07 arohner: hrm. ring.middleware.cache is in the ring source tree, but not in my ring-core-0.2.2.jar

13:17 OForero: hello

13:18 I was wondering if some one knows the name of the paper

13:18 or author on the Tries which is supposed to be the base for Clojure's collections

13:20 technomancy: OForero: it's Bagwell, I think

13:20 OForero: thanks I will try to locate something with that

13:22 a_strange_guy: http://lamp.epfl.ch/papers/idealhashtrees.pdf

13:28 OForero: thanks ... I am checking ... that work is from EPFL

13:30 kycs: hello, can someone help me understand this NullPointerException when filtering a lazyseq?

13:30 (type events) => clojure.lang.LazySeq

13:30 (count events) => 367

13:30 (count (filter #(= 0.0 (:num %)) events)) => NullPointerException

13:30 (count (filter #(= 0.0 (:num %)) (take 150 events)) => 98)

13:30 (count (filter #(= 0.0 (:num %)) (take 200 events)) => NullPointerException

13:31 a_strange_guy: (= 0.0 nil)

13:31 ,(= 0.0 nil)

13:31 clojurebot: false

13:31 kycs: ah

13:31 let me check that, thank you

13:31 cgrand: rhickey: inside a deftype a call to (instance? MyType x) fails because what is tested is if x is an instance of the stub class.

13:31 a_strange_guy: nope not the reason

13:32 kycs, this code can't fail

13:32 is events a lazy seq?

13:33 kycs: yes, type returns LazySeq

13:33 a_strange_guy: the NPE must come from the realization of events

13:39 kycs: I read in the log of events using contrib.duck-streams.read-lines and generate a lazy-seq of event maps. I bound this lazy-seq to events to test with the code above.

13:40 Is binding the correct term when using (def events <the-lazy-seq>)?

13:42 OForero: just in case anyone is interested

13:42 http://infoscience.epfl.ch/search?rg=10&sc=0&sf=&so=d&of_format=hb&of_export=bibtex&ln=fr&sp=&cc=Infoscience/Research/IC&as=1&p1=Bagwell&f1=&ext=collection:REPORT

13:42 kycs: I am running 1.1.0 if that matters.

13:43 chouser: kycs: yes, when you provide a value to 'def', it establishes a root binding

13:48 kycs: thank you

13:49 going back to this lazyseq question: I can call first and last on my lazyseq and the results are expected. However, filtering the entire lazyseq results in the NPE.

13:49 Is there a difference in how the lazyseq is realized when run through a filter vs last?

13:52 I can successfully apply filter to the lazyseq if I (take 181 events), however, applying filter to (take 182 events) throws the NPE.

13:53 I know the exact number isn't as important as how events is realized.

13:54 a_strange_guy: actually it is important how 'events is created

13:54 kycs: ok

13:54 you're right

13:55 rhickey: cgrand: do you have a test case?

13:56 kycs: let me try slurp in-place of read-lines

13:56 cgrand: rhickey: http://gist.github.com/430398

13:58 chouser: kycs: yeah, that's pretty strange. I'm having a hard time imagining how that's possible.

13:59 rhickey: cgrand: thanks

13:59 cgrand: rhickey: in usercode, the workaround is to use .isInstance

13:59 zakwilson: Reading the survey results, it seems a lot of people want a comprehensive IDE for Clojure (and would pay for it). While I dream of spending a year of my life writing such a thing and making a few tens of thousands of dollars from it, perhaps an open-source project would be a better way.

14:01 kycs: it must be the way I am creating the lazyseq by reading in my log file.

14:03 riddochc: rhickey: did you get my contributor agreement? What's next?

14:03 jcromartie: can I just say namespace.specifier/symbol is so much better than namespace.specifier.symbol

14:03 thanks for that :P

14:04 zakwilson: something like DrScheme (DrRacket now) or more like Eclipse?

14:04 I feel like the Java interop that would be going on in any big/serious project almost necessitates a strong Java side to the IDE, which makes a plugin to an existing IDE very appealing

14:05 a_strange_guy: kycs: what do you do to read the logfile?

14:05 jcromartie: I'm pretty always use extra Java libraries in my Clojure projects.

14:05 a_strange_guy: read-lines?

14:05 jcromartie: I pretty much*

14:05 kycs: I use read-lines

14:05 zakwilson: jcromartie: I was thinking somewhere between, with more than a bit of inspiration from Emacs in terms of how things are implemented under the hood.

14:06 lancepantz: what could a more full featured ide do that slime doesn't?

14:06 jcromartie: zakwilson: written in Clojure?

14:06 kycs: a_strange_guy: the file can get pretty large so I was trying to avoid slurp

14:06 a_strange_guy: wrap the call to read-lines in a (dorun ...)

14:06 zakwilson: lancepantz: be approachable for people who don't know Emacs

14:06 kycs: ok, trying that

14:06 a_strange_guy: it will load the whole file in ram though

14:07 lancepantz: wouldn't an ide of equivalent power have its own barriers though?

14:07 jcromartie: Clojure-IDE-in-Clojure would be great. Someone already made a very small one. I forget what it's called.

14:07 zakwilson: jcromartie: yes. I suspect reflection can handle most of the Java interop issues, but I'm no expert there (I have a Lisp background. By Java experience is limited to writing a single applet)

14:08 cemerick: zakwilson: not sure if you read my scratchpad that "specs" out what's need, but if you can drop emacs into eclipse, I think you win.

14:08 (that's mostly figurative, of course)

14:08 technomancy: well they did just add xembed support

14:08 oh, you meant figuratively.

14:08 kycs: I copied my snippet to pastebin: http://pastebin.com/1zNu0VTm

14:08 cemerick: mostly, yeah :-)

14:08 zakwilson: cemerick: I haven't, and that sounds like a horrible monstrosity, but I think I know what you mean.

14:08 kycs: can you take a look at (parse-file) which generates the lazy-seq from the log file please?

14:09 jcromartie: Paredit is pretty awesome, and I think it's by far the best way to edit Lisp code

14:09 kycs: I may be missing something obvious that you'll spot

14:09 lancepantz: agree

14:09 cemerick: technomancy: e4 has a lot of hooks that will make dynamic UIs cake to drive at runtime. It's begging for someone to write a clojure shell, and bootstrap all the goodies from there.

14:10 technomancy: cemerick: more power to em. I fully admit to being 100% out of touch with what "regular people" want myself, but the more the merrier.

14:10 cemerick: zakwilson: my objective would be to ensure that all the defaults are "right" for people that like eclipse et al., but as dynamic and flexible as necessary to support emacs-like customization, etc.

14:12 cschreiner: How can I bind *out* to the *Messages* buffer in emacs?

14:12 a_strange_guy: kycs: looking at it

14:12 kycs: a_strange_guy: nevermind

14:13 a_strange_guy: I found an issue

14:13 zakwilson: What I'm picturing here is an Emacs-style editor platform with a bunch of IDE stuff built on top and included in the default distribution. It would be a one-click install for Clojure.

14:13 kycs: the 182 map has nil values

14:13 zakwilson: And by Emacs-style, I don't mean Emacs learning-curve or keybindings (though there should probably be an option for that)

14:14 cemerick: zakwilson: that *sounds* good, but that's a long, long road. That "bunch of IDE stuff" is a huge category that I don't think anyone can reasonably replicate.

14:14 That's why I think stacking on top of one of the IDEs is really the only way to go.

14:14 kycs: a_strange_guy: thanks for helping me rule out my lazy-seq.

14:15 zakwilson: Indeed. I'm not entirely sure what "bunch of IDE stuff" people actually want. The nice thing about an Emacs-style design is that people from the community can extend things without actively being involved in the project, then you can appropriate (with permission, of course) their code in to the project if it's useful.

14:16 jcromartie: Building an IDE on an IDE platform is kind of like building a language on the JVM... and we know how that works

14:17 it gives you a head start

14:17 and lots of stuff "for free"

14:17 cemerick: zakwilson: Basically everything included in a std Java dev environment -- good editors, UI toolkits, outlines, debuggers, maven and ant integration, etc etc etc. Again, all that stuff in my scratchpad.

14:19 zakwilson: jcromartie: maybe so, but there's an awful lot of bloat and complexity there. I may also be biased as I kinda like Emacs and wish it had a better Lisp powering it.

14:19 cemerick: where's your scratchpad?

14:19 cemerick: zakwilson: http://muckandbrass.com/web/x/DoBZ

14:20 Twey: zakwilson: *approve*

14:20 cemerick: zakwilson: What people see as bloat is often the bits that are most attractive to the majority of devs.

14:20 chouser: I think the only role to fill short of ongoing improvement to existing plugins (for emacs, netbeans, eclipse, etc.) is something of specifically limited scope.

14:21 perhaps something that ties in with labrepl

14:21 zakwilson: What I want to make may well not be what people are asking for, and honestly, I probably don't have the determination to make it happen. That said, if a few more people want what I want, I'll most certainly contribute.

14:21 technomancy: zakwilson: some day clojure will compile to elisp bytecode

14:21 chouser: not a development environment as such, but an easy-install, feature-poor learning environment

14:22 zakwilson: What chouser is suggesting could be a good way to get traction on the project I want to build.

14:22 technomancy: chouser: maybe like a repl that doesn't require external commands to be usable?

14:22 cemerick: this sound like the IDLE concept that was batted around earlier

14:23 a_strange_guy: technomancy: what do you mean by external commands?

14:23 chouser: cemerick: yeah, that's close to what I'm imagining

14:23 cemerick: I think that'd be stellar, and I'd probably keep it open all the time.

14:24 There is no single right answer to the dev environment question. Lots of use-cases.

14:24 technomancy: a_strange_guy: rlwrap or an emacs shell

14:24 cemerick: REPL + better object browser + doc browser perhaps

14:24 chouser: technomancy: ah yes, like that.

14:25 zakwilson: in-place popup macroexpansion sounds interesting... especially if it highlighted the parts of the resulting code that are macro-generated and prevented editing them.

14:25 technomancy: a_strange_guy: basically I'm saying it'd be nice if Clojure's repl didn't go "durr hurr" when you pressed the arrow keys

14:25 chouser: heh

14:25 arohner: technomancy: lol

14:25 candera: I could see something that had a menu bar with lots of common commands. Pick an item and it would just spew the appropriate text to the REPL. Maybe with an intervening dialog to collect arguments.

14:25 E.g. Help->Find Documentation presents a dialog that takes terms. You hit "OK" and it runs (find-doc "whatever you typed in the dialog")

14:26 technomancy: if jline's license is compatible, I think it'd be a good thing to ship with the clojure releases along with a bin script

14:26 it's not as nice as rlwrap, but it's just a jar file

14:26 candera: Serves the dual purpose of discovery and education.

14:27 a_strange_guy: i dislike jline

14:27 chouser: this is what I had in mind when I started textjure, but then I got bogged down trying to do vi-like keybindings

14:27 a_strange_guy: impossible to enter multiline things

14:27 technomancy: a_strange_guy: it definitely does need work. but the alternatives aren't viable for improving clojure's out-of-the-box repl experience.

14:28 a_strange_guy: something like IRB from ruby would rock

14:28 it has nicely done autocompletion

14:29 technomancy: ruby can tie straight into libreadline because it's written in C

14:30 jcromartie: IRB is OK

14:30 but rlwrap makes the clojure console pretty awesome

14:30 chouser: using swing instead of a terminal has benefits for consistent handling of unicode, etc.

14:30 jcromartie: I really think that the Clojure community should banish all mentions of JLine and recommend rlwrap

14:31 chouser: is rlwrap available for all platforms?

14:31 jcromartie: chouser: and that's where a "DrClojure" would come iin

14:31 yeah

14:31 I use rlwrap on Mac and Windows

14:31 (through Cygwin on Windows)

14:31 technomancy: jcromartie: you can't ship rlwrap with clojure though

14:31 jcromartie: no, but you can recommend it over JLine, which is quite simply terrible

14:31 and doesn't ship with Clojure anyway

14:32 I like chouser's Swing console idea

14:32 chouser: a few have even been written already

14:32 textjure tries to do some nice things around multi-line input, coloring stdout, stderr, and return values differently, etc.

14:32 technomancy: do people really still have encoding issues with terminals?

14:32 chouser: but no up-arrow support yet. :-P

14:32 clojurebot: max people is 283

14:33 jcromartie: ugh, the first result for "clojure drscheme" on Google is that LoperOS doofus

14:33 spoils my day

14:33 now I am in a bad mood

14:33 :P

14:33 raek_: technomancy: yes

14:34 * technomancy notices his tea is done and heads back to work

14:35 jcromartie: rlwrap just instantly gives it all of the features one expects from a command-line console, so I'll always recommend that

14:35 raek_: clojure has worked great, though

14:35 jcromartie: but I'll work on that DrClojure :)

14:35 raek_: DrClojure sounds awesome!

14:35 jcromartie: tabs up top, console on the bottom

14:36 http://plt-scheme.org/screenshots/

14:36 I'd love to be able to have graphics in the REPL too

14:38 raek_: lein repl reads utf-8 but writes latin-1 for me though

14:38 Twey: Why would you want graphics in REPL?

14:38 I'm confused

14:38 jcromartie: Twey: ask the Scheme people

14:38 Twey: in a**

14:38 Graphics in emacs bewilder me enough

14:39 jcromartie: Twey: it's nice to be able to deal with images as just more data

14:39 Twey: And people who insist on using graphical IRC clients

14:39 raek_: something like arrows for stack traces?

14:39 Twey: raek_: There are appropriate Unicode characters…

14:39 technomancy: somebody please write libreadline bindings using jni or something (no idea if that's even possible)

14:39 jcromartie: no I mean like if I have an image or a graphics canvas, output the image in the REPL

14:39 timcharper: Twey: have you ever used Emacs for LaTeX ?

14:39 Twey: timcharper: Yeah

14:39 I didn't find auctex's previews that useful

14:39 jcromartie: I don't need a "graphical" REPL

14:39 timcharper: ok...

14:39 jcromartie: I just want to deal with images the same way I deal with numbers and strings

14:40 timcharper: Well, I found it useful

14:40 jcromartie: image printing

14:40 timcharper: :-)

14:40 jcromartie: I guess is the term

14:40 Twey: You can still pop up a window…

14:41 raek_: Twey: what do you mean? when I evaluate the string "åäö", which my terminal encodes in UTF-8, the repl prints "���", which in this case probably means that the terminal got three non-valid-UTF-8 bytes, that is "åäö" encoded in latin-1

14:41 jcromartie: sure but I'd love to see an image and be able to say (scale *1 200 200)

14:41 instead of having 100 windows for 100 iterations of an image

14:42 it'd be especially handy for encanter

14:42 raek_: yeah, "widgets" to visualize other kinds of values than numbers and strings

14:42 jcromartie: imagine being able to just say (histogram x) on a collection

14:42 raek_: images are values too

14:42 jcromartie: exactly

14:42 Twey: raek_: Are you sure your terminal is encoding it in UTF-8?

14:43 The REPL seems to do UTF-8 okay for me.

14:43 jcromartie: they don't have to be treated as magical byte sequences :)

14:43 raek_: very.

14:43 this only happens with "lein repl"

14:43 Twey: jcromartie: Fair enough

14:43 raek_: the "java -jar clojure.jar" repl gets it right

14:44 technomancy: raek_: if you could try it on the latest version and open a ticket if you could repro that'd be great

14:44 I think it may be fixed

14:44 raek_: yeah, I suspect so...

14:45 is the utf-8 option for swank enabled by default nowadays?

14:45 it makes my slime crash if it's not and I write any non-asciii character

14:47 I really should pull the latest versions of everything and go bezerk with my swedish letters everywhere I can...

14:47 ...and then report the bugs, of course

14:48 for the greater good of every non-english clojure community

14:48 jcromartie: how does Clojure deal with UTF symbols and things?

14:48 can I say (def π ...)

14:49 arohner: jcromartie: yes

14:49 Twey: Yes

14:49 jcromartie: cool

14:49 Twey: raek_: Please do

14:49 arohner: I have (defn Σ ...) and (defn Π ...)

14:49 jcromartie: Excellent

14:49 Twey: The English Clojure community would appreciate it, too :þ

14:50 raek_: clojure source code is always in UTF-8, IIRC

14:51 djpowell: yeah

14:51 jcromartie: for Spanish Clojurers: ¡disj

14:51 candera: raek_: Huh? If I use another encoding, something will barf? Is that true?

14:51 Twey: Hehe

14:51 raek_: I'm glad clojure inherited the character-byte disctinction from java...

14:52 candera: yes, if you use another encoding the reader won't be hapy

14:52 candera: I always assumed that whatever awareness Clojure has of encodings is via PushbackReader. Is PushbackREader that broken?

14:53 raek_: you could always read from your own reader

14:53 which you can configure to use any coding you like

14:54 broken?

14:54 candera: Sorry - I'm coming from the .NET side, so my mental model of the Java stuff underneath is far from complete or correct.

14:55 So I would think that the reader is written against an API that is above the level of what particular encoding the source file is in.

14:55 raek_: IMHO, the fact that clojure source files are encoded in UTF-8 should be considered a part of the file format

14:55 candera: E.g. I could use UTF-32 and it would still look like a stream of characters at the level of the reader.

14:55 djpowell: I think read, uses PushBackReader wrapped around an InputStreamReader initialised to use utf-8

14:56 raek_: readers provide a stream of characters.

14:56 djpowell: well load-file does, you can probably provide your own Reader implementation somehow

14:56 candera: OK, so the brokenness comes from forcing use of a UTF-8 InputStreamReader, not from PushbackReader.

14:56 djpowell: well it is done deliberately

14:57 candera: I eagerly await hearing how once again Rich has made some decision that seems weird to me at first, but brilliant on explanation. :)

14:57 djpowell: it basically does new PushbackReader(new InputStreamReader(in, "utf-8"))

14:57 Twey: Forcing UTF-8 here isn't really broken

14:58 candera: Why not? What if my file is encoded otherwise?

14:58 raek_: then you have to load it manually

14:58 Twey: It covers everything you'd ever want to read… the only reasons to keep other encodings around are 1) legacy and 2) efficiency

14:58 1) shouldn't apply, as there's no Clojure code written prior to UTF-8's advent

14:58 And for 2) UTF-8 is the best choice, as Clojure syntax is primarily in the ASCII range

14:59 (and standard symbols)

14:59 candera: This is not an issue for me, as I don't have anything where I'd need this. I just find it surprising - seems like it would be reasonable to default to UTF-8, but not to force it, especially since one could use the BOM to pick up other encodings.

14:59 raek_: also, if source files were allowed to be in any coding, where should the information about which coding it uses go?

14:59 Crowbar7: first line

14:59 candera: But if symbols are restricted to the ASCII and near-ASCII range, then it's even less of an issue.

15:00 raek_: and what coding should the first line be in?

15:00 Twey: ASCII

15:00 djpowell: and if your file is in utf-16?

15:00 Twey: (by dint of largest-common-denominator)

15:00 STill ASCII

15:00 Still**

15:00 Crowbar7: I agree focing UTF-8 is a good idea

15:00 raek_: then, the file cannot be in, say, UTF-16

15:00 Twey: The rest of it can

15:00 raek_: since it's not ascii-compatible

15:01 that sort of works for ascii-based encodings

15:01 Twey: No, but there's nothing wrong with having the first line be ASCII and the rest UTF-16, other than tool support

15:01 Crowbar7: UTF-16 do we really have more then 65000 characters?

15:01 Twey: If you care about the tools, you can make a separate file, say ‘foo.meta’ for each ‘foo.clj’, that provides the metadata and is fully encoded in ASCII

15:01 raek_: all text editors would need special cases for clojure code, then

15:02 i'm not sure if the Basic Multilingual Plane is full yet...

15:02 djpowell: if your editor can't support utf-8 (which most can), then I doubt it can support mixed ascii/utf-16

15:02 candera: I guess I thought the BOM (if present) would be sufficient for determining the encoding.

15:03 Otherwise, assume UTF-8.

15:03 Twey: But not all UTF-16 has a BOM

15:03 raek_: latin-1 cannot code the BOM

15:03 Twey: The BOM is optional

15:03 candera: I see.

15:03 Twey: And yeah, that doesn't work for other non-ASCII–compatible encodings

15:04 But the upshot of it is that we don't need to care about this stuff because UTF-8 has no real downsides for this usage so we can just use that and be done with it ☺

15:04 raek_: I think that forcing utf-8 is the most elegant solution for mostly-ascii text

15:04 candera: Well, on balance, if we had to pick one, UTF-8 is a great choice. And if it moves the tooling a step closer to supporting it universally, bonus.

15:04 raek_: agreed

15:04 Twey: Crowbar7: UTF-16 usage is mostly about encoding characters with higher code-points more efficiently

15:05 Rather than accessing more code-points

15:05 candera: If I wind up doing any Clojure in Chinese, I may feel differently. :)

15:05 raek: don't forget klingon...

15:05 Twey: UTF-8 allows you to represent ASCII characters in single bytes, but at the cost of requiring more bytes for characters furthur up

15:05 * technomancy o O ( quenyajure? )

15:06 Twey: E.G. the Han section requires three bytes under UTF-8, but only two under UTF-16

15:06 cemerick: candera: chinese write code in ASCII for the most part as well, even in languages that allow for more "exotic" characters. :-)

15:06 candera: Right. And it's not like the size of source files is really a big concern.

15:06 Twey: Yeah, that too.

15:06 candera: OK, color me enlightened. Again.

15:07 Err, "slightly more enlightened".

15:07 Twey: Hehe.

15:07 cemerick: I guess I'm big into surveys lately. :-P

15:07 Am I missing anything here? http://spreadsheets.google.com/viewform?formkey=dHVEYUg3V3dMZjc0VDdNUFhWMGJ2bmc6MQ

15:07 Twey: UTF-8 is capable of representing every character UTF-16 is, in fact.

15:08 s/furthur/further/

15:08 sexpbot: UTF-8 is capable of representing every character UTF-16 is, in fact.

15:08 Twey: Not that message, you silly bot.

15:08 s/silly/lovely/

15:08 sexpbot: Not that message, you lovely bot.

15:09 Crowbar7: not when a 1Tb HD is $75

15:10 source code size is minor

15:13 Twey: Crowbar7: Depends how much source code you've got… and remember that symbols are preserved in compiled code, too. Transfer is more of an issue than storage, these days.

15:14 It's not an issue in most cases, though.

15:18 riddochc: Hm. I have very specific needs out of an editor that make no existing editor all that good, and I don't expect that to change. So I'm willing to put up with mediocre tools, to an extent, for lack of any other choice.

15:20 Though if anyone wants to make a text editor that combines the interfaces of Dasher and Blender, I'd be thrilled. I don't expect it to happen, though, unless I do it myself, or a whole lot more people suddenly come down with RSI, too.

15:20 chouser: I imagine using incanter and having charts show up in your repl output along with your other results might be handy

15:21 riddochc: chouser: That would be cool.

15:21 Doesn't DrSheme do something like that?

15:21 chouser: actually, I think hiredman's swing repl allows for dumping swing widgets in the output

15:22 riddochc: There's also the inspector in -contrib, which brings up simple structures in a swing UI.

15:24 I wonder how hard it would be to make a clojure-emacs with swing, assuming that one is going to break compatibility with emacs-lisp.

15:24 candera: Ask the people who are still trying to do it in Common Lisp.

15:25 riddochc: Hemlock, wasn't it?

15:26 technomancy: "I'm gonna reimplement Emacs in a nicer lisp" comes up about as often in #emacs as "I'm going to make Clojure more accessible for newbies by removing the parens!" does in here FWIW.

15:26 candera: Maybe that was what they drank after trying it. :)

15:26 cmiles74: I know that a lot of the work on Emacs and Guile sounds like it centers around getting Elisp implemented in Guile. Somehow.

15:27 technomancy: cmiles74: right, but that's still using elisp rather than ditching it for greener pastures.

15:27 still crazy mind you, but slightly less crazy.

15:27 candera: And breaking compatibility with elisp would essentially mean rewriting 40 years worth of existing improvements.

15:27 cemerick: cmiles74 in #clojure? Be still my beating heart! :-D

15:28 cmiles74: technomancy: I agree with you! I think letting Elisp go would sound realistic to me.

15:28 cemerick. :P

15:28 cemerick: :-)

15:28 riddochc: I wasn't really proposing *doing* it, just wondering out loud at what degree of insanity it requires.

15:29 cmiles74: I've actually been hacking away at a simple text editor implemented in Clojure in my (pretty scarce) spare time. :-[

15:29 It's no Emacs but I can't leave it alone!

15:30 chouser: cmiles74: the question is, are you using it.

15:31 cmiles74: Not yet. I don't want to rely on the Swing components, partly because they seem to try to do too much and also because it seems like an interesting project.

15:31 So far I have a piece buffer based implementation that you can add text to. But not delete. :P

15:32 chouser: :-

15:32 :-)

15:32 riddochc: I mean, there's a lot of editors already out there. They all have their flaws, and their good points...

15:32 cmiles74: It will display pretty big files and that's a requirement of mine. Still, I don't feel confident enough to commit to producing a working product.

15:33 It's true. Day-to-day I use Emacs and I like it quite a lot.

15:33 cemerick: OK, yet another survey, now public. Petition / Market Research: For the development of a commercially-supported, polished Clojure development environment http://spreadsheets.google.com/viewform?formkey=dHVEYUg3V3dMZjc0VDdNUFhWMGJ2bmc6MQ

15:33 cmiles74: cemerick: After the results of the last poll, I was pretty sure this was coming. ;)

15:34 cemerick: cmiles74: Yeah, pretty inevitable, especially after Stu said he felt the same as I didn

15:34 did*

15:35 technomancy: cemerick: which stu?

15:35 cemerick: technomancy: Halloway

15:35 riddochc: I thought so too. And I definitely understand the disire for better tools.

15:36 Er, desire. Yeah, that.

15:39 I think this new poll will show sufficient commercial incentive from professional developers to motivate someone. I don't really feel like I should take the poll myself, given a rather severe lack of funds at the moment.

15:40 mmarczyk: cemerick: great survey -- thanks for that!

15:40 riddochc: <- outlier

15:41 mmarczyk: hm, I realised I have a protocol defined which is meant to do certain kinds of conversions...

15:41 thus I called it ANTLR->Clojure and the (single) method -- antlr->clojure

15:42 should I change the -> to 2?

15:42 NB. I don't think I need to care about that being called from anywhere outside of my own code

15:43 cemerick: riddochc: yeah, unless you can reasonably say you'd buy it today, best to not add your info :-)

15:43 when your cirucmstances change though, by all means jump in

15:47 riddochc: I'm curious to see what this inspires, anyway.

16:03 Licenser: 9cookies

16:11 fanatico: What happened to extend-class?

16:13 chouser: just used extend-type now

16:13 use

16:14 tomoj: ba9b7924

16:14 fanatico: right, thanks

16:17 zakwilson: hugod: NPE from remote-swank: http://gist.github.com/430590

16:42 Raynes: cemerick: Did you delete my comment on those survey results? O.o

16:43 cemerick: Raynes: no, it's a stupid disqus bug

16:43 based on whether the comma in the url is encoded or not :-x

16:43 Raynes: cemerick: Just checking. Wanted to make sure I didn't say something that ticked you off. :p

16:44 cemerick: Raynes: http://muckandbrass.com/web/display/~cemerick/2010/06/07/Results+from+the+State+of+Clojure%2C+Summer+2010+Survey vs http://muckandbrass.com/web/display/~cemerick/2010/06/07/Results+from+the+State+of+Clojure,+Summer+2010+Survey

16:44 Stupid.

16:44 Raynes: nah. You're big on tracking people down, though! :-|

16:45 Raynes: :o

16:52 mjg123: Hi - I am learning clojure. I have written a prime sieve, but it is *much* slower than the reference code I looked at. If anyone can give me a hint as to why that might be, I'd be really grateful

16:52 http://paste.lisp.org/+2DUX/1

16:56 Raynes: cemerick: "I like nachos. And Rich has fantastic hair."

16:56 That is the most amusing thing I've read all day.

16:56 Bleh. I logged into disqus, and now the comments aren't coming up for me. :\

16:56 I wanted to reply.

16:57 * Raynes kicks disqus

16:57 cemerick: Raynes: yeah, I'm not so thrilled. I filed a support ticket, we'll see what happens.

16:57 The nachos comment was apparently by @puredanger

16:58 Raynes: cemerick: Anyways, my reply was along the lines of "Yeah, I totally agree. Newcomers already have to overcome their fear of The Almighty Parenthesis, and it can be offputting to have to get rid of Emacsphobia at the same time."

16:58 cemerick: Raynes: yeah, I saw it, and replied :-)

16:58 Raynes: cemerick: Wait, the comment actually showed up? I typed it up, and before submitting, tried logging into disqus.

16:59 And boom.

16:59 Good thing I was finished with the comment. >.>

17:00 cemerick: Raynes: yup, here: http://muckandbrass.com/web/display/~cemerick/2010/06/07/Results+from+the+State+of+Clojure,+Summer+2010+Survey#comment-55358983

17:00 Raynes: Okay, now they're loading.

17:00 Wewt.

17:02 * chouser accidentally returns an exception instead of throwing it.

17:02 Raynes: cemerick: That was my first reply.

17:02 cemerick: I replied to your reply to my reply with what I said above.

17:02 cemerick: ah, ok

17:02 so, disqus sucks :-P

17:05 Raynes: Aw, come on.

17:06 cemerick: Now, it made my reply to your reply to my reply a reply to your main post. :( CONTEXT, MAN, CONTEXT!

17:06 $learn reply <Raynes> cemerick: Now, it made my reply to your reply to my reply a reply to your main post. :( CONTEXT, MAN, CONTEXT!

17:06 sexpbot: My memory is more powerful than M-x butterfly. I wont forget it.

17:07 Raynes: I honestly didn't mean to say reply that many times in that sentence.

17:11 cemerick: Raynes: It goes deeper than emacsphobia.

17:11 * cemerick tries to come up with an anlogy

17:11 cemerick: analogy*

17:11 Raynes: Oh no.

17:12 Not an analogy.

17:12 ;)

17:12 * chouser hopes it has to do with cars and saddles

17:12 cemerick: heh

17:12 Raynes: Learning curves and Emacsphobia is the only real problems that I can see. But I have a narrow mind.

17:12 :p

17:13 And, I agree with you that nobody should be forced to write code in one specific editor/IDE.

17:13 cemerick: It's just a non sequitur. Offering a spoon to someone trying to cut steak.

17:13 Raynes: Emacs is a spoon? :o

17:14 cemerick: Assume a company humming along fine using perforce or something. And then someone comes along and says -- hey, you should use git! The reaction would be something along the lines of, "uh, so what if it can make a salad for me, I've got software to ship tomorrow".

17:14 That's not very well-formed.

17:14 chouser: Good enough. I'm convinced!

17:14 ;-)

17:15 nDuff: heh.

17:15 Raynes: Heh.

17:15 * nDuff is at a company that desperately wants to get off of perforce, but has had "software to ship tomorrow" for the last three years.

17:16 cemerick: ok, so maybe I'm not so off base with that

17:17 Raynes: cemerick: I don't think in business.

17:17 cemerick: it's all that open source messin' with your head ;-)

17:17 Raynes: I'm too young to think about company and how business.

17:17 ;)

17:17 how business works*

17:19 cemerick: It's all about solving problems people have now. Where clojure does that, it'll find success. Unless XXX can do that, it's baggage.

17:19 (where XXX could be git from my analogy)

17:32 zakwilson: I wonder to what degree being proactive instead of reactive in tech decisions would help most companies.

17:37 stuarthalloway: has anybody *ever* written their own clojure.test/assert-expr method?

17:38 zakwilson: Is using derive with keywords in one namespace and trying to check a relationship in another the Wrong Thing?

17:38 briancarper: @stuarthalloway: I did once, a long time ago, I forget what it did though.

17:39 stuarthalloway: briancarper: considering breaking it (a little)

17:39 https://www.assembla.com/spaces/clojure/tickets/377-fix-file-line-reporting-in-ant-builds

17:39 the combination of assert-expr and report hooks in clojure.test makes it difficult to fix 377 without changing the public API for someone

17:40 so I chose to change it for the few, the proud, the assert-expr implementors

17:41 * technomancy has been playing with adding ./F/E output during test runs

17:41 briancarper: stuarthalloway: Seems like a small price to pay for proper line numbers.

17:41 mmarczyk: briancarper: nice post on learning Emacs, pretty close to my experience :-)

17:41 stuarthalloway: briancarper, we could get line numbers some other way, but that seems to me to be the right way

17:42 mmarczyk: technomancy: if you're willing to consider my patch to add stuff to pom, I was thinking of extending adding the new entries to sample.project.clj ...?

17:42 briancarper: mmarczyk: Thanks, still expecting to be flamed by someone soon though. Criticizing text editors is treading on holy ground.

17:42 Twey: briancarper: A *year*?! Wow…

17:43 mmarczyk: briancarper: yup, that's probably par for the course

17:43 Twey: briancarper: Have you seen efforts like ErgoEmacs?

17:44 briancarper: Twey: A year from knowing nothing to feeling entirely comfortable to the point where I could ignore the editor and just code. I haven't seen ErgoEmacs, no.

17:44 Twey: It's a default configuration that enables a lot of the things you mention there (as well as providing a saner keymapping for the common commands).

17:44 zakwilson: briancarper: If you don't think everyone including my grandmother should master Emacs inside and out, your obviously stupid and lazy. Any programming language which is POSSIBLE to edit in another editor isn't worth knowing. Kids these days!

17:44 (how'd I do?)

17:44 Twey: zakwilson: Hehehe

17:45 briancarper: zakwilson: Not enough ad hominem

17:45 Twey: It also increases compliance with the norms people expect of apps nowadays.

17:45 zakwilson: briancarper: I'm not very experienced at this flaming thing... I'll work on it.

17:45 Twey: (largely as a side-effect)

17:46 djpowell: anyone had a look at my clojure.java.shell patches on clojure-dev?

17:47 briancarper: Twey: Might be nice, but then you're non-standard and out of sync with the rest of the Emacs world. Those kinds of projects can probably never reach cricial mass.

17:48 Twey: briancarper: It's implemented in such a way that it doesn't interfere significantly with normal emacs operation

18:13 djpowell: hmm, does head have some direct binding going on?

18:14 MrEvil: #git

18:17 djpowell: whoa - memoize rocks for calculating edit-distances

18:25 zakwilson: I don't understand how to use much of the functionality that has been offloaded to Ring from Compojure. Where do I put wrap-session in order to create and use a session in Compojure?

18:26 briancarper: zakwilson: There's an example here http://groups.google.com/group/compojure/browse_frm/thread/6c5662f99777e470

18:28 I've had more luck using sandbar for sessions though, http://github.com/brentonashworth/sandbar

18:28 zakwilson: briancarper: Thank you. Most helpful.

18:33 * arohner is having trouble migrating to compojure 0.4 as well

18:33 arohner: is there an example anywhere of having two sets of routes, adding different middleware to each set of handlers, and then combining them into one handler?

18:33 I don't understand why this isn't working

18:35 briancarper: arohner: Can you post some code that isn't working? I'vecombined routes before OK.

18:35 arohner: briancarper: ah, I just fixed one of my problems. one of my own middleware was returning nil

18:36 now to figure out why files aren't being served...

18:36 It's very nice how easy it is to compose functionality in ring and compojure. The problem is, sometimes it's very hard to figure out where that behavior is coming from

18:37 Raynes: I haven't had any trouble with sessions in Ring. But I use Moustache instead of Compojure. I <3 cgrand

18:37 arohner: briancarper: how did you combine routes? using (routes) / (defroutes) or something else?

18:37 briancarper: arohner: Yes, and it's hard to figure out what to return from middleware sometimes. You can't step on the toes of middleware that comes before or after you.

18:38 arohner: Just (defroutes all-routes routes1 routes2)

18:39 arohner: briancarper: yeah, that's what I have. Now something else is returning {} rather than nil, stopping the search for the right handler.

18:39 mmarczyk: over 250 lines of stack trace to tell me that apparently I forgot to implement a protocol for one of my types :-(

18:40 briancarper: mmarczyk: Ouch.

18:40 mmarczyk: Ouch indeed.

19:19 lancepantz: doing a quick poll, do you use ^C to exit a repl, or ^D?

19:19 technomancy:

19:21 ninjudd: ^D

19:25 Raynes: lancepantz: First instinct is to do ^C.

19:26 briancarper: ^D

19:28 danlarkin: ^D

19:28 it's eof! why use anything different :)

19:30 mmarczyk: ^D

19:32 lancepantz: thanks for the responses

19:36 dsantiago: drewr, what kinds of quoting issues does one find in the real world, with respect to CSVs?

19:39 nDuff: dsantiago, commas or double quotes in the data are perhaps most common

19:40 dsantiago, ...multiline cell contents aren't completely unheard of...

19:40 * nDuff shrugs; he uses the Python CSV module whenever he cares about doing CSV parsing or generation accurately.

19:41 dsantiago: nDuff, yeah, thanks. drewr said that my csv parsing library didn't handle real-world quoting issues, and it in fact does all those you mentioned.

19:41 I'm not aware of any more.

19:42 I'd add support for any that were brought to my attention.

19:50 wlangstroth: dsantiago: drewr wasn't specific, he just said "real world"?

19:50 dsantiago: Yup, that's why I'm asking.

19:52 wlangstroth: where's the library?

21:10 dsantiago: wlangstroth: sorry, called away. It's github.com/davidsantiago/clojure-csv

21:38 hiredman: ,(str nil)

21:38 clojurebot: ""

22:48 Lajla: ,(+ 1 2 nil)

22:48 clojurebot: java.lang.NullPointerException

22:49 Lajla: ,(car (list 1 2 3))

22:49 clojurebot: java.lang.Exception: Unable to resolve symbol: car in this context

22:49 Lajla: ,(first nil)

22:49 clojurebot: nil

22:49 Lajla: ,(rest nil)

22:49 clojurebot: ()

22:49 Lajla: ,(rest 3)

22:49 clojurebot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer

22:50 jartur: ,(next nil)

22:50 clojurebot: nil

22:55 hiredman: ,(car (list 1 2 3))

22:55 clojurebot: :volkswagen

22:55 hiredman: ,(car (+ 1 nil))

22:55 clojurebot: :volkswagen

22:57 Lajla: aHAHA

22:57 Who did that?

22:57 tomoj: ,(do (require 'clojure.contrib.repl-utils) (clojure.contrib.repl-utils/source car))

22:57 clojurebot: java.lang.RuntimeException: java.lang.ClassNotFoundException: clojure.contrib.repl-utils

22:57 Lajla: ,(car complete-nonsense-with-no-menaing)

22:57 clojurebot: :volkswagen

22:57 tomoj: :(

22:57 Lajla: ,(car @#$*@$g2g2 4 g24h

22:57 clojurebot: No dispatch macro for: $

22:57 Lajla: ,(car "sshtring")

22:57 clojurebot: :volkswagen

22:58 Lajla: ,(car more than one argument)

22:58 clojurebot: :volkswagen

22:58 Lajla: ,(car

22:58 clojurebot: EOF while reading

22:58 Lajla: Ahhh, there you fail, my friend.

22:58 tomoj: huh?

22:58 Lajla: tomoj, I am applying imperical sciene.

23:08 hiredman: clojurebot: imperical science is what got the british empire where it is today

23:08 clojurebot: Ok.

23:08 lancepantz: anyone know why use statements do not work when wrapped within a let?

23:08 ie: (let [] (use 'clojure.contrib.core) (seqable? [:a :b]))

23:22 Lajla: hiredman, you can adress it?

23:22 clojurebot: All hail Lelouch vi Britannica, prince of the Holy Empire of Britannica.

23:22 clojurebot: the previous sentence is false

23:23 Lajla: Ahhh

23:23 Amazing

23:30 jartur: lancepantz: why would you do that?

23:31 lancepantz: it's in a macro that's evaluated inside of a second jvm

23:34 jartur: lancepantz: okay. probably you're doing something over my head

23:34 tomoj: interestingly require seems to work fine inside a let

23:34 lancepantz: yep

23:36 Raynes: Wow, cemerick is really out to get a commerical Clojure IDE going.

23:36 jartur: lancepantz: does (refer ...) work?

23:36 tomoj: nope

23:37 jartur: Well, that's why use doesn't I suppose

23:37 Raynes: I'm not sure how a pricey super-IDE is going to help the community. I suppose it will help Clojure in the business world (which is great), but it sounds terribly disappointing for the cashless Clojure would-be.

23:38 Well, reading his petition a couple of times, I guess he does seem to be generally aiming this towards companies and such.

23:40 It would be nice for the Clojure community to have access to IDE plugins for Eclipse and Netbeans that people don't have to consistently complain about constantly. :p

23:41 jartur: Raynes: Yeah. Basically the only working IDE is swank + emacs for now

23:41 Everything else is pretty much unusable

23:41 Raynes: jartur: Enclojure does work, doesn't it?

23:41 tomoj: certainly not

23:42 Raynes: counterclockwise works as well, I hear.

23:42 tomoj: I mean, it's certainly not the case that everything else is pretty much unusable, at least in general

23:42 Raynes: Maybe these plugins aren't up to par yet.

23:42 tomoj: maybe unusable to you, and probably unusable to me as well :)

23:42 lancepantz: the rest are just DE's

23:42 jartur: Well, they are usable in principle

23:43 tomoj: people actually do use them

23:43 jartur: People actually would do anything not to use emacs

23:43 tomoj: maybe "usable" means something other than what I'm thinking

23:43 TheBusby: the survey results indicate that most people seem to use emacs

23:44 emacs isn't exactly a high-bar when considering all the things you need to learn to use Clojure proficiently

23:44 tomoj: I suspect it's less skewed that the survey results indicate, but have no proof

23:44 jartur: I've tried plugins for NetBeans and Idea and just couldn't use them.

23:45 I went to emacs though I never have liked it

23:45 TheBusby: my experience lends me to believe that many, if not most, of Java dev's likely shouldn't be using clojure

23:45 jartur: TheBusby: Why so?

23:45 TheBusby: Java was designed to try and be idiot proof, and hence it attracted a lot of idiots in certain organizations

23:45 jartur: TheBusby: Because we are idiots? =)

23:45 lancepantz: because they are too reliant on ide's apparently :)

23:46 jartur: IDEs for Java are necessity

23:46 TheBusby: I would say they are the ones most vocal about things like IDEs

23:46 jartur: Because Java is atrocious

23:46 TheBusby: they care less about complexity and performance, and more about the GUI

23:46 jartur: I code on Java daily

23:46 And I hate it

23:47 Raynes: The last message I got was "<lancepantz> the rest are just DE's", could somebody gist what I missed pretty please? <3

23:47 jartur: Raynes: we're talking about how Java devs are idiots

23:47 tomoj: https://gist.github.com/db470ca3a33b35ebd237

23:47 Raynes: Thanks.

23:48 TheBusby: would in be valuable to have a great Clojure IDE, of course it would. Will it be as benefitial as many people think to the Clojure communicty? I'm not so sure.

23:49 jartur: TheBusby: I think something like emacs but not emacs would be great =)

23:49 Raynes: <Raynes> But rather than building a pricey brand-new plugin that nobody outside of a company can afford is a little less helpful than working to improve the existing plugins for the general public. I just think it's a priority mix up, but that's just me.

23:50 TheBusby: I'd be interested to see compare/contrast with other langueges like python/ruby/scala/etc

23:50 tomoj: 32% of the survey responders said they either used java primarily now or did before they started using clojure

23:50 Raynes: It looks like Clojure does a good job of converting Java programmers to Emacs.

23:50 TheBusby: didn't a similar number say they've only been using it for a few weeks/year as hobby projects?

23:51 be interesting to see the overlap of those numbers

23:51 jartur: TheBusby: Well, I use it at my day job.

23:51 TheBusby: Not as much as Java.

23:51 YET

23:51 Raynes: I think the majority had been using it for a year.

23:51 tomoj: 64% for tinkering or "serious" hobby projects

23:51 the majority is less than a year

23:51 but not by much

23:51 jartur: TheBusby: I think the most ide-requiring languages are Java and C#

23:52 Ruby, python, haskell and pure C are written in text-editors

23:52 Like vim

23:52 TheBusby: I agree, I used emacs for a long time but switched to visual slickedit (~1999) for Java

23:52 jartur: C++ is more comfortable with an IDE as well

23:52 TheBusby: stopped using Java and switched back to emacs

23:53 jartur: Writing C# w/o VS is almost impossible =)

23:53 I can't handle a medium or big Java project without Idea

23:53 LuminousMonkey: Is there any real advantage moving from, say vim to Emacs just for Clojure?

23:54 jartur: But I would never use any 'IDE" for, say, Ruby

23:54 LuminousMonkey: yes

23:54 LuminousMonkey: if only for clojure. I mean not moving

23:54 just use it as a tool for clojure

23:54 tomoj: there are great clojurists using vim

23:54 jartur: Yes, I know

23:55 But it's not such a seamless integration

23:55 vim has its limitations in this field

23:55 And they are known

23:56 lancepantz: i've said it before

23:56 but i switched from vim to emacs, and had a serious productivity boost after a week or so

23:56 sooooooo much easier

23:56 Raynes: chouser seems to enjoy his Vimness.

23:56 hiredman too.

23:56 jartur: There are people who invested so much in their vim proficiency

23:57 That they would never give it up

23:57 lancepantz: i used it for about 10 years

23:57 LuminousMonkey: Hmmm, I gave Emacs a very quick go, but go put off by needing to move my fingers off the homekeys a bit.

23:57 jartur: I still hit esc, or i before typing in emacs sometimes

23:57 =)

23:57 lancepantz: it's not ever so much about emacs as it is paredit and slime

23:58 i could see emacs being annoying with a regular keyboard

23:58 jartur: LuminousMonkey: it's nothing compared to slime =)

23:58 technomancy: hired man is one of us now.

23:58 LuminousMonkey: lancepantz: You've got different bindings, or keyboard?

23:59 lancepantz: LuminousMonkey: i use one of these http://www.kinesis-ergo.com/advantage.htm

23:59 jartur: lancepantz: you are they guy

23:59 lancepantz: are they really that good?

23:59 LuminousMonkey: lancepantz: Woah!

23:59 lancepantz: playing counter-strike for 16 hours a day in college wasted my tendons

Logging service provided by n01se.net