#clojure log - Feb 02 2010

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

0:10 qed: technomancy|away: Woohoo! So happy to see a formatted project.clj in 1.1.0-SNAPSHOT of leiningen

0:11 technomancy: qed: oh, from lein new?

0:11 yeah, we ended up just doing it with strings instead of serializing a list since pretty-printing wasn't exactly ... pretty for that case

0:18 qed: technomancy: is autodoc broken right now?

0:18 (from HEAD)

0:19 technomancy: [null] #<CompilerException java.lang.ExceptionInInitializerError (json.clj:15)>

0:19 [null] Make sure autodoc is added as a dev-dependency in your project.clj.

0:34 technomancy: do you now need to specify :namespaces -- before I just left it out and it seemed to pick up on what I wanted to AOT without it

0:37 hiredman: lein used to AOT everything, now it doesn't

0:43 qed: hiredman: k thanks

0:44 hiredman: do you know when all the contrib changes are going to go into effect?

0:44 1.1.2?

0:44 clojurebot: 5 (for large values of 2)

0:44 qed: k thanks

0:46 hiredman: one more question: is (:gen-class) a requirement (in general) for AOT compiled nses?

0:47 technomancy: qed: autodoc works for me

0:47 did you run lein deps after adding it to project.clj

0:48 qed: :gen-class is required for some AOT uses, but not all

0:49 qed: technomancy: yes i ran lein deps

0:49 im using autodoc from clojars

0:50 :dev-dependencies [[swank-clojure "1.1.0"] [autodoc "0.7.0"]]

0:54 technomancy: qed: odd... can't reproduce here

0:54 why's the stack trace mention json.clj:15 though? looks suspicious

0:55 qed: technomancy: im...not sure

0:58 technomancy: could this have anything to do with needing to explicitly AOT namespaces now whereas before i didnt need to?

1:00 technomancy: qed: no, autodoc doesn't need any compilation

1:00 replaca: qed: do you use json in your code?

1:03 qed: replaca: no, none

1:04 (ns blah.core (:gen-class) (:use clojure.contrib.duck-streams)) (defn -main "Moving on up..." [& args] (println "to the east side..."))

1:04 then in project.clj :namespaces [blah.core], :main "blah.core"

1:05 the rest is boilerplate

1:05 oh and i have [autodoc "0.7.0"]

1:06 replaca: qed: does removing either ":namespaces" or ":gen-class" help?

1:08 qed: replaca: no

1:08 replaca: keep in mind this is the HEAD of the git repo

1:09 replaca: qed: for autodoc, leiningen, contrib or clojure?

1:09 qed: sorry -- leiningen

1:10 replaca: ahh, interesting

1:10 let me test that here

1:10 qed: for some odd reason i just ran lein deps and hadn't changed a thing and it pulled down enlive

1:10 replaca: well, autodoc requires enlive

1:11 what TZ are you in?

1:11 qed: CST

1:11 why do you ask?

1:11 replaca: yup, maven (and thus leiningen) gets new stuff at midnight

1:11 qed: midnight CST? PST?

1:11 replaca: maybe cristophe updated something on clojars yesterday

1:12 midnight local

1:12 which was 11 minutes ago for you

1:12 qed: what would he have touched?

1:12 replaca: this was broken like an hour ago

1:12 replaca: I have no idea

1:12 qed: but the enlive popping up makes sense

1:12 replaca: did the enlive pull seem to fix it?

1:12 qed: no :\

1:12 vu3rdd: I am trying to create a debian package of clojure-contrib

1:13 replaca: qed: ok, i'll have a go

1:13 qed: thanks replaca

1:13 vu3rdd: I need to use a locally built copy of clojure.jar instead of the one from build server.

1:14 replaca: qed: so your running leiningen against lein-1.1.0-RC1?

1:14 *you're

1:14 qed: vu3rdd: pull the repo and ant build -Dclojure.jar=path/to/clojure.jar

1:14 replaca: no i pulled the git repo

1:14 err well yes and no

1:14 im under the impression they're practically the same thing

1:14 replaca: right, but when I do lein install on the latest, that's what I get

1:15 qed: technomancy didnt seem to mind when i said that

1:15 replaca: ok

1:15 vu3rdd: qed: I tried that, but it always seem to pull the jar from the repositories

1:15 qed: Leiningen 1.1.0-SNAPSHOT on Java 1.6.0_17 Java HotSpot(TM) 64-Bit Server VM

1:15 vu3rdd: mvn -o -e -Dclojure.jar package is what I used

1:16 qed: maybe i should blow away .m2 and see what happens?

1:16 replaca: dunno

1:16 qed: ill try it

1:16 cant hurt i guess

1:17 replaca: did you run it as "lein autodoc"?

1:17 qed: yes

1:17 vu3rdd: qed: yes, that's what I also did

1:17 here is the log

1:17 http://paste.lisp.org/display/94239

1:18 qed: vu3rdd: i dont think you want 1.2.0 do you?

1:18 replaca: vu3rdd: did you add build.clojure.org to your maven sources?

1:19 vu3rdd: qed: I am trying to build clojure and clojure-contrib from the master

1:19 I really don't need them.

1:19 qed: replaca: what's your lein-stable version

1:19 im 1.0.1

1:20 vu3rdd: replaca: No, I didn't. I just downloaded the sources from git, installed maven2 (apt-get install maven2) and ran the maven with -o and -Dclojure.jar

1:21 replaca: qed: what's lein-stable?

1:21 vu3rdd: my intension is to package clojure-contrib for debian and debian strictly requires that all the dependencies are resolved within debian itself

1:21 qed: when you use bleeding edge lein you're supposed to symlink to the checkout's bin/lein

1:21 vu3rdd: http://wiki.debian.org/Java/MavenRepoSpec

1:21 qed: and use lein-stable deps on the checkout

1:22 replaca: qed: ahh

1:22 qed: see Hacking

1:22 in the leiningen readme

1:22 (at the bottom)

1:22 replaca: mine was 1.0, I think

1:25 qed: replaca: i did a complete rebuild

1:25 im still getting the same issue

1:25 oh well it can wait for now

1:27 replaca: qed: ok, I've gotta walk the dog anyway, i'll keep poking and see if I can reproduce

1:30 vu3rdd: qed: if you get time, would you mind hosing your ~/.m2 and trying a local build with the -o option (or without it) and see if it still downloads the clojure-XXX.jar file?

1:31 replaca: qed: what versions of clojure and contrib do you have in your project.clj

1:31 ?

1:38 qed: org.clojure/clojure "1.1.0" and org.clojure/clojure-contrib "1.1.0"

1:40 replaca: this is probably something so stupid

1:49 replaca: qed: hmm, looks like it works for me too, trying your exact recipe

1:49 qed: weird.

1:49 i just removed my .swank-clojure directory

1:49 now how do i get that back

1:50 M-x clojure-install just tells me to see swank-clojure

1:53 there we go -- just needed an emacs restart it looks like -- also reinstalled slime-repl and slime through ELPA

3:07 LauJensen: Morning crew

3:11 vu3rdd: LauJensen: Good morning

3:12 LauJensen: Morning

4:06 eevar2: could someone ban the zombie?

4:13 LauJensen: Which zombie?

4:14 Raynes: LauJensen: The ugly one.

4:14 LauJensen: Get a grib redneck

4:14 s/b/p

4:14 Raynes: :p

4:14 eevar2: dmiles_afk (~dmiles@c-24-16-245-211.hsd1.wa.comcast.net) -- zombie as in compromised

4:15 *box

4:15 LauJensen: How do you know?

4:16 eevar2: * dmiles_afk has quit (Excess Flood) * 10+ during the short time i've been in here

4:16 LauJensen: Oh - Please alert the Freenod staff

4:16 s/nod/node

4:17 eevar2: did the same thing all yesterday as well, with a different nice. but he seems to be gone now

4:17 *nick

4:18 Raynes: eevar2: You're either observant, or very board like all the time.

4:18 LauJensen: eevar2: Raynes recommends burning a few tires in the backyard to pass time

4:19 * Raynes chuckles quietly.

4:19 * Raynes reads his drivers manual again, considering he has just under 2 hours and 30 minutes to do so.

4:20 Raynes: I think I scared him away.

4:24 eevar2: Raynes: hard to miss the channel containing nothing but joins/parts from a single person if you have those messages enabled

4:24 Raynes: Fair enough.

4:28 Today's my birthday. :D

4:29 eevar2: congrats

4:30 Raynes: <3

4:36 esj: Happy Birthday Raynes

4:36 Raynes: esj: Thanks. <3

4:43 esj: your 18th ?

4:44 can't be - but its your birthday and you're apparently taking a drivers license test

4:45 Raynes: esj: 16.

4:46 esj: congrats - 16 is nice.

4:47 unfo-: (self (feel "really old"))

4:47 Raynes: esj: Indeed, if only because I can get a standard license this year.

4:47 esj: unfo-: you and me both :)

4:56 zaphyr: hmm, can i destructure a deftype in an argument list?

4:59 AWizzArd: zaphyr: rhickey explained this to me a few days ago, so I remember: if you add the clojure.lang.IPersistentMap interface you can call keys on your instance.

4:59 Otherwise you can use Java reflection (look at the class “Class”).

5:00 But it would be nice if rhickey would add (maybe in the upcoming clojure-in-clojure compile) some Clojure specific reflection.

5:00 a_strange_guy: zaphyr: it works flawlessly even without IPersistentMap

5:00 AWizzArd: Because using Class to get all fields will result in a lot more info than we are interested.

5:01 zaphyr: Ahh, both answers are extremely useful in my situation, so thanks guys :)

5:02 hm, is deftype definately going to be in 1.2?

5:02 because it's really really handy :)

5:03 AWizzArd: a_strange_guy: you mean (deftype Foo [a b c]), (keys (Foo 10 20 30)) ==> (:a :b :c)? I get a “Don't know how to create ISeq from: user.Foo__1907”.

5:03 zaphyr: AWizzArd: yeah, that's what I ran into

5:03 AWizzArd: zaphyr: I think it is very likely to stay in Clojure. Rich put lots of work into it and it is very useful. No reason to not include it.

5:04 a_strange_guy: well but (let [{x :x y :y z z:} (Foo 1 2 3)] .... ) works fine

5:04 AWizzArd: yes, a_strange_guy, this is correct

5:04 I just understood that zaphyr did not know which slots are in his objects.

5:05 a_strange_guy: AWizzArd: I probably missed the first part of the question ;-)

5:05 zaphyr: xD

5:05 i am completely new to clojure. things explode for me in strange ways

5:06 do I get the guarantee that if i say (:x myType) that with the right hints it will expand to a direct member access in the jvm?

5:06 AWizzArd: a_strange_guy: it’s also possible that because I had the question (which I just answered) myself some days ago, and thus perhaps preferred an interpretation which makes it seem that I was not the only one with that challenge ;)

5:07 zaphyr: (and by extension within destructuring)

5:07 a_strange_guy: zaphyr: I think that it will be JITed to tirect access

5:08 zaphyr: okay, thanks

5:08 a_strange_guy: zaphyr: destructuring uses clojure.core/get, so that may be slower

5:09 zaphyr: hmm, right. well, one day, when i've spent less than 2 days playing with clojure I'll dig deeper into the compiler :)

5:09 a_strange_guy: However with the new Direct binding this probably is faster than before

5:09 zaphyr: Direct binding? is that an exposed interface, or going on underneath in the compiler?

5:10 a_strange_guy: zaphyr: this means, that functions from clojure.core/ are faster

5:10 zaphyr: hehe, that sounds lovely :)

5:11 a_strange_guy: but you cannot rebind them dynamically (the 'binding special form)

5:12 zaphyr: ahh, but that's still a sound design I'd say

5:12 I'm extremely impressed with clojure so far, considering its relatively new age, it's definately going places. ty rhicky :)

5:13 and. generally thanks for all the help and patience i've recieved here over the past couple of days, without which I'd still be floundering

5:21 a_strange_guy: does anyone know how to revent Functions from core to be bound directly?

5:21 ^prevent

5:23 somejan: I've been struggling with that also, but (:refer-clojure :exclude [short-array test partition]) in my ns does the job for me

5:23 maybe (:refer-clojure :only []) (untested)

5:23 ,(set! *warn-on-reflection* true)

5:23 clojurebot: java.lang.IllegalStateException: Can't change/establish root binding of: *warn-on-reflection* with set

5:24 a_strange_guy: no, I dont mean how to prevent them to be referred into the current ns

5:25 hiredman: oh

5:25 a_strange_guy: I kinda miss doing evil stuff like (binding [println (constantly nil)] ...)

5:25 hiredman: you can set :private to true in the var metadate

5:26 a_strange_guy: to supress output in my own code as an example

5:26 hiredman: oh

5:26 "dont"

5:27 * hiredman goes to bed

5:30 Chousuke: a_strange_guy: I think that's still an open question

5:31 a_strange_guy: the current behaviour seems to be prematurely optimized

5:31 Chousuke: a_strange_guy: as far as I know, direct binding is enabled so that people will complain if something breaks :)

5:31 in order to know what needs to be done

5:32 a_strange_guy: it does certanly break my "evil" rebinding magic XD

5:35 how about something like #^{:direct true} (any call in lexical scope in this form is bound directly)

5:35 then you could "annotate" the speed critical parts of your code

5:36 Chousuke: I think it's better to have it be opt-out instead

5:36 a_strange_guy: just like typehints work already

5:37 Chousuke: I suppose the problem is that you can't affect already compiled code. :/

5:38 hiredman: right, without putting costly checks in the bytecode :(

5:40 a_strange_guy: I just dont see direct binding a sane default

5:40 because mutually recursive functions (or declared functions) cannot be directly bound

5:42 hiredman: it is currently only the default for clojure.*

5:43 but yes, I would prefer opt-in too

5:45 a_strange_guy: the current situation is that I cannot tell how my own code is compiled without looking at my dependencies in core

5:45 so functions from core are compiled with fast calls

5:46 Chousuke: calls TO functions in core are statically bound

5:46 a_strange_guy: and my functions that use them as well

5:46 Chousuke: no.

5:46 calls to your own functions are still dynamically bound

5:48 hiredman: Chousuke: directly bound?

5:48 a_strange_guy: that is true, but i meant that if my own Function uses c.core/print i cannot override the use of print

5:49 Chousuke: hiredman: same thing

5:49 a_strange_guy: indeed.

5:49 a_strange_guy: but you can easily work around that by using your own print function

5:49 AWizzArd: hiredman: you are still awake :)

5:49 hiredman: AWizzArd: :P

5:50 LauJensen: Raynes: Congratz :)

5:50 hiredman: Chousuke: I'd prefer we pick one terminology and stick with it

5:50 AWizzArd: hiredman: btw, one possible solution for the challenge I stated yesterday, about a lock around a dosync:

5:50 Chousuke: hiredman: I'm not even completely sure what the terminology is

5:50 hiredman: Chousuke: *shrug* make something up, just be consistent

5:51 AWizzArd: instead of locking it this dosync could go into an agent. And all threads add their transaction job to the agents queue, which will work off the dosyncs. They can never collide this way and block each other out.

5:51 spariev__: Raynes: my congratulations :) have you finally got the joy Of Clojure book :) ?

5:51 Raynes: spariev__: I didn't get a chance to order it last night. I'll be getting it when I get home later.

5:51 Chousuke: AWizzArd: why would you need dosyncs then though?

5:51 Raynes: And thank you. LauJensen, as well.

5:51 Chousuke: AWizzArd: if all transactions are serialised

5:52 hiredman: AWizzArd: I can't say why, but I find that unsatisfactory, something is just not right

5:52 AWizzArd: Chousuke: interesting point.

5:53 hiredman: it would be nice of course if dosync offered some hooks.

5:53 hiredman: I think you are making it too complicated

5:54 hmm

5:54 AWizzArd: When I’ll release the code in some weeks we can see if things can be improved.

5:55 but it is worth to think about what Chousuke innocently mentioned :)

5:57 caljunior: ,(let [(symbol "foo") "bar"])

5:57 clojurebot: java.lang.Exception: Unsupported binding form: (symbol "foo")

5:58 AWizzArd: ,(class (symbol "foo"))

5:58 clojurebot: clojure.lang.Symbol

5:58 caljunior: is there a way to bind dynamically created sybols?

5:58 AWizzArd: let expects a Var

5:58 caljunior: symbols

5:58 AWizzArd: caljunior: macros

5:58 Chousuke: AWizzArd: it expects a symbol :P

5:59 but (symbol "foo") is not a symbol :)

5:59 AWizzArd: yes, you are right

5:59 let is a special form of course

5:59 caljunior: ,(symbol? (symbol "foo"))

5:59 clojurebot: true

5:59 caljunior: yes it is a symbol

5:59 AWizzArd: caljunior: let does not evaluate its argument

5:59 let is a special symbol

5:59 it is a list

5:59 Chousuke: caljunior: you're confusing some things here

5:59 AWizzArd: ,(class '(symbol "foo"))

5:59 clojurebot: clojure.lang.PersistentList

5:59 Chousuke: caljunior: (symbol "foo") is a list

6:00 caljunior: foo is a symbol

6:00 caljunior: right

6:00 Chousuke: when *evaluated*, (symbol "foo") produces foo

6:00 AWizzArd: Chousuke: your performance to day is particular good :-)

6:00 caljunior: can I force it to evalute with something like eval?

6:00 Chousuke: caljunior: in a way, yes.

6:00 AWizzArd: caljunior: you can use a macro

6:01 Chousuke: caljunior: you need to dynamically construct a data structure representing the let form and then eval that

6:01 caljunior: ,(let [(eval (symbol "foo")) 2])

6:01 clojurebot: java.lang.Exception: Unsupported binding form: (eval (symbol "foo"))

6:01 AWizzArd: again you put a list where a symbol was expected

6:01 Chousuke: ,(list 'let [(symbol "foo") 3] 'code-here)

6:01 clojurebot: (let [foo 3] code-here)

6:02 AWizzArd: as a special operator let has its own syntax. It does not evaluate forms in the position in which you tried to have it evaled.

6:02 Chousuke: ,(eval (list 'let [(symbol "foo") 3] 'code-here)) will fail, but that's what you want, in essence

6:02 clojurebot: DENIED

6:02 AWizzArd: though this is not desirable in most cases, and often better handled by a macro

6:02 Chousuke: eval should not be used unless it's necessary though. in this case, you most likely want a macro

6:02 caljunior: yes

6:03 thanks

6:03 *dives into macro tutorials*

6:05 Chousuke: eg, something like (defmacro with-foo-bound-to-5 [foo & code] (list* 'let [(symbol foo) 5] code))... or using syntax-quote `(let [~(symbol foo) 5] ~@code)

6:06 writing macros without syntax-quote is good practice for understanding the whole code=data thing

6:06 backquote forms often look like they're some magical macro syntax :/

6:06 At least that's what I thought when I first learned about macros

6:08 caljunior: thanks, this is very helpful.

6:09 Chousuke: I wonder if there exist macro tutorials that tell you to rewrite some existing macro without using backquotes :)

6:10 AWizzArd: Chousuke: yes, in „Practical Common Lisp” this happens.

6:10 but only a small fraction of the chapters talk about this

6:14 caljunior: sounds like an idea for the "Joy of Closure" chapter 8

6:14 Clojure "ouch"

6:21 succes!

7:07 AWizzArd: Hallo chouser

7:29 zaphyr: is bit-shift-right equivalent to >>? what is the equivalent to >>>?

7:33 AWizzArd: zaphyr: to which >>> are you referring? The one in C?

7:35 zaphyr: ah, java's, iushr

7:35 like x >> y but copies the high bit into the top y bits

7:36 oops

7:36 i mean clears the top y bits xD

7:37 i don't actually need it, but thought i'd ask since i can't find it

7:38 hiredman: unsigned right shift

7:38 dunno if clojure has a fn for it

7:38 zaphyr: ah, right, okay

7:38 not a massive problem for me, but would be nice to have

7:39 (seems a bit silly to have to implement it given there's jvm instructions for it)

7:40 unfo-: you can always call the java funciton

7:40 (.>>> 6)

7:41 or what?

7:41 hiredman: unfo-: no

7:41 >>> is not a method

7:42 unfo-: ok

7:42 oh right.. it's an oper

7:44 zaphyr: what's an oper?

7:45 unfo-: operator? like + - /

7:45 zaphyr: ah, does that go down to jvm instructions?

7:45 unfo-: altho in clojure-land they are functions i believe

7:46 zaphyr: hmm, is there a link for documentation on that?

7:46 hiredman: ,(doc +)

7:46 clojurebot: "([] [x] [x y] [x y & more]); Returns the sum of nums. (+) returns 0."

7:47 zaphyr: ,(doc .>>>)

7:47 clojurebot: Huh?

7:47 zaphyr: :S

7:47 unfo-: so if >>> was a method on Number you could call (.>>> 6) but since, as hiredman pointed out, it is not a method you can't

7:47 zaphyr: ahhh, right okay

7:47 of course the . should have clued me there

7:48 heh, in the lisp world functions and operators all fuse into one for me :)

7:48 unfo-: yeah

7:51 zaphyr: hmm, i seem to remember somewhere you can't type hint primitive values in defn, at least conventionally?

7:59 rhickey: zaphyr: right, because fns can't take primitives

7:59 if you want to use a fn arg as a primitive, re-let it in the body (defn foo [x] (let [x (int x)] ...

8:00 zaphyr: Right okay. I will argue this one later but I'm going to have to learn clojure more or you'll shoot me out of the sky in seconds :)

8:00 tyvm though, I am liking clojure a lot :)

8:01 jcromartie: What's the best way to have my web app reload a namespace when the file changes?

8:01 Or any Clojure program in general?

8:02 esj: employ an intern :P ?

8:05 zaphyr: hmm, actually the fns not taking primitives issue will completely go away if I can force inlining of functions and ensure i'm only doing unboxed arithmetic on floats, is this possible?

8:13 LauJensen: Blizzard in Denmark! :)

8:14 AWizzArd: New WoW servers?

8:14 unfo-: lol. prolly an actual blizzard ;)

8:14 LauJensen: hehe

8:14 unfo-: but that was my first association too ;)

8:14 AWizzArd: *g*

8:15 zaphyr: aha! definline! rhicky i take it all back :)

8:15 LauJensen: You guys are sick, but anyway - Yes, road home was almost impassble - I flew threw a drive which sent snow flying up both sides of the car, blinding the windows - lots of fun

8:15 s/threw/through

8:16 Anybody here familiar with Jerry Pournelle ?

8:17 rsynnott: the science fiction writer?

8:18 esj: he looks like an interesting guy

8:25 LauJensen: http://www.jerrypournelle.com/mail/2010/Q1/mail608.html <-- I'm getting a lot of traffic from there

8:28 esj: random, but every hit is sacred.

8:29 LauJensen: huh?

8:30 esj: well, its seems like a strange place to be slashdotting you. However, every hit you get is a good thing.

8:31 * esj apologises - heavily drugged up, and incoherent.

8:31 jcromartie: http://github.com/mmcgrana/ring/blob/master/src/ring/middleware/reload.clj

8:31 seems reasonable

8:35 LauJensen: hehe, esj - Hope you get well soon

8:35 esj: LauJensen: much obliged kind sir.

8:40 yason: Does a future need to be dereffed before it is scheduled for execution?

8:43 zaphyr: extreme performance win! I am now hooked :D

8:43 chouser: yason: no, it starts going immediately

8:44 yason: no, it starts going immediately

8:46 yason: chouser: that's what I thought, too. Hmmm.

8:46 * cemerick plays the Tuesday morning ML gameshow: bayesian behind door #1, or neural nets behind door #2

8:47 cemerick: yason: that is, it's *scheduled* to be executed immediately. If you've got a pile of them, they won't all start "simultaneously"

8:47 LauJensen: sucks a little that we dont have language level support for ai yet

8:47 AWizzArd: cemerick: what for?

8:48 esj: I'm hoping to get time to wrap Weka at some point.

8:48 yason: cemerick: yeah, I know. I just sent off a small task that does little side-effects but that won't happen

8:48 unfo-: http://narf-archive.com/pix/c7b313f1e76ec4a6558d690b907c996951762119.jpeg hahah ;D

8:52 LauJensen: haha

8:53 yason: Also - Sometimes, especially if you're in SLIME, futures will fail silently, thus appear to never start

8:53 cemerick: AWizzArd: I need to improve detection of columnated text. Our existing approach is pretty good, but it's *really* old and hard to change at this point.

8:53 zaphyr: unfo: xD

8:53 cemerick: Built before I knew what 'bayesian' was :-/

8:54 esj: cemerick - choose door 3, its a 2/3 probability the car is behind it.

8:54 cemerick: heh

8:56 yason: LauJensen: I'm in Slime...

8:58 AWizzArd: cemerick: without knowing more about this I would say that the bayseian route is good to go.

8:59 cemerick: yeah, probably. We already have a pretty solid bayesian toolkit, it's just that I don't understand it (whereas NN are my bag from years ago).

9:02 AWizzArd: just blindly use it and trust in its magic :)

9:03 cemerick: eh, they're both 'close your eyes and pull' sort of tools. I mean, I understand the mechanics, but every time either of them work, I'm amazed.

9:04 AWizzArd: They know how to keep track of a good statistic.

9:10 LauJensen: yason: Then make provision for silent failures, otherwise they'll drive you nuts

9:12 yason: LauJensen: Is this an intermittent issue in Slime or something I should expect to live with for now_

9:12 ?

9:13 LauJensen: I think its here to stay - I dont think there's a quickfix for it

9:13 Generally, when you're doing stuff with threads, always test outside of slime before deploying - SLIME sometimes forces evaluation where Clojure doesnt - Can cause hangs in your program etc

9:14 yason: LauJensen: well, what can you expect when you're knee-deep in sloshing slime already :)

9:15 rsynnott: this makes me sad: http://java.sun.com/

9:15 LauJensen: rsynnott: i'm just wondering how the whole thing will effect Clojure

9:18 * raek just discovered that TagSoup and clojure.xml fits together wonderfully

9:19 Fossi: huh? i don't get it? what part makes you sad?

9:19 rsynnott: Fossi: the sudden elimination of sun from that page

9:19 cemerick: raek: you'll likely discover enlive soon, which uses both :-)

9:20 rsynnott: Oracle tend to do this

9:20 they also killed the (very cute) sleepycat (bdb developers) website very quickly when they bought them

9:20 Fossi: ah, well, happens

9:22 cemerick: that's what should happen in a merger. One company, one banner, etc.

9:23 yason: rsynnott: when you switch off Sun it'll be an eternal night :)

9:23 rsynnott: Sun Microsystems logo was cooler.

9:23 raek: cemerick: :O

9:23 nice!

9:24 cemerick: raek: uh huh :-D

9:25 rsynnott: Google are lazier about it

9:25 they STILL haven't finished rebranding feedburner, or blogger

9:26 Fossi: it's indeed funny that the main focus about sun seems to be solaris, sparc and mysql

9:26 cemerick: That's because they have a single actual business. Anything they pull in that is ad-related is consumed entirely and leaves not a trace.

9:29 fro0g: I'm curious what will happen to virtualbox

9:30 LauJensen: fro0g: Its be joined to some of their existing Hypervisor software

9:30 s/its/it'll

9:33 fro0g: LauJensen: sounds difficult

9:33 cemerick: LauJensen: orcale has a hypervisor?

9:33 fro0g: I think they use xen

9:33 cemerick: what I read said that VB was a big deal for them, along with the VDI stuff

9:38 angerman: does leiningen support java classes?

9:39 HDurer: angerman: maybe http://github.com/antoniogarrote/lein-javac ? Haven't looked at it but was mentioned on the #leiningen channel

9:40 angerman: HDurer: thanks

9:47 cemerick: oh, that's unfortunate

10:09 jjames: #mindhed

10:10 sorry.. erg mistype

10:11 bobo_: hm, my leinigen just gets NoClassDefFoundError nomather what command i use after self-install. any clues? using cygwin in windows

10:15 LauJensen: bobo_: I couldn't help but notice that you had both "error" and "windows" in the same sentence - Do you need to me explain it more carefully? :)

10:16 bobo_: :-)

10:17 they force me at work :-(

10:21 LauJensen: My Global Warming post has been linked on HN, Dzone, ClimateAudit, Jerrypournelle.com, whatsupwiththat.com and a few other places - its a amazing the interest the weather gets now a days - It used to be what we talked about when all other topics were drained

10:23 rsynnott: ugh, you don't want to be linked to by Pournelle

10:23 he's a bit of a loon

10:25 LauJensen: rsynnott: I cant do much about the people who link me, but generally I try to stay detached from everybody :)

10:27 jkdufair: what is your global warming post?

10:30 LauJensen: jkdufair: Just a blogpost which shows how to run 50 Gigs of NOAA weather data in parallel using Clojure

10:31 jkdufair: oh cool! link?

10:31 couldn't find it on pournelle. went blind trying

10:31 LauJensen: http://www.bestinclass.dk

10:32 click blog (right side), top post

10:51 jkdufair: wow. nice clojure hacking. interesting conclusion. i wonder how to explain the icecaps.

10:51 too OT, sorry

10:52 LauJensen: Which icecaps ?

10:54 neotyk: ,(take 2 (for [a [{:a 1 :b 1} {:a 2 :b 2}] :while (= 2 (a :a))] [a]))

10:54 clojurebot: ()

10:54 jkdufair: polar? conventional wisdom says they are receeding.

10:54 neotyk: how would I filter only for elements that have :a = 2

10:55 esj: every?

10:55 LauJensen: replace :while with :when

10:56 or just add a :when clause, depending on what you want

10:56 esj: ,(filter :a [{:a 2 :b 3} {:b 9 :c 3} {:a 3 :dh 3}])

10:56 clojurebot: ({:a 2, :b 3} {:a 3, :dh 3})

10:56 neotyk: esj: that's what I was looking for

10:57 LauJensen: I'm preparing for "for" makes sense ;)

10:57 LauJensen: uuuuh

10:57 esj: somebody showed me that technique a couple of days ago.

10:57 neotyk: ~filter

10:57 clojurebot: filter doesn't stop

10:58 neotyk: (doc filter)

10:58 clojurebot: "([pred coll]); Returns a lazy sequence of the items in coll for which (pred item) returns true. pred must be free of side-effects."

10:59 LauJensen: jkdufair: They might be decreasing in size - I don't know. All the data shows is that globally on average, the Globe is cooling

11:00 neotyk: ,(filter #(= 2 (:a %)) [{:a 1 :b 1} {:a 2 :b 2}])

11:00 clojurebot: ({:a 2, :b 2})

11:01 jkdufair: ,(filter #(= 2 (:a %)) [{:a 1 :b 1} {:a 2 :b 2} {:foo 3}])

11:01 clojurebot: ({:a 2, :b 2})

11:01 jkdufair: just curious

11:02 LauJensen: ,(for [item [{:a 2 :b 5} {:a 5 :b 10} {:c 3 :a 2 :b 7}] :when (= (:a item) 2)] item)

11:02 clojurebot: ({:a 2, :b 5} {:c 3, :a 2, :b 7})

11:03 neotyk: clojurebot: what is short for ,(doc ...)

11:03 clojurebot: Roger.

11:03 neotyk: ~what

11:03 clojurebot: what is wrong with you

11:03 neotyk: ,(doc for)

11:03 clojurebot: "([seq-exprs body-expr]); List comprehension. Takes a vector of one or more binding-form/collection-expr pairs, each followed by zero or more modifiers, and yields a lazy sequence of evaluations of expr. Collections are iterated in a nested fashion, rightmost fastest, and nested coll-exprs can refer to bindings created in prior binding-forms. Supported modifiers are: :let [binding-form expr ...], :while test, :when test. (

11:04 neotyk: ahhh, so while is until test is true

11:04 LauJensen: while is as long as test is true

11:04 or until test is false

11:06 neotyk: ,(for [i [{:a 2} {:a 1}] :when (= 1 (:a i)] i)

11:06 clojurebot: Unmatched delimiter: ]

11:06 neotyk: (for [i [{:a 2} {:a 1}]] :when (= 1 (:a i)] i)

11:06 ,(for [i [{:a 2} {:a 1}]] :when (= 1 (:a i)] i)

11:06 clojurebot: Unmatched delimiter: ]

11:06 LauJensen: looks like a Vim user is in our midsts :)

11:07 Shame on you Fred Flintstone

11:07 zaphyr: =]

11:07 esj: Now Lau, just because he's a beginner doesn't mean he's using vim ;)

11:07 LauJensen: Actually I think per definition thats exactly what it means :)

11:08 neotyk: ,(for [i [{:a 2} {:a 1}] :when (= (i :a) 1)] [i])

11:08 clojurebot: ([{:a 1}])

11:09 LauJensen: (look, he was away firing up Emacs)

11:09 neotyk: while

11:09 ,(for [i [{:a 2} {:a 1}] :while (= (i :a) 1)] [i])

11:09 clojurebot: ()

11:09 * neotyk has emacs always running :P

11:12 zaphyr: hmm. (dotimes [x 1000000] (JavaDot/dot x x x x x x)) is running at least two orders of magnitude slower than a java for loop calling the same function, is there a way to make this less embarassing?

11:12 LauJensen: ,(for [x [2 4 6 8 9 10] :while (even? x)] x)

11:12 clojurebot: (2 4 6 8)

11:12 LauJensen: ,(for [x [2 4 6 8 9 10] :when (even? x)] x)

11:12 clojurebot: (2 4 6 8 10)

11:12 LauJensen: zaphyr: Type hint it ?

11:13 zaphyr: Lau: i tried, but I am failing :(

11:13 LauJensen: Why ?

11:13 chouser: JavaDot/dot takes all ints?

11:13 zaphyr: floats

11:14 hmm. let me try (dotimes [x 1000000] (let [x (float x)] ...))

11:14 LauJensen: (set! *warn-on-reflection* true)

11:15 then compile the function, and fix whatever the compiler recommends

11:15 zaphyr: ahhhh

11:15 thanks

11:15 and i was also being an idiot- after adding that type hint i'm now just 1/2 java's performance, which is much more acceptable :)

11:16 Chousuke: ~def dotimes

11:16 LauJensen: zaphyr: For a direct java-call you should be as fast as Java

11:17 dotimes automatically hints to an int, so no slowdown

11:17 zaphyr: right, i wonder why i was receiving such a hit? :/

11:17 LauJensen: meaning, (doseq [x (range 10)] is slower than (dotimes [i 10])

11:17 zaphyr: that's an int- primitive int?

11:17 LauJensen: yes

11:18 Clojure supports java primitives

11:18 or should I say, Oracle primitives :)

11:19 zaphyr: SHHH

11:19 do not speak it's name :(

11:19 thanks though :)

11:19 LauJensen: np

11:21 zaphyr: the ultimate plan is to try and implement carmack's invsqrt in clojure to perform the same as my java version, so expect more tears before the day is through... :)

11:21 LauJensen: Fun exercise

11:22 zaphyr: If i can get java numerical performance out of clojure, i really see no reason to use any other language :)

11:22 rhickey: how does one get paredit action for {}'s?

11:23 Chousuke: rhickey: works for me, using paredit 22

11:23 LauJensen: well... If I make a development contract with a customer, where we agree that pre-deployment I'll fix bugs on a 200$ per bug fixed rate, you can be sure I'll argue for C++ or Scala :)

11:23 noidi: rhickey, I've heard that it's fixed in the 22beta

11:23 while the version in elpa is 20

11:23 rhickey: ah, used elpa, so now what?

11:24 where deos elpa put things?

11:24 does

11:24 LauJensen: ~/.emacs.d

11:24 clojurebot: It's greek to me.

11:24 freddy_d: rhickey: thank you! for Clojure. it is awesome. I've always wanted to combine FP with JVM.

11:25 rhickey: freddy_d: you're welcome!

11:25 noidi: apparently uninstalling works like M-x package-list-packages, C-s paredit, d, x

11:26 (I finally decided to take the plunge and upgrade paredit, too :)

11:26 freddy_d: rhickey: I haven't been this excited about a new language since 1996 (and I've tried quite a few along the years) :-)

11:26 Chousuke: rhickey: it might be enough to replace your paredit.el with http://mumble.net/~campbell/emacs/paredit-beta.el (renamed to paredit.el) in the ~/.emacs.d/elpa/pareditwhatever dir (assuming your elpa is configured similarly to mine)

11:27 zaphyr: rhicky: i concur with freddy_d, great stuff :)

11:27 dnolen: rhickey: if you don't want mess with installing paredit 22, http://paste.lisp.org/display/94251

11:28 noidi: I removed the package from elpa and saved that paredit-beta.el as ~/.emacs.d/paredit.el and everything just worked

11:28 tomoj: anyone using lein-swank successfully?

11:28 noidi: fdaoud, I've had that feeling about Clojure for about a year now :)

11:29 the more I use it, the more amazed I am by how well all the pieces fit together and complement each other

11:29 tomoj: I saw some posts on the mailing list about my classpath problem, but I built lein-swank.jar from master and it still didn't work :(

11:29 AWizzArd: dnolen: does rhickey want to try out emacs?

11:29 fdaoud: noidi: great, can you tell a bit more about what you've used it for?

11:29 dnolen: AWizzard: he was asking about paredit.

11:30 jkdufair: java is the matrix and clojure is the red pill

11:30 rsynnott: where does Oracle fit in? :)

11:30 Chousuke: Oracle are the machines? :P

11:31 noidi: fdaoud, right now I'm using Clojure to write a 3D game with OpenGL

11:31 LauJensen: I've seen some stunning results from Zach Tellman who has moved computations onto the GPU using Clojure

11:31 fdaoud: noidi: impressive

11:32 fr0og: penumbra?

11:32 LauJensen: Exactly

11:32 fdaoud: noidi: I'm doing webapp development with Compojure, Enlive, and contrib.sql. So much leaner than my previous stack.

11:32 LauJensen: fdaoud: contrib.sql ?! :)

11:32 noidi: I've only looked briefly at enlive, but it seemed awesome :)

11:33 fdaoud: LauJensen: is that wrong?

11:33 LauJensen: fdaoud: Yes - Use ClojureQL :)

11:33 noidi: LauJensen, that's your project, isn't it? ;)

11:33 rsynnott: ah, clojureql is another one of these things that lives only in many forks on github :P

11:34 LauJensen: Well, you decide what to use, but we hope to have 1.0 done my February/Early march, and you'll then have a sweet Lisp frontend, and several modules for backends, mysql, postgresql, fleetdb, derby etc

11:34 fdaoud: LauJensen: in this particular case, I have a bunch of ready-to-use, tried-tested-and-true, SQL, including DDLs and all the queries I need. So ClojureQL doesn't seem necessary.

11:34 rsynnott: this is the problem with github; you never know what the authoritive version is these days

11:34 LauJensen: Target whatever you want, dont change your code

11:34 fr0og: rsynnott: i think it's on gitorious

11:34 LauJensen: rsynnott: ClojureQL lives only on Gitorious

11:34 ~clojureql

11:34 clojurebot: clojureql is http://gitorious.org/clojureql

11:35 rsynnott: ah :)

11:36 fr0og: any plans for an h2 backend for it?

11:37 LauJensen: Nope - But you can write a module for it pretty easily - The great thing about ClojureQL is that its very extendable, even moreso with the new frontend which is being put in as we speak

11:37 So both SQL type systems, but also Mongo, Fleet etc will work with the same code

11:37 fdaoud: noidi: so far so good with enlive. I'm already using CSS and jQuery, so it's great to be able to use CSS-style selectors.

11:38 zaphyr: hmm, is there a clojure pastebin?

11:38 dnolen: zaphyr: most people use paste.lisp.org

11:39 zaphyr: ta :)

11:41 tomoj: gist has basic clojure syntax highlighting

11:41 zaphyr: Here's my current failed attempt at getting performance: http://paste.lisp.org/display/94252

11:44 jkdufair: so if sql (the language) access to my data isn't a requirement, what's the simplest, most idiomatic way to add durability to clojure's STM?

11:44 Chousuke: zaphyr: + is only inlined for two arguments

11:44 tomoj: zaphyr: what's the let for?

11:45 rhickey: is paredit-22-beta stable?

11:45 zaphyr: Chousuke: ah, that might seriously be an issue :)

11:45 tomoj: evaluation order?

11:45 zaphyr: tomoj: casting the dotimes argument to an int, speeds things up by about 5x

11:45 Chousuke: rhickey: I have been using it for quite a while without problems, but my paredit use is not very advanced :/

11:45 zaphyr: tomoj: it's a let* because i was doing the dotimes in the let* earlier and didn't change it :)

11:45 rhickey: Chousuke: mine won't be advanced either :)

11:46 tomoj: zaphyr: I meant the let in the macro

11:46 in dot-m, that is

11:46 zaphyr: tomoj: oh, that makes sure each argument is only evaluated once

11:46 tomoj: ah, yeah

11:46 arohner: jkdufair: there currently aren't any options. Fixing that would probably require integrating JTA into the STM, not easy work

11:46 Chousuke: zaphyr: it's unnecessary in this case though since you're evaluating them only once in any case. :)

11:48 zaphyr: Chousuke: imagine it was maybe going to be used one day :)

11:48 OH! that's faster :D

11:48 thanks Chousuke :)

11:48 jkdufair: arohner: interesting. thx. right now STM pretty much stands alone on top of the JVM, yes?

11:49 transparent durability would be kickass

11:49 without resorting to image files and other abominations

11:49 arohner: jkdufair: yes it would

11:50 zaphyr: in fact, great news! it's as fast as java :)

11:51 * zaphyr waves goodbye to boilerplate, and is glad he wasted all that time in lisp again

11:52 mabes: since watchers on agents are called synchronously does that mean if an agent isn't sent a function that will block but if the watcher may then send-off should be used for that agent w/the blocking watcher?

11:52 does that make sense?

11:55 rhickey: hmm, with paredit 22 beta entering an opening curly { doesn't create a closing curly }

11:58 tomoj: did you have paredit 21 or greater when clojure-mode loaded?

11:58 a_strange_guy: rhickey: what does M-x paredit-open-curly doo?

11:58 that is mapped to the '{' key

11:58 tomoj: for me, clojure-mode adds that mapping when it sees paredit

11:59 but I had to add M-{ and M-[ for paredit-wrap-curly and paredit-wrap-square myself

11:59 rhickey: a_strange_guy: that works, but { is not bound to it

12:01 tomoj: huh, lein-swank suddenly works now

13:00 qed: =[˻user˼]= (+ 1 2)

13:00 ^Is this an incredibly annoying slime repl prompt?

13:00 heh

13:00 zaphyr: my eyes

13:01 dakrone: is the unicode in there?

13:01 *that

13:02 hiredman: sounds like a yes

13:03 rys: Looks good to me

13:03 dakrone: so it's only annoying if you have to paste it into something that doesn't support unicode

13:04 hiredman: I don't see why you need all that stuff to separate the prompt from code

13:05 AWizzArd: hiredman: *g*

13:09 danlarkin: ya it's not your $PS1 :)

13:21 itistoday: join #node.js

13:21 forgot the slash apparently

13:34 jweiss: any compojure people here? looking at these session functions, i just don't get it. why does session-assoc seem to return a function that should take a request as the argument, and then all it returns is a map with nothing in it but the session? shouldn't it keep the rest of the request, and just add to the session?

13:35 maybe i'm using this wrong.

13:35 i want to add something to the session after a user logs in, to indicate the username of the currently logged in user

13:36 dakrone: jweiss: you can't do (session-assoc :username username) ?

13:37 jweiss: dakrone: i don't think so, session-assoc returns a function, not a map

13:38 the function it returns apparently is expecting the request as its argument

13:38 see alter-session

13:41 dakrone: jweiss: according to the docs on compojure.org, session-assoc takes & keyvals and associates key-value pairs with the session, doesn't mention anything about what it returns

13:42 it's assoc-session that has request response]

13:42 jweiss: dakrone: yeah i know, not very good doc :)

13:42 dakrone: as its arguments

13:42 jcromartie: assoc-session is middleware

13:42 dakrone: so it sounds like you want session-assoc instead of assoc-session, right?

13:42 jcromartie: middleware take handler functions and return new handlers

13:42 * jweiss looks

13:42 LauJensen: jweiss: Did you see my blogpost where I show how to use sessions?

13:43 jweiss: LauJensen: hm, maybe, what's the link

13:43 LauJensen: http://www.bestinclass.dk/index.php/2009/12/beating-the-arc-challenge-in-clojure/

13:44 jweiss: LauJensen: hm ok that helps, thanks

13:45 jcromartie: remember, jweiss, all of the functions that "change" the session just return the new value

13:45 jweiss: jcromartie: yeah i understand it's functional

13:45 jcromartie: k

13:53 AWizzArd: Oho, Suns “Project Kenai” is closing down (Orcale descision).

13:53 mebaran151: I never much saw what it was good for...

13:53 cemerick: Yeah, that was announced last week, I think.

13:54 AWizzArd: cemerick: and today an email was sent out to the project owners

13:54 mebaran151: Kenai offered Jira and support for git and hg.

13:54 cemerick: I think the big deal was that builds could be done "in the cloud"

13:54 ...or maybe that was forthcoming.

13:54 AWizzArd: i liked the jira most

14:21 jkdufair: LauJensen: Liked your beating the arc challenge, but I like paul graham's solution of representing program flow as closures.

14:21 presumably we can do that too somehow?

14:21 i was a big fan of smalltalk's seaside for a long time

14:23 chouser: arc's web stuff actually uses continuations, doesn't it? We can't do that as cleanly in Clojure, though closures do work fine.

14:23 jkdufair: yes, continuations

14:24 do we have some sort of call/cc?

14:24 AWizzArd: no, but threads

14:24 jkdufair: is that a jvm limitation?

14:24 AWizzArd: is there anything specific you want to do with continuations of which you think it can't be done (easily) with threads?

14:25 chouser: jkdufair: yes, jvm limitation

14:25 jkdufair: nothing specific. i like the model - i think it's does a great job of masking the statelessness of http

14:25 beating the arc challenge got me thinking about it

14:25 chouser: jkdufair: I'd be afraid it masks real issues that ought to be addressed -- client disconnects, code updates while user is "logged in", etc.

14:26 But then I've never used a continuations-based web framework, so I may not know what I'm talking about. :-)

14:26 jkdufair: yeah, seaside addresses some of that and it's not super pretty but it's as elegant as any web framework i've seen

14:26 AWizzArd: continuations don't do any magic, and you can do all you want with threads

14:27 LauJensen: I think continuations are great - Lets wait until PG finishes his work, and then we'll port it

14:27 chouser: a thread is normally much heavier than a continuation

14:28 jkdufair: i like that you can basically map the back button to the stack with a continuation

14:28 AWizzArd: the os/vm could offer extremly leightweight threads

14:28 chouser: esp. a blocking thread compared to a stored continuation. esp. if the continuation is serializable. :-)

14:29 AWizzArd: It could be interesting to have a webserver running with my db. It can also support the back button easily. Maybe this will also be very nice.

14:29 jkdufair: it appears that there is at least one continuations library for java: RIFE/Continuations

14:29 http://lambda-the-ultimate.org/node/1002

14:30 AWizzArd: A year ago I talked with the author of rife. The project was pretty unmaintained back then.

14:30 jkdufair: of course with ajax, continuation-based web frameworks aren't quite the silver bullet they once seemed

14:31 AWizzArd: right

14:31 jkdufair: and i suppose the semantics of "back" aren't quite as simple as "the previous state"

14:31 where did i put that blue pill

14:32 otoh, i do like paul graham's little /said/ example

14:32 chouser: not even close. people rarely mean "undo" when they click "back"

14:42 hiredman: do you read the clojure-dev group?

14:51 hiredman: chouser: uh, I think so, I have both groups with the same tag in gmail, so it's hard to distinguish

14:52 chouser: ah. I add a 'dev' tag to that one. Anyway, just saw your wall-hack method nominated for an rename.

14:52 hiredman: :/

14:52 thats fine, I guess

14:54 I thought the name was cute, but I guess that could be an argument against

14:58 neotyk: Hi clojure gurus

14:59 AWizzArd: hallo neo

15:01 neotyk: it's neotyk mister AWizzArd

15:02 ordnungswidrig: hi all

15:02 LauJensen: Hi

15:02 AWizzArd: Ah, hello ordnungs

15:03 neotyk: hi

15:05 * ordnungswidrig is hacking clojure-rest

15:06 neotyk: is there any nice async http client clojure lib somewhere already?

15:07 cemerick: ordnungswidrig: I saw that the other day. I'm looking forward to using it :-)

15:07 ordnungswidrig: I'm looking forward to make it leave the alpha state :-)

15:08 chouser: I thought I saw somewhere that the servlette api is strictly synchronous (one thread per connection). would be a shame if true.

15:08 It wouldn't be hard to extend something like ring to use CPS, which would be lovely.

15:08 cemerick: ordnungswidrig: yeah, I'll be looking to pull it in once we finish an initial spike of the project using handlers directly (in part to fully understand how compojure works)

15:08 AWizzArd: chouser: you are in love with continuations today :-)

15:09 chouser: CPS is closures thank goodness

15:09 neotyk: servlet 2.5 os like you say chouser

15:09 cemerick: I was under the impression that the servlet spec specifically doesn't talk about impl details like that.

15:09 neotyk: 3.0 supports async

15:10 drewr: neotyk: clojure.contrib.http.agent is async

15:10 neotyk: chouser: check atmosphere project

15:10 chouser: cemerick: all it has to do is say "return the result" and you're stuck holding one thread per connection.

15:11 AWizzArd: maybe this thread is of interest: http://groups.google.com/group/compojure/browse_frm/thread/887cdaef8800d2b/5656cbdbcdf439c2?tvc=1#5656cbdbcdf439c2

15:11 neotyk: drewr: so I can do c10k with it?

15:11 cemerick: chouser: it doesn't -- Servlet.service returns void -- you can write to the response with however many threads you want to coordinate.

15:11 drewr: neotyk: c10k is the other direction :-)

15:12 neotyk: :-/

15:13 so issuing 10k req is what?

15:13 drewr: I'd just use ab(8)

15:13 but you could use c.c.http.agent I suppose

15:13 AWizzArd: http://www.jboss.org/netty was linked in that discussion.

15:14 neotyk: AWizzArd: very nice thread

15:14 hiredman: "Lisp will be in the top 10 most popular programming languages by 2010."

15:14 chouser: oh, so it's only the containers like jetty that impose the restriction?

15:15 AWizzArd: hiredman: didn't you want to sleep? ;)

15:15 hiredman: want time is it?

15:15 what

15:15 clojurebot: What is meta

15:15 AWizzArd: 21:15 o'clock

15:15 ordnungswidrig: cps sounds fun.

15:16 compojure-rest shall be able to abstract this pain away. as it's a chain of decisions / functions I see the possibility to use a message passing style as well.

15:16 is cps and message passing "congruent" in some way?

15:17 neotyk: what is cps?

15:17 hiredman: yes

15:17 dnolen: cps: continuation-passing-style

15:17 ordnungswidrig: hiredman: yes to me?

15:17 hiredman: yes

15:18 chouser: in this case, all I really mean is for ring to pass a "callback" to the handlers, so they can call it from whatever thread they want later.

15:18 neotyk: dnolen: suspending response in general, right?

15:19 hiredman: scheme original had another greek letter operator to create things you would send messages to, but the code paths for it and λ were found to be essentially the same

15:22 dnolen: neotyk: cps is way of structuring the code to make it easy to go back to any point in a computation. entirely unnecessary if the language has native continuation support. I wrote a port of a CL library cl-cont called clj-cont if you want to see how it works in Clojure. it's fun, tho not very efficient.

15:25 hiredman: oh

15:25 ouch

15:25 "Unroll optional arguments."

15:25 * hiredman cries in his corner

15:26 ordnungswidrig: unroll optional arguments? what will this tell me?

15:27 neotyk: that it makest hiredman crying ;)

15:27 hiredman: oh, it's in the proposed coding guidelines for clojure.lib

15:30 ,(doc io!)

15:30 clojurebot: "([& body]); If an io! block occurs in a transaction, throws an IllegalStateException, else runs body in an implicit do. If the first expression in body is a literal string, will use that as the exception message."

15:33 LauJensen: New blogpost: http://www.bestinclass.dk/index.php/2010/02/reddit-clone-in-10-minutes-and-91-lines-of-clojure/

15:38 abrenk: LauJensen: Yeah, something to read tomorrow! Thanks. By the way, the link "Git Repo" under "Deployment" is defunct.

15:40 LauJensen: oh

15:40 right, thanks

15:40 abrenk: LauJensen: and it would be better to run "git clone git://github.com/LauJensen/cloneit.git" I guess

15:41 LauJensen: Fantastic catch

15:41 Thanks - I went a little too fast

15:44 abrenk: LauJensen: Thats the stuff I already grok... let's see how many more weeks pass until I can at least read your Clojure code like I write Java...

15:45 LauJensen: This one should be quite easy. There was a similar project done in Common Lisp recently and I wanted to do a Clojure port 1) Just to show our colors and 2) Show off our cool infrastructure toys

15:54 drewr: anyone tried using moustache?

15:56 ordnungswidrig: does anybody have a pointer for a sha1 digest in clojure?

15:56 chouser: yes, just a sec.

15:57 LauJensen: Already #5 on HN - Keep the love coming :)

15:57 cemerick: ordnungswidrig: I could paste one if you like. It's pretty simple.

15:57 chouser: LauJensen: hate to break it to you, but attention is not the same as love. :-)

15:57 LauJensen: haha

15:58 neotyk: LauJensen: s/Sorting my date/Sorting by date/

15:58 ordnungswidrig: cemerick: I'd appreciate it

15:58 cemerick: ordnungswidrig: hrm, although our version uses a byte[] -> hex string routine I wrote in Java eons ago.

15:58 lisppaste8: url?

15:59 jeez, still down

15:59 clojurebot needs to grow a pastebin I guess

15:59 hiredman: you could always just use whatever from apache commons

15:59 neotyk: LauJensen: also would like to see a bit more on let part in rendering links

16:00 LauJensen: more explanation ?

16:00 cemerick: ordnungswidrig: yeah, commons-codec is comprehensive

16:00 ordnungswidrig: uhm, wouldn't java ship a digest in the jdk?

16:00 neotyk: LauJensen: I'm dumb ;-)

16:00 hiredman: cemerick: clojurebot recognizes and tags urls from a few difference pastebins

16:01 cemerick: ordnungswidrig: it does, commons-codec wraps those and implements others via a std api

16:01 LauJensen: neotyk: No you're probably just putting into words what most people think, and also what I'll think reading that 6 months from now perhaps :)

16:01 cemerick: ordnungswidrig: but anyway: http://dpaste.com/153869/

16:01 neotyk: LauJensen: it's first time I see destructuring like that

16:01 chouser: ordnungswidrig: http://paste.lisp.org/display/94267

16:01 hiredman: http://delicious.com/clojurebot/pastbin

16:02 neotyk: anyway, I'll keep reading

16:02 hiredman: clojurebot recognizes dpaste.de but not .com :(

16:03 neotyk: LauJensen: you got me confused by this data structure, now I see its set of elemeny and map

16:03 LauJensen: Its all key/val, the key is the url, the value is another hashmap

16:03 neotyk: s/elemeny/element/

16:04 congrats you got me square confused :)

16:04 LauJensen: so (let [[k v] data], puts the url in k and the properties in v., since v is a hash-map, you can pull the same trick on that (let [[k {:keys [a b c]}]] {:a {:a 2 :b 3 : c 3}

16:04 Ok - Lemme see if I can add it to the post :)

16:06 neotyk: but this destructyring with {:keys would use more explaining for me :-p

16:06 ordnungswidrig: chouser: thanks!

16:06 cemerick: thanks as well

16:06 LauJensen: ,(let [{:keys [a b]} {:a 2 :b 3 :c }] b)

16:06 clojurebot: 5

16:06 LauJensen: couldn't be simpler right? O_o

16:07 ,(let [{:keys [a b]} {:a 2 :b 3 :c 9}] b)

16:07 clojurebot: 3

16:07 LauJensen: So {:keys ks} makes named variables of the values in the map

16:08 DeusExPikachu: is there a time/timer lib in clojure or you guys just use java.util.Date?

16:08 LauJensen: DeusExPikachu: In that blogpost I linked above I show off Joda Time

16:08 DeusExPikachu: not for timing functions

16:10 neotyk: LauJensen: I still don't get it, will try after reading

16:11 LauJensen: We'll go 1on1

16:11 herdrick: hi, i'm looking for the pointfree predicate negation function. i.e. instead of this: #(not (even? %)) i want to do something like this: (negator even?)

16:11 does it exist?

16:11 neotyk: ok

16:12 so this works as I would expect

16:12 hiredman: ,(comp not even?)

16:12 clojurebot: #<core$comp__4952$fn__4955 clojure.core$comp__4952$fn__4955@d650da>

16:12 rhickey: ,(doc complement)

16:12 neotyk: ,(let [{:keys [a b]} {:a 2 :b 3 :c 9}] b)

16:12 clojurebot: "([f]); Takes a fn f and returns a fn that takes the same arguments as f, has the same effects, if any, and returns the opposite truth value."

16:12 3

16:12 hiredman: (count "complement")

16:12 ,(count "complement")

16:12 clojurebot: 10

16:12 hiredman: ,(count "comp not")

16:12 clojurebot: 8

16:12 hiredman: :D

16:12 neotyk: but second one not at all

16:13 ,(let [{:keys [a b]} {:a 2 :b 3 :c }] b)

16:13 clojurebot: 5

16:13 neotyk: wher dit it got this 5 from?

16:13 hiredman: neotyk: it is eating an exception

16:13 you are missing a value in your map

16:13 LauJensen: Yea sorry, that caused confusion

16:13 Forget you ever saw that

16:14 herdrick: hiredman: ok, thanks. that is pretty short ;)

16:14 neotyk: sure, what about trauma it caused ?

16:14 hiredman: ~ticket #87

16:14 clojurebot: {:url http://tinyurl.com/y92lmv8, :summary "GC Issue 83: PersistentArrayMap trust the reader (map literals) too much", :status :test, :priority :low, :created-on "2009-06-17T20:36:09+00:00"}

16:14 neotyk: thanks LauJensen hiredman :)

16:15 hiredman: are you suggesting tp fix it ? ;-)

16:15 LauJensen: np

16:16 hiredman: neotyk: there a patch on the ticket

16:17 neotyk: hiredman: very nice of you

16:18 hiredman: scopes!!

16:30 cemerick: ,(instance? Byte/TYPE (make-array Byte/TYPE 0))

16:30 clojurebot: false

16:30 cemerick: thoughts on that? ^^

16:30 oh jeez, nevermind

16:30 * cemerick facepalsm

16:30 cemerick: facepalms*

16:31 hiredman: ,(instance? (Class/forName "[B") (make-array Byte/TYPE 0))

16:31 clojurebot: true

16:31 cemerick: yeah. I know. I can't believe I got so far as to hit enter on that one. Screwy day.

16:32 abrenk: LauJensen: you could use clojure 1.1.0 (without -new-SNAPSHOT) in your project.clj

16:32 hiredman: I just saying, [B? who decided to use that?

16:33 cemerick: in a bandwidth-constricted environment, seems reasonable

16:34 stuff like that was determined back in 1993-ish

16:34 abrenk: It's a pity that clojure-contrib 1.1.0-RC1 is not in the http://build.clojure.org/snapshots repository so that it can be used from leiningen.

16:41 Okay, there's a http://build.clojure.org/releases repository which Phil added to leiningen two days ago.

16:45 tomoj: wow, compojure's refactor branch only has one source file

16:45 awesome

16:51 jfkw: noob question: starting java clojure.main with -cp or CLASSPATH set to /path/to/clojure.jar:/path/to/clojure-contrib.jar, can't (use 'clojure.contrib.foo).

16:53 tomoj: what's foo?

16:53 dakrone: and what error are you getting?

16:53 tomoj: can't use anything? or just stuff like pprint

16:53 jfkw: clojure.contrib.logging, clojure.contrib.duck-streams

16:54 tomoj: duck-streams should surely work, at least

16:54 AWizzArd: jfkw: (System/getProperty "java.class.path")

16:54 jfkw: "/home/jtk/src/clojure/clojure.jar:/home/jtk/src/clojure-contrib/clojure-contrib.jar"

16:55 chouser: what's the actual exception?

16:55 AWizzArd: and this file certainly exists?

16:55 jfkw: user=> (use 'clojure.contrib.duck-streams) \n java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (NO_SOURCE_FILE:0)

16:55 AWizzArd: ah

16:55 chouser: :-)

16:55 AWizzArd: that one

16:55 hiredman: ~clojure.lang.RestFn

16:55 clojurebot: ant clean and rebuild contrib

16:55 tomoj: hmm, contrib is no longer built with 'ant', is it?

16:55 chouser: or if you didn't build it yourself, make sure your clojure and contrib versions match

16:56 abrenk: LauJensen: when adding a link the home page reads "example.com Posted ago. 1 points" without a date.

16:56 AWizzArd: jfkw: you can simply download clojure and contrib from here: http://build.clojure.org/

16:56 hiredman: tomoj: sshh

16:56 LauJensen: abrenk: refresh, youre too fast

16:56 jfkw: I used the ELPA swank-clojure install, saw the git repositories in ~/src, pulled on branch master, ran ant on clojure, mvn package on clojure-contrib.

16:57 abrenk: LauJensen: after a refresh everything is fine, I know. But how come my browser's "too fast"?

16:57 dakrone: tomoj: should be able to use maven to build it

16:57 LauJensen: I didn't implement a 0 second print

16:58 abrenk: I see!

17:01 neotyk: abrenk: what browser you use, I also want too fast browser :)

17:02 abrenk: neotyk: see uzbl.org

17:02 Raynes: offtopic: I passed my road test! :D

17:02 LauJensen: Congratz!

17:03 Raynes: <3

17:03 abrenk: neotyk: but I guess any browser should handle a redirect on localhost in under a second...

17:03 LauJensen: Is it true you took it in a pick-up truck ?

17:03 Raynes: LauJensen: Untrue. Chevy Lumina. ;)

17:03 LauJensen: Dont even know what this is - get a european model! :)

17:03 Raynes: :)

17:04 neotyk: abrenk: still I'm always under impression that my browser is slow

17:04 abrenk: Although if the snow in germany continues a pick-up truck would come in handy...

17:06 neotyk: abrenk: is uzbl in workable state?

17:09 abrenk: neotyk: I'd say "yes", enough to give it a try if you agree with its principles

17:11 neotyk: cool

17:18 fr0og: is uzbl like conkeror, but for the vi crowd?

17:21 dakrone: uzbl is a set of processes for web browsing that allow the user to hook them up however they want, customizing the experience

17:22 * fr0og is confused

17:22 fr0og: I guess I just have to try it sometime

17:24 abrenk: fr0og: yeah, you could say that, I guess. Its WebKit based, conkeror based on Mozilla IIRC.

17:28 * technomancy would squeal with glee for a webkit/v8-based conkeror

17:29 fr0og: I prefer how mozilla renders fonts. Webkit looks to fuzzy for my taste

17:30 abrenk: technomancy: keybindings are customizable, so that shouldn't be a problem. the default is somewhat vi like.

17:31 technomancy: abrenk: I'll put it on my list of things to take a look at

17:31 though I prefer JS to Python as an extension language

17:51 Intertricity: I'm moving to clojure from python, I know nothing about java but I read I should probably get familiar with the api. Is there any api reference written for clojure users, or a good reference in general?

17:52 hiredman: just get familiar with reading javadocs

17:53 nDuff: Intertricity, IMHO the Clojure sequence library is a much higher priority than the Java API; the latter is mostly pretty well-structured, and consists of things that are easy to find (and pretty obvious when you need them), whereas with the sequence library it's easy when starting out to not expect that the thing that's the right tool for your job exists.

17:53 hiredman: ~jdoc String

17:54 Intertricity: so worry more about the sequence library?

17:54 hiredman: is worry the right word?

17:55 Intertricity: well, learn first

17:55 hiredman: http://clojure.org/sequences

17:55 Intertricity: thanks for the links hiredman :)

17:55 hiredman: the main functions are reduce, filter, and map

17:56 neotyk: which if you come from python should be no rocket science :)

17:58 Intertricity: hehe yeah

17:59 vaguely familiar, was just getting into them when I realized I wanted to start moving over

18:01 Thanks a bunch for the help guys!

18:02 abrenk: Intertricity: and if you don't want to read but rather watch, see http://clojure.blip.tv or search on vimeo.

18:03 Intertricity: :o

18:03 wow, most of the things you can learn via video these days :P

18:03 again, thanks :3

18:04 herdrick: hello - i have another question. if i have a recursive function that I want to memoize, is the normal way to do this just to do like this: (def foo (memoize (fn [x] ...

18:04 ?

18:05 hiredman: herdrick: no

18:05 well

18:05 actually

18:05 sure

18:05 herdrick: ah, thanks hiredman ... then what is?

18:06 right, the "recursive" part is key :)

18:06 hiredman: depends how you are recursing

18:06 recur will not let you use memoize

18:06 herdrick: ok

18:07 hiredman: if you recur via something like (fn f [a] (f (dec a)))

18:07 herdrick: no, i'm just doing a good old, problematic in a non- tail optimizing JVM recursion

18:07 :)

18:07 hiredman: that will also not use memoize

18:07 herdrick: actually, that does work

18:07 hiredman: herdrick: then you should be fine

18:08 herdrick: it won't use the memoized version of the functio

18:08 arohner: it depends

18:08 hiredman: uh

18:09 it doesn't

18:09 arohner: (def foo [x] ...)

18:09 (def foo (memoize foo))

18:09 hiredman: (fn f [a] (f (dec a))) is calling itself via an internal name

18:09 arohner: excuse me, that is not the case I was adressing

18:10 herdrick: well, this memoizes properly: http://paste.lisp.org/display/94271

18:10 hiredman: you can't rebind f in (fn f [a] (f (dec a))) to refer to the memoized version of the function

18:10 herdrick: do you mean something different?

18:10 hiredman: yes

18:10 do you see a def in (fn f [a] (f (dec a))) ?

18:10 herdrick: oh

18:11 sure, i've got you

18:11 i wasn't aware of that way of using fn

18:11 thanks

18:11 hiredman: it's not that common because of recur

18:15 herdrick: it's not obvious to me *why* within a def form you can refer to the name being defined.

18:15 where do i go to read up on that

18:15 arohner: herdrick: http://clojure.org/special_forms

18:16 herdrick: arohner: thanks

18:17 hiredman: I'm not 100% on that, but I think def must make a place holder before evaluating the form, and then swap the result in

18:18 arohner: hrm, special forms just tells you can create a fn with a name. I don't see a place where it specifies you can refer to it by name inside the definition function

18:18 nm, the first example does it

18:19 hiredman: ,(macroexpand-1 '(defn foo [] 1))

18:19 clojurebot: DENIED

18:19 hiredman: bah

18:19 anyway

18:19 defn is not giving a fn a name

18:19 defn expands to (def something (fn ...))

18:20 it is binding a name to a value, the value happens to be a fn

18:20 dreish: ,(#'defn 'foo [] 1)

18:20 clojurebot: (def foo (clojure.core/fn ([] 1)))

18:22 hiredman: the var acts as a layer of indirection between the names and values

18:22 herdrick: hiredman: right, that's what i'd expect

18:23 "it is binding a name to a value, the value happens to be a fn" i mean

18:23 thanks hiredman:

18:23 * hiredman needs a blackboard so he can draw box and pointer diagrams

18:56 herdrick: question about plans for clojure:

18:56 are there plans to make error messages better?

18:56 for example, i just got this:

18:56 java.lang.IllegalArgumentException: Wrong number of args passed to: user$score-pair

18:56 [Thrown class java.lang.RuntimeException]

18:57 with of course no mention as to what args were passed

18:57 technomancy: herdrick: I think it will wait until the Clojure-in-Clojure compiler.

18:57 herdrick: i find this slows me down a lot

18:57 technomancy: ok

18:58 technomancy: herdrick: the clj-stacktrace library looks great for just making things more readable though

18:58 it's on my to-investigate list

18:58 herdrick: technomancy: making the stack trace more readable? so it doesn't add any more info, right?

18:59 technomancy: herdrick: right

18:59 herdrick: i can deal with messy messages

18:59 it's the lack of info that kills

19:13 chouser: herdrick: by looking at the stack trace as is, you should be able to see the line where score-pair was called

19:15 herdrick: chouser: thanks. well, i get something like this in stack trace: user$score__6568.invoke(NO_SOURCE_FILE:5)

19:15 i'm running this in a SLIME repl

19:16 chouser: keep backing up

19:16 "before" that on the stack should be the actual fn and line that calls score-pair

19:17 herdrick: chouser: that line *is* where i call score-pair

19:17 the number that comes after NO_SOURCE_FILE: is curious

19:18 technomancy: herdrick: if you use C-c C-k to compile your files you'll get better line numbers in your stack traces

19:18 chouser: oh, I see

19:18 technomancy: NO_SOURCE_FILE:5 means the fifth line of an anonymous region that was eval'd without filename data

19:18 herdrick: technomancy: really? trying that...

19:19 technomancy: oh, that's great. thanks a ton.

19:20 ambient: to build vimclojure i have to install Gradle?

19:20 herdrick: technomancy: regarding the NO_SOURCE_FILE thing: it always seems like its incremented one line too many - still useful tho, thanks

19:21 chouser: thanks for the help, too

19:39 hi, i have another question for the helpful people of #clojure :)

19:39 any ideas about how to print out a tree of sequences in a sort of tree-like way?

19:40 i have nested seqs and i'd like to view them in a tree-like format

19:59 say, is there a way to enter a private irc channel where clojurebot is present?

19:59 Chousuke: herdrick: there's a pretty-printer in contrib

19:59 you might be able to use that.

19:59 herdrick: ok, i saw that

20:00 Chousuke: doesn't clojurebot work in query?

20:00 herdrick: query? i don't know much about IRC

20:01 Chousuke: private chat. /query clojurebot

20:01 I'm not sure if it'll respond though

20:01 herdrick: as for pprint in contrib, unfortunately i'm a little leery of getting the newest code from github as i'm a little afraid of it breaking my current setup... for example incanter now ships with a a version of clojure jar-ed up, apparently

20:01 ok, thanks Chousuke

20:02 Chousuke: herdrick: there are actually releases of contrib now

20:02 herdrick: yep, it works, thanks Chousuke

20:02 Chousuke: for 1.0.0 and 1.1.0

20:02 herdrick: ok, Chousuke, i'll look at that

20:02 thanks

21:07 a_strange_guy: hi, i noticed that the clauses in the 'case special form aren't tailcontexts

21:08 that should be a bug, shouldn't it?

21:11 ,(loop [c 0] (case 0 (recur 1) :foo))

21:11 clojurebot: java.lang.Exception: Unable to resolve symbol: case in this context

21:12 a_strange_guy: '(clojure-version)

21:12 ,(clojure-version)

21:12 clojurebot: "1.1.0-master-SNAPSHOT"

21:13 hiredman: uh

21:13 pretty sure you are missing part of that case

21:14 a_strange_guy: stupid mistake, but clojurebot isn't 1.2.0-master anyway

21:17 hiredman: I wonder if the non tail position might be a limitation of the special dispatch case uses

21:18 a_strange_guy: it should be possible on the JVM

21:18 hiredman: well, recur uses the goto bytecode, and case uses some special dispatch table stuff

21:18 they might not play nice

21:20 dnolen: http://paste.lisp.org/+20QX

21:22 http://paste.lisp.org/display/94281#1, in the macroexpansion recur isn't in the tail position.

21:23 a_strange_guy: we dont know actually

21:23 dnolen: might be intentional in case's design tho. case meant for fast code, not expressive code.

21:24 fast code == when clojure's core data types get rewritten in Clojure.

21:28 chouser: will they be faster?

21:29 dnolen: chouser: think so ? :)

21:39 jweiss: does clojars have some kind of picky thing about ssh keys? i pasted my dsa public key and it rejected it

21:39 dakrone: hmm...can someone help me with the clojure equivalent of Object[] params = new Object[]{"xxx@yyy.com", "password"}; ?

21:40 not really sure since it doesn't seem like a regular constructor

21:40 hiredman: it isn't

21:40 that is an array

21:40 jweiss: dakrone: what's wrong with ["xxx@yyy.com" "password"] ?

21:40 hiredman: (to-array ["xxx@yyy.com" "password"])

21:40 jweiss: or that if you really want an array :)

21:41 ambient: ,(doc into-array)

21:41 clojurebot: "([aseq] [type aseq]); Returns an array with components set to the values in aseq. The array's component type is type if provided, or the type of the first value in aseq if present, or Object. All values in aseq must be compatible with the component type. Class objects for the primitive types can be obtained using, e.g., Integer/TYPE."

21:41 dakrone: oh hah, I thought it was doing something more complex underneath

21:41 hiredman: ambient: it's an array of Objects

21:41 so to-array is fine

21:41 ambient: ok

21:41 hiredman: ,(to-array ["xxx@yyy.com" "password"])

21:41 clojurebot: #<Object[] [Ljava.lang.Object;@1f3f16b>

21:42 hiredman: weird print

21:42 dakrone: hiredman: that solved it, thank you

22:02 what's the syntax for casting a java type to a different java type in clojure?

22:03 hiredman: don't

22:04 chouser: no need

22:04 hiredman: clojure is a dynamic language, you don't need to cast anything to anything

22:04 dakrone: hmm...I'm getting a java.lang.IllegalArgumentException: No matching method found: execute for class org.apache.xmlrpc.client.XmlRpcClient

22:05 which I was guessing was due to using a HashMap instead of a regular Map

22:05 tomoj: type hint?

22:06 hiredman: dakrone: a HashMap is a Map

22:06 ~jdoc org.apache.xmlrpc.client.XmlRpcClient

22:07 tomoj: I guess you only need type hints when there are overlapping instances?

22:07 dakrone: here's the code I'm trying to use: http://paste.lisp.org/display/94284

22:08 hiredman: dakrone: none of the execute methods on that take a map

22:08 dakrone: hmm..maybe I'm reading some out-of-date tutorials on it

22:08 hiredman: docjar could be out of date too, or something

22:09 params should be an array or a list

22:11 dakrone: with a regular array I'm getting this error: http://paste.lisp.org/display/94284#1

22:11 which I interpreted as needing to use key/values instead of just a regular list from what I found online

22:12 hiredman: that is an error string from perl

22:12 (bugzilla)

22:13 you can tell because it takes about User.pm

22:13 talks

22:13 dakrone: yea, so browsing around on perl sites made it look like it should have been a hash instead of a list

22:13 hiredman: a perl hash has nothing to do with a java or a clojure hash

22:14 dakrone: perl is not my strong suit

22:14 hiredman: I think you need to pass an array with a hash in it

22:15 the array is the arguments for the rpc call

22:15 you want to send one argument, a map

22:15 so an array with a map in it

22:15 dakrone: okay, so an array containing a HashMap then

22:15 hiredman: I would just try a clojure map first

22:16 no sense using a hashmap if you don't have to

22:16 dakrone: okay, I'll give it a shot :) thanks

22:18 hiredman: progress, that got past it, thank you

22:55 konr: is there a succint way to create a combination of n lists, like (comb [1 2] [a b]) -> [1 a] [1 b] [2 a] [2 b]}

22:55 *{[1 2] ...

23:02 http://richhickey.github.com/clojure-contrib/combinatorics-api.html

23:02 yay!

23:03 liebke: ,(for [i [1 2] j [:a :b]] [i j])

23:03 clojurebot: ([1 :a] [1 :b] [2 :a] [2 :b])

23:04 Kruppe: I use java a lot at work, can I write libraries in clojure that my colleagues can import and use as if they were regular java classes?

23:10 hiredman: they will need to have the clojure runtime available

23:11 but otherwise, yes

23:13 Kruppe: hiredman: interesting, I might have to look into that

Logging service provided by n01se.net