#clojure log - Sep 09 2010

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

0:11 Bahman: Hi all!

0:12 bmh: Hi Bahman!

0:12 Bahman: Hello bmh!

0:12 bmh: You're rather exclamatory!

0:20 Bahman: bmh: Just trrying to follow the punctuation guides :-)

0:32 bartj: ,(partition-by #(= 3 %) [1 2 3 4 5 6 7 8 9 10])

0:32 clojurebot: ((1 2) (3) (4 5 6 7 8 9 10))

0:36 pdk: (doc partition-by)

0:36 clojurebot: "([f coll]); Applies f to each value in coll, splitting it each time f returns a new value. Returns a lazy seq of partitions."

0:38 bartj: I am not able to understand why the elements 4,5,... are in one set!

0:39 is it that the equality sign changes only when it is 3?

0:39 ok got it!

0:40 _ato: ,[(= 3 1) (= 3 2) (= 3 3) (= 3 4) (= 3 5)]

0:40 clojurebot: [false false true false false]

0:41 pdk: it makes me picture playing 20 questions with clojurebot

0:41 bartj in the first partition the two items don't = 3

0:41 so they all get lumped together

0:42 3 = 3 and that changes the return value of #(= 3 %) from when it was evaluating 1 and 2 so it gets split

0:42 then the return value changes again when you hit 4 and stays the same from there since nothing after that = 3

0:43 bartj: pdk, yes, I peered at it harder and was able to understand...thanks very much for your explanation

0:48 also, is it possible to partition based on groups of elements

0:49 for eg: partition if the sum of consecutive elements is 6

0:51 pdk: hmm that i havent looked into

0:51 might need to roll your own but doesnt sound complicated

0:52 since when you feed a function to partition it just looks at each value handed to it individually as far as i know

2:43 LauJensen: Morning gang

2:54 Bahman: Morning LauJensen!

3:06 jave: hello

3:12 bartj: good morning

3:15 my attempt to split a vector so that the sum of the elements is not greater than maximum-sum

3:15 is here: http://pastie.org/1147543

3:15 any comments greatly appreciated

3:16 because, it looks too ugly (non-clojurish)

3:21 _ato: hmm

3:33 _mst: here's a shot at it: http://pastie.org/1147559

3:34 LauJensen: _mst: Thats how I would have done it

3:41 _ato: You're working on moving Clojars to a different maintainer now?

3:46 harto: is there an inverse of select-keys?

3:47 AWizzArd: harto: what would the inverse function do?

3:47 harto: copy a map while excluding a given set of keys

3:48 AWizzArd: dissoc sounds good

3:48 harto: eep - of course :)

3:48 AWizzArd: ,(dissoc {:a 10, :b 20, :c 30, :d 40} :b :c)

3:48 clojurebot: {:a 10, :d 40}

3:49 harto: forgot it could take multiple keys

3:49 AWizzArd: harto: but good that you asked, because as you forgot about dissoc I forgot about select-keys (:

3:49 jave: I'm trying to make a ring handler in a compojure app that returns a redirect http header. I'm failing, for some reason. does someone have an example somewhere how to do it properly?

3:51 LauJensen: jave: isn't (defn handler [r] (redirect "/somewhere")) working?

3:52 jave: LauJensen: thanks, I did it some other bad way

3:52 LauJensen: k

4:00 jave: clojure should have been invented 10 years ago

4:00 bartj: _mst, that seems much much cleaner...thank you

4:01 AWizzArd: Ah, Java 7 was delayed. Earliest point of publishing it will be mid 2011.

4:01 bartj: jave, people don't appreciate the light if they don't know darkness (:

4:01 LauJensen: jave: naah, computers were too slow back then :)

4:01 jave: bartj: ah, point taken

4:01 but imagine all the suffering that would have been avoided

4:03 _mst: bartj: no worries! It was a bit of a rushed job (written 2 minutes before I left work) so it may be completely wrong :)

4:09 bartj: _mst, it's right and faster too

4:35 jave: I have some shared state that I handle properly with dosync, refs and so on. then I noticed I had some shared state in the form of a global variable being redefined with def. this sort of happened to work at the time. which made me think, what actually happens when you def something again?

4:36 Chousuke: jave: the root value in the var just gets replaced I think.

4:37 notsonerdysunny: can one access the clojure functions in a namespace from java? if so how?

4:37 not methods ...

4:40 Chousuke: notsonerdysunny: The functions are java objects so yeah. The java side of Clojure isn't documented at all but if you read RT.java you should find a method you can use to look up a var from java.

4:40 and once you have the Var you want it's easy to get to the function and invoke it.

4:42 jave: I just tested in the repl. the Var object gets reused when you redef something.

4:42 notsonerdysunny: I guess ... since it is not documented .. it is probably going to change in non-portable way with different versions of clojure...

4:42 jave: Chousuke: tnx

4:43 Chousuke: jave: Also only the root binding changes so any dynamic binding in effect will not be affected

4:43 ie. (binding [foo 5] (def foo 3) (println foo)) will print 5

4:44 notsonerdysunny: well, not until the java stuff gets completely rewritten

4:44 notsonerdysunny: It's probably best to wrap the code in some static methods so you can easily update it if/when something changes

4:45 ClojureUtils.call("clojure.core/+", 1, 2) or something :)

4:45 notsonerdysunny: :) hmm...

4:46 Chousuke: Using Java from Clojure is easy but the reverse is a bit painful :P

4:47 I think chouser once mentioned that he writes static methods for java consumers so that they don't have to figure out how to call clojure functions :P

4:52 LauJensen: makes sense

5:10 notsonerdysunny: types defined with deftype and defrecord can be used as regular java classes right?

5:11 and protocols as java interfaces ...

5:19 hiredman: ,(use 'clojure.lang.RT)

5:19 clojurebot: java.io.FileNotFoundException: Could not locate clojure/lang/RT__init.class or clojure/lang/RT.clj on classpath:

5:19 hiredman: ,(import 'clojure.lang.RT)

5:19 clojurebot: clojure.lang.RT

5:19 hiredman: ,(RT/var "clojure.core" "+")

5:19 clojurebot: #'clojure.core/+

5:20 hiredman: ,(-> (RT/var "clojure.core" "+") deref (.invoke 1 2))

5:20 clojurebot: 3

5:23 LauJensen: ,(-> (RT/var "clojure.core" "+") (.invoke 1 2))

5:23 clojurebot: 3

5:25 LauJensen: hiredman: Why did you deref it?

5:26 yayitswei: do you know how to disable host name checking for SSL connections? I'm using clojure-http and getting a java.security.cert.CertificateException

5:44 AWizzArd: LauJensen: RT/var returned a clojure.lang.Var instance.

5:44 It is just that invoke is nice and can deref implicitly.

5:44 hiredmans deref went from Var => fn

5:44 LauJensen: AWizzArd: Why deref when invoke does it?

5:46 Chousuke: avoids one level of indirection I suppose :P

5:46 notsonerdysunny: protocols are neat .. but can I somehow implement a protocol corresponding to addition of two vals for say a coordinate (x,y,z) and be able to do things like (apply + <vector of coordinates>)

5:47 Chousuke: notsonerdysunny: + doesn't use a protocol, so no.

5:47 octe: when i write clojure programs i usually embed a swank server in it.. and when connecting with slime you usually want to access the main object of the program, say for example the connection object for an irc bot

5:47 so i've made that a global, set by the the -main function

5:47 but it feels wrong to do that just so i can access it via slime

5:47 notsonerdysunny: can I get a list of inbuilt protocols which I can implement?

6:20 _na_ka_na_: anybody know how do i read json an http request body ?

6:23 (clojure.contrib,json/read-json (:body request)) is throwing exception

6:23 No implementation of method: :read-json-from of protocol: #'clojure.contrib.json/Read-JSON-From found for class: org.mortbay.jetty.HttpParser$Input

6:23 LauJensen: I expect that you first read the body as a string, then call read-json

6:24 _na_ka_na_: hmm, in case of xml I was just doing (clojure.xml/parse (:body request))

6:24 LauJensen: (->> (repeatedly (.read (:body request))) (take-while pos?) (map char) (apply str) read-json)

6:24 try that

6:28 _na_ka_na_: java.lang.Integer cannot be cast to clojure.lang.IFn

6:29 shoudl have #(.read ..)

6:29 its working!

6:29 LauJensen: Hooray! :) Sorry about the typo

6:31 _na_ka_na_: I slight problem

6:32 I sent \"I am the superman\" as application/json .. but the reading the body as above gives me : #<core$_GT_ clojure.core$_GT_@739e3169> "I am the superman"

6:36 bartj: why does lazy-xml take such a long time to finish parsing ?

6:36 I load the xml, print the first node and exit

6:37 but there is noticeable time-lag (4-8 seconds) after printing the first node and exiting the application

6:40 _na_ka_na_: My bad I had a > symbol lying around by mistake ..

6:41 LauJensen: just (slurp (:body request)) also works! .. See http://groups.google.com/group/compojure/browse_thread/thread/fece02bf92408b76?pli=1

6:41 LauJensen: _na_ka_na_: slurp*, not slurp

6:41 _na_ka_na_: but slurp is working for me in 1.2

6:44 LauJensen: really? cool

6:45 ah right, slurp actually does exactly what I did above, just in a loop

6:46 ...and using a StringBuilder

6:59 bartj: , (flatten '('(1 2) '(3 4) '(5 6)))

6:59 clojurebot: (quote 1 2 quote 3 4 quote 5 6)

7:00 bartj: I thought the quote wasn't supposed to be there (:

8:02 LauJensen: rhickey: It seems odd to me, that as advanced as Clojure is now, the stacktraces still leave you searching high and low for the line number which is causing the problem. Isn't this something fixable? Ideally I just want the line causing the breakage to light up in a bright red color

8:05 cemerick: LauJensen: something like clj-stacktrace will probably be integrated into the REPL sooner rather than later.

8:05 LauJensen: cemerick: remember the full feature list for clj-stacktrace? Ive never used it

8:06 cemerick: LauJensen: no, look at its github page

8:07 rhickey: LauJensen: this is a generic complaint. Are you talking about at the repl, with slime/swank, error in loaded code or just eval'ed from editor etc?

8:08 LauJensen: rhickey: I'm mostly bothered in the slime repl

8:08 clj-stacktrace doesn't address this, it looks like its just applying some formatting to the regular stacktrace

8:09 rhickey: LauJensen: they should dig for cause and put it first

8:09 LauJensen: rhickey: But even the root cause more often than not says (NOSOURCE:1) or something similar.

8:10 rhickey: LauJensen: please put together a test example

8:10 LauJensen: Ok I will. It'll take a little time so I'll post on the ML

8:10 rhickey: "I don't like the stack traces" is never going to get fixed

8:11 LauJensen: Because its not possible always to pinpoint the broken line?

8:14 cemerick: LauJensen: I've *never* seen "NOSOURCE" -- is SLIME not loading code with source file information?

8:15 LauJensen: slime-eval-buffer does, slime-eval-defun doesn't

8:16 cemerick: The latter being evaluating a selected top-level or something?

8:16 LauJensen: yea, typically you call eval-buffer first time you open a file, then afterwards you have a series of eval-defun, which only evals the fn your cursor in on

8:17 cemerick: ...which is where the source-less classes come from, presumably.

8:17 There's nothing clojure can do about that.

8:17 How open to suggestion are the SLIME devs, anyway?

8:20 LauJensen: cemerick: No clue - But yea I usually run a full slime-eval-buffer when debugging something

8:28 this is easily the most annoying java tip I ever received: http://java2everyone.blogspot.com/2009/01/set-word-wrap-in-jtextarea.html

8:34 bartj: ,(#{"a" "b" "c"} 0)

8:34 clojurebot: nil

8:35 bartj: I was expecting the output to be "a"

8:35 aren't sorted sets functions ?

8:36 cemerick: ,(#{"a" "b"} "a")

8:36 clojurebot: "a"

8:36 cemerick: #{} is not a sorted set, though

8:38 Raynes: bartj: sets are functions that look up their argument inside themselves and return it.

8:38 -> (["a" "b" "c"] 0)

8:38 sexpbot: => "a"

8:39 Raynes: Vectors do what you were trying to do.

8:39 cemerick: Raynes: have you figured out a way to Durham?

8:39 LauJensen: Raynes: I can tell, that if you want to get some use out of your bot, you need something simpler than '-> '

8:39 bartj: gah, that was for vectors, sorry

8:40 Raynes: LauJensen: I've already changed it three times. I'd rather people not use it than have to change it again. People most definitely wont use it if they have no clue what it even is. :p

8:41 LauJensen: np, its your bot

8:41 Raynes: cemerick: I wont even be able to afford the registration fee.

8:42 sleepynate: -> 8ball

8:42 sexpbot: java.lang.NumberFormatException: Invalid number: 8ball

8:42 Raynes: LauJensen: Nobody will ever be satisfied with the prefix I choose for evaluation. Thus is the nature of a noisy bot. I purposely avoided using a single character prefix for the evaluation in case somebody used the bot and decided they wanted to use the same prefix for normal commands.

8:42 $8ball

8:42 sexpbot: Raynes: My sources say no.

8:42 sleepynate: ya that

8:43 Raynes: The arrow is to sexpbot as the comma is to clojurebot.

8:43 sleepynate: i dunno... i read the source months ago after i saw you on SO :)

8:43 forgive me :D

8:44 Raynes: :p

8:51 bartj: er, what is the diff b/w clojurebot and sexpbot ?

8:51 Raynes: bartj: They're completely different bots.

8:51 LauJensen: bartj: clojurebot is just a more userfriendly version of sexpbot

8:52 Raynes: sexpbot is meant to be a more general purpose bot.

8:53 I've not done a side by side comparison of them.

8:55 LauJensen: ,(println "-> (println \",(println \"hello, world!\"))")

8:55 clojurebot: -> (println ",(println "hello, world!"))

8:55 sexpbot: java.lang.Exception: EOF while reading string

8:55 Raynes: Almost.

8:56 sexpbot doesn't like chains though.

8:56 LauJensen: thats a shame

8:57 rhickey: anyone got a regex for identifying and pulling apart these "clojure.main$repl$read_eval_print__5710.invoke" ?

9:00 LauJensen: rhickey: like a .split on $ ?

9:00 Raynes: LauJensen: I'll make eval prefixes a configuration thing and allow them to be different per-channel with a default.

9:01 That will let me keep -> for most channels and change it to a simpler one for #clojure.

9:01 chouser: I wrote something that sorta de-munged strings like that, but I'm having trouble finding it.

9:03 ah, here it is.

9:03 LauJensen: Raynes: cool

9:04 chouser: ,(apply str (map (fn [[_ pre _ qmk bng _ dlr und]] (str pre (cond qmk "?" bng "!" dlr "/" und "-"))) (re-seq #"(.*?)((_QMARK_)|(_BANG_)|(__\d+)|(\$)|(_)|$)" "clojure.main$repl$read_eval_print__5710.invoke")))

9:04 clojurebot: "clojure.main/repl/read-eval-print.invoke"

9:04 notsonerdysunny: is there a function to push an element to the end of the list?

9:04 not beginning

9:05 chouser: rhickey: that's probably not quite what you wanted.

9:05 notsonerdysunny: lists aren't good at that, but vectors are. (conj [1 2 3] 4)

9:06 notsonerdysunny: ,(conj [1 2 3] 4)

9:06 clojurebot: notsonerdysunny: excusez-moi

9:06 notsonerdysunny: I actually tried that ..

9:07 chouser: *

9:07 LauJensen: notsonerdysunny: Then you must be using Scala, because in Clojure it does what chouser showed :)

9:08 notsonerdysunny: LauJensen: did you notice what clojurebot gave me when I tried it in the irc itself?

9:08 LauJensen: ,(conj [1 2 3] 4)

9:08 clojurebot: [1 2 3 4]

9:08 LauJensen: hmm, you must have done something really bad in your life

9:09 cgrand: ,(conj [1 2 3] 4)

9:09 clojurebot: [1 2 3 4]

9:09 LauJensen: To deserve that kind of discrimination from a bot

9:09 cgrand: (^^ tried to copy paste the faulty one in case a subtle non-printable character was in the way)

9:10 notsonerdysunny: hmm... you must be right .. :(

9:11 ,( conj [1 2 3] 4)

9:11 clojurebot: notsonerdysunny: excusez-moi

9:11 notsonerdysunny: ,(conj [1 2 3] 4)

9:11 clojurebot: notsonerdysunny: Excuse me?

9:11 LauJensen: hiredman: When did you implement discrimination in Clojurebot? And thanks for not putting me on the list :)

9:11 notsonerdysunny: try -> (conj [1 2 3] 4)

9:11 notsonerdysunny: ->(conj [1 2 3] 4)

9:11 sexpbot: => [1 2 3 4]

9:12 notsonerdysunny: :)

9:13 finally a bot that does not discriminate... :)

9:13 Raynes: That's kind of odd.

9:13 LauJensen: Raynes: not really. I've also wondered why hiredman smiles on his github avatar, it seemed so out of character for him.. now I know :)

9:13 s/also/always/

9:13 sexpbot: <LauJensen> Raynes: not really. I've always wondered why hiredman smiles on his github avatar, it seemed so out of character for him.. now I know :)

9:17 notsonerdysunny: ,(conj [1 2 3] 4)

9:17 clojurebot: notsonerdysunny: I don't understand.

9:17 notsonerdysunny: ,(conj [1 2 3] 4)

9:17 clojurebot: notsonerdysunny: Excuse me?

9:18 notsonerdysunny: ,(conj [1 2 3] 4)

9:18 clojurebot: notsonerdysunny: Gabh mo leithscéal?

9:18 notsonerdysunny: its kind of funny .. :)

9:18 ,(conj [1 2 3] 4)

9:18 clojurebot: notsonerdysunny: Huh?

9:18 notsonerdysunny: ,(conj [1 2 3 4] 5)

9:18 clojurebot: notsonerdysunny: Gabh mo leithscéal?

9:18 notsonerdysunny: ,(conj [1 2 4 8] 5)

9:18 clojurebot: notsonerdysunny: I don't understand.

9:19 notsonerdysunny: ,(conj [ 1 2 3 4 5 6 7] 8)

9:19 clojurebot: notsonerdysunny: Huh?

9:19 Raynes: It's less funny the 8th time.

9:19 notsonerdysunny: ,(conj [ 1 2 3 4 5 ] 55)

9:19 clojurebot: notsonerdysunny: No entiendo

9:19 raek: I just realized how to simplify (if x (if-let [y (re-find z x)] y w) w) ; assuming w is not a very small expression

9:19 notsonerdysunny: sorry Raynes ..

9:19 Raynes: :p

9:20 raek: (if-let [y (and x (re-find z x))] y w)

9:20 Raynes: raek: You're a genius. You must blog about your findings immediately.

9:21 raek: was that sarcasm? I don't claim I realized something revolutionary...

9:22 this has been bugging me before

9:22 Raynes: raek: Not quite.

9:23 cgrand: raek: (or (and x (re-find z x)) w)

9:24 raek: yes, but in my case I actually did something more with y (which I omitted here)

9:25 rhickey: chouser: one of the problems with regexes is I can never tell what they do, so can't determine if it's what I want :)

9:25 raek: regexen are indeed write-only...

9:25 Raynes: They aren't meant for reading.

9:26 raek: that's the reason I have 70 lines of tests for 2 lines of regexen

9:26 rhickey: the regex would need to distinguish clojure fn names from other class names

9:27 chouser: rhickey: you want two separate stringss back? demunged namespace, demunged fn name?

9:27 rhickey: could be as simple as contains $ and methodname contains "nvoke"

9:28 clojure.core$let.doInvoke => clojure.core/let

9:29 chouser: yes, two strings would be fine

9:29 chouser: but if not a clojure fn, leaves it untouched?

9:31 mmcgrana has some related code here: http://github.com/mmcgrana/clj-stacktrace/blob/master/src/clj_stacktrace/core.clj

9:32 rhickey: chouser: maybe should return full ns/name in first case, then yes, untouched otherwise

9:32 chouser: it would be lovely if that was in contrib, might even make it into the repl

9:34 but the munging stuff is already in core, and the rest is pretty simple

9:35 he's not looking at structure of name, but for .clj source file

9:36 chouser: yeah

9:37 before I saw his, I wrote some of my own code to colorize, demunge etc. also more than what you want I suspect. http://gist.github.com/571861

9:49 rhickey: can I use clojure.string, or is that not available yet when this needs to work?

9:57 rhickey: chouser: best not

9:58 I think I can use .clj file detection, so the fn doesn't need to do validations, will be passed a clojure fn class + invoke-isn method variant

9:58 invoke-ish

9:59 chouser: validation shouldn't be hard, so if it's a pain on your end don't bother.

9:59 rhickey: either way

10:00 chouser: right now trying to do demunging based on the table Compiler already has

10:00 CHAR_MAP

10:08 rhickey: chouser: right

10:30 chouser: rhickey: ok, I think I have something that'll work as a starting point anyway. want it via email?

10:31 30 lines, unfortunately.

10:31 not all regex. :-)

10:39 rhickey: sent

10:40 rhickey: sent

10:42 rhickey: chouser: looking at it now - thanks!

10:45 chouser: np. hope it helps.

10:49 note inner fns get funny names

10:49 (fn-name (str (.getName (class (.dispatchFn print-method))) ".invoke")) ;=> "clojure.core/fn--3962/fn"

10:49 not sure what you wanted there.

10:50 (fn-name (str (.getName (class (fn a>b<c))) ".invoke")) ;=> "user/eval813/a>b<c"

10:52 LauJensen: chouser: would be great if it said anon-fn-which- and then an english description of the body :)

10:52 chouser: heh

11:17 AWizzArd: rhickey: would it be possible to add a compiler flag which, when set, will try to make every defn ^:static?

11:18 rhickey: AWizzArd: anything is possible, not sure about doing that

11:20 AWizzArd: This could be set somewhere in Ant, when one builds a .jar file.

11:22 rhickey: btw, what is the intended way for "normal people" to submit bugs? They can create an account in Assembla, but are then blocked from creating tickets until someone activates this feature for that specific account.

11:22 So, google group?

11:24 rhickey: AWizzArd: that's not true, anyone can use Support tab, but checking in ggroup still first step

11:25 AWizzArd: A friend tried it and reported he didn't see a button to create a ticket. This is some weeks ago. I don't know if it was for Clojure or Contrib.

11:26 rhickey: Support tab still probably requires an Assembla account, and maybe watching the project

11:26 but no special privileges

11:28 AWizzArd: ok, maybe he was not a watcher!

12:27 duncanm: if i have a text file with some numbers in the form of (x1,y1)(x2,y2) and I call clojure.core/read, what would i get back?

12:32 Chousuke: duncanm: (x1 y1)

12:32 duncanm: Chousuke: the list?

12:32 Chousuke: yeah

12:32 duncanm: so i'd get back.... a list of lists?

12:32 Chousuke: read reads just one form at a time

12:33 so if your stream is just that, you'd just get the first list

12:33 and then the second the next time you read

12:33 etc.

12:48 chouser: we should have read-seq

12:54 rhickey: ok, improved repl errors and stack traces are up - try the new repl utility: pst

12:54 thanks to chouser for the help

13:01 chouser: printing only the root cause obscures file name and line number of compile-time exceptions

13:04 rhickey: chouser: you mean in pst?

13:04 chouser: yeah. and various other stack trace prettifiers floating around.

13:04 rhickey: pst can take an exception arg, (pst *e)

13:05 chouser: for runtime exceptions, the root cause is often the most important one. For compile-time exceptions, it seems to me the outermost is often most helpful.

13:05 rhickey: but the conditional in clojure.repl considered almost all repl exceptions to be compiler exceptions

13:05 er, clojure.main

13:06 duncanm: rhickey: i'm thinking of coming to clojure-conj, and i can stay with a friend in Raleigh - but I don't drive at all, do you know if there'll be carpooling to go from Raleigh to Durham?

13:06 rhickey: duncanm: I don't know who would be in Raleigh

13:06 duncanm: rhickey: is there a mailing list where i can ask this question?

13:09 rhickey: duncanm: I'll see

13:09 duncanm: rhickey: thanks so much, sorry for interrupting

13:09 rhickey: chouser: so, what's an example?

13:09 chouser: (defn evil [x] (eval x)) (evil '(Foo/bar))

13:10 the one-line summary doesn't include the filename/line number of the actual error

13:10 neither does (pst)

13:11 (pst *e) does, but that's at the top of a very long trace

13:11 rhickey: chouser: well, I'm happy to have another heuristic, but the old one (is it a CompierException) seemed always true

13:11 chouser: ok

13:17 rhickey: maybe if compiler exception and source not NO_SOURCE_FILE

13:19 apgwoz: who do i have to talk to get my messages "auto approved" for the list?

13:19 ... talk to to get

13:20 chouser: apgwoz: I think google groups does that automatically over time.

13:20 apgwoz: chouser: interesting. ok

13:20 sort of hard to contribute to a conversation when your responses show up hours later :)

13:20 but, i guess in the long run it's better

13:31 chouser: duncanm: (defn read-seq [reader & [recursive?]] (let [eof (Object.)] (take-while #(not (identical? eof %)) (repeatedly #(read reader false eof (boolean recursive?))))))

13:32 then something like (vec (read-seq (clojure.lang.LineNumberingPushbackReader. (clojure.java.io/reader "core.clj"))))

13:32 duncanm: chouser: wow, thanks so much

13:32 Raynes: LineNumberingPushbackReader IsAReallyLongClassName.

13:33 duncanm: it's better than PushbackReaderWithLineNumbers

13:34 chouser: or DescriptorProtos$DescriptorProto$ExtensionRange$Builder

13:38 http://tinyurl.com/2ca3nhb (in case you think I'm kidding)

13:40 mefesto: to type hint a String[] in clojure is ^"[Ljava.lang.String;" the way to go?

13:42 chouser: duncanm: gah, I forgot to close the stream. Should be (with-open [r (clojure.lang.LineNumberingPushbackReader...)] (vec (read-seq r)))

13:48 (defn array-type [c] (.getName (class (into-array (resolve c) []))))

13:48 then ^#=(user/array-type String) seems to work.

13:48 :-P

13:48 Raynes: oo

13:48 chouser: probably better off with what you had.

13:48 Raynes: o.o*

13:48 -> (type (make-array String 10))

13:48 sexpbot: => [Ljava.lang.String;

13:48 Raynes: Lovely.

13:48 mefesto: heh thanks. wasn't sure if there was something setup like how there is for primitives

13:49 chouser: mefesto: I don't know of any. ...but that proves nothing :-P

13:50 Raynes: ah, (make-array (resolve c) 0) would be slightly better

13:51 LauJensen: Is there an explanation somewhere, for why they chose the name "[Ljava.lang.String" ? (and the other weird looking names)

13:53 chouser: [ looks like an array lookup

13:54 the following char is usually the first letter of the type name, B for bytes, I for ints, etc.

13:56 except longs is J and Objects is L. I have no idea what that's about.

13:57 LauJensen: So in other words... no? :)

13:59 technomancy: LauJensen: basically they really didn't put much thought into it since they don't understand repls

13:59 chouser: hm. I doubt that was it. they know how to print themselves somewhat prettier

14:00 LauJensen: Well... I think Phil is right in so far that they probably didn't put a lot of thought into it

14:00 I think many of the bad things people say about the inconsistencies in PHP can be said about Java as well. Especially Swing... Man Swing drains me... :)

14:00 chouser: yeah -- those are internal bytecode things

14:02 cemerick: duncanm: regarding carpooling, I'd try to give a shout on twitter?

14:06 duncanm: cemerick: okay

14:06 cemerick: good idea

14:06 the lesson here for me really is: i really need to learn how to drive

14:07 raek: (function for parsing jvm type descriptors: http://github.com/raek/impojure/blob/master/src/impojure/class/constant_pool.clj#L114 )

14:07 cm9: Hi,

14:08 I'm running lein.bat to install leiningen, but it tells me the lein jar file can't be found.

14:08 duncanm: is there something like interleave, but gives me alists instead of plists?

14:08 raek: "[Ljava.lang.Object;" --> [:array [:reference "java.lang.Object"] 1]

14:09 cm9: It says I can try lein self-install, but the readme doesn't mention this and it doesn't help anyway.

14:09 chouser: duncanm: heh "alists" and "plists" aren't clojure words, but maybe you want 'zipmap'?

14:09 raek: "[[[I" --> [:array [:primitive :int] 3], etc

14:09 cm9: It says the jar already exists (and it doesn't). I also can't find the leiningen jar file online at the place specified in the script. Any ideas?

14:10 raek: maybe you could try removing the maven local repository directory

14:10 I don't know where it is in Windows

14:10 maybe somewhere in Application Data or something

14:10 cm9: I have never used maven though, there shouldn't be one..

14:10 raek: leiningen uses maven

14:11 cm9: I've never used leiningen, I'm trying to install it for the first time here,.

14:11 raek: ok, no previous failed installs or anything? then there shouldn't be any maven stuff around...

14:12 cm9: nope. Nothing like that,

14:12 it's odd!

14:12 LauJensen: cm9: If you're on Windows, try Cake instead of lein, it does the same as lein and then some

14:12 http://github.com/ninjudd/cake/wiki/Cake-on-Windows

14:12 cm9: LauJensen: Okay, I'll give that a shot

14:12 Thanks

14:12 raek: can you post what you get from "lein self-install" on pastebin or something?

14:12 LauJensen: np - Ive tried it, it works great

14:12 cm9: raek: Will do

14:13 raek: what are the notable features cake? (I've heard about the persistent JVM)

14:13 cm9: raek: http://pastebin.com/vz2iutXe

14:14 LauJensen: raek: 1) Its totally cross-platform, via gems. Big win. 2) Has a fantastic task dependency system, 3) Persistent JVM (which I dont care about personally)

14:14 raek: I'm currently very happy with leiningen, but it's always good to know about other tools and what they do best

14:15 LauJensen: Cake is a drop in replacement for lein, but does more than lein if you need it to

14:15 and these guys that are working on it, are beyond fast. They put in a lot of work

14:16 cm9: Lau: Cake doesn't have any problem with x64 version of the JDK, does it?

14:16 LauJensen: cm9: No, I reported a bug a couple of weeks ago, was fixed in about 6 minutes IIRC

14:17 cm9: Lau: wow - that is commitment. You think they were staring at a blank email client waiting for bugs to come in? :)

14:17 LauJensen: cm9: I dont know, I reported to ninjudd, so Im guessing he's a ninja of sorts, didn't really asked, just sat back and was impressed

14:18 raek: hrm... is the lein.bat link pointing to the master version? that doesn't seem right...

14:18 Licenser: greetings my lispy friends

14:18 cm9: Lau: Perhaps a ninja with udders

14:18 LauJensen: They also had a Windows specific bug in the way they were reading files. I reported it, and after 1 or 2 hours (basically once he woke up) a new gem was released which fixed it, so I hit "gem install cake" in Windows again, and compiled

14:18 cm9: quite possibly

14:18 raek: cm9: try this lein.bat instead: http://github.com/technomancy/leiningen/raw/stable/bin/lein.bat

14:18 cm9: raek: This won't clash with having cake installed, will it?

14:18 raek: nope

14:20 AWizzArd: Apple seems to be more permissive in the future about the programming languages that may be used for their iOS (iPhone, iPad, etc). So, it could well be that Java and Clojure may be allowed soon.

14:20 cm9: raek: Now I just get "http://github.com/technomancy/leiningen/raw/stable/bin/lein.bat"

14:20 raek: Oops. I meant now I just get...

14:20 raek: ..."The syntax of the command is incorrect."

14:20 LauJensen: AWizzArd: Im just not sure Clojure makes sense in that setting

14:20 raek: hrm, does it mention which command?

14:21 LauJensen: cm9: Why waste time on lein when cake works?

14:21 cm9: that's the entire output when I type "lein self-install".

14:21 lau: Still downloading jdk!

14:21 LauJensen: k

14:22 raek: ah, you don't have java installed yet? that might explain it...

14:25 hiredman: some people have stricter definitions of "works" than cake adheres to

14:25 raek: cm9: if you open a command terminal and run "java -version", do you get "The syntax of the command is incorrect."?

14:25 LauJensen: hiredman: speaking from any recent experience?

14:26 lancepantz: whats up with that hiredman?

14:27 cm9: raek: similar to that yes

14:27 raek: java must not be on my path

14:28 raek: from the source of lein.bat, it looks like it uses the java executable

14:29 so I guess it has to be on the path

14:29 LauJensen: it does

14:30 hiredman: Its poor style to throw out a line like that and not substantiate it. My recent experiences with cake are quite to the contrary, it works very well

14:30 lancepantz: hiredman: it's frustrating to spend so much time working on something, that alot of people clearly like and use, only to have people on this channel make snide unsubstantiated comments

14:31 not calling you out specifically, but this isn't the first time

14:31 cm9: raek: Java is now on the path (and java -version works as I'd expect), however, lein self-install gives the same error: "The syntax of the command is incorrect."

14:31 lancepantz: it doesn't even matter if it "works" anyways, it's clearly stated as a work in progress all over the documentation

14:31 LauJensen: lancepantz: I hear you - You've received a poor reception, primarily because some people get a little militant about lein, probably because it was here first, and because its solves the problem it set out to solve

14:31 cm9: raek: Anyway - jdk is downloaded now, so I'm going to try and go ahead with that.

14:32 (and cake)

14:38 Lua: Okay - cake is installed. Any pointers to tutorials for using it to learn clojure - i.e. run *.clj scripts, and anything else I may need?

14:39 s/Lua/Lau/

14:39 sexpbot: <cm9> Lau: Okay - cake is installed. Any pointers to tutorials for using it to learn clojure - i.e. run *.clj scripts, and anything else I may need?

14:39 LauJensen: cm9: you should ask lancepantz, he's one of the devs working on it. First I would recommend that you consume their github page, wiki and all. Its not a big read but it'll get you started

14:40 cm9: Lau: great, thanks for all your help

14:40 lancepantz: cm9: if you want a repl, just do cake repl

14:40 cake help will tell you all of the commands

14:40 LauJensen: http://github.com/ninjudd/cake

14:40 cm9: Thanks, I will surely be back later with more questions!

14:40 LauJensen: cm9: np. There's a good intro on that page

14:40 lancepantz: you can start a new project by using cake new 'project-name'

14:40 LauJensen: lancepantz: you forgot to put 'new' on the github page

14:41 cm9: lancepantz: Not at that level yet, need to learn a bit about clojure itself before making multi-file projects..

14:41 lancepantz: and if you have any cake specific questions, we use the #cake.clj channel

14:41 cm9: lancepantz: Just interested in getting the contents of a file to "run", like I'd do with python: "python foo.py"

14:42 (for now)

14:43 LauJensen: cake repl => (load-file "myfile.clj"), would work I think

14:43 lancepantz: cm9: in most cases its not that simple, as java needs to have the class path set up if you're using any jars

14:44 cm9: lancepants: you're referring to the clojure jar, I suppose?

14:44 lancepantz: no, that one will get included

14:44 cm9: lancepantz: I don't plan to make my own jars for a while if I don't have to.

14:45 ssideris: so cake is a lein alternative?

14:45 cm9: I'd just like to get started with clojure as simply as possible!

14:45 lancepantz: but if you want to start simple, open a new file anywhere on your system, and add (println "hi")

14:45 cm9: brb

14:45 lancepantz: then do 'cake run filename'

14:45 ssideris: cake is another clojure build tool, yes

14:47 briancarper: And for yet another build tool question... could anyone tell me why ths is failing to install clojure-contrib? http://gist.github.com/572306

14:48 I can see the JARs sitting right here: http://build.clojure.org/snapshots/org/clojure/contrib/complete/1.3.0-SNAPSHOT/

14:48 slyrus: complete vs. complete:jar:

14:49 ssideris: lancepantz: do you know if/what advantages it offers over leininingen?

14:49 cm9: lancepants: That cake run is just what I need, thanks.

14:50 lancepantz: ssideris: i'd look over the readme http://github.com/ninjudd/cake

14:50 LauJensen: cm9: Next up, you might want to install ERC, you get free nick completion :)

14:50 cm9: sorry :-S I will look into it

14:51 lancepantz: ssideris: the main difference is the persistent jvm and the task model, they both are just different philosophically than lein, tons of people hate it though, so i'm not saying its better :)

14:51 briancarper: slyrus: What does complete:jar: mean?

14:52 anonymouse89: I'm having trouble including clojure as a lein dep

14:52 hiredman: briancarper: you have the version names reversed for contrib and clojure

14:52 anonymouse89: is it not hosted on clojars? If I search for org.clojure I get no relevant results

14:52 slyrus: briancarper: who knows. but it's looking for org.clojure.contrib:complete:jar:1.3.0-SNAPSHOT

14:52 hiredman: contrib has a "master" and clojure doesn't

14:53 ssideris: lancepantz: I did read the readme and the faq, but I only used leiningen 10 days ago for the first time, so I wasn't in a position to make the comparison myself

14:53 kencausey: anonymouse89: Look at the clojure.org download page, it lists the lein info

14:54 anonymouse89: and no, it is not on clojars

14:54 anonymouse89: kencausey: sorry for the silly question, but that's exactly what I needed

14:54 kencausey: actually, I might be wrong about clojars... I'm not sure but anyway, you're welcome

14:55 lancepantz: ssideris: ah, well cake does some trickery to eliminate jvm startup time after the first command, alot of people like that

14:55 briancarper: hiredman: Are you sure? It's successfully finding clojure with "master". It fails to find contrib even if I add "master".

14:56 Clojure has "master" in the URL: http://build.clojure.org/snapshots/org/clojure/clojure/1.3.0-master-SNAPSHOT/

14:56 lancepantz: ssideris: it also is easier to add new tasks to your project, and to chain tasks together

14:57 hiredman: briancarper: not 100%, but that is how it's been for sometime now

15:00 ssideris: lancepantz: sounds useful

15:00 I wonder why people hate it

15:00 since it seems compatible with leiningen anyway

15:01 lancepantz: me too

15:02 briancarper: So I guess I'm back to building contrib by hand. Maven is a disaster. Thanks for the help anyways.

15:03 Raynes: briancarper: Don't let cemerick here you. ;o

15:04 hiredman: ~works on my machine

15:04 clojurebot: http://haacked.com/images/haacked_com/WindowsLiveWriter/IConfigMapPathIsInaccessibleDueToItsProt_1446B/works-on-my-machine-starburst.png

15:06 cemerick: I hear all. Most things I let just drift by, though. :-)

15:07 LauJensen: cemerick: yea right :)

15:09 ninjudd: briancarper: it looks like the contrib problem is on http://build.clojure.org/

15:10 the jar should exist at http://build.clojure.org/snapshots/org/clojure/contrib/complete/1.3.0-SNAPSHOT/complete-1.3.0-20100909.170549-24.jar

15:10 but it is missing. there is only http://build.clojure.org/snapshots/org/clojure/contrib/complete/1.3.0-SNAPSHOT/complete-1.3.0-20100909.170549-24-bin.jar

15:12 briancarper: ninjudd: I see. Good catch. So how do I tell Maven to install this file instead?

15:12 ninjudd: looks like all the contrib complete jars started having -bin in the file name starting on August 22. not sure how to make it work with maven

15:16 briancarper: ninjudd: OK then. Thanks.

15:17 ninjudd: cemerick: do you have any idea why the -bin is added to those jars?

15:18 ranjit_c: i'm not sure if this message came through already, but:

15:18 does anybody have any experience with using jtransforms in incanter? i'm having some trouble getting the 2d transforms to work

15:23 cemerick: ninjudd: it's recent, so likely the result of a pom change

15:26 ninjudd: here's the commit that introduced the change http://github.com/clojure/clojure-contrib/commit/b0f2e778a81916fbdb5cf59bdf364307ba1ec965

15:26 notice the <id>bin</id> in the assembly descriptor

15:27 LauJensen: cemerick: Do you know why that was done?

15:27 ninjudd: cemerick: yep. do you have to do something special in maven to get that jar? specify id=bin i suppose

15:27 cemerick: LauJensen: No, someone would have to ask Stuart.

15:28 ninjudd: it's actually ends up being a classifier, I think.

15:28 It's hardly unusual, at least in Java-land. It's possible that the assembly plugin cannot produce a classifier-less jar, but I'd be surprised if it didn't.

15:31 ninjudd: ok. just checked in a fix to cake to support classifiers

15:32 briancarper: [org.clojure.contrib/complete "1.3.0-SNAPSHOT" :classifier "bin"] works for lein.

15:32 cemerick: briancarper: glad things are on the right track :-)

15:33 ninjudd: briancarper: yeah, just added the same syntax to cake. thanks

15:33 LauJensen: I told you these guys work fast!

15:33 cemerick: now ninjudd just needs to put me on the payroll :-P

15:34 Raynes: LauJensen: You might want to consider purchasing some pom poms.

15:34 cemerick: lol

15:34 LauJensen: Raynes: I need more than one set?

15:34 cemerick: LauJensen: different colors, chief!

15:34 Raynes: It's all about the rainbow.

15:34 ninjudd: cemerick: you want a job? we'll hire you. you just have to move to Los Angeles

15:35 cemerick: ninjudd: I have too many jobs. I probably wouldn't be able to hack LA, anyways. :-)

15:35 Santa Barbara, now that's another story.

15:36 briancarper: I appreciate everyone's help. Sorry for whining, but it's very frustrating having so much trouble with a simple install. I can't even remember what program I was working on.

15:37 cemerick: briancarper: I understand the pain.

15:37 ninjudd: cemerick: 1 hour 38 minutes drive

15:37 cemerick: *way* too much :-)

15:38 ninjudd: yeah. i drive 30 minutes, and that's *way* too much

15:38 cemerick: The solution is education of course. Imagine someone chucking the JVM because they didn't grok the classpath. *shrug*

15:38 I had to drive 2 hours, each way, every day for three months. To a miserable, poorly-paying job. Worst period in my life.

15:40 chouser: cemerick: I had a similar experience, though perhaps a bit less extreme.

15:40 cemerick: focusses the mind

15:40 lancepantz: i move alot

15:41 cemerick: chouser: I'd say the opposite. I was numb after a month. :-(

15:41 That was a looong time ago.

15:41 Stories to last a lifetime though. I've a bucket-full.

15:41 lancepantz: however, i like 2.8 miles from the office here in la, it's taken me over an hour to get home on a few occasions

15:41 cemerick: lancepantz: jog?

15:41 LauJensen: lancepantz: helicopter broken?

15:41 chouser: I mean -- motivates to escape a life of such employment

15:42 cemerick: oh, right

15:42 lancepantz: in a car :)

15:42 cemerick: yeah, I'm saying...jog instead

15:42 lancepantz: EXERCISE?!?!

15:42 LauJensen: I think its nice how a conversation about (yet another) maven buggy config, instantly leads us to dicuss long tedious commutes to work, and cemerick is reminded of the worst period in his life........

15:42 lancepantz: dear lord man

15:43 chouser: met guys there who'd been doing roughly the same job of 20+ years. made my heart ache.

15:43 cemerick: lancepantz: Just got back from playing 1.5 hrs of handball. It's good for the mind.

15:43 briancarper: cemerick: True, education is a solution. But imagine if Emacs was a requirement to use Clojure. I could use the same argument. There's only so much time in a day.

15:43 cemerick: I figured out a bug in the process that I'd been stuck on for 2 days.

15:43 lancepantz: i've actually become quite a fan of surfing since the move to la

15:44 now thats about my favorite thing to do, that wears me out enough

15:44 cemerick: briancarper: I fundamentally agree.

15:44 artifact coordinates have (almost) nothing to do with maven at this point though

15:44 everyone should know about group, project, version, classifier

15:45 chouser: :-(

15:45 * chouser puts it on a list

15:45 drewr: is there something like :validator for a ref that will retry the commit upon failure instead of throwing an exception?

15:46 cemerick: chouser: here's the URL for you: http://maven.apache.org/pom.html#Maven_Coordinates

15:46 hiredman: LauJensen: how is that buggy maven behavior?

15:46 chouser: cemerick: thanks. will read it right now.

15:46 briancarper: cemerick: Point taken, thanks. I'll read up.

15:48 hiredman: just because you are unaware of something that does not make it a bug

15:50 chouser: read a post from a debian guy about how langauge-specific dep management solutions are all so weak compared to debian's

15:50 I believed him.

15:50 LauJensen: chouser: All I know, is that apt-get can spend a 1 minute doing what pacman does in 1 sec

15:51 cemerick: An interesting side of this is that this education/discovery problem doesn't really exist for Java devs, even when they're new to maven. When you're writing an XML pom, the editor you're using will (usually) show all of the possible children (i.e. coordinate parts) in a <dependency> element, so greenhorns see the whole landscape pretty quickly.

15:51 chouser: LauJensen: not sure that's a good amount to know.

15:51 LauJensen: hehe, agreed :)

15:51 cemerick: Of course, there's no completion in string-based coordinates in a project.clj

15:56 mrBliss: degustibus: another belgian!

16:08 chouser: does a maven version have a specified format, or is it just a string?

16:08 anonymouse89: is there a fn to replace the nth element of a seq?

16:09 degustibus: hi

16:09 mrBliss: hi degustibus

16:09 chouser: assoc replaces the nth element of a vector

16:09 cemerick: chouser: maven coordinates can be represented as a string

16:09 degustibus: is this the right place to ask about slime/swank-clojure problems?

16:09 rhickey: man, I hate tests that check for particular exception types

16:09 chouser: cemerick: that's not what I mean. if I want may version to be "gamma" or "yoink" is that ok?

16:10 my

16:10 mrBliss: degustibus: you can always try ;-)

16:10 cemerick: oh, I see

16:10 anonymouse89: chouser: cool, didn't realize that assoc was not only for maps

16:10 chouser: anonymouse89: it's for associative things which include vectors and maps, but not seqs

16:11 degustibus: i just installed aquamacs with slime plugin and then swank-clojure 1.2.1 and it seems that after 1 eval in slime, it locks up

16:11 cemerick: chouser: Yes, you can have arbitrary version strings, but then version ranges won't work.

16:12 mrBliss: degustibus: which version of the slime plugin (via elpa?)

16:12 cemerick: e.g. you won't get 1.1-FOOEY if you specify a dependency with a version of [1.0,2.0)

16:12 degustibus: doing c-x c-e on a second expression will not do anything, and typing an expression in slime buffer will work, but it will never evaluate

16:12 cemerick: and -SNAPSHOT version strings have special semantics

16:12 degustibus: (i'm new to emacs, so i have to clue how to go around troubleshooting it)

16:12 chouser: cemerick: makes sense. can projects at the top (root?) of a dep tree override deps of its various intermediate nodes?

16:13 oh. will have to read about -SNAPSHOT then.

16:13 mrBliss: degustibus: how did you install swank-clojure?

16:13 cemerick: chouser: If I understand the question, yes. That's what the <dependencyManagement> element is for, to override deps defined in "child" projects.

16:13 I don't think lein/cake have any corollary to that yet.

16:13 rhickey: improved pst is up: http://github.com/clojure/clojure/commits/master

16:14 chouser: cemerick: ok, thanks.

16:14 mrBliss: degustibus: just a dev-dependency in project.clj right?

16:14 scottj: rhickey: do you prefer that format to clj-stacktrace?

16:14 degustibus: i cloned the repository and did "lein jar" and then I copied the jar + clojure and clojure-contrib to ~/.swank-clojure

16:14 rhickey: now with depth control, better reporting for compilation errors

16:14 scottj: never used clj-stacktrace

16:14 degustibus: i also tried "lein swank" in incanter and the result is pretty much the same

16:15 mrBliss: degustibus: that's more interesting

16:15 degustibus: can you make a new leiningen project

16:16 degustibus: with :dev-dependency [[swank-clojure "1.2.1"]] ?

16:16 degustibus: let me try that

16:17 scottj: rhickey: there's an example on http://github.com/mmcgrana/clj-stacktrace . It has the advantage of filenames all being aligned. I noticed that pst doesn't show the exception class (though the error does)

16:19 chouser: rhickey: (pst) seems to break when printing a NullPointerException

16:19 hiredman: cemerick: is that like excluding dependencies of a subproject?

16:19 chouser: (.foo nil) (pst) ;=> java.lang.NullPointerException java.io.PrintWriter.write (PrintWriter.java:399)

16:20 hiredman: (cause lein does that)

16:21 cemerick: hiredman: it allows you to change versions of or exclude dependencies for the project it's defined for, and all dependencies of that project.

16:21 * cemerick will stop speculating on what lein does and does not support :-)

16:22 degustibus: mrBliss: same thing...

16:22 also compilation doesn't work either

16:22 it says "Compiling..." and locks up

16:22 mrBliss: degustibus: which version of slime do you have?

16:22 degustibus: 2010-09-03

16:23 mrBliss: try installing slime and slime-repl 20100404 with ELPA

16:23 hiredman: rhickey: re clj-stacktrace http://osdir.com/ml/clojure/2010-08/msg01110.html

16:24 rhickey: hiredman: yes, I looked at the link above

16:25 degustibus: i will try that

16:25 hiredman: the link above is clj-stacktrace, my link is someone saying "hey, clj-stacktrace is neat, we should have it in clojure"

16:25 rhickey: chouser: NPE has null message

16:26 I'll add the class and that will take care of that

16:36 rainerschuster: some clojure-clr folks on the chan today?

16:39 rhickey: pst prints classnames

16:47 emh: is there an idiomatic way of catching exceptions that are wrapped in RuntimeException or do I just catch RuntimeException and check instance? with .getCause?

16:49 rhickey: emh: the latest clojure.repl has a root-cause which will walk down nested causes (other than CompilerExceptions)

16:50 emh: rhickey: thx

16:51 lancepantz: alexyk: ping

16:51 alexyk: lancepantz: pong

16:52 lancepantz: alexyk: when you were doing your serialization benchmarks, did you compare json jackson to c.c.json and clojure-json?

16:53 Anniepoo_: I'm trying to debug, I'd like to test the arity of a function I'm being passed. Is there a way to do that?

16:53 alexyk: lancepantz: I did mmcgrana's clj-json, based on jackson, only

16:53 and it was damn slow

16:53 lancepantz: yeah, thats what i was interested in

16:53 alexyk: so kinda no sense with the rest

16:53 lancepantz: really? slower than the pure clojure variants?

16:54 alexyk: lancepantz: no, the others are even slower

16:54 jackson rocks, but dynamic nature of clojure is such that apparently you can't get fast serialization unless you declare what and how

16:54 ocaml kicks ass so bad here

16:55 lancepantz: interesting

16:55 you should publish those numbers, i think alot would find them useful

16:55 LauJensen: alexyk: yea, blog!

16:55 lancepantz: seems to come up regularlly

16:56 * lancepantz needs a blog

16:57 alexyk: I have a domain even clojure.pro, for this, but no time :(

16:57 eventually

16:57 lancepantz: i keep coming up with these elaborate plans to write my own blogging software, which just creates too much resistance

16:57 LauJensen: lancepantz: yea, silly, considering Ive already done it for you :)

16:58 alexyk: lancepantz: no sense in that, I setup tumblr on my own domain, and it understands markdown, and you post github gists with code

17:00 lancepantz: LauJensen: did you write a blogging platform?

17:00 LauJensen: lancepantz: Well, micro-platform. bestinclass.dk. You can watch my latest screencast to see the blogging backend

17:00 rhickey: LauJensen: so, does pst do it for you?

17:01 lancepantz: i'll check it out

17:01 LauJensen: rhickey: It certainly looks like it

17:02 rhickey: Did you spend all this time on stacktraces today because I whined in here?

17:02 AWizzArd: rhickey: thanks for pst.

17:03 rhickey: LauJensen: the whining made me look at it. I spent time on it because the base behavior seemed worse than in the past - everything treated as a compiler exception

17:04 LauJensen: Oh ok - Well thanks a bunch!

17:05 rhickey: LauJensen, AWizzArd : chouser helped with some demunge code

17:05 LauJensen: Yea I saw - rhickey you yourself must be impressed by this community that has spawned around clojure. Impressive to see how things get done

17:07 lancepantz: it's interesting how quickly it happened

17:09 rhickey: lancepantz: there's not much to it, I wonder if it really will make a difference for people.

17:12 ssideris: wooohooo, just parallelized my program trivially (from map to pmap)

17:12 :-)

17:13 sorry, i know i didn't do anything impressive, but I've never written anything that uses all my processors at the same time in the past

17:13 Chousuke: pst looks neat

17:14 With old clojure stacktraces it was pretty difficult to see which part was java and which Clojure

17:14 ssideris: are you referring to this? http://github.com/mmcgrana/clj-stacktrace

17:15 Raynes: ssideris: http://github.com/clojure/clojure/commit/9c7566a42dc029b17cb1819ff00a8e802e4a1767

17:26 technomancy: I wonder why clj-stacktrace wasn't considered for Clojure itself; the response on the mailing list seemed very positive.

17:27 rhickey: technomancy: the author never attempted to put it in contrib afaik

17:28 technomancy: I'm not sure that would have helped much; for it to be really useful it would have to be used by clojure.test and clojure.main.

17:29 or do you mean for copyright assignment purposes?

17:29 rhickey: technomancy: if it started in contrib it could have been moved in with the other repl stuff

17:30 scottj: will this change have any effect on how backtraces are displayed in slime (break them?) or how compojure prints them to terminal?

17:31 technomancy: scottj: slime has its own hand-rolled, not-very-good backtrace printer.

17:32 but perhaps it could be improved to build on this

17:33 cemerick: Surely reimplementing widely-used libs just because they're not in contrib already isn't the best path?</rhetoricalComment>

17:33 rhickey: cemerick: what is the expectation then? If people want to improve Clojure they should contribute to it

17:33 meanwhile you have people advising others not to participate in contrib

17:34 rainerschuster: btw. interessted in clr contrib?

17:34 cemerick: rhickey: I don't know any of the specifics, but if clj-stacktrace is/was of high quality and met the requirements, some dialogue with Mark probably would have produced whatever assignments were necessary. *shrug*

17:34 * cemerick is mostly trying to save people (i.e. rhickey) time :-)

17:35 rhickey: cemerick: am I supposed to do that?

17:35 hiredman: rhickey: contrib as a giant ball of stuff some of which works and some of which doesn't even load without throwing exceptions seems like a bad idea

17:35 rhickey: hiredman: well, it's complain or fix it. Stuart Sierra has spent a bunch of time recently modularizing it. Anyone else could have at any time

17:36 cemerick: rhickey: the non-modular nature of contrib and the disconnection between original maintainers and "progress" in individual libraries were big problems. We'll see how the reorganization pans out in that regard.

17:36 hiredman: rhickey: I don't see that modularizing really changes the big ball of stuff nature

17:36 the big ball stuff has more to do with a big ball of stuff in source control

17:37 alexyk: how do we print clojure version in the repl?

17:37 dnolen: ,*clojure-version*

17:37 clojurebot: {:interim true, :major 1, :minor 2, :incremental 0, :qualifier "master"}

17:37 rhickey: hiredman: any aspect of that could be improved upon. But things are either in the project or not

17:37 alexyk: thx

17:38 chouser: ,(clojure-version)

17:38 clojurebot: "1.2.0-master-SNAPSHOT"

17:38 technomancy: I think the only reason Mark didn't make an effort to get clj-stacktrace integrated himself was that I only gave him the idea in the middle of the 1.2 feature freeze.

17:38 hiredman: rhickey: I think it would be better to just call certain projects "blessed" vs. everything has to be pulled into contrib

17:39 rhickey: technomancy: nothing that was done today is any big deal. If clj-stacktrace does something wonderful it can be submitted as patches.

17:39 technomancy: right or wrong I can sympathize with him for not wanting to get his code into contrib due to the bucket-o-stuff reputation it has

17:39 rhickey: hiredman: you can think that, but you can;t put together a project with clean provenance that way

17:39 chouser: hmph. I'm really proud to have code in contrib. when did it get a bad rep?

17:39 Raynes: What he said.

17:39 cemerick: hiredman: the fact that contrib is under the clojure "group" has significance legally.

17:40 technomancy: rhickey: good to hear; I was just wondering aloud because of the lack of an official response on the mailing list thread

17:40 alexyk: chouser: thx

17:40 rhickey: do you think apache projects build on random stuff from people's github repos? or postgresql?

17:40 cemerick: chouser: As am I, but until recently, it was impossible for authors to advance their contributions independently of the clojure release schedule.

17:41 rhickey: technomancy: I'm sorry I missed that thread

17:41 technomancy: rhickey: np; in retrospect clojure-dev would have been a better place for it

17:42 rainerschuster: uups, i'm sorry, posted the same answer in the groups two times

17:42 chouser: cemerick: oh, this is a release version numbers thing again, isn't it.

17:42 danlarkin: what's the difference where the the code lives, if they assign copyright, or usage rights to Clojure, then that's that

17:42 technomancy: I have them both filtered into the same location, so I forget that there are separate mailing list sometimes.

17:42 hiredman: rhickey: I suppose I can understand that, but it doesn't make my think any better of contrib

17:42 cemerick: chouser: Roughly, yes. Apparently, now contrib authors can commit breaking changes (if they so choose), which aren't automatically pulled into contrib/master.

17:43 rhickey: hiredman: have you ever submitted patches to improve contrib?

17:43 cemerick: I've almost stopped following the main list entirely. It's impossible to track consistently.

17:43 hiredman: not that I recall

17:44 defintely nothing related to project structure

17:44 rhickey: the fundamental idea behind contrib was it was an area where the community could contribute. It has never been and will never be any more or better than the sum of the efforts of the community. Anyone who thinks it is broken can fix it

17:46 yes, it is easier to work off in your own corner, but you can't then look up and be disappointed your stuff isn't part of the project

17:47 alexyk: dnolen: with all those trailing spaces now red in TextMate, is there a command to trim them all?

17:48 dnolen: alexy: trailing spaces in the textmate bundle? yeah I haven't had a chance to cleanup the white space.

17:48 alexyk: dnolen: clojure bundle highlights them in red, which is useful to kill them. I just wonder if there's a TextMate snippet to do that already

17:50 dnolen: alexyk: probably, I'm planning on doing a bit of cleanup, also have a bunch of updates from franks42

17:51 alexyk: dnolen: cool, I'll have git pull at the ready :)

17:51 dnolen: alexyk: have you been using it? how's it working out for you?

17:52 alexyk: dnolen: restarted today, we'll see

17:52 cemerick: rhickey: There will almost certainly be times in the future where a well-tested, non-contrib lib will save you gallons of sweat and blood. I don't have any good answers re: who should go looking for such libs. Just something to think about. :-)

17:53 * dnolen with all the new goodies in 1.2.0 core, is quite happy with the fruits of contrib.

17:54 rhickey: cemerick: I have thought about it, thus the CAs and everything else. It's the authors of those libs who haven't thought about it, i.e. if they had similar CAs they'd have the ability to contribute it to Clojure (or anyone else, like Apache) cleanly. If they take patches from random people on github then they are screwed

17:54 rainerschuster: how can i run clojure-clr on a STA thread (for WPF usage)

17:54 ?

17:55 technomancy: dnolen: same here, except now that now that we have clojure.java.io I don't need contrib

17:55 rhickey: rainerschuster: you might try contacting David Miller directly about specifics like that

17:55 rainerschuster: thx

17:56 dnolen: technomancy: what about prioritymap ? what about fingertrees when they're ready. I still wanna see a good datalog tutorial, etc.

17:56 rainerschuster: (rhickey): is it part of the CA?

17:56 rhickey: rainerschuster: ?

17:57 rainerschuster: Contributor Agreement

17:57 rhickey: rainerschuster: is what part of the CA?

17:57 rainerschuster: clojure-clr

17:57 rhickey: rainerschuster: yes, fully

17:57 rainerschuster: so i should send in a signed one

17:58 rhickey: rainerschuster: yes, must do before contributing to clojure-clr

17:58 chouser: I've been developing finger-trees outside of contrib because of how speculative it was when it started. Will a git repo with all commits attributed to me be clean enough to hand over to clojure or contrib later?

17:59 rhickey: chouser: yes, you can always submit something that is completely your own work, and in fact you assert that it is so in your CA

17:59 cemerick: rhickey: such situations can't be remedied after the fact, assuming all the participants are on board?

17:59 ninjudd: rhickey: so are you suggesting that everyone who has a clojure project on github require contributors submit a CA?

17:59 rainerschuster: (rhickey): seems like you got a new contributor (i'm neither fast nor have enough time, but i'll try helping porting) no promises as allways. I'm bloody new to clojure

18:00 rhickey: cemerick: going after that later is a huge hassle

18:01 chouser: a lot of stuff on github has no aspirations to be integrated into anything larger

18:01 technomancy: it was very easy to relicense swank-clojure despite having 30+ contributors

18:01 chouser: technomancy: I think it gets harder as email address start becoming invalid

18:01 rhickey: ninjudd: I think anyone that has a library that takes patches from someone else without some sort of agreement is naive and foolish. At best, they are permanently locking themselves into a particular license, and at worse, precluding widespread use of their work.

18:02 * Raynes is naive and foolish.

18:03 ninjudd: rhickey: so is there any way for clojure github authors to reuse the work you've done in collecting CA's? or does every project have to maintain a separate set of CA's?

18:04 hiredman: ninjudd: cas are for a particular project

18:05 shoover: rainerschuster: when I ran a WPF app, I had to create my own thread and call SetApartmentState on it

18:06 rhickey: it would be useful if github would set up a universal CA, every user granting the CA rights to every project owner whose projects they contributed, but with only a single agreement. Until then it's one per project

18:06 rainerschuster: (shoover): thx, so there is a ned for a run-in-sta func?

18:06 ninjudd: would it be possible to collect CAs online to reduce the friction for this kind of thing?

18:06 rhickey: hehe. just what i was thinking

18:06 shoover: rainerschuster: that would be one way to do it

18:07 rhickey: ninjudd: I haven't looked into how to make that legally sound

18:08 shoover: rainerschuster: and you have to use the gen-delegate macro to create your ThreadStart to launch the thread

18:08 cemerick: ninjudd: http://twitter.com/cemerick/status/24046944800 ;-)

18:08 rainerschuster: (rhickey): is there a way to email it, or do i have to send it the long road (from germany)

18:08 ninjudd: rhickey: i guess i had always assumed that there was an implicit CA for patches you submit to someone else's project on github.. i suppose that's what you meant by naive

18:08 cemerick: Signed PDFs are fully legit, legally.

18:09 mcav: cemerick: signed as in pen-scribbled PDF, or signed as in type-name-in-box PDF?

18:09 cemerick: mcav: signed as in, using Acrobat's document-signing tools.

18:09 open source folk probably don't have Acrobat Pro laying around, though

18:10 rhickey: cemerick: who has those (besides you)?

18:10 cemerick: rhickey: They're baked into Acrobat Pro. Foxit may actually support it as well.

18:10 ninjudd: what about sending a high res photo of the signed agreement? it works for cashing checks...

18:11 cemerick: Adobe has its own central authority for such things, which the feds, IRS, state gov'ts etc. have all accepted.

18:11 arohner: is there a fix for slime eating parts of exception messages?

18:11 rhickey: cemerick: I meant who as in people, not tools

18:11 arohner: that is, slime not printing 100% of the text that you'd see at the repl

18:11 cemerick: rhickey: If Acrobat Pro is the only avenue, then very few, and likely no developers.

18:12 rhickey: cemerick: right

18:12 * cemerick wasn't actually suggesting using Acrobat's signing tools for a CA repository :-)

18:12 dakrone: rhickey: only the person who creates the original document needs Pro, anyone with Adobe Reader can CA-sign a document

18:12 rhickey: far more people have submitted CAs than have tangibly contributed, so I don't think the CA is the impediment

18:13 * cemerick hangs his head in shame at not knowing everything about acrobat

18:13 rhickey: dakrone: that's interesting

18:13 shoover: cemerick: I have it, but I only know about one feature that I needed at the time

18:13 cemerick: and I don't have a lot of shame about that :)

18:13 rhickey: cemerick: I would love something like that (Adobe signing), not trying to shoot it down

18:14 rainerschuster: i'm chossing the oldfashioned way. 6€ will be affordable

18:14 rhickey: dakrone: I wonder why I don't see more documents set up for signing like that then

18:14 cemerick: shoover: no shame to it at all :-)

18:15 hiredman: I usually use latex to overlay a svg of my signature on a pdf

18:15 ninjudd: rhickey: not for clojure, but i think it would more of an impediment for library patches. people are used to finding a bug, fixing it, and submitting a pull request. if they get an email back from the author asking them to sign and mail in a document, there will be a not insignificant drop off...

18:15 shoover: cemerick: and if you have Acrobat Pro you probably have Illustrator and Photoshop and no programmer should plumb all those depths

18:16 rainerschuster: (rhickey): why do you have to use this kind of agreement. aren't there any such licenses out there?

18:16 dakrone: rhickey: google uses it for people signing their NDAs

18:16 rhickey: hrm "† For ad hoc form distribution and data collection for up to 500 people."

18:17 cemerick: shoover: I only have the first, but then I'm in a special situation :-)

18:18 lancepantz: cemerick: maybe you should implement online document signing in your pdf startup :)

18:18 technomancy: accepting scanned signed papers would be a step up from requiring actual postal mail IMO

18:19 cemerick: lancepantz: We don't touch the signing stuff at all, probably never will. You need Adobe's keys to do so (which we could get, but would then be fried by the DMCA).

18:19 But, Snowtide's been around since 2001, not quite a startup.

18:19 lancepantz: i was referring to docuharvest

18:19 cemerick: ah

18:19 same thing applies, unfortunately :-)

18:20 mcav: agreed with technomancy -- even if you don't mess with acrobat, scanning the sheet in would be much better

18:20 cemerick: technomancy: Only faxed materials have force of law IIRC.

18:20 lancepantz: damn proprietary software :)

18:20 rainerschuster: (shoover): thx for sharing https://gist.github.com/193876/aa65c14f21159ac339b8980ec803c218b88e6b87

18:20 cemerick: yes, damn that proprietary software! Uh, wait...

18:20 :-D

18:21 technomancy: cemerick: wow, quite silly... but par for the course when it comes to US tech law I guess.

18:21 ninjudd: cemerick: but i can send a fax from my scanner to your email without ever using a fax machine

18:21 lancepantz: hahaha

18:22 arohner: cemerick: I don't believe that's correct. The law was updated to allow for digital signatures, and checkboxes

18:22 cemerick: technomancy: FWIW, we do scanned contracts all the time, and so do a lot of others. There's case law supporting that, so most people feel safe enough with it. Only faxes have any statutory position.

18:22 That's all IIRC.

18:22 arohner: cemerick: so MegaCorp's EULA has legal force

18:22 cemerick: arohner: True, though that doesn't do much for something like a CA.

18:23 Case law has been pretty tough on EULAs over the years, though, especially where there are onerous terms.

18:23 arohner: cemerick: yes, but that's about the EULA itself, rather than the enforceability of a checkbox

18:26 cemerick: aha, I see what you're saying. This was helpful for me: http://en.wikipedia.org/wiki/Electronic_signature

18:27 apparently, there are legally binding signatures that don't hold up in court if contested

18:29 cemerick: Of course, most contracts are *never* tested. Everyone behaves themselves pretty well, fundamentally. One of the things that gives me hope for the human race. :-)

18:48 mabes: anyone know if it is possible to have leiningen exclude a source file from jar/uberjar? We have a user.clj in source for dev purposes..

18:58 technomancy: mabes: put it in test-resources rather than src/

18:59 mabes: technomancy: oh, nice. I'm assuming that is on the classpath then. good to know about. thanks!

18:59 technomancy: np

18:59 I knew I accepted that patch for a reason.

19:27 joshua-choi: In your experience, does the apply function ever become a performance bottleneck?

19:28 (Which is tantamount to if dispatching a function by its arity is ever a limiting factor.)

19:31 I'm wondering about this in relation to memoize, which wraps a function in a (fn [& args] ... (apply f args) ...).

19:35 wtetzner: i've never noticed a performance problem with apply

19:36 joshua-choi: What about packing arguments, like with [& args]? memoize does that too.

19:37 I'm worried about wrapping functions in multiple "general" functions (not just memoize) that do different things but all are similar to: (fn [& args] ... (apply f args) ...).

19:37 Ah well, perhaps I'm prematurely optimizing

19:37 wtetzner: i wouldn't worry about it too much

19:37 apply should be fine

19:37 joshua-choi: What about [& args], which seems to create a new vector every time?

19:38 wtetzner: nah, it uses javas variadic argument system

19:38 i believe

19:38 joshua-choi: Oh, really? & args doesn't create a new object for args? How does that work?

19:38 wtetzner: and creating a new vector is cheap

19:39 joshua-choi: Well, yeah, that's true

19:39 Thankfully

19:39 It's just that this is going to happen a *lot*.

19:40 wtetzner: still, i use & args all the time and haven't noticed any performance problems

19:40 the only time i've noticed function call overhead to be a performance problem is in cases where you're calling java methods

19:41 and the reflective calls are too expensive

19:41 but type tags solves that

19:41 joshua-choi: Yeah. Reflection isn't related to this. But it's very impressive on Rich Hickey's part if [& args] and apply don't make bottlenecks.

19:42 tomoj: joshua-choi: ey! cat or hound for jbo, you think? playing around trying to make sense of fnparse.

19:42 joshua-choi: Lojban?

19:42 tomoj: guessing cat since terminators etc are weird

19:42 joshua-choi: Yeah, Cat.

19:43 The existing parsers use packrat parsers too.

19:43 But mine will be able to do left recursion directly!

19:43 And there's a lot of left recursion in that language.

19:43 tomoj: will be pretty exciting

19:43 joshua-choi: But I'm not working on that right now; I'm fixing a bug in FnParse proper. But I've got to go now

19:43 See you all

19:43 hiredman: [& args] certainly does not use java's varadic args stuff

19:43 tomoj: yeah, just toying around myself trying to do morphology

19:45 wtetzner: oh right, AFn has methods taking up to 20 args before using java's variadic args

19:46 so [& args] just creates a seq over those args?

19:50 joshua-choi: That's amazing

19:51 I vaguely recall Clojure functions having some high limit on their parameters

19:51 hiredman: no

19:51 joshua-choi: Okay then

19:51 hiredman: [& args] has nothing to do with java varadic args

19:51 joshua-choi: tomoj: I've already written a parser for morphology. It's done. It's unfinished on sentence structure now

19:51 hiredman: How does [& args] work then? Does it simply construct an actual vector?

19:52 tomoj: :O

19:52 hiredman: the invoke overloads you see in IFn with varadic args are used for twenty args passed to a clojure function

19:52 wtetzner: right, but the fact that AFn has the methods going up to 20 args means it can't be using java's variadic args

19:52 hiredman: no

19:52 those aren't used for [& args] either

19:53 those are used for [a b c d e f g h i j k l m n]

19:55 wtetzner: ah, i see

19:55 RestFn

19:56 so it uses a switch to find the right arity (the stuff before &), and then creates an ArraySeq on the remaining args

19:57 hiredman: it can't be an arrayseq, since [& args] supports passing infinite seqs

19:59 wtetzner: it does?

19:59 hiredman: yes

20:00 ,(apply (fn [& args] (first args)) (iterate inc 0))

20:00 clojurebot: 0

20:03 wtetzner: ,(ancestors (fn [x & xs] (first x)))

20:03 clojurebot: nil

20:03 hiredman: ancestors takes a class or something that is part of a hierarchy

20:03 wtetzner: ,(ancestors (class (fn [x & xs] (first x))))

20:03 clojurebot: #{clojure.lang.Fn java.util.concurrent.Callable clojure.lang.IMeta java.lang.Runnable java.io.Serializable java.util.Comparator java.lang.Object clojure.lang.IObj clojure.lang.RestFn clojure.lang.AFunction :clojure.contrib.generic/any clojure.lang.AFn clojure.lang.IFn}

20:06 wtetzner: well, if a finite number of args are passed in, an ArraySeq is created

20:07 at least, if the invoke methods in RestFn aren't overridden

20:22 chouser: I[& xs]

20:23 joshua-choi: Does this error mean anything to you all? "java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined: clojure.lang.Delay@4631c43f"

20:23 chouser: I've never noticed a performance issue with [& xs], but I have gotten some gains in some code bases by getting rid of apply calls

20:23 joshua-choi: that sounds like a macro is returning something unusal.

20:24 joshua-choi: Hmm

20:24 chouser: oh, a delay

20:24 joshua-choi: Yeah, delays are involved

20:25 Mmm, can I paste a short stacktrace here?

20:25 May I, I mean

20:25 chouser: (defmacro foo [] (delay 5)) (defn bar [] (foo)) ; generates an error

20:25 joshua-choi: best to use lisppaste or gist for stack traces

20:26 but by all means -- they're often helpful.

20:26 kencausey: paste.lisp.org

20:26 joshua-choi: Heh, I'm not familiar with either of those, unfortunately; I'll try, though

20:26 kencausey: you will have to paste in the link yourself, the lisppaste bot is away at the moment.

20:27 joshua-choi: http://gist.github.com/572824

20:30 chouser: do you get the same error with my foo/bar post above?

20:31 what's at hound.clj line 427?

20:31 joshua-choi: Yes. I'll go see if my system contains something like that.

20:31 Yes, a macro call is at 427, but what puzzles me is that that macro does not contain a direct delay call.

20:31 The macro does contain a function call that contains a delay call.

20:31 yayitswei: question: what's the idiomatic way to count all non-nil values in a list?

20:31 chouser: well, if expands to anything that includes a delay, it won't work.

20:32 joshua-choi: Hmm, perhaps a delay is getting into the macro-time

20:32 Yes

20:32 Well, I'll check for that; thanks for the tip

20:32 However, a puzzling thing is...

20:32 the macro called at 427 is already called earlier in the file, with no error.

20:33 That's really puzzling me.

20:34 yayitswei: or rather, count all non-nil atoms

20:34 I have this so far, but I think it can be shortened:

20:34 (count (filter (complement #(nil? %)) (flatten alist)))

20:36 chouser: for filter/complement see remove

20:36 tomoj: also note that #(nil? %) is the same as nil?

20:36 chouser: ,(count (remove nil? [1 2 nil 4 5]))

20:36 clojurebot: 4

20:37 yayitswei: oh, perfect

20:37 thanks, chouser!

20:38 tomoj: should I be worried yet about getting clojure-conj tickets?

20:40 chouser: tomoj: dunno, but I bet they'll sell out

20:40 plane ticket prices are starting to go up already. apparently the unprecedented demand for flights to Durham.

20:42 hiredman: uh oh

22:43 lancepantz: ,(defmulti foo (partial (comp type first)))

22:43 clojurebot: DENIED

22:43 lancepantz: -> (defmulti foo (partial (comp type first)))

22:43 sexpbot: java.lang.SecurityException: Code did not pass sandbox guidelines: ()

22:43 lancepantz: :(

22:45 wwmorgan: lancepantz: why is the partial there?

22:46 lancepantz: looks like i don't need it

22:47 slyrus: argghhh! the tabs! they're killing my eyes!

22:47 lancepantz: #(type (first %)) is equivalent to (comp type first)?

22:48 wwmorgan: ,((comp type first) ["foo" :bar]) ; Looks good to me

22:48 clojurebot: java.lang.String

22:50 lancepantz: weirdness, C-x C-e doesn't update defmulti's?

22:51 wwmorgan: lancepantz: a lot of people are running into that. It's new behavior in 1.2. defmulti now has defonce semantics

22:51 lancepantz: ah!

22:51 that's what threw me

22:51 wwmorgan: If you do (def foo nil) then you can evaluate the defmulti to do what you want

22:53 lancepantz: strange, that clears it, but i still have to paste the defmulti sexp to my slime repl

22:55 wwmorgan: whoops, yep. You have to ns-unmap the symbol. (ns-unmap *ns* 'foo)

22:55 cemerick: wwmorgan: are you using *emacs* of all things?!? :-O

22:55 ;-)

22:57 wwmorgan: cemerick: just guessing. I met my environment halfway and learned vimclojure

22:57 cemerick: wwmorgan: that sounds more believable

Logging service provided by n01se.net