#clojure log - May 22 2009

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

0:07 durka42: i don't understand where clojure.lang.Compiler/macroexpand could be throwing away the metadata where clojure.core/macroexpand does not, as it is as direct a port as i can determine

0:08 +1 for that disassemble idea i suppose

0:15 avital: hello. is there a good reference for what set! does? i'm trying to get it from http://clojure.org/vars but it doesn't make much sense to me. altogether i'm trying to see what would "go wrong" if you just vars instead of atoms

0:17 or maybe someone here might be able to elaborate?

0:18 hiredman: thats an interesting question, I believe at one point refs and vars where the same thing (back in clojure pre-history)

0:18 avital: my current answer - i'm not sure its completely accurate

0:19 is that with atoms you can use a function that computes the new value for the atom and there is no intermediate value problems (that could cause broken invariants, etc)

0:19 and with vars you can still modify data you just don't have that added benefit

0:19 hiredman: vars also interact with binding

0:22 durka42: man, if i knew jvm bytecode i could maybe figure out what's going on

0:22 hiredman: ~def c.l.Compiler

0:22 :O

0:22 ~ping

0:22 clojurebot: PONG!

0:22 hiredman: ~def c.l.Compiler

0:23 connection refused

0:25 durka42: connection refused going where?

0:25 hiredman: tinyurl I guess

0:26 I wonder if I over some quote

0:26 quota

0:27 durka42: ~google tinyurl api quota

0:27 o_O

0:27 hiredman: huh

0:28 seems like maybe clojurebot needs a kick

0:28 durka42: ~kick

0:28 clojurebot: First, out of 2520 results is:

0:28 Google Analytics Data API - Protocol - Google Analytics - Google Code

0:28 http://code.google.com/apis/analytics/docs/gdata/1.0/gdataProtocol.html

0:28 No entiendo

0:28 durka42: ha

0:28 it worked

0:56 unless i'm missing something really obvious, what is the point of the (new clojure.lang.Range ...) lines in c.core/range?

1:00 hiredman: ,(range -20 10)

1:00 clojurebot: (-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)

1:04 durka42: but that does two things

1:05 the first is

1:05 ,(new clojure.lang.Range -20 10)

1:05 clojurebot: (-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)

1:05 durka42: and the second is

1:05 ,(take (- 10 -20) (iterate inc -20))

1:05 clojurebot: (-20 -19 -18 -17 -16 -15 -14 -13 -12 -11 -10 -9 -8 -7 -6 -5 -4 -3 -2 -1 0 1 2 3 4 5 6 7 8 9)

1:05 durka42: and it throws the first one away

1:05 ~def range

1:06 hiredman: uh

1:06 it's in an if

1:07 durka42: that would be the "something really obvious" :)

1:07 hiredman: ~def range

1:07 ~def max

1:07 durka42: why then...

1:07 because Range is faster but can't do bignums?

1:08 hiredman: possibly

1:08 dunno

2:14 cads: can I launch shell applications and pipe together arbitrary system processes inside clojure?

2:15 hiredman: ~javadoc System

2:15 bah

2:15 cads: in ruby, for example, `ls` => "bin\nDesktop\nDocuments\ndocument.tex\nincoming\nnbody\nopt\np\nPictures\nproject\nPublic\nstore\nTemplates\ntmp\n"

2:15 hiredman: right

2:15 Runtime not System

2:16 ~javadoc Runtime

2:35 yangsx: ,(clojure.set/rename-keys {:a 1 :b 2} {:a :a1 :c c1})

2:35 clojurebot: java.lang.Exception: Unable to resolve symbol: c1 in this context

2:35 yangsx: ,(clojure.set/rename-keys {:a 1 :b 2} {:a :a1 :c :c1})

2:35 clojurebot: {:c1 nil, :a1 1, :b 2}

2:37 yangsx: rhickey: Shouldn't the result be {:a1 1, :b 2}?

2:43 slashus2: hmm

4:00 unlink: When are vars useful as a container for mutable data?

4:02 AWizzArd: unlink: it is difficult to say (formally)

4:02 typically vars will be used for atomic values, such as flags

4:03 in most cases you would not want to store collections in vars and dynamically change their bindings

4:03 can you specify what you need?

4:12 unlink: I don't have a use case. I'm just trying to understand the options.

4:13 AWizzArd: They are in most cases used to send signals to other threads and not really as mutable data.

5:10 Chousuke: hmm

5:14 had an exam for a course called "programmin language principles" today. the last problem was to write reverse in lisp

5:15 I hope they accept my solution using reduce. :/

5:16 I forgot the syntax for it in CL (with :initial-value whatever) so I used it like it works in clojure (with a comment). :P

5:16 clojurebot: for is not a loop

5:17 jdz: theoretically they should. but you're in trouble if they are old-school and wanted you to write a recursive function...

6:27 Chousuke: jdz: I guess I should've included a recursive definition of reduce.

6:27 jdz: hehe

6:34 Chousuke: actually, the previous problem was to tell what a given lisp function does... it was append. I guess I could've used that too :P

6:34 but reduce is much neater. :)

6:36 AWizzArd: Impress your teacher by letting him know that you are aware that map is just a special case of reduce :)

7:09 maacl: Anybody has any experience with JACOB (COM/Java) bridge and Clojure?

7:12 I cannot figure out how to apply map or doseq to the Variant objects returned by JACOB.

7:45 opqdonut: is there a simple way of propagating current local bindings inside an eval

7:48 AWizzArd: opqdonut: you could (list '+ loc1 loc2) and eval that

7:49 opqdonut: i'm not building the evalled structure, it's coming from elsewhere

7:53 AWizzArd: Do you have an example? Do you mean something like (defn foo [a b] (eval (+ b 10))) and then (foo 5 'a) and you want ==> 15?

7:54 opqdonut: yeah basically

7:55 i have a macro that builds a complex structure, which is then processed. processing includes eval

7:56 jdz: opqdonut: do you have experience with lisp programming?

7:56 opqdonut: and i'd like to parametrize these sturcutes built with the macro: "(defn foo [a b] (macro ...))"

7:56 AWizzArd: Probably you will need to write your own interpreter then

7:56 opqdonut: jdz: some, i've done cl and scheme in the past

7:56 jdz: opqdonut: anyway, macroexpand is your friend

7:57 opqdonut: jdz: please elaborate

7:58 jdz: opqdonut: macros are expanded when code is processed (compiled). with macroexpand you can see what code will be executed at runtime.

7:58 opqdonut: yes

7:59 ah, with-local-vars will probably help

8:00 hmm

8:02 jdz: btw, anybody noticed that [maybe all] source code locations are 0 now?

8:02 opqdonut: yeah

8:03 luckily we have contrib.stacktrace

8:03 Chouser: regression in svn 1370

8:03 opqdonut: (which doesn't help with all compile-time errors, sure)

8:04 Chouser: hm, and durka42 wrote a patch: http://paste.lisp.org/display/80629

8:06 rhickey: are you getting this? :-)

8:06 rhickey: looking now

8:07 opqdonut: is there a reason for eval not looking up current local bindings?

8:07 jdz: opqdonut: yes.

8:08 opqdonut: pray tell?

8:08 jdz: opqdonut: by the time your eval runs, the names of bindings may have long gone and replaced by register references.

8:08 rhickey: Chouser: what/s a test case?

8:08 opqdonut: ok

8:09 Chouser: ,(:line ^#'map)

8:09 clojurebot: 1509

8:09 rhickey: oh, in metadata

8:15 jdz: 38 out of 460 public vars in clojure.core have a non-zero (and non-nil) values

8:17 :line values i mean

8:35 rhickey: .^#'when

8:35 ,^#'when

8:35 clojurebot: {:macro true, :ns #<Namespace clojure.core>, :name when, :file "clojure/core.clj", :line 310, :arglists ([test & body]), :doc "Evaluates test. If logical true, evaluates body in an implicit do."}

8:36 Chousuke: ,*clojure-version*

8:36 clojurebot: java.lang.Exception: Unable to resolve symbol: *clojure-version* in this context

8:37 Chousuke: hmm.

8:38 jdz: clojurebot must be running on a version without *clojure-version*

8:38 Chousuke: yeah

8:50 AWizzArd: Does the newest version of Clojure run in emacs + jochu's swank?

8:55 jdz: what's jochu's swank?

8:56 eevar2: http://github.com/jochu/swank-clojure/tree/master

8:56 marklar: AWizzArd: I set up a new comp the other day, trunk (the alpha snapshot) didn't work, but the 1.0 branch does

8:57 jdz: oh, that's the only swank :)

8:57 i might make a patch that makes it work for me

8:59 AWizzArd: jochu seems to be busy, no updates since over one month

8:59 lisppaste8: jdz pasted "swank patch for trunk clojure" at http://paste.lisp.org/display/80652

9:02 AWizzArd: jdz: great, that also works for me

9:03 jdz: there's more work to be done if somebody wants to get swank-clojure-compile-p to work

9:03 rhickey: add-classpath be gone!

9:04 jdz: rhickey: yes, that's the short story :)

9:08 Chousuke: hm

9:10 it seems clojure-slime-config forgets to add the swank directory to its classpath

9:10 so swank is correct, clojure-mode isn't.

9:10 or hm

9:10 jdz: Chousuke: it does not forget, it is doing it using add-classpath

9:11 Chousuke: I can't see it anywhere

9:11 jdz: see the paste above

9:14 ,(:line (meta (var *ns*)))

9:14 clojurebot: nil

9:14 Chousuke: right; works

9:15 now to figure out why viper mode is not automatically enabled anymore...

9:16 I should really refactor my non-aquamacs-specific configuration into .emacs or something I guess.

9:22 gnuvince: Chousuke: I recommend ~/.emacs.d/init.el

9:23 Chousuke: does every self-respecting emacs variant load that first? :)

9:23 what.

9:24 I typed "info emacs" into a terminal and the window closed

9:24 it didn't crash. it just closed.

9:24 ... maybe the shell did crash, though.

9:24 * Chousuke hates info pages

9:28 Chousuke: for something large like emacs a full manual is fine in info format I suppose, but it wouldn't hurt to have man 5 emacs that describes briefly what configuration files influence emacs and how. :/

10:30 meh, why is emacs making no sense.

10:31 I do (load "~/emacs.d/init.el") at the top of my init file and that seems to break custom-set-variables :/ (init.el itself does not have it)

10:36 jdz: Chousuke: i think custom-set-variables wants to be the first form in .emacs

10:36 as always, i may be wrong

10:36 Chousuke: well, meh

10:37 that's no fun at all. spoils my modularisation attempt :P

10:37 jdz: and i think if you customize something with emacs customizer, it will put custom-set-variables as the first form later, anyway

10:37 Chousuke: hmm

10:39 weird stuff.

10:40 I put the load statement in my .emacs file and now it works. but not in aquamacs' own config file (custom-blah still isn't the first form though)

12:18 lisppaste8: j-dot pasted "aliases and keywords" at http://paste.lisp.org/display/80657

12:19 j-dot: I've got a question about aliases and keywords ... in the REPL session I just pasted, I want the call to (my/foo {:my/bar "baz"}) to print "baz". Is this possible?

12:20 a call like (my/foo {:my-ns/bar "baz"}) works as expected

12:20 hiredman: ::my/bar

12:20 j-dot: awesome, thanks!

12:21 I thought the double :: was just for use within the namespace

12:32 hiredman: clojurebot: :: is <reply>itym Paamayim Nekudotayim

12:32 clojurebot: 'Sea, mhuise.

12:32 hiredman: clojurebot: ::?

12:32 clojurebot: itym Paamayim Nekudotayim

12:48 gnuvince: Does anyone know when (if) Rich's QCon talks videos will be available

12:52 duncanm: dum de dum

12:53 this might be an idea that has been brought up before

12:53 but what about extending the . form to include something like (. 1 + 2)

12:53 Chousuke: that would be weird.

12:53 duncanm: i just tried it and got "No matching method found: + for class java.lang.Integer"

12:54 but it could be nicer syntax to people new to s-exprs

12:54 in particular (. i < j)

12:54 technomancy: duncanm: I don't think Java works like other OO languages in that regard.

12:54 duncanm: instead of the usual (< i j)

12:54 durka42: it doesn't really relate to the established purpose of . though

12:54 Chousuke: duncanm: I don't think the benefit is enough to justify overloading it like that though.

12:55 duncanm: i guess it's my inner Smalltalker talking right now ;-)

12:55 rhickey: gnuvince: InfoQ spreads out their vids over time, some of the OOPSLA talks are just coming out

12:55 technomancy: duncanm: yeah, Java is not real OO. =)

12:55 duncanm: but shielding people from prefix notation is generally not helpful... they need to dive into the deep end.

12:55 Chousuke: if you want infix notation, you can always write a macro

12:55 duncanm: hey rhickey

12:56 rhickey: hey

12:56 duncanm: well, usually i prefer the prefix notation (.foo obj) to (. obj foo), but sometimes i feel some tension deciding which form looks better

12:56 i figured if that tension exists for method calls as is, no harm extending to operators too ;-)

12:57 technomancy: the tension will fade with time, don't worry.

12:57 replaca: rhickey: question about metadata on namespaces? (from yesterday, but I don't think you saw it)

12:57 duncanm: i mention this because i found out the PLT Scheme people now have an extension that lets them write (i . < . j)

12:57 the syntax obviously(?) inspired by haskell

12:58 replaca: rhickey: right now it seems to get lost in gen-class'ing, which means no ns doc for compiled classes.

12:58 rhickey: should we have an issue on this?

12:58 technomancy: duncanm: with all due respect, don't go there.

12:58 Chousuke: I think (.foo obj) is better because it puts the actual operation first

12:58 technomancy: duncanm: that's a rabbit hole that everyone is tempted by, but it leads nowhere

12:58 duncanm: Chousuke: but then if you nest a bit more, the (.. ) notation becomes mighty attractive

12:58 Chousuke: I prefer -> :)

12:58 (it's more general)

12:58 duncanm: then i start to think, why don't i start with (. obj foo)

12:59 Chousuke: what's -> ?

12:59 is that an alias to 'doto' ?

12:59 technomancy: -> is like a cross between doto and reduce

12:59 rhickey: replaca: yes, issue would be great, thanks

12:59 technomancy: it accumulates the return value of each call

12:59 replaca: rhickey: ok, will do

12:59 Chousuke: (-> "foo" .toUpperCase symbol)

12:59 duncanm: i guess this sort of conversation must have been rehashed over and over again back in the Lisp days

12:59 Chousuke: ,(-> "foo" .toUpperCase symbol)

12:59 clojurebot: FOO

12:59 duncanm: Chousuke: oooh, that's news to me

13:00 Chousuke: note that it allows mixing java and clojure, which .. doesn't allow

13:00 duncanm: oooh, fun

13:00 Chousuke: ,(macroexpand-1 '(-> "foo" .toUpperCase symbol))

13:00 clojurebot: (clojure.core/-> (clojure.core/-> "foo" .toUpperCase) symbol)

13:00 technomancy: duncanm: it's even come up on the clojure list several times. the consensus is always: people need to get comfortable with prefix notation or they will remain second-class citizens when it comes to reading existing code

13:00 duncanm: technomancy: right

13:01 technomancy: we don't want to fragment the community

13:01 duncanm: technomancy: yeah, i'm okay with the prefix notation

13:01 technomancy: i just thought, the PLT people are now incorporating this . op . notation

13:01 and clojure's front-dot notation is in fact even better, if only it supported operators

13:01 Chousuke: ,(-> "foo" .toUpperCase (str "bar"))

13:01 clojurebot: "FOObar"

13:02 duncanm: but i have no personal feelings regarding the underlying idea (that there be syntax for infix notation)

13:03 hmm

13:03 Chousuke: is that like cascades in Smalltalk?

13:03 rhickey: infix is a non-priority, dramatically complicates readability once you are used to prefix

13:03 duncanm: rhickey: agreed

13:03 technomancy: duncanm: here's the latest discussion on that if you want to follow the last time it was raised: http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38?q=infix+mark&lnk=ol&

13:03 duncanm: heh, thanks but no thanks ;-)

13:04 Chousuke: duncanm: it's just a simple recursive macro: first form is put right after the head in the second form, the result of that is again put after the head of the third form, etc.

13:04 duncanm: all of this came to me because i was reading this guy blogging about this .op. notation from PLT, and I thought, Clojure can do better than that!

13:04 gnuvince: rhickey: ok, thanks.

13:04 technomancy: clojurebot: infix is not worth the trouble; see http://groups.google.com/group/clojure/browse_thread/thread/319a1c77ed718ba/3e4be7484b7cbe38

13:04 clojurebot: In Ordnung

13:05 duncanm: so (-> "foo" .toUpperCase (str "bar")) is the same as (str (.toUpperCase "foo") "bar")

13:05 Chousuke: yes.

13:05 duncanm: funky... i wonder when this form would be useful..

13:05 neat

13:05 learned something new today

13:06 Chousuke: it's useful quite often

13:06 you could also write (.toUpperCase) but the macro allows omitting the parens in that case

13:06 rhickey: replaca: could you please email me details on the SF meetup?

13:06 duncanm: rhickey: are you still doing a lot of travelling spreading the gospels of Clojure around?

13:07 replaca: rhickey: yup, you'll get them this morning

13:07 duncanm: rhickey: like i said to you at the ILC, i keep thinking of how great it is that, 3 months after i saw your talk in Boston, i'm now writing Clojure code at work everyday ;-)

13:07 rhickey: duncanm: Java one coming up. I might do JAOO in the fall if I can work it in. Overall I'm trying to ease up on travel so I can get more done

13:07 Chousuke: ,(let [x 5] (> 6 x 1)) ; <- perk of prefix notation

13:07 clojurebot: true

13:07 technomancy: duncanm: that sounds like a lot of fun actually. some kind of mendicant friar hacker wandering around with a time-worn copy of the book of First Halloway. =)

13:08 duncanm: Chousuke: sure

13:08 Chousuke: I was surprised when I saw that in some code.

13:09 I didn't even consider > could take more than two parameters

13:09 duncanm: guys, i don't need to be sold on prefix notation ;-)

13:09 technomancy: heh

13:09 duncanm: i rarely use to front-dot notation myself

13:10 technomancy: just for the sake of argument, wouldn't it be a good idea to disallow (. obj foo) and always wrote (.foo obj) ?

13:10 Chousuke: duncanm: . is the special form

13:11 .foo and Foo/bar are sugar for it.

13:12 duncanm: Chousuke: that's implementation, one could choose not to expose . on its own, right?

13:12 Chousuke: well, I guess.

13:12 duncanm: ah well

13:12 Chousuke: it could be useful for macro writers though.

13:12 duncanm: ahh

13:12 good point

13:13 sigh, how did i get myself into a discussion about syntax

13:13 next time, i should learn to keep it to myself - syntax discussions are generally silly

13:14 Chousuke: there's not that much syntax to discuss anyway :)

13:16 hiredman: rhickey: docs say "The current namespace, *ns* can and should be set only with a call to in-ns or the ns macro, both of which create the namespace if it doesn't exist." but (binding [*ns* (create-ns 'foo)] stuff) seems to work fine, is correct that binding should not be used for this case?

13:22 rhickey: hiredman: right, binding *ns* not advised

13:23 hiredman: oh :(

13:24 in-ns seems hoplessly imperative

13:24 (in-ns 'foo) do stuff (in-ns 'bar)

13:25 rhickey: in-ns is not something for use in program logic, just for repl and declaratively establishing ns at top of file

13:26 mcroom: does anyone know if it's possible to bind *use-context-classloader* when generating a class via gen-class?

13:26 hiredman: rhickey: so what would be used in program logic?

13:29 rhickey: hiredman: what kind of program logic?

13:30 hiredman: rhickey: uh, good question, someone was in here yesterday trying to write a macro for defining functions in another namespace so those functions would have access to private vars

13:36 technomancy: wasn't there a with-ns macro contributed recently?

13:37 replaca: ~def with-ns

13:37 hiredman: :(

13:37 replaca: technomancy: looks like the answer is yes :-)

13:40 hiredman: ugh

13:40 * hiredman watches clojurebot spam twitter again

13:41 hiredman: no wonder, I re-defed that

13:45 clojurebot: how much do you know?

13:45 clojurebot: I know 302 things

13:47 cemerick: there should be an add-method to go along with remove-method (and make roping an existing fn in as the impl of a method simpler)

13:51 Chousuke: (.addmethod multi dispatch fn)

13:51 :p

13:51 (I picked that from defmethod)

13:53 cemerick: Chousuke: yeah, I looked it up, too -- I'm not saying that's hard at all, but it's a common-enough operation that a std fn should be available IMO (just like remove-method, which is just a wrapped call to .removeMethod) *shrug*

13:53 hiredman: ~def max

13:53 oh crap

13:53 cemerick: speaking of....

13:53 ~max

13:54 hiredman: mismatch between what version clojurebot thinks is running and what version it is

13:56 ~def max

13:57 ,*clojure-version*

13:57 clojurebot: {:interim true, :major 1, :minor 1, :incremental 0, :qualifier "alpha"}

14:01 technomancy: I'm trying a project that complains due to the absence of ~/.clojure.conf, but it doesn't give any details about what this file should look like.

14:01 anyone know where I could find a sample?

14:02 danlarkin: is it this? http://github.com/bkudria/dotfiles/blob/d5f9ea692162171664d604886a2467debab6c293/.clojure.conf

14:02 hiredman: oh, isn't that a lanucher config dingus

14:02 technomancy: looks about right; thanks

14:03 danlarkin: first link in google for "clojure.conf" btw :)

14:03 technomancy: heh... the output told me to look in the "emacs-clojure" repository instead, which doesn't seem to exist.

14:10 * technomancy finds himself wishing Seattle had a Clojure group like SF's.

14:10 technomancy: any other seattle residents in here besides myself and hiredman?

14:10 * danlarkin wishes albany had a user group for anything

14:10 technomancy: =(

14:11 * Chousuke wonders how many clojure users there are in this country.

14:12 technomancy: danlarkin: I got the go-ahead to open-source my couch adapter btw

14:12 ataggart: /msg NickServ identify passw0rd

14:12 hiredman: cute

14:12 technomancy: there's not much to it, but here it is: http://p.hagelb.org/couch.clj.html

14:13 danlarkin: is that pretty close to what you had?

14:13 danlarkin: technomancy: I have a bit more than that

14:13 hiredman: and hiredman doesn't do any software developement

14:13 technomancy: danlarkin: what do you think about the way with-db binds couch/*db*?

14:14 I found it convenient syntax, but it breaks if you have anything lazy that gets realized outside the with-db block.

14:14 danlarkin: it's a neat idea.. yeah you have to be careful with the laziness

14:15 hiredman: the alternative is contrib.sql style passing around db

14:15 danlarkin: I have only explicit parameters, other than server, which is *server*

14:15 technomancy: passing around the DB name to every request felt tiresome to me, but you don't run into the laziness problem

14:16 it might make more sense if you had code that used more than one DB at a time

14:16 danlarkin: technomancy: yeah I was thinking I'd tackle that problem when I came to it

14:16 hiredman: you could make everything a multimethod to allow both styles

14:17 technomancy: hiredman: would you need a multimethod for that? seems you could just have optional args.

14:17 oh, you mean a multi-body fn?

14:17 hiredman: yeah

14:17 technomancy: that would probably be better, yeah.

14:17 danlarkin: it doesn't work for some cases, at least with my lib..

14:18 since I've got, like, document-get which can take a DB and a document, or a DB, document and revision

14:20 hiredman: hmmm

14:20 technomancy: hiredman: SeaFunc is next wednesday BTW

14:21 in case you're interested. (Seattle Functional Group)

14:21 hiredman: hmmm

14:22 danlarkin: twism also has a couchdb interface

14:22 I don't think any of us have "released" yet though

14:23 * cemerick is very interested to see twism's view server, when it's ready

14:23 danlarkin: ohhhh cemerick is coming around

14:23 :)

14:23 * technomancy claims first place

14:24 cemerick: danlarkin: heh -- we'll see.

14:24 We are using jcouchdb for now, though.

14:24 danlarkin: I would be sortof almost ready to release, except I want an ordered-map, and lacking one I'm not sure what datastructure to use

14:25 cemerick: ...and shelling out via python for a couple of key java-driven views. We may or may not make our own view server depending on timelines.

14:27 * danlarkin has gotta stop finding other things to fiddle with and prep for release

14:34 StartsWithK: hi

14:35 any way i can load .clj file without executing it? like read-string

14:35 well, not like read-string as it reads only the first object

14:36 hiredman: uh

14:36 read?

14:37 StartsWithK: heh, thanks

14:49 Chouser: I've got to be thinging about this wrong. I should not have this kind of race condition in Clojure code.

15:06 cemerick: Was I imagining things, or is there some kind of pretty-printing macroexpand these days?

15:07 Chouser: there's pprint in contrib which can do such things

15:11 * Chouser instruments Agent.java

15:14 hiredman: the distiction is not unimportant with regards to scoping

15:14 oh wow

15:14 wrong channel

15:16 sh10151: uh

15:16 how about

15:16 "the distinction is important for scoping"

15:16 just a suggestion

15:17 hiredman: DENIED

15:17 Chouser: I use such double negatives a lot. They don't mean quite the same when cancelled out.

15:17 sh10151: Chouser: ITYM "it is not uncommon that I use double negatives"

15:18 Chouser: sh10151: indeed, it's impossible that you're incorrect.

15:19 sh10151: "not unlikely that I'm correct"

15:19 your version is a de morgan's nightmare or something

15:19 emacsen: I have an easy question. Can somone please help me by clojurizing this Java line (I'm getting constructor errors): Session session = Session.getInstance(new Properties());

15:20 sh10151: (Session/getInstance(Properties.))

15:20 emacsen: I've not seen the / macro before...

15:20 what the heck is that? (doc is unhelpfu)

15:20 sh10151: you're old school like me then

15:21 tried to learn the language and rich goes "hey, lemme improve that for you!"

15:21 Chouser: it's just a namespace qualified symbol, but if the namespace is actually a class name, and the name part is a static method or field, then it's a java interop call

15:21 sh10151: http://clojure.org/java_interop

15:21 (Classname/staticMethod args*)

15:21 Chouser: ,(macroexpand '(Session/getInstance(Properties.)))

15:21 clojurebot: (Session/getInstance (Properties.))

15:21 sh10151: if you don't know Java that might be rough for you

15:22 you'd need to know that Session.getInstance is a static method call

15:22 emacsen: Wow... that's useful but wow.... (No I don't know Java, and this is biting me)

15:22 oh it's not instanced?

15:22 Chouser: hm. that macroexpand was not useful, because those classes are not imported for clojurebot

15:22 sh10151: Anything that starts out with Classname.methodCall has no instance

15:23 emacsen: gotcha

15:23 sh10151: Java has no metaclasses

15:24 emacsen: There really needs to be a quick primer somewhere

15:24 sh10151: a rosetta stone like you just asked for

15:24 nothing too involved

15:24 just covering the case of using Java libraries while not knowing Java syntax

15:24 though Java syntax isn't the most complicated thing to learn

15:25 emacsen: Exactly. It's also that many of the Clojure docs I've read assume you know Java

15:25 hiredman: http://java.sun.com/docs/books/tutorial/java/index.html

15:25 emacsen: they're all like "You know Java, so here's Clojure"

15:25 sh10151: yep

15:25 like the talk about the Comparator interface and proxy and whatnot

15:25 hiredman: clojurebot: learn java?

15:25 clojurebot: ?

15:25 sh10151: Though it strikes me that Clojure's intent is to drag java developers to lisp

15:25 hiredman: clojurebot: learn java is <reply>http://java.sun.com/docs/books/tutorial/java/index.html

15:25 clojurebot: Ok.

15:26 sh10151: rather than the reverse :)

15:26 hiredman: clojurebot: please help me learn java!

15:26 clojurebot: http://www.khanacademy.org/

15:26 hiredman: huh

15:26 emacsen: sh10151 I think so too but there are some of us who purposefully never learned Java :)

15:26 hiredman: ~learn

15:26 clojurebot: http://java.sun.com/docs/books/tutorial/java/index.html

15:26 hiredman: clojurebot: are you kidding me?

15:26 clojurebot: It's greek to me.

15:26 sh10151: it's worth knowing the syntax

15:27 hiredman: clojurebot: learn me some java for great good!

15:27 clojurebot: ?

15:28 hiredman: clojurebot: how can I learn java?

15:28 clojurebot: http://java.sun.com/docs/books/tutorial/java/index.html

15:29 emacsen: So in that Session/getInstance (Properties) example I'm passing a Properties to the Session/getInstance?

15:29 hiredman: actually berkely's 61b course video is online somewhere. that is like the most boring intro to java every

15:29 ever

15:30 emacsen: don't forget the .

15:30 ,(macroexpand '(Properties.))

15:30 clojurebot: (new Properties)

15:30 emacsen: right... I got that... so yes, :)

15:47 Lau_of_DK: I need to get a thread-local-var going, is 'binding' the method of choise?

15:52 danlarkin: Lau_of_DK: that's what I use, anyway

15:55 Chousuke: with-local-vars too

16:02 cemerick: hrm...why isn't there a tag in clojure-contrib's svn for 1.0?

16:02 (I see the revision-comment, but a tag is good, and canonical.)

16:04 Lau_of_DK: Thanks

16:06 I have a problem picking between binding and with-local-vars - In the setting of using routes in compojure, each route needs to get an instance of the cookie for a given session - which would be appropriate?

16:10 maacl: Does anyone have any experience with using JACOB (the Java COM bridge) with Clojure? I have problems applying Clojure functions/macros like map and doseq to the objects (Variants) returned by JACOB. I am guessing I need to do some kind of conversion, but I can't figure out how.

16:11 replaca: cemerick: are you a slime guy?

16:11 cemerick: replaca: no, enclojure :-)

16:12 hiredman: maacl: do you have specific code + exception?

16:12 gnuvince: Would it be possible to make Java array accesses *not* go through the reflection library?

16:12 replaca: cemerick: oh,, weren't you fighting enclojure that other night? I thought they had added pretty printing macro expansion, but maybe that's just slime & the vim extension

16:12 Chousuke: gnuvince: hint them as #^ints etc?

16:13 gnuvince: Chousuke: still calls java.lang.reflect.Array.setInt and whatnot

16:13 hiredman: gnuvince: seems like it should be

16:13 replaca: cemerick: but to answer your earlier question (pprint (marcroexpand-1 foo)) should do it

16:13 hiredman: gnuvince: are you using aset-int?

16:13 cemerick: replaca: they may have. I haven't explored the new features much at all...just trying to get the work done. :-)

16:13 gnuvince: hiredman: yes.

16:13 hiredman: gnuvince: don't

16:13 Chousuke: hmm.

16:14 replaca: you might want to wrap that in a (binding [*pprint-suppress-namespaces* true] ...) to remove the namespaces from the symbols (which makes it easier to read)

16:14 dnolen: aset is faster then aset-int, confirmed by the BDFL

16:14 gnuvince: hiredman: no change

16:15 replaca: I should probably just add that whole thing as a function in the pprint package... hmmm...

16:15 maacl: hiredman: sure , just a sec

16:15 dnolen: You need to create a let expression. Cast with (ints ary)

16:15 Or whatever

16:16 hiredman: 2009:May:11:08:53:29 rhickey : Chouser: yes, hinted array + aset is fastest, aset-int is not a fast thing at all

16:16 gnuvince: dnolen: this is what I got:

16:16 (let [#^ints arr (int-array len)]

16:16 (dotimes [i len]

16:16 (aset arr i (mask-fn (getter buf))))

16:16 Chousuke: (binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10)))

16:16 ,(binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10)))

16:16 clojurebot: EOF while reading

16:16 Chousuke: oops

16:16 ,(binding [*warn-on-reflection* true] (let [a (into-array Integer/TYPE [1 2 3 4 5]) a (ints a)] (aset a 1 (int 10))))

16:16 clojurebot: 10

16:18 Chousuke: hm, looks like the type casts are pointless

16:18 I don't get reflection warnings even if I remove them

16:18 dnolen: gnuvince: I think you need yo cast the result of mask-fn. Return values are boxed.

16:19 gnuvince: I meant, I get calls to java.lang.reflect.Array.setInt in the outputs of -Xprof and -Xrunhprof

16:19 dnolen: You should not I'm pretty sure.

16:20 gnuvince: let me try casting the result of mask-fn

16:20 Chouser: Chousuke: I'm pretty sure that binding happens too late

16:23 emacsen: Hey technomancy

16:23 Chousuke: Chouser: might be.

16:24 technomancy: emacsen: hi

16:24 gnuvince: dnolen: I still got some calls, although they look nearly negligible.

16:25 dnolen: gnuvince: So an improvement?

16:26 gnuvince: not really, performance is basically the same

16:26 maacl: hiredman: http://paste.lisp.org/display/80674

16:26 dnolen: Seems

16:26 Odd

16:27 technomancy: emacsen: how goes it?

16:27 hiredman: maacl: replace (map mtch paras) with (class paras)

16:27 gnuvince: dnolen: don't worry too much about it, I've been trying to improve the performance of this program for over two months now.

16:28 maacl: hiredman: com.jacob.com.Dispatch

16:29 hiredman: maacl: map takes a seq

16:29 or a Collection

16:30 btw putting defs inside a function like that is not cool

16:30 maacl: hiredman: Yeah, and I don't know how to go from the Dispatch or Variant classes that I get from JACOB to a seq or Collection

16:31 hiredman: maacl: well, read the javadoc for Dispatch

16:31 maacl: hiredman: I know, this is just quick and dirty stuff to see if I can get it to work

16:31 hiredman: is it some kind of logical collection? is does it provide an interator?

16:32 you maybe need to write your own lazy-seq wrapper over Dispatch

16:32 ataggart: is any Iterable automatically seqable?

16:32 technomancy: ,doc iterable-seq

16:32 clojurebot: java.lang.Exception: Can't take value of a macro: #'clojure.core/doc

16:32 ataggart: ah nice

16:33 hiredman: ataggart: well, not the same way a Collection is

16:33 but you just call iterable-seq on it

16:33 technomancy: (doc iterator-seq)

16:33 clojurebot: "([iter]); Returns a seq on a java.util.Iterator. Note that most collections providing iterators implement Iterable and thus support seq directly."

16:33 ataggart: excellent

16:33 hiredman: ok, ? what that said

16:34 ataggart: spelling counts ;)

16:35 maacl: hiredman: it is a java version of a MS level dispatch object whatever that is

16:36 hiredman: maacl: well, go read the javadocs

16:38 maacl: hiredman: that is what I did, it has no methods that imply that it is a collection

16:38 hiredman: maacl: don't look at methods, look at inheritence

16:38 maacl: is it some kind of collection of things?

16:38 if it isn't, why are you trying to use map?

16:39 ugh

16:39 and you're mapping a function that keeps re-defing stuff

16:39 horrible!

16:39 infact

16:39 just forget about the map for now and rewrite the function using let

16:39 maacl: hiredman: it is a collection in this case but apparently it can represent any com object

16:40 hiredman: maacl: so how would you access the objects in the collection?

16:40 maacl: hiredman: as I said, quick a dirty, planning to clean it up

16:40 hiredman: there is quick and dirty, and there is shameful

16:41 maacl: hiredman: thanks, that is really helpful being a newb and all

16:41 hiredman: if you are new there is all the more reason you should be writing in proper style

16:42 writing it like that makes it difficult to read

16:42 and makes it harder for other people to help you

16:43 maacl: hiredman: I realise that, but that is what my current skills suffice for

16:44 hiredman: not that I do not want to improve them that is

16:45 hiredman: maacl: for binding names to values locally (within a function or some other scope) use let

16:45 ,(let [a 1] a)

16:45 clojurebot: 1

16:45 maacl: hiredman: ok

16:47 hiredman: so, how would you get one of the objects in the collection out of the Dispatch object?

16:49 maacl: hiredman: that is what I cannot figure out - the dispatch object is some sort of generic object and it has no useful methods as far as I can see

16:50 hiredman: ...

16:50 maacl: hiredman: the com object it represents has a First and Last Property but no methids to iterate over it

16:51 hiredman: is the javadoc online somewhere?

16:51 maacl: hiredman: I am really fumbling around in the dark here

16:51 Chouser: maacl: do you have clojure.contrib? Can you get one of these objects in your REPL?

16:51 maacl: yes

16:51 Chouser: have you ever used clojure.contrib.repl-utils/show ?

16:51 clojurebot: clojure is the brand

16:52 Chouser: oh

16:52 ...catching up here...

16:53 maacl: Chouser: http://paste.lisp.org/display/80674#1

16:53 hiredman: http://paste.lisp.org/display/80674#1

16:53 Chouser: yeah, see that now, sorry.

16:54 maacl: hiredman: don't think so

16:54 hiredman: maacl: what is this supposed to be a collection of?

16:55 maacl: hiredman: paragraph objects

16:56 hiredman: what kind of java object is that?

16:56 maacl: hiredman: also a variant

16:57 Chouser: have you managed to call any methods yet?

16:57 do you have any docs for this paragraph collection object?

16:57 the COM object I mean

16:57 hiredman: maacl: where there are a few nice getVariant methods there

16:57 I would start with those

17:00 * durka42 playing with nested metadata

17:01 durka42: ,(defmacro_ with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))

17:01 clojurebot: java.lang.Exception: Unable to resolve symbol: defmacro_ in this context

17:01 * Chouser is fighting agent and agent-watcher-agent races

17:01 maacl: hiredman: but how would that help me to iterate over the collection

17:01 Chouser: durka42: try _defmacro

17:02 durka42: ,(_defmacro with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))

17:02 clojurebot: java.lang.Exception: Unable to resolve symbol: _defmacro in this context

17:02 durka42: Chouser: i knew you had done something evil yesterday

17:02 maacl: Chouser: yeah, only vaguely useful properties are First and Last and Count

17:02 durka42: ,(keys (ns-publics *ns*))

17:02 clojurebot: nil

17:03 Chouser: durka42: ok, now try with _defmacro

17:03 durka42: ,(_defmacro with-nested-meta [obj & metas] `(with-meta ~obj (-> ~(last metas) ~@(map (fn [m] `((fn [~'_1 ~'_2] (with-meta ~'_2 ~'_1)) ~m)) (reverse (butlast metas))))))

17:03 clojurebot: #'sandbox/with-nested-meta

17:04 hiredman: Chouser: could you stop that?

17:04 durka42: ,^^^^^(with-nested-meta [:base "base"] {:two 2} {:three 3} {:four 4} {:five 5} {:six 6})

17:04 clojurebot: {:six 6}

17:04 hiredman: I am well aware there are holes in clojurebot

17:04 Chouser: ,(clear-temps)

17:04 clojurebot: nil

17:04 durka42: maybe intern should be added to the blacklist

17:04 hiredman: I am ok leaving holes

17:04 Chouser: ,with-nested-meta

17:04 clojurebot: java.lang.Exception: Unable to resolve symbol: with-nested-meta in this context

17:05 Chouser: It's easy to clean up

17:05 hiredman: thats not the point

17:05 Chouser: oh?

17:06 hiredman: Chouser: there are DoS like attacks using (try (catch)) allowing people to make macros waltzs around clojurebot's filtering of catch statements

17:09 Chouser: ,_defmacro

17:09 clojurebot: java.lang.Exception: Unable to resolve symbol: _defmacro in this context

17:09 hiredman: ,(_def #^{:macro true} a [& b])

17:09 clojurebot: java.lang.Exception: Unable to resolve symbol: & in this context

17:10 hiredman: ,(_def #^{:macro true} a [b])

17:10 clojurebot: java.lang.Exception: Unable to resolve symbol: b in this context

17:10 hiredman: *shrug*

17:11 twism: ,(doc true?)

17:11 clojurebot: "([x]); Returns true if x is the value true, false otherwise."

17:11 hiredman: oh

17:11 pffft

17:12 ,(_defn #^{:macro true} a [& b])

17:12 clojurebot: #'sandbox/a

17:12 hiredman: ,(a foo bar baz)

17:12 clojurebot: nil

17:12 hiredman: man I have been tpying def where I mean defn a lot lately

17:13 Chouser: ,(intern *ns* '#^{:macro true} ummm (fn [& x] 5))

17:13 clojurebot: #'sandbox/ummm

17:13 Chouser: ,(ummm baz bar foo)

17:13 clojurebot: 5

17:16 Chousuke: ,(ns-publics *ns*)

17:16 clojurebot: {temp-vars #'sandbox/temp-vars, ummm #'sandbox/ummm, _defn #'sandbox/_defn, a #'sandbox/a, _def #'sandbox/_def}

17:16 Chousuke: ,a

17:16 clojurebot: java.lang.Exception: Can't take value of a macro: #'sandbox/a

17:18 Chousuke: ,(map #(ns-unmap *ns* %) '(temp-vars ummm a))

17:18 clojurebot: (nil nil nil)

17:19 Chouser: ,(ns-publics *ns*)

17:19 clojurebot: {}

17:20 Chousuke: where did the others go? :/

17:20 Chouser: I assume hiredman nixed them

17:22 hiredman: yep

17:43 unlink: ,*ns*

17:43 clojurebot: #<Namespace sandbox>

17:43 unlink: ,+

17:43 clojurebot: #<core$_PLUS___3346 clojure.core$_PLUS___3346@b3c24f>

17:43 unlink: ,`+

17:43 clojurebot: clojure.core/+

17:44 unlink: ,`a

17:44 clojurebot: sandbox/a

17:44 * Chouser is so glad he doesn't have to type #<core$_PLUS___3346 clojure.core$_PLUS___3346@b3c24f> every time he wants to add two numbers.

17:44 unlink: Yeah, you'd have to change those numbers every invocation of the program.

17:44 Chouser: tedious

17:49 rhickey: would you consider letting agents have immutable names, for debugging?

17:51 mrsolo_: +1 for that feature!

18:32 rhickey: Chouser: like Maxwell Smart?

18:32 durka42: (def shoe phone)

18:33 hiredman: ~laugh

18:33 clojurebot: No entiendo

18:33 rhickey: with-cone-of-silence

18:42 ataggart: is this an idiomatic way of declaring optional named formal parameters? (defn foo [& [a b c]] ...)

18:47 hiredman: or make a multifn

18:47 ataggart: ah yes, thx

19:04 rhickey: ping technomancy

19:05 technomancy: rhickey: hello

19:05 rhickey: technomancy: I'll check out your sdb changes as soon as I figure out how :)

19:05 technomancy: heh.

19:05 * rhickey knows zip about git

19:06 technomancy: rhickey: if you add my repo as a remote then you can diff it against your master branch

19:07 rhickey: sounds good, how do I add your repo as a remote?

19:08 bitbckt: heh

19:08 * rhickey will rtfm if this is too much trouble

19:08 technomancy: not at all

19:08 bitbckt: git remote add <name> <url>

19:08 technomancy: git remote add technomancy git://github.com/technomancy/sdb

19:08 bitbckt: Like that.

19:09 technomancy: then create a new branch to pull my changes into: git checkout -b service-url

19:09 git pull technomancy service-url

19:09 git diff master

19:10 you can also just view the history of my branch from github's web interface and check out each commit individually: http://github.com/technomancy/sdb/commits/service-url/

19:11 rhickey: the PeepCode screencast on Git is pretty helpful at explaining how things work; if you ask Geoff I'm sure he'd be happy to send you a coupon code for it. =)

19:12 rhickey: technomancy: already bought it, haven't watched it yet

19:12 technomancy: oh cool.

19:14 rhickey: so, if I like your changes then what?

19:14 I know, git this that the other

19:15 :)

19:15 technomancy: heh; yep: switch back to your master (git checkout master) and merge with git merge service-url.

19:15 rhickey: git checkout master

19:16 gnuvince_: Just a FYI guys: http://www.reddit.com/r/programming/comments/8mfh7/terrible_ironpython_20_and_pretty_good_jython_25/c09rdwn

19:16 technomancy: even if clojure ends up on hg, a lot of the concepts are the same. (cheap in-place branching, managing remotes, etc.)

19:17 opqdonut: git rules

19:17 bitbckt: Here we go...

19:17 opqdonut: :)

19:18 Chousuke: :p

19:18 lisppaste8: gnuvince pasted "Simple binary tree constructor" at http://paste.lisp.org/display/80683

19:18 Chousuke: I wouldn't mind hg. it's better than SVN ;(

19:18 rhickey: technomancy: so, after git merge service-url, git status (in master) doesn't show any changed files, did the merge commit them?

19:19 technomancy: rhickey: yeah, that's right. if you "git log -n 5" you'll see the history

19:19 gnuvince_: I bet we generate more conversation on VCS choices than on Clojure itself :)

19:19 technomancy: gnuvince_: http://twitter.com/chacon/status/1865583992

19:19 and also: http://twitter.com/coda/status/1865644913

19:21 I heard the book was delayed till the end of June... too bad.

19:22 gnuvince_: Stuart's book?

19:22 technomancy: yeah

19:22 gnuvince_: Well I guess it's time to make more backward incompatible changes :)

19:22 technomancy: heh

19:22 opqdonut: rhickey: the merge commits if there were no conflicts

19:23 technomancy: oh wait, now it says next week: http://www.pragprog.com/titles/shcloj/programming-clojure

19:23 rhickey: so, now how do I get it up on github?

19:23 technomancy: maybe I was imagining things.

19:23 rhickey: you should be able to just "git push origin master"

19:23 possibly just "git push" depending on how it's configured

19:25 mrsolo_: book delayed? :-<

19:25 rhickey: ooh baby: http://github.com/richhickey/sdb/tree/master

19:25 thanks!

19:25 technomancy: rhickey: looks good! there's a lot to wrap your head around, but it's worth it; I promise. =)

19:27 rhickey: it seems weird that by switching between branches in the same dir, you don't get separate files to view simultaneously

19:27 how do you view diffs in context?

19:27 bitbckt: git diff

19:28 * rhickey is used to IntelliJ

19:28 opqdonut: you can diff whole trees

19:28 rhickey: git diff was pretty ugly

19:28 bitbckt: heh

19:28 Chousuke: try some of the GUI tools

19:28 opqdonut: you can also use gitk or git-gui to browse

19:28 rhickey: opqdonut: also ugly

19:28 Chousuke: gitk is pretty bare, but... did you use OS X?

19:28 technomancy: rhickey: the built-in Emacs version-control tools work the same for git as they do for any other VCS

19:29 rhickey: technomancy: more ugly :)

19:29 Chousuke: gitx is a pretty one for os x

19:29 rhickey: I will try IntelliJ's git support, it's the reason I tried git before hg

19:29 technomancy: rhickey: if the text is ugly then you should pick a better typeface. =)

19:30 but yeah, I've heard good things about gitx if you like point-and-click

19:30 * technomancy is allergic to the rodent, but tastes vary. =)

19:31 bitbckt: do they ever

19:32 rhickey: I don't have spare brain cells to memorize the commands and keystrokes of every program

19:33 * technomancy puts away his deck of flash cards quietly

19:34 technomancy: C-u C-x v = being a personal favourite of mine

19:34 dnolen: GitX makes life easy. For diffs I prefer Changes (very pretty and useful), still waiting for a Git client as good as Cornerstone for OS X.

19:35 As Cornerstone is for SVN i mean.

19:37 * Chousuke checks out what kind of git support intellij has

19:40 technomancy: magit is great for project-level support in Emacs: http://alexvollmer.com/index.php/2009/01/18/meet-magit/

19:40 nothing like it for partial commits particularly

19:40 Chousuke: I never learned to use that properly.

19:41 dnolen: magit is quite good.

19:41 Chousuke: I always just use git add --patch :P

19:41 I never use much of the emacs funky features

19:41 technomancy: is that an interactive add?

19:41 Chousuke: yeah

19:41 bitbckt: git add -i

19:42 a bit more flexible

19:42 at the expense of extra brain cells ;-)

19:42 Chousuke: I get confused with all the key combos in emacs

19:42 clojurebot: but I like using notepad++!

19:42 Chousuke: I just don't use them.

19:42 and clojurebot deserves a cookie

19:42 technomancy: cool... when I was starting I always did commit -a to automatically add everything, but it's much nicer to commit only as much as makes sense for a single unit.

19:43 Chousuke: yeah.

19:43 technomancy: otherwise it's too easy to end up with commits that contain totally orthogonal changes in them

19:43 that's the best part about magit

19:44 rhickey: ah, that's much better:

19:44 http://cloud.github.com/downloads/richhickey/sdb/Picture_1.png

19:44 http://cloud.github.com/downloads/richhickey/sdb/Picture_2.png

19:44 bitbckt: lol

19:44 Chousuke: neat

19:46 * rhickey loves IntelliJ

19:46 bitbckt: Clearly.

19:47 rhickey: they are getting closer with their Clojure support, but I'm still using AquaMacs...

19:47 enclojure too, improving rapidly

19:48 Chousuke: aquamacs lacks the clojure logo :(

19:48 rhickey: but Netbeans only supports Hg :)

19:48 bitbckt: By all means, please use IntelliJ, then. ;-)

19:48 technomancy: I've always been wary of programs that aren't extensible in lisp, but I suppose you could extend IntelliJ or NetBeans using Clojure now?

19:48 hiredman: I nautilus (gnome file manager) showing the clojure logo for .clj files on my freebsd machine

19:49 I have

19:49 rhickey: technomancy: a lot of enclojure is written in Clojure

19:49 technomancy: yeah, that's really the only reasonable way to go.

19:52 rhickey: how are you finding simpleDB? is it pretty pleasant to work with?

19:53 rhickey: technomancy: with the sdb lib, I think so, yes, but I've only played (put my iTunes db on it etc)

19:53 query perf is good with 4000 records

19:53 eventual consistency is the tricky bit, for apps

19:54 technomancy: yeah, it's nice to have a fire-and-forget solution

19:54 keep stuffing things in and let Amazon handle the scaling. =)

19:55 rhickey: keeping my music lib on Amazon costs me 4 cents a month

19:55 technomancy: the query system looks primitive compared to CouchDB, but I guess it just depends on what kind of things you're going to use it for.

19:55 rhickey: Greetings from Amazon Web Services,

19:55 This e-mail confirms that your latest billing statement is available on the AWS web site. Your account will be charged the following:

19:55 Total: $0.04

19:55 technomancy: at least it's ad-hoc query

19:56 technomancy: I wonder if they actually issue a charge for such a small amount, or do they let it accumulate a bit? seems like the credit card processing fees would make that not even worth collecting.

19:57 rhickey: technomancy: I don't know, but I love it! Startup for nothing

19:58 technomancy: pretty slick.

19:58 rottcodd: are there any examples of using jna from clojure?

19:59 hiredman: ~google chouser clojure-jna

19:59 clojurebot: First, out of 8 results is:

19:59 Chouser&#39;s clojure-jna at master - GitHub

19:59 http://github.com/Chouser/clojure-jna/tree/master

19:59 technomancy: clojurebot: psst--you've got an HTML entity showing there.

19:59 clojurebot: excusez-moi

19:59 technomancy: how embarassing.

20:00 hiredman: clojurebot: clojure-jna?

20:00 clojurebot: clojure is like life: you make trade-offs

20:00 hiredman: clojurebot: clojure-jna is http://github.com/Chouser/clojure-jna/tree/master

20:00 clojurebot: 'Sea, mhuise.

20:08 rottcodd: thanks, any reason it's not on the libraries page on clojure.org?

20:10 technomancy: that page is manually updated, takes time for stuff to show up there

20:12 * technomancy needs to let himself not be bothered by trailing whitespace

20:12 technomancy: deep breath... let it out... it doesn't matter.

21:53 gnuvince_: Wow

21:54 That V8 engine the Google guys are writing is pretty impressive.

21:54 The "node counter benchmark" on my machine takes 549s with Python 2.6, 14s with Clojure 1.1 and 1.7s with V8.

21:56 durka42: python looks like a big loser there

21:58 gnuvince_: Yes

21:59 I was quite surprised with Clojure, though I'm quite sure it could do a lot better given some work on the compiler.

Logging service provided by n01se.net