#clojure log - Jan 11 2010

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

0:21 chouser: mebaran151: ha!

0:22 mebaran151: in Soviet Russia, Java writes You!

0:23 though oddly enough, Java is the opposite of a classless language ....

0:24 but it does personify class struggle :)

0:34 defn: I wonder how many lispers grew up poor...

1:10 mebaran151: hmmm

1:10 any ClojureQL junkies about? I've got an col declared primary_key and it's still letting in nils

1:44 Raynes: I wish I could get Slime working with the 'new' branch. :'(

1:55 mebaran151: I wish I could get auto-gen id's to work in clojureql

2:54 I'm having ClojureQL anxiety

3:29 LauJensen: Morning team

3:29 mebaran151: oh Lau, just who I was looking for :)

3:29 defn: G'morning

3:30 mebaran151: I can't seem to get identity columns to work in derby

3:31 le paste: http://gist.github.com/274089

3:35 I also can't seem to get the examples to auto-inc an id either

3:37 LauJensen: sec

3:38 Are you working on a recent pull ?

3:38 mebaran151: I'm gonna try to document all this on your wiki once I get a chance

3:38 fairly recent

3:38 my sources have references to auto-inc and not-nulls

3:38 LauJensen: Great

3:38 mebaran151: I'm running Derby 10.4.2

3:39 LauJensen: Let me just check my snapshot

3:39 Yea, its non-nulls instead of not-nulls in my recent push

3:39 mebaran151: http://gist.github.com/274092

3:40 LauJensen: Same

3:40 mebaran151: oh yep it is

3:40 but auto-inc should be the same?

3:40 LauJensen: But as always, if something isn't working, print out the SQL statement and see whats missing, I expect it would be quite clear in this case that NOT NULL was not being set for all those variables you listed

3:41 mebaran151: I'll look for an example of compile-sql

3:42 LauJensen: (with-connection [c (make-con...)] (compile-sql (query tables *) c))

3:42 or even better

3:42 http://whollyweirdwyrd.blogspot.com/2009/12/testing-clojureql.html

3:43 defn: boom boom chicka chicka boom boom

3:44 how do i get all of the items after the 2nd item in a list?

3:44 is there any way better than (rest (rest coll))

3:44 LauJensen: ,(drop 2 [1 2 3 4])

3:44 clojurebot: (3 4)

3:44 defn: cool thanks LauJensen

3:45 LauJensen: (->> [1 2 3 4] rest rest)

3:45 ,(->> [1 2 3 4] rest rest)

3:45 clojurebot: (3 4)

3:45 LauJensen: np

3:45 unfo-: what is '->>'

3:46 defn: ,(doc ->>)

3:46 clojurebot: "([x form] [x form & more]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."

3:46 unfo-: ah

3:46 LauJensen: ,(->> (range 10) (filter even?) (map inc))

3:46 clojurebot: (1 3 5 7 9)

3:46 unfo-: fold right, sort of?

3:46 LauJensen: No map is more like fold right

3:47 defn: this changes the order of computation

3:47 LauJensen: Sort of

3:47 It just takes the first arg and sets it as the last arg to the remaining forms

3:47 defn: it's like obj.method1.method2.method3

3:47 mebaran151: LauJensen, I'm getting an error, wrong number of args passed to clojureql$fn

3:48 LauJensen: mebaran151: Paste the culprit please

3:48 defn: LauJensen: what's the diff between -> and ->>

3:48 LauJensen: -> threads the first item as the second item, ->> threads the first item as the last item

3:48 ,(-> #(+ % 2) (map (range 10)))

3:48 clojurebot: (2 3 4 5 6 7 8 9 10 11)

3:48 mebaran151: http://gist.github.com/274096

3:49 I love the Clojure seq library: it's what drew me to the language

3:49 I realized I spent most of my time manipulating collections rather than just objects

3:50 LauJensen: I wish I was that clever - I was really into Common Lisp when Clojure came along, you know what first got me interested?

3:50 mebaran151: hm?

3:50 LauJensen: (javax.swing.JOptionPane/showMessageDialog nil "Hello GUI")

3:50 mebaran151: oh heh, I do most of my GUI stuff in Adobe AIR, so I never had to write Soviet GUI

3:51 LauJensen: mebaran151: I cant anote a gist, but you define c as the connection, but never pass it to compile-sql

3:51 mebaran151: I tried both ways

3:51 inserting a c after compile-sql produces

3:51 LauJensen: started]))) == started]) c))

3:52 mebaran151: no multimethod for org.apache.derby.impl

3:53 okay got that to work

3:53 now I see that I'm not getting nulls and IDENTITY columns, but the real question is why

3:55 LauJensen: Here I get this "CREATE TABLE invoices (id int NOT NULL GENERATED ALWAYS AS IDENTITY ,consumer_id int NOT NULL ,item_id int NOT NULL ,details varchar(640),snapshot_cap decimal(12, 4),started int NOT NULL ,executed int,expires int,PRIMARY KEY (id))"

3:55 mebaran151: hmmmm

3:55 LauJensen: Next time you can use a paste bin to get annotations

3:56 mebaran151: should I repull?

3:56 so I'm calling create table correctly but my clojureql is broken

3:56 LauJensen: Try repulling to a new directory and add that to cp instead, see if you get a different result

3:56 I have 2 major merge requests coming up, so things will start shaking soon, as 1.0 is coming very close

3:56 mebaran151: man I don't have gradle: I borrowed this build

3:57 LauJensen: hehe

3:57 Gradle takes what, 25 secs to install ?

3:57 mebaran151: never installed it yet

3:57 you can't beat lein for the install

3:57 LauJensen: I think I show how in the blog-post

3:58 unzip gradle, add 2 env-variables, thats it

3:58 export PATH=$PATH:/PATH/TO/gradle-0.8/bin

3:58 export GRADLE_HOME=/PATH/TO/gradle-0.8

3:58 mebaran151: yep I googled

3:59 is the version on clojars functional?

4:00 LauJensen: Yes, but Clojars is broken in that if you search for a repo you rarely get the right one, so clojars.org/clojureql

4:00 I'm out, highlight 'LauJensen' of privmsg if u need me

4:03 mebaran151: thanks Lau

4:03 I'll keep on hacking

4:03 esj: Good Morning, Parentherati.

4:03 mebaran151: you've been great

4:11 LauJensen: *sigh* already back again

4:12 A customer called me up, because they had some old html data tucked away in a database which they needed to have extracted and ordered. Clojure+CQL made it almost too easy

4:14 esj: Just so long as the customer doesn't know that

4:15 LauJensen: They'll be happy to hear it

4:17 mebaran151: got gradle up and running

4:17 now to go on a building adventure!

4:19 Raynes: ,(->> 3 .toString println)

4:19 clojurebot: 3

4:20 Raynes: That's pretty cool.

4:20 It backwardizeseses it. :D

4:20 (doc ->)

4:20 clojurebot: "([x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."

4:22 LauJensen: Haha Raynes - We should ask Rich to update the doc string "Macro which backwardizeses the expressions"

4:22 Raynes: Absolutely. :)

4:23 unfo-: what is the diff between -> and ->> ?

4:23 Raynes: ,(-> 3 .toString (println (str "meow")))

4:23 clojurebot: 3 meow

4:23 Chousuke: the expr is threaded to the second and last place, respectively

4:23 Raynes: ,(->> 3 .toString (println (str "meow")))

4:23 clojurebot: meow 3

4:23 Raynes: That is the difference.

4:23 :D

4:23 unfo-: aaa ty!

4:28 LauJensen: hehe, somebody will have fun reading this log tonight - First we discuss -> vs ->> and someone asks, whats the diff? 20 minutes later unfo and Raynes repeat the process :)

4:29 unfo-: :P

4:31 Raynes: :o

4:32 * Raynes watches Ninja Warrior (Kunoitchi) and eats his Parmesan & Garlic Cheese Nips (TM).

4:41 LauJensen: Raynes: You accidentally pasted your Twitter update in here :(

4:41 (just kidding)

4:47 defn: so... what's the difference between -> and ->>?

4:49 the-kenny: defn: The position where the argument gets inserted

4:49 ,(doc ->)

4:49 clojurebot: "([x form] [x form & more]); Threads the expr through the forms. Inserts x as the second item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the second item in second form, etc."

4:49 the-kenny: ,(doc ->>)

4:49 clojurebot: "([x form] [x form & more]); Threads the expr through the forms. Inserts x as the last item in the first form, making a list of it if it is not a list already. If there are more forms, inserts the first form as the last item in second form, etc."

4:49 the-kenny: Second vs. Last

4:49 defn: the-kenny: i was joking

4:49 as per Lau's quote above

4:49 the-kenny: defn: Uh.. sorry.

4:49 defn: np :)

4:50 the-kenny: I was writing on a text for my art class and I didn't read the quote

4:52 esj: ok, so three discussions about -> in, feels like time to figure out emacs and slime :)

4:55 on a different note. (seriously) A memoized function is in some sense a memory leak. Is there a way to limit the number of values it stores ? Or is this default behaviour and I didn't realise ?

4:56 unfo-: well it is a stupid cache, in that it does not discriminate and caches every result

4:56 if you want sophistication, implement your own :-)

4:56 this is what i learned from Programming Clojure :)

4:57 esj: ohoh, the problem with that is that anything I do is, by definiton, stupid. So that's a dead end :)

4:58 thanks for the answer though, appreciated.

4:58 unfo-: also worth noting: you can use memoization in conjuntion with lazy-seq to make it lazy :)

4:59 esj: interesting

4:59 unfo-: esj, but still if you do (take-nth 100000000000 (some-big-calculations-memoized)) it is still gonna take lotsa memory :)=

5:00 esj: yeah, unless I use a circular buffer on the memoization :)

5:40 quizme: is it possible to make the snake game without mutable state ?

5:40 unfo-: i haven't gotten to the snake game part yet in my ebook ^_^

5:42 Raynes: I believe it's possible.

5:53 Chousuke: quizme: I don't think it's possible to write any game without *some* state, but you sure can keep it down to minimum

5:55 quizme: chousuke: like you could keep making cheap copies of snake positions for example.

5:57 Chousuke: you still need to store the position in a ref

5:57 that's mutable state

5:57 it's just controlled :)

6:00 Raynes: It feels possible. :(

6:00 quizme: whate if the position was a sequence rather than a number

6:01 then that sequence could be a series of cheap copies

6:01 LauJensen: This is a 3 or 4 part series of RETRO games written functionally, can be quite an eye opener in that he reduces much state: http://prog21.dadgum.com/23.html

6:03 esj: interesting link

6:07 quizme: great article

6:08 esj: its nice how Clojure deals with some of the issues with FP he raises. Things like destructuring and persistent types would have been useful to him, I think.

6:12 hdurer: Sorry, is there anybody here who could help me with leiningen? I have been trying to get at least the sample (from the git repo) working with the stable (or current trunk) leiningen. But the uberjar generated just won't run the app.

6:13 $ java -jar nomnomnom-standalone.jar

6:13 Failed to load Main-Class manifest attribute from

6:13 nomnomnom-standalone.jar

6:13 crazzyford: have you set main-class in project.clj

6:13 and called gen-class in that namespace?

6:13 hdurer: I have done nothing except checkout the git repo and do lein deps; lein compile; lein jar; lein uberjar

6:14 crazzyford: its not main class, my bad

6:14 its just :main

6:14 hdurer: (in the sample/ subdir of the repo)

6:14 crazzyford: that doesn't have a main

6:14 hdurer: But sample/src/nom/nom/nom.clj does contain the gen-class as far as I can see

6:14 crazzyford: look at actual lein for a proper example

6:14 post us up your project.clj file

6:15 oh right

6:15 yeah their sample won't work with uberjar

6:15 hdurer: Great.

6:15 crazzyford: in project.clj, you need to set a :main

6:16 hdurer: I had something that used to work (even the sample used to work with that old version (0.5 something?)

6:16 crazzyford: so that should be nom.nom.nom or summat like that

6:16 hdurer: and now everything is broken

6:16 crazzyford: weird

6:16 I'ma patch the sample now for ye

6:17 hdurer: putting a :main nom.nom.nom in the project doesn't fly either

6:18 Oops. Sorry. It does work.

6:18 crazzyford: I've forked lein, submitting patch as soon as I've tested

6:19 hdurer: excellent.

6:20 Would you let me know your username on github so I can check now?

6:20 crazzyford: can you paste your new copy of project.clj

6:20 just so I'm sure I've set the :main class correctly

6:20 hdurer: One sec. Let me do a cleanup and try again. On a second machine it just didn't work.... :-(

6:21 Give me sec to see if I can reproducably make it work/fail

6:21 lisppaste8 url?

6:21 lisppaste8: To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.

6:22 crazzyford: I'm at http://github.com/tcrayford/leiningen

6:22 check that that project.clj is roughly the same as yours and I'll submit a pull request

6:24 lisppaste8: hdurer pasted "New leiningen sample/project.clj" at http://paste.lisp.org/display/93229

6:24 crazzyford: exactly the same as mine

6:25 lisppaste8: hdurer annotated #93229 "Diff for this file to current master version" at http://paste.lisp.org/display/93229#1

6:26 crazzyford: pull request is off

6:26 cheers

6:27 hdurer: OK, that does work. I goofed up on the other machine which has "lein" as a symlink to the git repo's version.

6:27 crazzyford: hah

6:27 hdurer: Not sure my setup there is broken or if the master branch version doesn't work

6:28 Note that "lein new foo" doesn't include a :main element in foo/project.clj

6:28 So, if that *is* required, the new action should be fixed as well.

6:29 crazzyford: its only required for uberjars

6:29 hdurer: I find that the mose useful feature of leiningen

6:29 s/mose/most/

6:30 crazzyford: its up to what you're doing with it

6:30 I never put stuff in jars

6:30 needs my swank

6:31 posted that up under lein/issues

6:31 hdurer: I never got swank working with clojur

6:31 crazzyford: I can't get it working with lein and it set as a dependancy of my project

6:31 hdurer: but I am not willing to put much work into it --- swank works fine with my SBCL setup which is more important.

6:32 crazzyford: so I just compiled an uberjar out of clojure-swank and stuck it in my project under /libs

6:32 aye

6:32 I'm kinda new to the whole emacs/slime scene so has been useful

6:42 neotyk: Hi *

6:43 rhickey: neotyk: hi

6:43 neotyk: crazzyford: I use swank-clojure-project

6:43 quizme: LauJensen: awesome article. I think I understand the functional style of programming much better now.

6:44 LauJensen: Great

6:44 neotyk: new post: http://bit.ly/7xi5aK clojure.core/str makes sense now :)

6:45 LauJensen: Look forward to reading

6:45 neotyk: I hope I made sense in it

6:45 LauJensen: there should be nothing new for you, this is my learning experience :)

6:45 LauJensen: but I'm looking forward for your comments

6:46 LauJensen: Ah ok

6:46 I think I'm dropping a post later today as well so we can exchange blows :)

6:46 neotyk: great

6:47 Raynes: I'm going to assume you aren't talking about cocaine.

6:47 Chousuke: str uses somewhat outdated style :)

6:50 neotyk: Chousuke: next one is apply

6:50 Chousuke: is apply newer style?

6:52 Chousuke: ~def apply

6:52 no :P

6:52 neotyk: lol

6:52 where do I find new style ?

6:53 Chousuke: basically, any direct use of . is old-style. Also I think the ((fn ... ) args) thing in str isn't very common anymore.

6:55 but those are very old functions, anyway :)

6:59 neotyk: so it would go like .toString and anonymous function defined by #(?

6:59 Chousuke: or just using let, I guess.

8:02 defn: loo

8:03 Raynes: Yay! Leiningen works!

8:05 The uberjar task has got to be the most awesome thing since Clojure itself was first thought up.

8:11 seths: Raynes: swank-clojure-project is pretty sweet too

8:11 Raynes: seths: Indeed.

8:42 Leiningen coupled with swank-clojure reduces classpath annoyances exponentially.

8:42 I do believe I'll be prescribing this medication to new patients.

8:46 seths: Raynes: uberjar will def. be part of my presentation on Leiningen this week to a Clojure meetup

8:46 Raynes: Good. Because it's awesome. :D

9:12 chouser: So I implemented the agent error handler proposal yesterday. http://www.assembla.com/spaces/clojure/tickets/30

9:15 I'm least sure about how I moved the error pointer into the same AtomicReference as the action queue, but I think something like that was necessary to manage restart thread-safely.

9:18 neotyk: ~def for

9:19 chouser: ah, 'for'. So beautiful in its simplicity.

9:20 neotyk: LauJensen: thanks for your comment :) you are evil

9:26 defn: chouser: are there any places in clojure where there is > 3 arity

9:26 core functions i mean

9:27 chouser: hm.. there are certainly some that take & rest args of course.

9:27 defn: nod, is that true n-ary?

9:27 or is that like unary?

9:28 like nested unary or soemthing

9:28 something

9:31 chouser: I guess I'm not sure what you mean. You can invoke such a function either with specific args to its .invoke method, or with a seq of args to its .applyTo method.

9:35 defn: chouser: that's what i was looking for, thanks

9:35 chouser: what news on the book btw?

9:37 chouser: Well... I think we've got the first draft of chapter 5 complete. But no word on the MEAP of the first 4. Still "any day now" I guess. :-P

9:38 defn: :)

9:38 im excited for it

9:39 chouser: That's encouraging to hear, thanks!

9:41 rhickey: chouser: looking now - thanks for the patch!

9:42 defn: are there any clojure libraries to search html documents by xpath and/or css3 selectors?

9:42 rhickey: typo - "agent-errors ... DEPRECATED: Use 'agent-errors' instead."

9:42 chouser: heh.

9:42 confusing

9:47 defn: anyone have a parser they recommend for java?

9:47 rhickey: chouser: at first glance it looks ok (bundling the error so controlled by same CAS)

9:47 chouser: defn: enlive and c.c.zip-filter both support searching xml and html by vaguely xpath-like expressions.

9:48 defn: chouser: ah, works for me -- thanks

9:48 rhickey: chouser: I'll have to spend some more time staring at it

9:48 chouser: rhickey: ok. you agree something like that was necessary?

9:48 rhickey: yes, to keep same model

9:48 tricky, right?

9:48 chouser: yes

9:49 that was my second or third attempted solution.

9:49 rhickey: but much better to keep it than try another

9:50 Raynes: Wait, chouser is writing a book too?

9:50 :o

9:51 chouser: so there are some small time-windows that would be tricky (and I think unnecessary) to solve. Like an agent can error out while a 'send' is being set up. In that case, I go ahead and queue it even though the queue is in fail state.

9:52 Raynes: Yep, with Fogus. "The Joy of Clojure" ...but we've got nothing to link to or show off yet.

9:52 Raynes: chouser: Awesome. Hopefully you'll procrastinate until 1.2 comes out, so you can document deftype and reify. :>

9:52 rhickey: chouser: what happens if someone sends an action in the middle of a restart?

9:54 chouser: Raynes: I think deftype, reify, and protocols are probably close enough to their final state already -- we plan to cover them regardless of 1.2 timeframe.

9:54 Raynes: Oh, neat.

9:54 defn: so im wondering...if i have some foreign jar from some third party, is there a way to know what i need to (use) it as?

9:54 Raynes: Maybe Practical Clojure will as well.

9:55 rhickey: chouser: nm, same prior.count logic works across restart and enqueue

9:56 chouser: right, that was the requirement the drove combining error and the queue

9:56 rhickey: so should I pull new into master?

9:56 chouser: so that the execute gets kicked off exactly once

9:56 yes!

9:57 Raynes: Yes!

9:57 rhickey: chouser: yes, that execute only once logic was the whole trick in the agents

9:58 defn: i just got enlive from clojars, but can't seem to (use 'enlive), 'enlive.enlive, 'enlive.enlive-html, etc.

9:58 chouser: and wantinto to do that without locking something on every send drove me to write the ActionQueue class.

9:58 defn: How do i know what to use it as?

9:59 Raynes: defn: I'd probably just extract the jar or open the jar in Emacs and see the directory structure.

9:59 chouser: rhickey: I did feel a little dirty using the ActionQueue concrete class instead of some new interface. Is that okay because it's a private class?

9:59 rhickey: chouser: yes

9:59 LauJensen: neotyk: np :)

10:00 defn: Raynes: thanks

10:00 rhickey: if you were writing it in Clojure you'd just have had a little map or tuple

10:00 chouser: rhickey: yep. Instead I got to write 8 yummy word-filled lines.

10:01 rhickey: go Java!

10:01 chouser: it's worse because my Java is so lousy. if(error) oops if(error == NULL) gah if(error == null) ...

10:02 rhickey: ... 23 files changed, 3635 insertions(+), 1011 deletions(-) ...

10:03 Raynes: Bang.

10:03 chouser: whee!

10:04 rhickey: tests pass, contrib tests pass...

10:04 what version of contrib should I be using?

10:05 I had been using master, see all these branches now

10:06 chouser: contrib 'new' should probably be merged into 'master' as well.

10:06 ordnungswidrig: hi all

10:06 rhickey: chouser: I guess after I push this?

10:07 chouser: yeah, not before.

10:08 you could test contrib 'new' too if you want, though I don't think there's much different there

10:10 rhickey: chouser: that doesn't work at present - contrib/new needs to pull from contrib/master some changes made to deal with release?

10:10 e.g. bytes

10:13 ordnungswidrig: Is the a quickcheck implementation for clojure? I know clojurecheck is somewhat paused and more about TAP than quickcheck atm

10:15 chouser: rhickey: ok, I wouldn't bother with it. contrib new has only one commit not in contrib master, and there don't seem to be any tests for it.

10:17 rhickey: brave new world - http://github.com/richhickey/clojure/commit/e08a7a8add966827179c3431c1e31c56dbd64f40

10:17 cemerick: rhickey: oh, very exciting :-)

10:18 Raynes: !

10:18 chouser: brave reify world, you mean.

10:19 rhickey: I'll take any qualifier other than broken :)

10:21 * Raynes points out that it's building clojure-1.1.0-new-SNAPSHOT.jar

10:22 rhickey: Raynes: builds with new properties don't clean up old jars

10:22 ant dist will

10:23 Raynes: are you sure?

10:23 Raynes: Mhm. Just pulled and 'ant'.

10:23 It built 'new' snapshots instead of master snapshots. I assumed you didn't update the 'ant' file before pushing.

10:23 rhickey: so you'll have both that and clojure-1.2.0-master-SNAPSHOT.jar

10:24 chouser: looks ok here -- jar filenames and repl startup text both say clojure-1.2.0-master-SNAPSHOT

10:25 rhickey: chouser: here too

10:25 Raynes: That's odd.

10:25 Guess I'll re-clone.

10:25 rhickey: Raynes: do ant dist, then ant

10:25 biab

10:26 Raynes: Same stuff.

10:26 * Raynes will reclone the repo.

10:28 spariev: hello, nub question. I've written function to format dates, it works but I wonder could it be made more idiomatic/concise - http://paste.lisp.org/display/93239

10:31 esj: spariev - as an aside, if you're going to use dates heavily, take a look at Joda Time.

10:32 Chousuke: spariev: using rest args seems to be pointless in that case

10:32 spariev: you should instead make it a function overloaded by arity

10:32 Raynes: build.clojure.org/snapshots needs new builds. :>

10:33 Chousuke: spariev: ie. (defn format-date ([date] (format-date date "dd MMM yy")) ([date format] ...))

10:33 spariev: esj: thanks, that looks better

10:34 Chousuke: ups, I misse, thanks too

10:36 esbena: how do I join two sequences? (like 'addAll' for java collections)

10:38 Chousuke: esbena: there's concat

10:38 esbena: doh

10:38 Chousuke: esbena: it's lazy, too :)

10:39 ,(time (first (concat (range 10000000) (range 10000000))))

10:39 clojurebot: 0

10:39 "Elapsed time: 0.191 msecs"

10:42 esbena: once again, thx a lot.

10:49 crazzyford: is there a guide to clojure.stacktrace?

10:50 I want to see the full cause of an expression, something like (print-stack-trace (/ 1 0))

10:51 Chousuke: pst probably takes the exception object

10:51 which is accessible as *e in the repl

10:52 crazzyford: perfect

10:52 chairs

11:08 Raynes: rhickey: Heh. Just figured out why it was doing that before. I was still on the 'new' branch. :o

11:11 Bleh. swank-clojure still doesn't work, but now I'm actually kind of screwed unless I use 1.1. :\

11:12 ordnungswidrig: defprotocol went to master?

11:19 somnium: Raynes: are you using a slim version of swank?

11:19 Raynes: somnium: No.

11:20 Kjellski: Hi there...

11:20 Raynes: somnium: I think I'm the only one who gets this. Which is great, because then I really am screwed.

11:20 somnium: Raynes: just put a slim version in lib by hand and it should be all good

11:23 ordnungswidrig: What's this: "(clojure.core/in-ns 'de.kotka.clojurecheck)" (from http://bitbucket.org/kotarak/clojurecheck/src/tip/src/de/kotka/clojurecheck/combinators.clj)

11:23 Is this outdated syntax for the ns macro?

11:23 Raynes: java.lang.NoSuchMethodError: clojure.lang.RestFn.<init>(I)V (pprint.clj:1) What the hell does that non-sense mean, anyways? :\

11:24 somnium: Raynes: it means contrib needs to be clean and built against the clojure version youre using

11:24 * Raynes tries that.

11:28 Raynes: That was it.

11:28 somnium: You sir, are my hero.

11:29 somnium: =)

11:30 Raynes: Now, we just need new builds on build.clojure.org/snapshots, and all will be well in the magic kingdom.

11:33 cemerick: ach, I simply can never remember the signature naming convention for gen-class method impl vars (e.g. -methodName-void-int-int, etc).

11:34 Raynes: Oh.

11:34 Way ahead of me.

11:34 There /are/ new builds.

11:34 Haha.

11:34 Life is good, man, life is good.

11:36 Aren't any clojure-contrib snapshots yet though.

11:36 Oh, just didn't update the version number.

11:38 Kjellski: Raynes: Have you tried build.clojure.org?

11:38 Raynes : for jars it´s fine...

11:55 crazzzyford: ,(binding [*DB* "foo"] (for [num [1 2 3] (str *DB*)))

11:55 clojurebot: Unmatched delimiter: )

11:56 crazzzyford: ,(binding [*DB* "foo"] (for [num [1 2 3]] (str *DB*)))

11:56 clojurebot: java.lang.Exception: Unable to resolve var: *DB* in this context

11:56 crazzzyford: is this meant to happen?

11:56 Chousuke: yes.

11:56 crazzzyford: mk

11:56 kinda annoying

11:56 Chousuke: binding is not intended to create new vars

11:57 crazzzyford: I'm not properly using it like this

11:57 Chousuke: only to dynamically rebind existing ones, to affect already compiled code that uses the var.

11:58 crazzzyford: I'm using it for a with-db macro

11:58 but I want to look up some more content based on one of the bindings in the for loop

11:58 Chousuke: eg. (def somevar) (defn foo [] (dostuff-with somevar)) (defn bar [] (binding [somevar 3] (foo)))

11:58 for is not a loop :)

11:58 crazzzyford: yeah my syntatic bad

11:58 hiredman: also, for is lazy

11:59 crazzzyford: hence I have to do a doall right?

11:59 if I'm loading stuff from a db

11:59 Chousuke: yeah.

11:59 Raynes: Kjellski: What are you talking about?

12:01 crazzzyford: heh, the repl's forcing of evaluation was messing me up

12:01 Kjellski: Raynes: Sorry... read the wrong thing out of your last messages...

12:02 Raynes: Kjellski: No worries.

12:30 * Raynes notes to whomever it may concern that the latest clojure-contrib-1.1.0-master-SNAPSHOT (built today on build.clojure.org/snapshots) is not built against master.

12:31 Raynes: I don't know if they are generated automatically or not, but it needs to be built against master or it isn't going to run with swank-clojure.

13:58 * Wulf_ punctures {newbie} with a knife

13:58 {newbie}: why?

13:58 hiredman: that's a first

13:59 {newbie}: wth

13:59 was that?

14:03 mabes: it would appear to be a drive-by stabbing... or something similar

14:03 fdaoud: FUNCTIONAL HUMOUR?

14:04 sorry for the caps lock didn't notice

14:11 defmacro: k

14:28 technomancy: Raynes: you can use the "new" contrib builds in the mean time

14:36 LauJensen: I blogged about feeding Reddit to Hadoop: http://www.bestinclass.dk/index.php/2010/01/hadoop-feeding-reddit-to-hadoop/

14:50 mebaran151: hey, Lau, is there anyway to insert-into return the primary key of the record it inserted

14:51 the return value of "1" isn't particularly informative, and it would avoid a race condition in trying to get the primary key of a newly inserted row

14:55 {newbie}: Am I the only one that thinks it wold be nice of letfn worked exactly as let?

14:55 for example

14:55 (letfn [zing (fn [x] (println x)]

14:55 (zing 3))

14:55 s/of/if

14:56 mebaran151: {newbie}, but then wouldn't it actually be let!

14:56 {newbie}: dam right!

14:56 '-.-

14:56 stuartsierra: mebaran151: Hadoop is not a database. It has no concept of rows or keys.

14:57 mebaran151: oh I forgot to mention, I was talking about ClojureQL

14:57 somnium: you still cant call zing from the body in let, no?

14:57 mebaran151: you closed the let there

14:57 {newbie}: let me test

14:57 mebaran151: you need letfn if you want to call the function recursively

14:58 LauJensen: mebaran151: yes there is

14:58 {newbie}: mebaran151: The syntax is correct

14:58 o nvm

14:59 than was an old example

14:59 mebaran151: LauJensen, hmm?

15:00 LauJensen: ---> priv :P

15:04 mabes: LauJensen: awesome hadoop post. I've been meaning to look into how to use hadoop w/clojure so this will be perfect learning material.

15:05 LauJensen: Great - Glad to hear it :)

15:09 stuartsierra: LauJensen: working on clojure-hadoop 1.1.0 to fix the missing config options

15:09 LauJensen: stuartsierra: No need :P

15:14 {newbie}: After I use the seq the results are cached what I don't know is if the access to the cache is random or not

15:15 s/seq/lazy-seq

15:16 somnium: {newbie}: seqs are like linked-lists

15:16 {newbie}: so reusing a seq multiple times is not a very good idea

15:17 somnium: {newbie}: if you want indexed access bettor off calling vec on it, if thats what you mean

15:19 {newbie}: yeah, reusing teh seqs is only worthy when doing some king of stream processing

15:37 stuartsierra: LauJensen: new source on Github, more config options

15:37 LauJensen: Good work Speedy Gonzales :)

15:37 stuartsierra: Not tested yet. :)

15:39 cemerick: would there be interest in << from http://muckandbrass.com/web/x/AgBP being added to contrib? I've found it incredibly useful so far...

15:43 the-kenny: cemerick: Wow, that looks cool

15:48 ska2342: Hi. Is it considered bad style to Thread/sleep in the action of an agent?

15:48 LauJensen: no

15:48 cemerick: heh. I'd say so. :-P

15:49 the-kenny: thanks. Not sure if anyone's using it so far, tho.

15:49 the-kenny: ska2342: No, but I would use send-off to send the agent, or you could block other agents

15:50 ska2342: I was thinking about an action which polls some state somewhere (e.g. an URL), saves it and after sleeping sends itself to *agent* again. Yes, send-off would be the way to go. Just to demo the self-calling idiom.

15:50 LauJensen: cemerick: Looks sweet

16:00 stuartsierra: ska2342: a Timer may also help

16:00 hiredman: ScheduledThreadPoolExecutor

16:01 ska2342: stuartsierra: Usually I'd use a Timer, but I want to demo the idiom. This is not for a real-life program.

16:02 stuartsierra: ok

16:02 hiredman: ScheduledThreadPoolExecutor!

16:05 ska2342: hiredman: OK, I've read that it's preferable to Timer. Where do agents come into the game?

16:06 the-kenny: cemerick: I'll save the snippet here :)

16:06 hiredman: ska2342: why would they?

16:06 the-kenny: Btw. any recommendations on a code-snippet-manager? Maybe an emacs plugin?

16:07 LauJensen: the-kenny: emacs gist integration ?

16:07 ska2342: hiredman: because I want to demo them :-)

16:07 the-kenny: LauJensen: hm.. not really what I'm searching for

16:07 LauJensen: I want something like a small database for saving snippets in different languages

16:08 LauJensen: the-kenny: emacs gist integration ?

16:08 the-kenny: LauJensen: I use gists for showing small snippets of different things for everyone. But there isn't a good search etc.

16:09 _schulte_: the-kenny: if you use Emacs you could try an Org-mode file with embedded source-code blocks

16:09 the-kenny: _schulte_: I like the idea.. is there a way to highlight the blocks in the right language?

16:10 _schulte_: the-kenny: org-mode has tags and foldable outline levels which should help for organization, and it has facilities for embedding/exporting/editing the source-code blocks

16:10 ska2342: the-kenny: I tried to use the built-in wiki for that ages ago. Didn't work for me, though. Now, what was it's name...? (emacs-wiki-find-file ..something)

16:10 _schulte_: the-kenny: yea, hit C-c ' with the point on the code block

16:10 the-kenny: _schulte_: How do I insert a code-block? (sorry for these annoying questions)

16:11 crazzzyford: ,(with-meta (ref {}) (:foo {}})

16:11 clojurebot: Unmatched delimiter: }

16:12 crazzzyford: ,(with-meta (ref {}) (:foo {}))

16:12 clojurebot: java.lang.ClassCastException: clojure.lang.Ref cannot be cast to clojure.lang.IObj

16:12 _schulte_: the-kenny: np, I use the following yasnippet http://gist.github.com/274611

16:12 crazzzyford: are you not meant to be able to add metadata to refs?

16:12 _schulte_: the-kenny: the syntax is described here http://orgmode.org/worg/org-contrib/babel/reference.php#sec-1.1

16:15 neotyk: ~def do

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

16:15 neotyk: where does do come from?

16:17 michaeljaaka: Hi

16:17 I have function http://gist.github.com/274615

16:18 does it work how it is written in comment?

16:18 it is my fun but I'm not sure if it is eval lazily

16:19 because there is indirect recursion on the same function with overloaded number of arguments

16:19 it simply works like from (concat-seq '(( 1 2 3 4 ) ( 5 6 7 8 )))

16:19 does ( 1 2 3 4 5 6 7 8 )

16:20 Chousuke: (comp apply concat) :P

16:20 michaeljaaka: hmmm

16:20 the number of sequences it not known

16:20 I mean it is evaluated in lazy way

16:20 and is too big to fit in memory

16:21 does your solution works leazy too?

16:21 Chousuke: yeah.

16:21 ,(ffirst (apply concat (repeat (range 1000))))

16:21 clojurebot: java.lang.IllegalArgumentException: Don't know how to create ISeq from: java.lang.Integer

16:22 Chousuke: hmm.

16:22 oops

16:22 ,(first (apply concat (repeat (range 1000))))

16:22 michaeljaaka: hmmm apply must know number of sequences

16:22 clojurebot: 0

16:22 michaeljaaka: apply must know number of arguments

16:22 Chousuke: no it doesn't. that thing there concatenates infinite sequences :)

16:23 michaeljaaka: and what is comp?

16:23 Chousuke: actually, not comp

16:23 partial :P

16:23 sorry, my mistake

16:24 michaeljaaka: hmmm, looks like works fine

16:24 I knew that there is already simply way

16:24 ska2342: ,(apply concat '((1 2 3) ("a" "b") (6 7)))

16:24 clojurebot: (1 2 3 "a" "b" 6 7)

16:24 Chousuke: yeah, it's not always obvious :)

16:26 michaeljaaka: hmmmm I looks at apply function

16:27 I can see spread is used

16:27 is it because of it apply behaves leazily?

16:29 stuartsierra: Apply is not lazy.

16:29 michaeljaaka: so apply concat is not leazy

16:29 stuartsierra: (apply foo [1 2 3]) ==> (foo 1 2 3)

16:30 michaeljaaka: because apply must know how many sequences is for concatenation

16:30 stuartsierra: No

16:30 (apply concat (list [1 2] [3 4])) ==> (concat [1 2] [3 4])

16:30 ,(apply concat (list [1 2] [3 4]))

16:30 clojurebot: (1 2 3 4)

16:32 hiredman: ,(letfn [(f [& y] (first y))] (apply f (iterate inc 0)))

16:32 clojurebot: 0

16:33 michaeljaaka: hmmmmm, concat has [x y & zs]

16:34 so two first sequences must be known

16:34 and then third and rest is leazily evaluated

16:34 stuartsierra: no

16:34 Concat is always lazy.

16:34 ,(take 5 (concat [1 2] (range 10000)))

16:34 clojurebot: (1 2 0 1 2)

16:35 ska2342: ,(apply concat '((1 2 3)))

16:35 clojurebot: (1 2 3)

16:35 ska2342: Or even...

16:35 ,(concat)

16:35 clojurebot: ()

16:36 ska2342: No problems with arity here.

16:36 stuartsierra: 'concat' attaches lazy sequences together

16:36 'apply' is used when you want to call a function with a bunch of arguments, but you happen to have those arguments in a list

16:37 michaeljaaka: yes but concat has no declaration like

16:37 (defn concat[ & a ] .. )

16:37 stuartsierra: ~def concat

16:38 'concat' is defined for 0, 1, 2, or more arguments

16:38 hiredman: ,(letfn [(f [& y] (first y)) (N [] (iterate inc 0)) (N′ [] (repeatedly N))] (apply f (N′)))

16:38 clojurebot: Eval-in-box threw an exception:java.lang.OutOfMemoryError: Java heap space

16:38 michaeljaaka: and 1 2 is too much

16:38 need to have more without 0, 1 and 2

16:38 Chousuke: hm?

16:39 concat works the same for any arity. is there a problem?

16:41 hiredman: michaeljaaka maybe suffering under the illusions of a. that clojure has lazy evaluation, and b. some imagined mechanisms for the working of this lazy evaluation

16:50 LongInt: Where can one get Clojure STM case-studies/testimonials?

16:50 hiredman: clojurebot: Nakatomi space is http://bldgblog.blogspot.com/2010/01/nakatomi-space.html

16:50 clojurebot: 'Sea, mhuise.

16:52 rhickey: ,(apply (fn [x & ys] x) (iterate inc 0))

16:52 clojurebot: 0

17:18 DapperDan: which compojure on clojars works? ato's tries to download clojure 1.1 alpha, hiredman's doesn't have jetty etc.

17:18 http://clojars.org/search?q=compojure

17:18 hiredman: the germans

17:18 whose jar doesn't show up in the search

17:20 liebke

17:20 the-kenny: Germans?

17:20 hiredman: german's

17:22 I don't know, but for some reason I assume he is german

17:23 http://incanter-blog.org/2009/11/29/incanter-webapp/ <-- one here

17:23 chouser: does anybody have a clojure collection 'diff' fn?

17:24 danlarkin: clojure.set/difference

17:24 DapperDan: hiredman: when i try to run compojure run-server using your jar, i get javax/servlet/ServletOutputStream

17:24 [Thrown class java.lang.NoClassDefFoundError]

17:25 chouser: no but i have wanted one.

17:25 chouser: danlarkin: thanks, I wasn't clear. I've got deeply nested maps and vectors that are unequal, and I want to know why

17:25 hiredman: DapperDan: *shrug* I just stole a pom from some other compojure

17:26 DapperDan: hiredman: but how is it 'BETTER'?

17:27 hiredman: DapperDan: it removes the bits that stop compojure from working on appengine

17:27 danlarkin: chouser: for that I have no remedy :)

17:27 chouser: ok

17:27 * chouser goes to

17:41 mebaran151: liebke is the best one

17:42 I sometimes just browse the clojars maven repo directory listing directly

17:45 danlarkin: chouser: fess up, is it you or fogus on the cover? http://joyofclojure.com/

17:46 chouser: Well, I haven't actually met _fogus_, so I can only assume...

17:46 `Nate: I'm having trouble installing clojure-contrib

17:46 I installed clojure as per this url: http://riddell.us/tutorial/clojure/clojure.html

17:46 and the repl works

17:46 but the line (:use clojure.contrib.str-utils) yields java.lang.ClassNotFoundException: clojure.contrib.str-utils (NO_SOURCE_FILE:1)

17:46 Can anybody help me out?

17:48 hiredman: gar

17:48 yet another tutorial referencing the deprecated clojure.lang.Repl

17:48 come on!

17:48 (but I doubt that has anything to do with your problem)

17:48 `Nate: you don't have contrib on your classpath

17:49 ghotli: `Nate: This is how i got set up with clojure recently. That tutorial is a bit outdated. http://thoughtadventures.blogspot.com/2010/01/setting-up-clojure-repl-with-emacs-and.html

17:49 hiredman: ~dirt simple

17:49 clojurebot: simple setup is http://www.thelastcitadel.com/dirt-simple-clojure

17:49 `Nate: Thanks

17:50 hiredman: doesn't tell you how to get clojure.jar or clojure-contrib.jar

17:58 `Nate: I don't think it's the classpath, the command (System/getProperty "java.class.path") shows both the clojure.jar and the clojure-contrib.jar to be on the classpath

17:58 yet (:use clojure.contrib.str-utils) still doesn't work

18:00 hiredman: I have the right jars on the classpath, is there any way that I could have messed up the creation of the contrib jar?

18:01 esbena: do I need to do something special to get clojure to use both of my cpu-cores? (I have a pure breadth first algorithm - which only use one core :( )

18:01 `Nate: I built it with "ant -Dclojure.jar=/path/to/clojure.jar"

18:01 hiredman: `Nate: how do you know you have the right jars on the classpath?

18:02 `Nate: (System/getProperty "java.class.path") in the repl

18:02 hiredman: ah

18:02 where did you get contrib?

18:02 `Nate: the git repo

18:02 hiredman: specifically?

18:03 `Nate: git://github.com/richhickey/clojure-contrib.git

18:04 {newbie}: does anyone here use a free java profiler with clojure?

18:04 Chousuke: esbena: there's no automatic parallelisation.

18:04 esbena: but you can use futures or agents or whatnot

18:05 hiredman: `Nate: what about (:use clojure.contrib.base64)

18:05 `Nate: no dice

18:06 hiredman: so your jar is busted

18:06 `Nate: I also tried putting the src/ directory of clojure-contrib on the path

18:06 not sure if that should have worked

18:06 but it didn't

18:06 hiredman: what is the output of the ant run?

18:06 `Nate: thanks for all of the help, by the way

18:06 one sec

18:06 hiredman: pastebin please

18:07 esbena: Chousuke: I use pmap on the top level - shouldn't that spawn more threads?

18:07 hiredman: (doc pmap)

18:07 clojurebot: "([f coll] [f coll & colls]); Like map, except f is applied in parallel. Semi-lazy in that the parallel computation stays ahead of the consumption, but doesn't realize the entire result unless required. Only useful for computationally intensive functions where the time of f dominates the coordination overhead."

18:07 Chousuke: esbena: yes

18:07 esbena: however, make sure you're not spawning too many threads.

18:08 `Nate: hiredman: http://pastebin.com/meae327d

18:08 esbena: Chousuke: I know .. but it bugs me greatly that the threads doesn't run on the second core..

18:08 Chousuke: esbena: maybe the work is too lightweight

18:09 esbena: ie. you don't get enough work to distribute beneficially across multiple cores.

18:09 hiredman: and without changing directories, staying right where you are, what does java -cp ../clojure/clojure.jar:clojure-contrib.jar clojure.main -e "(use 'clojure.contrib.base64)" output?

18:10 Chousuke: esbena: pmap is also semi-lazy

18:10 `Nate: nothing: looks like it worked

18:10 looks like I may have a problem with my clj script

18:10 hiredman: `Nate: possibly

18:11 `Nate: I can probably take it from here, thanks

18:11 hiredman: people tend to turn out pretty horrible scripts

18:11 I recommend against using them

18:12 `Nate: heh, thanks

18:13 ok, I got it working

18:13 much appreciated

18:25 scode: Hmm, is there an idiomatic way to do a get whereby you can distinguish between nil-the-value and nil-it-didn't-exist?

18:25 Supposing I want to implement an associative structure (lru cache) where I would like to avoid a two-way test-and-get.

18:25 the-kenny: scode: You can supply an "nil" parameter

18:26 ,(doc get)

18:26 clojurebot: "([map key] [map key not-found]); Returns the value mapped to key, not-found or nil if key not present."

18:26 the-kenny: (get {:foo nil} :bar false)

18:26 ,(get {:foo nil} :bar false)

18:26 clojurebot: false

18:26 the-kenny: ,(get {:foo nil} :foo false)

18:26 clojurebot: nil

18:26 scode: the-kenny: Ah! Great. Thanks!

18:26 the-kenny: You're welcome

18:26 scode: (This is a case where I like multiple return values like in CL :))

18:26 the-kenny: scode: Yeah, I like them too

18:27 mebaran151: hiredman, did you ever get the app-engine sdk into maven?

19:06 the-kenny: _schulte_: org-babel looks really awesome, thank you!

19:15 jolby: the-kenny: If you are using org-babel and Clojure together, there is a little documentation covering setup/basic usage now: http://orgmode.org/worg/org-contrib/babel/languages/org-babel-doc-clojure.php

19:19 the-kenny: jolby: Thanks!

19:30 tolstoy: I notice on the mailing list there's an RC2 for clojure.contrib 1.1. Alas, no mention of actually where to download it.

19:30 Is there a place to download clojure-contribs?

19:31 Ah: http://code.google.com/p/clojure-contrib/

19:42 I314159: Hi

19:42 Does anyone know if there's an example of using the trace library online?

19:49 scottj: Any existing code for getting a seq of all the connections between a node and all other nodes of a graph? I know c.contrib has a graph library but given {:a [:b] :b [:a :d] :d [:b :e] :e [:d]} if I pass :b I want to get ((:b :a) (:b :d) (:b :d :e))

19:51 and I don't think the contrib graph.clj has that functionality

19:55 I314159: http://wave.thewe.net/2009/12/17/logging-and-debugging-in-clojure-followup-complete-tracing/

19:56 I314159: thx!

20:53 technomancy: did anything change in clojure.test in the past month that would cause rebinding clojure.test/test-var to quit working?

20:53 hrm; no changes to clojure.test since the first of december

20:59 seths: techonmancy: w/r/t leiningen, is the logo the mustachioed gentleman at http://technomancy.us/131?

21:00 opps, that should have said technomancy:

21:00 technomancy: seths: yep

21:00 I need to integrate it into the readme so it shows on github.

21:01 seths: great! Unless you prefer otherwise I'll use it in a presentation?

21:02 probably the small version on Flickr

21:02 technomancy: the best version I have is http://p.hagelb.org/leiningen.png

21:02 complete with background transparency

21:03 seths: running into a 403 on that

21:04 technomancy: my bad; try again

21:05 seths: same thing, might be some caching somewhere

21:05 the image on technomancy.us has transparency, size works for me

21:05 technomancy: ok

21:05 seths: thx!

22:09 Drakeson: using clojars.org, how can I download a jar file directly?

22:10 is there a "lein download foo/bar version" ?

22:19 liebke: Drakeson: you can browse the repository directly: http://clojars.org/repo/

22:22 Drakeson: liebke: cool. thanks :)

22:22 liebke: np

22:27 Drakeson: how does one hunt for libraries? is there a way to obtain a local cache of some meta-data about libraries in clojars and maven repositories?

22:35 mebaran151: heh, I just accidentally deleted my homedir

22:35 I'm debating whether now should be the time I become a unix hacker

22:39 *emacs hacker

22:40 Drakeson: go for it

22:41 arohner: if you become an emacs hacker, your entire home dir will be open in emacs

22:41 and then you can just C-x s

22:41 mebaran151: unix has taught me how not to value my data

22:41 the data is ephemeral

22:41 anything I care about I put up on bitbucket

22:42 because it is simply inevitable that I will destroy my homedir

22:42 that's what I learned as a sysadmin :)

22:43 that's why it is absolutely necessary to send snapshots to s3 (whch I did for all my customers)

22:44 alright, where should I start as a lisp hacker

22:44 *emacs hacker

22:50 I'm on Ubuntu 9.10

22:51 hiredman: eh?

22:52 mebaran151: having destroyed my homedir, I think it's a sign I should be using emacs for clojure dev

23:02 how do I get the classpath slime is using?

23:11 defn: mebaran151: first step, get emacs23 and compile from source

23:12 mebaran151: step two, start reading other people's configs and build a small config of your own. only edit your config with emacs

23:13 mabes: step three, become frustrated and consider giving up

23:13 mebaran151: step four, resist this urge and alias vim to emacs -nw

23:15 blbrown_win: ~

23:15 clojurebot: No entiendo

23:15 blbrown_win: ~(+ 1 1)

23:15 clojurebot: :negative/num-1 + :positive/num-1 = :zero/zero

23:15 blbrown_win: ~(+ 1.0 1.0)

23:15 clojurebot: FAQ #1 is http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b

23:15 blbrown_win: ~help

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

23:16 blbrown_win: `(+1 1)

23:16 what is the syntax to invoke a command

23:16 chouser: ,

23:16 clojurebot: EOF while reading

23:16 blbrown_win: ,(+ 1 1)

23:16 clojurebot: 2

23:17 blbrown_win: ,(new java.util.Date)

23:17 clojurebot: #<Date Mon Jan 11 20:23:17 PST 2010>

23:18 blbrown_win: hmm, clojurebot must be in... Texas!

23:19 hiredman: nope

23:22 Raynes: I would probably use Vim, but then I installed M-x nterm, M-x paredit, and actually tried VimClojure. :D

23:22 nterm > eshell

23:24 I don't believe there is a way to run a shell inside of Vim like you can in Emacs. Dreamkiller.

23:25 defn: Do people use emacs as a java ide?

23:25 Is it better to learn eclipse or netbeans?

23:25 (as opposed to emacs)

23:25 Raynes: It could be a Java IDE.'

23:26 defn: sure it 'could', but do people do it, and are those people effective?

23:26 somnium: defn: if youre in emacs already try out cedet first

23:26 defn: i have cedet

23:26 somnium: then Im not sure what youre looking for in the ides

23:27 defn: oh, i didnt mean to suggest ive used cedet

23:27 only that i have it

23:29 Raynes: Emacs is an effective IDE for pretty much anything, if you know what you're doing it.

23:36 G0SUB: I need some tips about configuring the logging system when using c.c.logging. can anyone help?

23:36 ctdean: Maybe, go ahead

23:37 G0SUB: ctdean: well, I want all my logs to go to a file, which is rotated, etc.

23:37 defn: Raynes: yeah I mean, i figured as much, but that doesn't mean it's always the *best* IDE

23:37 G0SUB: ctdean: I would also like to change the log format

23:38 Raynes: defn: Well, there really /isn't/ a best IDE for anything. It's really what works best for you.

23:38 If that is Netbeans or Emacs, so be it.

23:38 ctdean: G0SUB: So what you need to do is create a .properties file (or files) and put them in your classpath. Since the logging system uses existing java libararies you need to configure those libs

23:38 arohner: defn: emacs is the best thing on the planet for editing text, period. Personally, I expect my editor to be just that, an editor

23:39 ctdean: I use log4j and I can post my .properties files if you'de like

23:39 arohner: I use other tools when I want to debug or profile

23:39 G0SUB: ctdean: please do. thanks in advance.

23:40 arohner: defn: I don't expect my editor to refactor my code. I claim I'm productive, but I'm used to what some people would call primitive development environments. it works for me. YMMV

23:41 ctdean: log4j .properties files http://gist.github.com/274916 http://gist.github.com/274915

23:42 blbrown_win: hiredman what is wrong with the #java administrators never understood that community

23:42 Raynes: All hail the gist.

23:42 somnium: and at a glance, things like Xrefactory exist

23:42 ^^ wrt emacs capabilities vs. ides

23:42 hiredman: blbrown_win: huh?

23:42 G0SUB: ctdean: so I put it somewhere in the classpath. do I have to load the file explicitly?

23:43 ctdean: G0SUB: Yes, put it in the root of your classpath with those filenames. No need to load them yourself, the lib will do it

23:43 hiredman: there was a #jvm for a few days once

23:43 it had three people in it

23:44 G0SUB: ctdean: cool. any other config needed? or can I just use (logging/debug) etc. straightaway?

23:45 ctdean: G0SUB: I think that's it. make sure the directory exists for the file, load c.c.logging, and go nuts

23:45 G0SUB: ctdean: hehe, yahoo! Any refs for what else I can put in those properties files?

23:46 ctdean: G0SUB: btw, I didn't know much about this before I created those two files. SO I just read the docs log4j, etc

23:49 mebaran151: defn, do I really need emacs23, 22 isn't good enough?

23:49 Raynes: mebaran151: emacs 23, it's whats for dinner, tonight.

23:50 G0SUB: ctdean: "Note: your log configuration should display the name that was passed to the logging implementation, and not perform stack-inspection, otherwise you'll see something like "fn__72$impl_write_BANG__39__auto____81" in your logs."

23:50 ctdean: does the current config address that?

23:50 defn: mebaran151: it makes a huge difference in comfort

23:51 tft ftw

23:51 ctdean: G0SUB: you're testing the limits of my knowledge here :), I think that is the %c in conversionPattern property.

23:51 Try it and see!

23:52 G0SUB: ctdean: ah, no problem. I am a complete Java n00b. that's why I was asking. Thanks a lot :)

23:52 mebaran151: defn

23:52 okay

23:52 apt-getting

23:53 defn: no, dont get the package

23:53 compile from source

23:53 mebaran151: I gotta compile it? why's

23:53 defn: what distro are you on?

23:53 ubuntu 9.10?

23:53 ctdean: G0SUB: it's all good, I know a lot about Java, but very little about the libs, go figure, lol. sort of an oxymoron

23:53 mebaran151: Ubuntu 9.10

23:53 G0SUB: ctdean: hehe

23:53 mebaran151: it seems pretty recent

23:53 defn: the package doesnt have cedet setup right which became annoying

23:53 mebaran151: okay

23:53 sigh

23:53 defn: itll probably work for your fine though

23:54 just get the package since compiling cramps your style

23:54 ;)

23:54 G0SUB: ctdean: java is more about the huge number of libs than the language I presume.

23:55 mebaran151: defn, nah, I'll compile from the source

23:55 what dev packages do I need?

23:56 ls

23:58 qbg: Is anyone else unable to build clojure-contrib using the latest master snapshot?

Logging service provided by n01se.net