#clojure log - May 14 2010

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

0:39 defn: aww ninjudd left before i could explain that all of the examples have results

0:39 you just gotta click em

0:39 arohner: haha

0:39 the sum of digits 0 to n with a reduce => WARNING

0:51 Is it rude to push jars to clojars without maintainer approval

0:52 technomancy: defn: only if you don't alter the groupid

0:52 defn: noted

0:52 technomancy: where do i edit that bad boy?

0:52 just change the defproject ... to foo.bar.project-name

0:53 Raynes: $mail ninjudd All of the examples have results. You just have to click them.

0:53 Bug!

0:53 technomancy: yup

0:56 Raynes: Methinks the mail database got corrupted.

0:58 Eh. Something looks broken in c.c.io.

0:59 "java.lang.IllegalArgumentException: No matching method found: write for class java.io.BufferedWriter"

0:59 "at clojure.contrib.io$spit__2167.invoke(io.clj:328)"

0:59 * Raynes doesn't have time for this.

1:02 Raynes: Guess Stuart broke it.

1:15 This makes little sense.

1:15 spit works fine from the REPL, but not from sexpbot/clj-config.

1:20 technomancy: any more contrib forms that clojure-mode should be smarter about indenting?

1:20 currently have dotrace, handle-case, and handle

1:20 raek: sorry for ignoring your clojure-mode patch for so long. it got lost under a big pile of stuff

1:21 defn: clojure is 1.2.0-master-SNAPSHOT and contrib is 1.2.0-SNAPSHOT, yes

1:22 technomancy: t

1:22 wait, I mean true

1:22 dang elisp

1:22 defn: :)

1:23 Raynes: What a weird bug.

1:24 Check this out: if you do (spit "omgfile" {:wtf "omg"}), it will throw "java.lang.IllegalArgumentException: No matching method found: write for class java.io.BufferedWriter"

1:24 I didn't realize I wasn't str-ing it before, so that fixed it.

1:24 technomancy: try {:wtf "bbq"}

1:24 Raynes: Same thing! Weird!

1:24 defn: lol

1:24 Raynes: ;)

1:25 technomancy: {:rolf "copter"} maybe?

1:25 :rofl

1:25 defn: {:loller "skates"}

1:25 Raynes: is that weird? I didn't think you could just write a data structure out like that

1:25 technomancy: Raynes: check the mailing list; some of the semantics of io got changed to quit using PrintWriters and got reimplemented with protocols

1:25 Raynes: It worked before the last commit.

1:26 defn: Raynes: are you trying to serialize?

1:26 Raynes: I understand how it wouldn't work.

1:26 But I don't understand why it threw such a useless error.

1:26 It had me going for a whiler.

1:26 while*

1:26 defn: clj-config. It uses Clojure data structures for configuration files.

1:27 defn: dont you want something like (dorun (with-out-writer (java.io.File. "foo") (binding *print-dup* true] (prn {:foo "bar"})))

1:27 )

1:27 Raynes: No, I don't.

1:27 defn: oh...

1:27 well then nevermind then!

1:27 Raynes: $mail ninjudd All of the examples have results. You just have to click them.

1:27 sexpbot: Message saved.

1:28 Raynes: That's better. :D

1:28 defn: since you're from AL you should have said 'em instead of them

1:28 Raynes: I don't have much of an accent. :p

1:28 LauJensen Jr.

1:28 defn: All them thar examples have results! Ya just gotta click 'em!

1:28 Tarnashuns!

1:29 Raynes: Ya'll just gotta click 'em!*

1:29 I hate "Ya'll", but what I hate worse is these illiterate hicks not bothering to put the apostrophe there.

1:31 defn: Want a preview of the new tryclojure? :>

1:31 defn: sure

1:31 technomancy: just submitted updated slime, clojure-mode and clojure-test-modes to elpa

1:31 hopefully they will be available soon

1:31 defn: technomancy: sweet

1:31 Raynes: defn:

1:31 defn: i run clojure-mode from a git repo anywho

1:32 Raynes: is this on your 56k?

1:32 technomancy: defn: well now the folks who are too lazy to do that will benefit

1:32 Raynes: I'm working on some better stuff to do with the text-field (like probably get rid of it and make it look like an actual REPL.).

1:32 Yes.

1:32 Minus that last period in the parens there. :>

1:32 defn: Raynes: nice work buddy

1:33 Raynes: That's why I said preview. It's obviously going to be slow right now. :p

1:33 defn: Raynes: can i make one minor stylistic suggestion

1:33 Raynes: Sure.

1:33 defn: dont post anything that takes people to Reddit

1:33 Raynes: O_o?

1:33 defn: Reddit sucks. ycombinator is the only way to roll

1:33 Raynes: It's the Clojure reddit. :o

1:34 defn: yeah but it's still reddit

1:34 reddit is filled with so much junk

1:34 technomancy: Raynes: can't enter anything here

1:34 Raynes: Patches welcome. :)

1:34 technomancy: oh, nm; just took a while

1:34 Raynes: Yeah, sorry. Slow webs.

1:34 defn: I got the scrolling to work on my Chrome now too. JQuery made it work for some reason.

1:34 technomancy: Raynes: one request: can you make clojure.lang.PersistentQueues show as queue-fish?

1:35 because that would really make my day

1:35 clojurebot: everyday is Rich Hickey Appreciation Day

1:35 Raynes: wut

1:35 technomancy: that too

1:35 ,Q

1:35 clojurebot: <-nil-<

1:35 Raynes: I think there was an implicit joke there that I missed.

1:35 technomancy: ,clojure.lang.PersistentQueue/EMPTY

1:35 clojurebot: <-nil-<

1:35 technomancy: ,(conj (conj clojure.lang.PersistentQueue/EMPTY 12) 9)

1:35 clojurebot: <-(12 9)-<

1:36 Raynes: Thats interesting.

1:36 technomancy: behold, the legendary queue-fish

1:37 it's a print-method hack that got added to clojurebot

1:40 TheBusby: for some reason that reminds me of William Tell's arrow

1:42 defn: ,(conj clojure.lang.PersistentQueue/EMPTY \\\\\\\\\\\\\)

1:42 clojurebot: EOF while reading

1:43 defn: ,(conj clojure.lang.PersistentQueue/EMPTY \\\\\\\\\\\\\/)

1:43 clojurebot: <-(\\ \\ \\ \\ \\ \\ \/)-<

1:43 defn: aww that's no good

1:43 ,(conj clojure.lang.PersistentQueue/EMPTY "\\")

1:43 clojurebot: <-("\\")-<

1:43 defn: ,(conj clojure.lang.PersistentQueue/EMPTY [-_-])

1:43 clojurebot: java.lang.Exception: Unable to resolve symbol: -_- in this context

1:44 defn: </spam>

1:45 technomancy: ,(conj clojure.lang.PersistentQueue/EMPTY '^_^)

1:45 clojurebot: Unmatched delimiter: )

1:45 technomancy: ,(conj clojure.lang.PersistentQueue/EMPTY (symbol "^_^") )

1:45 clojurebot: <-(^_^)-<

1:46 technomancy: ok, g'night

2:17 replaca: wow, folks are really fascinated with the fish :)

2:17 defn: it's novel, and it's late :)

2:41 jColeChanged: Hi, I'm just starting to learn clojure and ran into a bit of a bump.

2:43 zmila: JColeChanged - what's the problem?

2:43 tomoj: what's the bump shaped like?

2:43 jColeChanged: Its shaped like a tree I think.

2:44 http://pastebin.org/234696

2:45 I'm trying to so recursion and finding myself getting a stackoverflow error. I tried switching it to use recur and got the same problem.

2:45 Well, a different problem, but it still didn't run.

2:46 tomoj: side note: you probably want defn

2:46 and we don't like underscores

2:46 (defn knapsack-count [sack space] ...

2:46 zmila: here (knapsack_count (rest sack) space) - you don't change "space"

2:49 tomoj: the way you're trying to solve the problem is not easy to do in clojure, I think

2:58 LauJensen: Morning all

2:58 jColeChanged: I'll probably try solving it another way than. Just goofing around with project euler problems so its not really a big deal.

2:59 Morning Laujensen.

3:03 LauJensen: jColeChanged: http://gist.github.com/400896

3:03 Hows that work?

3:07 jColeChanged: That worked.

3:07 Perfeclty.

3:07 Thankyou LauJensen.

3:08 LauJensen: np :)

3:08 jColeChanged: BTW: You solved problem 31 on project euler.

3:08 LauJensen: No you did - I just fixed your code :)

3:09 jColeChanged: =) This channel seems a whole lot more friendly than most (from my limited experience). Glad I decided to learn clojure.

3:10 LauJensen: Yea its definitely a nice place to hang out

3:10 tomoj: won't that code still blow the stack?

3:11 guess it doesn't matter if you're only looking for a specific answer

3:11 need trampolines to solve it that way in general, I think?

3:11 LauJensen: No, it blew the stack because it didn't bail on empty

3:11 tomoj: Yes

3:11 But I don't know how to explain a trampoline solution in a newbie friendly way, perhaps you can help?

3:12 tomoj: I've never needed them yet :(

3:12 scottj: Is there a better way to get a string of x spaces than (apply str (take x (repeat \space)))?

3:12 LauJensen: $(doc trampoline)

3:12 sexpbot: result: -------------------------clojure.core/trampoline([f] [f & args]) trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if... http://gist.github.com/400904

3:12 LauJensen: ,(doc trampoline)

3:12 clojurebot: "([f] [f & args]); trampoline can be used to convert algorithms requiring mutual recursion without stack consumption. Calls f with supplied args, if any. If f returns a fn, calls that fn with no arguments, and continues to repeat, until the return value is not a fn, then returns that non-fn value. Note that if you want to return a fn as a final value, you must wrap it in some data structure and unpack it after trampoline r

3:12 tomoj: ,(doc repeat)

3:12 clojurebot: "([x] [n x]); Returns a lazy (infinite!, or length n if supplied) sequence of xs."

3:12 tomoj: scottj: ^

3:13 scottj: tomoj: ahh, thanks

3:13 tomoj: not quite as cool as ruby, but meh

3:14 overloading * for sugar seems evil now to me anyway

3:15 LauJensen: I really like the 2**10 operator

3:15 2**10 vs (Math/pow 2 10)

3:16 tomoj: how come I never see symbols with infix :?

3:16 like 'foo:bar I mean

3:16 scottj: tomoj: what I think is tricky about that is that 2*" " seems as valid as " "*2

3:20 I suspect because clojure programmers are used to associating : w/ keywords they don't think to use it as a separator in symbol names, and use packages to separate things groups - feels insufficient

3:20 s/packages/namespaces

3:21 tomoj: I wonder what rich was thinking when he explicitly allowed it

3:21 "A symbol can contain one or more non-repeating ':'s."

3:28 scottj: LauJensen: if I were going to use Math/pow more than a couple times in a prog I'd define **

3:30 lancepantz_: does clojure-mode in emacs only highlight purple and blue out of the box?

3:30 tomoj: I'm just bugged by the fact that it only returns doubles

3:31 LauJensen: scottj: define it as a reader-macro and send it to Rich :)

3:34 scottj: lancepantz_: you mean does it only define two faces? it has faces for builtin, comment, func, keyword (annoyingly highlights some builtins and what clojure calls keywords), and string. not constant face

3:38 jColeChanged: Lauljensen: From what I can tell the only difference between next and rest is that rest returns an empty sequence and next returns nil when given a sequence with no items beyond the first. Are there any other differences that I'm missing which made next preferable to rest in the code you fixed or was it just your preference?

3:39 LauJensen: None at all. When next first was introduced, it was described as being more lazy than rest which was now eager. But when I wanted to explain that, I saw in the docs that it was no longer the case. So for this scenario rest is fine, if not better

3:46 jColeChanged: Oh, and by the way (< x 0) is (neg? x), (> x 0) is (pos? x)

3:46 tomoj: heh, interestingly it looks like for lists, rest actually just does the exact some thing as next, but then returns () if it gets nil back

3:47 jColeChanged: and (zero? x) as well right?

3:47 LauJensen: si

4:21 jColeChanged: Thanks again for the help. I'm heading to bed (its 1:20 AM).

4:31 unfo-: if i wanna do GUI stuff with clj i do it with java's swt/swing/etc libs right?

4:32 abrenk: unfo-: yes - there are a couple blog entries regarding clojure and swing

4:32 unfo-: also there's a wrapper around miglayout in clojure-contrib

4:33 unfo-: abrenk, ty. I got interested in implementing something like this: http://rogeralsing.com/2008/12/07/genetic-programming-evolution-of-mona-lisa/ in clj :)

4:33 sexpbot: "Genetic Programming: Evolution of Mona Lisa « Roger Alsing Weblog"

4:40 LauJensen: unfo-: Looks like something that would be simple to paint on a JPanel

4:43 tomoj: there's also processing

4:45 unfo-: true true

4:45 <3 processing with scala at least :)

4:45 haven't checked it out with clj

4:46 LauJensen: Its trivial to plug into with Clojure

4:46 Slick2D is a little tricky, PulpCore is really tricky

4:46 JME is doable, but a little tricky and very tedious

4:47 JPanel is definitely the way to go for something like that

4:47 Takes 10 minutes to set up a panel with customized rendering

4:50 vIkSiT: hmm, btw - in your experience - how much of an overhead is clojure code compared to equivalent java or scala?

4:50 I've been reading some blog posts today with all sorts of benchmarks

4:51 LauJensen: vIkSiT: judging from Wide Finder II its about -20% :)

4:51 Chousuke: for well-written, optimised code.

4:51 LauJensen: You see, in that particular benchmark, it beat both Java and Scala. But theres not a 1 answer fits all. If you want to be as fast as Java or Scala, you can definitely be that, but dynamically typed unhinted code will be slower

4:51 vIkSiT: LauJensen, ah hmm - would you have a link to some results? a google search thows a number of blog posts from '08

4:52 LauJensen: So choose your battles. If you hav slow code, optimize it. If not, keep it elegant

4:52 vIkSiT: ah I see

4:52 LauJensen: http://wikis.sun.com/display/WideFinder/Results

4:52 sexpbot: "Results - Wide-Finder - wikis.sun.com"

4:52 LauJensen: Clojure did that in 8 minutes something

4:52 vIkSiT: for instance - this post is quite telling: http://groups.google.com/group/clojure/browse_thread/thread/73b1d41635d19dd8

4:52 LauJensen: $google alex osbourne wide finder II

4:52 sexpbot: First out of 2640 results is: ongoing · What · Technology · Concurrency

4:52 http://www.tbray.org/ongoing/What/Technology/Concurrency/

4:53 Chousuke: if you just write straightforward code it's anywhere between one point something to ten times slower than a java solution, depending on what you're doing :P

4:53 vIkSiT: hehe

4:53 LauJensen: or 100 times slower if it reflects

4:53 Chousuke: heh

4:53 vIkSiT: and would you know its efficiency vs common lisp?

4:54 LauJensen: But the point is. Clojure is 10x more concise and elegant than Java, and 9x more so than Scala. And if you want, you can make it just as fast.

4:54 Chousuke: vIkSiT: which implementation? :)

4:54 LauJensen: vIkSiT: I dont have any numbers, though I have seen a comparison, where optimized Clojure vs optimized CL showed Clojure to be about 5x faster

4:54 Than SBCL I think

4:54 vIkSiT: LauJensen, oh yes, I agree in terms of conciseness and elegance :)

4:55 Chousuke, well, SBCL, or Franz for instance!

4:55 tomoj: 5x faster than sbcl...

4:55 Chousuke: again, it depends a lot on what you're doing

4:55 LauJensen: vIkSiT: But if you saw my post on Fluid Dynamics, you can see just how low-level you can go with Clojure. I did primitive math

4:55 tomoj: that is baffling

4:55 Chousuke: I wouldn't believe that 5x number :P

4:55 vIkSiT: LauJensen, ah yes I think I saw it a few days ago

4:55 LauJensen: tomoj: why?

4:55 Chousuke: SBCL is extremely fast if you write properly type-hinted code.

4:55 tomoj: sbcl compiles

4:55 Chousuke: it can beat C at times.

4:56 tomoj: to machine code I mean

4:56 Chousuke: for a similar algorithm

4:56 LauJensen: It was the Brians brain I did. My version was slow, lets say it took 1 minute for a certain number of iterations. The SBCL version then took 20 seconds, then Christophe made one that took 5 seconds - Same algorithm

4:57 vIkSiT: hmm

4:57 LauJensen: tomoj: but going directly to machine-code also means no hot-spot

4:57 Chousuke: but still, imperative programming is idiomatic in CL so most CL code won't really be comparable with clojure code, as the data structures and algorithms used are very different.

4:57 vIkSiT: Chousuke, what do you mean by your last statement btw?

4:57 imperative programming is "idiomatic" in CL?

4:57 Chousuke: yes.

4:57 vIkSiT: as in?

4:57 LauJensen: True. But I think its a void concern. The question should be, can I make this fast _enough_ if I need to. And yes you can. End of performance story, lets now look at elegance and robustness :)

4:58 tomoj: yeah

4:58 Chousuke: vIkSiT: Well, if you try to write imperative code in clojure you'll end up with a mess

4:58 tomoj: I won't be touching sbcl anytime soon

4:58 Chousuke: vIkSiT: but CL is much more forgiving.

4:59 vIkSiT: ah

4:59 LauJensen: Chousuke: Yea, CL is the father who doesn't care - Rich cares!

4:59 vIkSiT: btw, I'm always a bit hazy about what exactly "idiomatic" refers to when used with lisps

4:59 Chousuke: LauJensen: I'd rather say that CL is not as opinionated

4:59 vIkSiT: does it imply using functional techniques vs imperative mishmash?

4:59 Chousuke: well functional style is idiomatic in CL too

5:00 LauJensen: vIkSiT: when something is idiomatic to a language, it means it adhears to what the language-designer intended - at least thats one definition

5:00 vIkSiT: ah I see

5:00 Chousuke: in my view CL supports both approaches equally well

5:01 LauJensen: Chousuke: wow, really?

5:01 tomoj: I don't want to give the designer authority over idioms

5:01 LauJensen: I didnt even know they had persistent immutable datastructures

5:01 tomoj: bad news is, he's already got it

5:01 tomoj: maybe de facto

5:01 Chousuke: LauJensen: well, they don't. but you don't need those for functional programming.

5:01 tomoj: if he says "don't do that" people will listen

5:01 but we really have the power to create whatever idioms we want, under my understanding of the word

5:01 LauJensen: Chousuke: If its to have any practical application, then yes you do

5:02 Chousuke: LauJensen: nah

5:02 LauJensen: Chousuke: How then can your code be both effecient and geared for concurrency?

5:02 tomoj: I think of idioms as code style memes I guess

5:02 Chousuke: what has concurrency to do with this?

5:02 LauJensen: higher-order functions and such are useful even without immutable data structures

5:02 LauJensen: Chousuke: 'practical application'

5:03 Chousuke: concurrency isn't the only practical application of functional programming :P

5:03 LauJensen: Thats true, but even Richs definition of a functional language, is one which has a focus on immutable datastructures

5:05 Chousuke: I didn't mean to define CL as a functional language, but one that supports functional idioms

5:05 and those don't necessarily include working with immutable data structures

5:06 LauJensen: Chousuke: Im just trying to alert you to the fact, that CL doesnt not support functional paradigmes 'equally well' as Clojure. So that if you have to choose based on the criterium, choose Clojure

5:06 scottj: http://news.ycombinator.com/item?id=1016566

5:06 sexpbot: "Hacker News | Palindromes (Clojure vs. Common Lisp)"

5:07 Chousuke: I didn't say it supports the paradigm equally to clojure. I said it supports imperative and functional programming equally well :)

5:07 no comparison to clojure in that statement.

5:07 LauJensen: aha - sorry I misread :)

5:10 Raynes: mmarczyk: ping

5:12 Licenser: http://blog.licenser.net/2010/05/14/stupid-db =)

5:12 sexpbot: "lice! : Stupid DB"

5:14 tomoj: link to github is wonky

5:20 Raynes: To whom it may concern: http://tryclj.licenser.net/ is awesome now.

5:21 LauJensen: Raynes: I love that you've done it, but does it have to be so ugly?

5:21 Raynes: Why, thank you.

5:21 LauJensen: http://tryruby.org/

5:21 sexpbot: "try ruby! (in your browser)"

5:21 LauJensen: http://tryhaskell.org/

5:22 And then look at yours - notice something a little off? :)

5:22 Raynes: It's my first web development project ever. I'm sorry if it's ugly. Licenser has a fork, and I suspect he'll make his pretty, then you can use his.

5:22 Chousuke: it should use the clojure colour scheme

5:23 tomoj: I'm surprised jquery-console doesn't support emacs keybindings

5:23 LauJensen: Raynes: Please dont pout, its nothing personal. Im just saying, slap on some nice css and a huge clojure.svg background image and you're all set :)

5:23 Raynes: I'm not pouting. I don't expect anyone to use it.

5:23 tomoj: or maybe that's not possible?

5:23 LauJensen: tomoj: but Conkeror does

5:23 tomoj: yeah, but not in the jquery-console

5:23 (not even in quote-mode)

5:23 LauJensen: oh

5:24 Raynes: Just trust me, if I had any clue how to make it pretty, I certainly would.

5:24 I'm definitely not a designer.

5:24 LauJensen: I think I'll make a little script which hits every bug tracker in the world, and files the bug "does not support emacs keybindings" - they really should be everywhere

5:24 tomoj: :D

5:24 LauJensen: Raynes: So just copy paste the other sites

5:25 Raynes: Eh.

5:25 I'd rather not.

5:25 LauJensen: just link they CSS and use the same classes :)

5:25 Raynes: I'd rather it be ugly than just copy and paste someone else's work. Believe it or not, I worked my ass of on that site, ugly or not.

5:25 :p

5:26 zmila: tryclojure is good. i'll use it when smth small need to be checked. in order to not start the whole Eclipse

5:26 Raynes: I needed the experience, and that's why Licenser made his fork. He can make his "official" if he wants, and put it on try-clojure.org.

5:26 LauJensen: Raynes: ok, here's my suggestion. Make the background white. Remove everything but the evaluation box, and but that in a div which has a background: transparent url(/something/with/a/nice/border.png) no-repeat top left. And thats it. Simple and beautiful

5:27 Raynes: Would be kind of lonely.

5:27 esj: second that - make it look like a goole page

5:27 s/goole/google/

5:27 sexpbot: second that - make it look like a google page

5:30 zmila: ,(assoc {} [3 #{1 2 3}] 100)

5:30 clojurebot: {[3 #{1 2 3}] 100}

5:30 zmila: tryclojure fails to eval "(assoc {} [3 #{1 2 3}] 100)" => ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IFn

5:31 Raynes: I already had plans to do something like that. With some added stuff below all that, like the other pages, with links and such.

5:31 On the right, there is a message that says "This site is not finished" or something similar.

5:31 Once it's gone, you can whine about ugliness all you want. :p

5:32 zmila: Probably problems with URL encoding. I'll fix that later. I need a break.

5:32 tomoj: Raynes: good work! someday we will have a nice in-browser tutorial to wow people with

5:37 zmila: yes, Raynes. just simple "#{1}" fails, but only "#{}" is ok

5:38 Raynes: tomoj: Meh, not good enough.

5:38 tomoj: well, like you said, it's not done yet

5:39 zmila: i even don't need to open the page, just type the url ending with the expr :)

5:40 http://tryclj.licenser.net/magics?code=%28range%200%201000%29

5:40 nice!

5:40 Raynes: Oh, cool. That's kind of an implicit API.

5:40 :p

5:41 Or an accidental API.

5:42 zmila: i can calculate with google just from firefox address bar

5:42 and now eval clojure

5:55 cgrand: Raynes: late pong

5:55 Raynes: Wasn't that like a day or two ago? >_>

5:56 I think I was going to ask you why Moustache still requires clojure/contrib 1.1.0-master-SNAPSHOT

5:56 Oops.

5:57 ^ wrong channel.

5:57 The oops was in the wrong channel, that is.

6:10 zmila: That isn't my bug! :D

6:10 zmila: That's a clj-sandbox bug.

6:10 $eval #{1}

6:10 sexpbot: java.lang.Integer cannot be cast to clojure.lang.IFn

6:10 zmila: good :)

6:11 Raynes: Well, I guess that does make it my bug. :|

6:11 But not a tryclojure bug.

6:12 tomoj: $eval #{+ 2 3}

6:12 sexpbot: java.lang.Integer cannot be cast to clojure.lang.IFn

6:14 tomoj: $eval #{'list list}

6:14 sexpbot: result:

7:25 tomoj: Licenser_: you around?

7:25 Raynes: or you?

7:26 Raynes: I'm here.

7:33 tomoj: that was a premature ejaculation, sorry

7:38 $eval *print-level*

7:38 sexpbot: DENIED!

7:39 tomoj: Raynes: ok, ready, I guess :/

7:40 Raynes: ?

7:40 tomoj: thought I could do more but I'm giving up

7:40 http://tryclj.licenser.net/magics?code=*print-level*

7:41 Raynes: Is there a question here or something? :o I'm confused.

7:41 tomoj: you work on clj-sandbox, right?

7:41 Raynes: Yeah.

7:41 tomoj: http://tryclj.licenser.net/magics?code=*print-length*

7:42 *print-level* is no longer blacklisted (or is now whitelisted, whichever) on your tryclojure

7:43 Raynes: I haven't modified those in any way, so I guess it must be whitelisted in the default tester.

7:43 tomoj: ok, now it is again

7:43 no, I did this

7:43 want me to PM you or do you trust #clojure? :)

7:44 Raynes: Oh, wait, you broke it?

7:44 See, you didn't say that.

7:44 :p

7:44 PM me.

7:52 tomoj: too bad it doesn't work on def

7:56 zmila: setting print-len is "Disabled for security purposes."

7:56 Raynes: tomoj: Licenser is working for that.

7:56 zmila: Sure is. :p

7:57 zmila: but how about asking your magic api for (range 0 1000000000000000) ?-)

7:57 Raynes: Feelin' lucky? Punk? Go for it.

7:57 :p


7:58 tomoj: oh, so even with *print-length* whitelisted, you're safe?

7:59 Raynes: tomoj: It actually isn't whitelisted. I don't know why it's going through.

7:59 Maybe another bug.

7:59 tomoj: hrmm, I need to work harder :P

7:59 yeah, the bug I just told you about in PM

7:59 Raynes: Oh yeah.

8:00 Sorry, I've been awake for a while.

8:00 :p

8:00 tomoj: oh, I think I can whitelist defn too

8:00 but maybe when it expands to def, that'll be blocked even so?

8:02 yep :(

8:02 Raynes: I think so.

8:03 tomoj: and since def is a special form there's nothing I can do about it, oh well

8:14 http://tryclj.licenser.net/magics?code=(net.licenser.sandbox.box43527/tomoj)

8:16 ok, I'm done, sorry :(

9:00 webar7: can someone make #clojure run on python or parrot instead of java :P

9:01 Chousuke: yes, but will someone? I dunno :P

9:02 Hodapp: gnu lightning ftw

9:02 webar7: was that the sound of you volunteering to port it?

9:05 webar7: I have such pain building/installing java on freebsd ... sigh

9:06 Hodapp, ok ... as long as I know it's technically feasible :)

9:06 Chousuke: it'll probably become a lot easier as the java parts get rewritten in Clojure

9:07 but it's probably not going to happen tomorrow :)

9:07 eevar2: webar7: there's no openjdk for freebsd?

9:08 Chousuke: Though as far as I understand the situation, when 1.2 is released clojure should have all the tools necessary to do it.

9:09 webar7: Hodapp, I'm like Jim Carrey in that movie where when faced with 1000000 to 1 odds he says "I've got a chance!!"

9:10 Hodapp: hmmmm

9:15 SynrG: webar7: what, i can get clojure to work on OpenVMS but freebsd is a no go? i find that amusing :)

9:15 webar7: haha

9:16 SynrG: http://www.freebsd.org/java/ says there are binaries ...

9:16 sexpbot: "FreeBSD Java™ Project"

9:19 webar7: yeah ... they sort of work

9:20 eevar2: SynrG: i assume it's as simple as port install openjdk6

9:20 webar7: it';s more that when I read you can do lisp type programming in clojure but then "do anything you can do in java" by calling out to the jvm I thought: "but I don't wanna do java" hahah

9:21 but anyway it shore is cooool

9:21 SynrG: still waiting for clojure in clojure, hm?

9:21 webar7: and it's gonna work on appengine :)

9:22 chouser: clojure-in-clojure will still let you do anything you can do in java

9:23 eevar2: it will also still run on / depend on the jvm

9:23 chouser: right

9:24 it will make it easier to port to other hosts, but will not itself be a host.

9:25 defn: f

9:25 clojure is three languages

9:26 webar7: chouser, other hosts like other vms?

9:26 chouser: right

9:27 javascript, golang, parrot, etc.

9:28 defn: the environment of the hostess defines the freedom of her hosts

9:28 chouser: defn: which three?

9:29 defn: chouser: i was just thinking of the motivations for learning clojure

9:29 Hodapp: hm, I wonder if I could program Processing in Clojure

9:29 as it's basically just Java

9:29 but straight Java makes me want to cry sometimes

9:29 defn: you have your passionate "compelled" force of nerds, you have your "tickled by the idea" nerds, and you have the "we're in it for the white paper" nerds

9:30 Hodapp: white paper?! where?

9:30 defn: you also have the "hedging my bets" nerds who insist on learning haskell, erlang, scala, AND clojure

9:31 arkahn: I want a t-shirt that says "I'm in it for the whitepaper"

9:31 defn: hahahaha yes!

9:31 Hodapp: where do the "C++ is the only language you'll ever need, and it's beautiful" nerds fit in?

9:31 defn: "I went to grad school, and all I got is this lousy whitepaper."

9:31 chouser: Hodapp: http://data-sorcery.org/2009/08/30/processing-intro/

9:31 sexpbot: "Creating Processing Visualizations with Clojure and Incanter « Data Sorcery with Clojure"

9:31 Hodapp: HELLZ YEAH

9:33 I'm on my netbook so it was easier to ask rhetorically in here than to switch windows and ask Google

9:34 chouser: netbook ftw?

9:34 * Hodapp shrugs

9:35 defn: knowing what irc is, is half the battle

9:36 Hodapp: pdk: #zdoom is that way.

9:37 pdk: unless, of course, you're not that pdk.

9:47 neotyk: Hi

9:47 to get clojure current clojure 1.2 what are version strings for lein?

9:47 both clojure and contrib

9:48 tomoj: 1.2.0-master-SNAPSHOT for clojure

9:48 1.2.0-SNAPSHOT for contrib

9:48 jfields_: anyone have a good idea on how to split this "34HD1209,ADSK,"-2,539","-83,203",25,0,0" into this ["34HD1209" "ADSK" "-2,539" "-83,203" "25" "0" "0"]

9:48 neotyk: tomoj: thanks

9:50 drewr: jfields_: you sure you don't mean ["34HD1209, ADSK" ...]?

9:50 tomoj: would be easier to understand if you escaped the inner quotes, I think

9:51 drewr: nm, missed a level of quoting there

9:51 anyway, you'd probably be best served by using a csv parsing lib

9:51 supercsv and opencsv are both pretty good

9:52 tomoj: http://github.com/davidsantiago/clojure-csv hmm

9:52 jfields_: drewr: sorry, I guess that wasn't clear. The line '34HD1209,ADSK,"-2,539","-83,203",25,0,0' is in a file, and includes the inner quotes, but not the outer ones I added.

9:53 chouser: jfields_: re-seq

9:55 jfields_: chouser: the commas within the quotes make a regex seem... complicated.

9:55 chouser: :-) yes

9:56 ,(map (fn [[_ a b]] (or a b)) (re-seq #"([^\",]+)|\"(.*?)\"" "34HD1209,ADSK,\"-2,539\",\"-83,203\",25,0,0"))

9:56 clojurebot: ("34HD1209" "ADSK" "-2,539" "-83,203" "25" "0" "0")

9:57 chouser: though a csv lib may be better

9:57 drewr: tomoj: I tried that lib a while back but it's not quite industrial enough for everyday work

9:57 jfields_: chouser: hah. thanks.

9:57 tomoj: too bad

9:58 drewr: tomoj: doesn't handle the kinds of quoting issues one finds in the real world

9:59 arkahn: "data sorcery with chouser" - I'm copying that solution into my notes for future reference. In solving it, I had gotten as far as using re-seq and scratching the surface with some REs ; )

10:03 _na_ka_na_: hello

10:03 is there an easy way to get a random element out of a set

10:04 chouser: arkahn: regex knowledge is highly transferrable among modern languages and environments

10:04 _na_ka_na_: one way could be (first (shuffle set)) ... but its overkill

10:04 chouser: (doc rand-nth)

10:04 clojurebot: Titim gan éirí ort.

10:04 tomoj: perhaps (rand-nth (seq #{..})) ?

10:04 _na_ka_na_: hmm.. thx lemme chk

10:04 tomoj: ehh

10:04 chouser: clojurebot's running a rather old clojure

10:05 _na_ka_na_: is it not in 1.1?

10:05 tomoj: sucks that you have to convert to something other than a set, and if it's seq you get linear time to walk to the nth, no?

10:05 _na_ka_na_: or seq-utils 1.1?

10:05 chouser: tomoj: yeah

10:05 tomoj: and I guess converting a set to a vector isn't all that attractive either

10:06 chouser: nope, still O(n)

10:06 arkahn: chouser: thankfully I have regex experience from other languages, though just the regex stuff you wrote would have taken me a bit longer to think up. : ) Nicely done.

10:06 _na_ka_na_: if there were a lazy shuffle .. then one could do (first (shuffle )) .. but the shuffle in seq-utils isn't lazy?

10:07 raek: (defn random-of [coll] (nth coll (rand-int (count coll))))

10:07 this is how I ended up solving it

10:07 _na_ka_na_: this is O(n) ..

10:08 * raek reads back some lines

10:08 chouser: you really want a set here, for other reasons? rand-nth on a vector should be nearly O(1)

10:08 _na_ka_na_: ya set is required as i want only distinct elems

10:09 chouser: ,(counted? (seq #{:a :b}))

10:09 clojurebot: false

10:09 chouser: meh

10:10 _na_ka_na_: hmm..

10:14 arkahn: does that mean that (count #{:a :b}) has to go through all n items to find the count or does it keep track as part of adds/removes in the data structure?

10:15 _na_ka_na_: it has to traverse the whole set .. :/

10:16 well w/o O(1) count, we can't even implement a lazy shuffle ??

10:16 wait a min.. does lazy shuffle even make any sense?

10:17 chouser: ,(counted? #{:a :b})

10:17 clojurebot: true

10:17 _na_ka_na_: how?

10:17 clojurebot: with style and grace

10:18 chouser: arkahn: no, (count #{:a :b}) is O(1) because sets know their size. What I was checking was if the seq of a set also knows its size. It could, but apparently it doesn't.

10:18 arkahn: chouser: ok - thank you

10:18 _na_ka_na_: hmm ok ..

10:18 chouser: ok, so rand-nth calls count on the collection (set in this case) directly.

10:19 I'm confusing myself. Ignore that.

10:19 _na_ka_na_: can you please tell me where to find rand-nth

10:20 chouser: (rand-nth (seq a-set)) means rand-nth will count the seq, which because it's not counted will walk the whole thing.

10:20 _na_ka_na_: rand-nth is in 1.2-snapshot (git master). There's something similar (maybe rand-elt?) in contrib

10:21 _na_ka_na_: hmm thx chouser

10:22 ,(source rand-elt)

10:22 clojurebot: java.lang.Exception: Unable to resolve symbol: source in this context

10:22 _na_ka_na_: its thr .. but same as above (defn rand-elt

10:22 "Return a random element of this seq"

10:23 [s]

10:23 (nth s (rand-int (count s))))

10:26 chouser: But even if set-seq were counted, nth on the seq would still have to walk, so technically O(n)

10:26 I can't see how to do any better than O(n) unless some clojure collection type directly supported rand-nth

10:27 PersistentSet could walk its internal tree choosing a random branch at each level and give you O(log32 n)

10:28 but ... you know what, that wouldn't be evenly distributed across the leaf nodes.

10:29 _na_ka_na_: hmm .. i see what you're saying

10:32 chouser: you'd have to know the size of each branch to balance the upper choices, and I don't think sets or sorted-sets know that

10:33 neotyk: does de.kotka.lazymap work with clojure 1.2?

10:33 chouser: a finger tree could. you might be able to get set-like behavior out of a finger tree, and still get O(log2 n) random lookups

10:36 zakwilson_: Is there a way to kill a future that's still computing?

10:36 Aside from (shutdown-agents)

10:37 chouser: future-cancel

10:37 zakwilson_: Why didn't I notice that in the autocompletions?

10:38 tomoj: apparently future-cancel will not kill a process spawned with Runtime exec

10:41 maybe with a finally it could

10:47 zakwilson_: Anybody have experience with EC2? I have some compute-intensive Clojure code and I'm wondering how much faster it would run on a high-CPU XL instance than on my laptop.

10:58 Do futures have a timeout?

10:59 chouser: looks like you can have a timeout on the 'get'

11:00 zakwilson_: I ran (def the-future (future (a-process-that-takes-hours))) and it stopped after a few minutes

11:00 future-done? says it's done, and its value is nil (should be true if it completed)

11:03 mikem: maybe (a-process-that-takes-hours) terminated early with a nil?

11:05 zakwilson_: Can't happen. It could throw an exception, but not return nil.

11:10 patrkris: zakwilson_: and you're sure that it didn't throw an unhandled exception?

11:10 webar7: anything can happen :)

11:10 zakwilson_: patrkris: No. I'm sure it didn't return nil, but it may have thrown an unhandled exception.

11:11 patrkris: zakwilson_: you can probably inspect *e to see the last unhandled exception

11:11 and use the stuff under clojure.stacktrace

11:11 Raynes: http://tryclj.licenser.net/ With the help of LauJensen, I/we've completely redesigned TryClojure. Note that there are a few bugs in clj-sandbox that make the repl a bit less useful than it will be eventually. You can't def* anything, and there seems to be a bug with sets containing integers that Licenser and I will work on later, but all in all, it works.

11:12 zakwilson_: patrkris: I didn't know about *e. The last unhandled exception was an attempt to access an undefined variable at the REPL before the future was created.

11:16 patrkris: zakwilson_: ok, probably wasn't an unhandled exception then :)

11:16 well it was, but not in your future

11:18 wahz: hi; what does "call to contains can't be resolved" refer to when using protocols and records in clojure 1.2?

11:19 stuartsierra: wahz: are you calling 'contains?' on a record object?

11:20 zakwilson_: There are no unhandled exceptions in my future? Thank you, oh great psychic. Now I don't have to do any testing!

11:20 wahz: no, I don't call 'contains?' directly

11:42 stuartsierra: wahz: maybe something else is calling it, that would be my guess

11:47 wahz: I use a record field as a test in a 'cond'; could that be causing it perhaps?

11:49 stuartsierra: I don't think so...

11:49 wahz: okay, thanks

12:30 goodnight; and for anyone else in Australia, go to bed! :)

13:02 giacecco: hi all

13:04 anyone wants to give me a hand with a strange ant script?

13:07 anyone wants to give me a hand with a strange ant script?

13:48 jfields: is there something more simple than this: (Integer/parseInt (apply str (filter #(not= \, %) "2,000")))

13:50 chouser: (remove #{\,} "2,000")

13:50 ,(remove #{\,} "2,000")

13:50 clojurebot: (\2 \0 \0 \0)

13:50 chouser: ,(.replace "2,000" "," "")

13:50 clojurebot: "2000"

13:51 chouser: ,(Integer/parseInt (.replace "2,000" "," ""))

13:51 clojurebot: 2000

13:51 chouser: ,(Integer. (.replace "2,000" "," ""))

13:51 clojurebot: 2000

13:52 jfields: chouser: thanks man. if it makes you feel better, I'm reading your book. so thanks for always answering my questions :)

13:52 chouser: heh. great!

13:53 some people read slashdot to break up monotany at work. I answer #clojure questions.

13:57 cemerick: hrm, I see the pause-after-script-is-done issue is still there

13:58 related to non-daemon agent threads IIRC

14:10 naeu: how might i take a list and create a new list with each item passed through a function and put into an inner list: [1 2 3 4 5] -> [[2] [4] [6] [8] [10]]

14:11 chouser: those are vectors

14:11 ,(for [i [1 2 3 4 5]] [(* 2 i)])

14:11 clojurebot: ([2] [4] [6] [8] [10])

14:14 naeu: ah, i had forgotten about for

14:14 I've not managed to get comfortable with it in a functional context yet

14:14 chouser: thanks

14:14 * tcrayford needs to add support for turning nested map/filters into for comprehensions

14:15 * tcrayford into clojure refactoring mode that is

14:15 chouser: the choice between map/filters and for (for me anyway) is based on a bunch of vague preferences and unrelated details

14:16 in this case, wanting to produce an inner vector pushed me towards for

14:16 tcrayford: you can use map I guess

14:16 chouser: ,(map #(vector (* 2 %)) [1 2 3 4 5])

14:16 clojurebot: ([2] [4] [6] [8] [10])

14:16 tcrayford: aye

14:16 I just like being able to switch preferences like that automatically where it makes sense

14:17 automatically threading stuff through ->>/-> (and unthreading) has been a nice thing for me

14:17 TimMc: I'd like to get started with Clojure + Compojure, but I can't find much about how to structure a project + build files.

14:17 chouser: tcrayford: yeah, those sound handy

14:17 ,(reduce #(conj %1 (vector (* 2 %2))) [] [1 2 3 4 5])

14:17 clojurebot: [[2] [4] [6] [8] [10]]

14:17 tcrayford: TimMC: using lein?

14:18 TimMc: tcrayford: I see that lein exists, but I don't know what to do with it.

14:18 tcrayford: chouser: that paper on fold linked in the joy of clojure was so damn cool

14:18 TimMc: download it, install it

14:18 TimMc: tcrayford: Done.

14:18 tcrayford: then run `lein new` somewhere

14:18 with the name of the project

14:19 `lein new myfirstcompojure` or summat

14:19 chouser: I've been meaning to translate that paper into clojure and put it up on a blog, might do that soon

14:19 TimMc: OK, I'll explore that, thanks.

14:20 * chouser looks for the link

14:20 tcrayford: I have it

14:20 TimMc: Can I get that integrated with an IDE like Eclipse?

14:20 tcrayford: one sec

14:20 chouser: "A Tutorial on the Universality and Expressiveness of fold" by Graham Hutton ?

14:20 tcrayford: http://www.cs.nott.ac.uk/~gmh/fold.pdf

14:20 yeah that one

14:21 TimMc: I mean, if I want to write a Java app, I just fire up Eclipse or NetBeans and create a project, and *BAM* I'm ready to go. Anything like that?

14:21 tcrayford: TimMc: not at the moment iirc

14:21 not with lein anyway

14:21 you can do it with maven and any of the java ide's with a clojure plugin

14:21 but I don't know too much about that

14:21 TimMc: OK, so it's not just poor google-fu on my part.

14:21 chouser: tcrayford: I haven't read it. All references to scholarly works are because of Fogus.

14:22 tcrayford: chouser: its really nice

14:22 technomancy: tcrayford: actually you can have it spit out a pom, which then the IDEs can generally figure out

14:22 (not that I've tried)

14:22 chouser: tcrayford: it does look interesting. I'd probably rather read your blog than the haskell in there though. :-)

14:22 tcrayford: technomancy: not that you would try :P

14:22 jfields: it's not possible to destructure when using %1, correct?

14:22 I need to stick with (fn) if I want to destructure, right?

14:23 tcrayford: chouser: the nice part is when he defines filter and map in terms of reduce

14:23 clojurebot: map is lazy

14:23 tcrayford: for me anyway

14:23 wooby: anyone getting a reader missing parens w/ clojure test mode recently?

14:23 tcrayford: are you using 1.2

14:23 ?

14:24 chouser: clojurebot: yes, but in haskell everything is.

14:24 clojurebot: Huh?

14:24 tcrayford: you need to grab the latest source off of technomancy's github, otherwise it breaks

14:24 chouser: jfields: right, fn or let

14:24 jfields: chouser: thanks

14:25 I have a map and I want to apply a fn to every val and return the map. The best I could come up with was: (reduce (fn [map [k v]] (assoc map k (* 2 v))) {} {:a 1 :b 2})

14:25 wooby: tcrayford, thanks

14:26 tcrayford: wooby: I got bit by that a couple of days back, because I had a forked test-mode with a red/green bar thing (that I've now gotten rid of)

14:27 chouser: ,(let [m {:a 1 :b 2}] (zipmap (keys m) (map inc (vals m))))

14:27 clojurebot: {:b 3, :a 2}

14:28 chouser: ,(let [m {:a 1 :b 2}] (into {} (map (fn [[k v]] [k (inc v)]) m)))

14:28 clojurebot: {:a 2, :b 3}

14:29 wooby: tcrayford, ah yes i was tempted to try that thing also

14:30 tcrayford: wooby: it broke occasionally, and wasn't actually that useful, so its been dropped

14:30 technomancy: the clojure-test-mode fix has been submitted to elpa, just waiting for upload

14:30 tcrayford: does it still work with 1.0 & 1.1?

14:32 technomancy: tcrayford: no, you need clojure-test-mode 1.2 for clojure 1.0 support

14:32 tcrayford: but 1.1 is still fine?

14:34 technomancy: ja

14:35 tcrayford: no worries here then, I didn't really get into proper projects until 1.1 was the standard

14:38 TimMc: Feh, I still can't get lein to run properly. Self-install worked, but if I try to do anything else, it fails with a clojure/main not found error. :-(

14:45 This looks promising, though: http://vimeo.com/8934942

14:45 sexpbot: "Episode 8 - Projects on Vimeo"

14:46 TimMc: ("Full Disclojure")

15:03 * ninjudd changed his mind. Leiningen should not be called cake, because it is way too difficult if you want to something slightly complicated.

15:04 tcrayford: also cake is already taken for some other language

15:04 ninjudd: pie?

15:04 technomancy: the cake is a lie.

15:05 tcrayford: the cake is spy!

15:05 (to be said in a Heavy [TF2] accent)

15:05 TimMc: technomancy: Boy, am I glad to see you! I'm getting "NoClassDefFoundError: clojure/main" whenever I try anything with lein other than self-install.

15:05 ninjudd: cake is build system that only works for windows and cygwin? that hardly counts

15:06 TimMc: This is a Win 7 64-bit system, via Cygwin.

15:06 ninjudd: http://sourceforge.net/apps/trac/cake-build

15:06 sexpbot: "Cake Build System"

15:06 technomancy: TimMc: I think there are some outstanding issues with cygwin support. not sure of the details myself. I have some patches I need to look at for that; it should improve for the 1.2 release.

15:07 TimMc: you might try teropa's fork

15:07 TimMc: I'm stuck on Win 7 here at work -- recommendations for alternatives?

15:08 technomancy: you could try lein.bat too. it's more manual but better-tested.

15:08 tcrayford: vmware/linux?

15:08 TimMc: Urgh.

15:08 technomancy: robwolfe is my go-to man for Windows issues; too bad he's not online.

15:09 TimMc: Thanks for the help!

15:10 We're exploring using Clojure for a web app, but getting a dev environment set up has been tricky.

15:11 tcrayford: I'd reccomend it if you do. I wrote a fairly substantial webapp in compojure and enjoyed it a lot

15:12 TimMc: Note: teropa's fork doesn't help

15:12 Yeah, it *looks* fun, and I have fond memories of Scheme, but... bleh.

15:12 tcrayford: yeah, clojure's tooling support on windows is kinda lacking

15:13 you tried one of the ides properly yet?

15:13 cemerick: TimMc: If you're not liking lein, there's clojure-maven-plugin. Not so popular with some, but pretty darn solid IMO.

15:13 * cemerick runs away to avoid the slings and arrows

15:13 tcrayford: cemerick: didn't you have a blog post about using that and compojure somewhere?

15:13 TimMc: You know what would be a really *awesome* Getting Started guide? A .zip/.tgz with toll install instructions, a build file, and an eclipse workspace premade. :-P

15:13 *tool

15:14 cemerick: tcrayford: yeah... muckandbrass.com/chas will lead you there

15:14 TimMc: cemerick: I think I like lein, it just doesn't like me.

15:14 tcrayford: cemerick: mostly this for TimMc's benefit

15:15 cemerick: TimMc: If you're already in eclipse, then maven would presumably be the easier path.

15:15 TimMc: True.

15:15 cemerick: I've not used the clojure plugin there yet though.

15:15 * kotarak throws in gradle with clojuresque if neither lein nor maven are favorised.

15:15 cemerick: ouch ;-)

15:15 tcrayford: eclipse's ccw is meant to be pretty good, has paredit and some other nice things

15:16 I need to pick an ide to work refactoring-mode into soon

15:16 cemerick: tcrayford: that's what I hear; I plan on giving it a run, as well as intellij's sometime shortly

15:16 TimMc: We're a Java shop, so Eclipse and Maven are embraced.

15:16 cemerick: although what I see re: e4 sounds pretty good, so that might prejudice things a little.

15:17 jfields: any idea what this means: Exception in thread "main" java.lang.AbstractMethodError: org.apache.log4j.helpers.FileWatchdog.doOnChange()V

15:19 tcrayford: that's just a java error no?

15:19 jfields: yeah, I'm trying to implement an abstract class, but when it gets to the Template Method (which is abstract) it throws that exception

15:20 (proxy [FileWatchdog] [path]

15:20 (doOnChange []

15:20 (println "changed")))

15:21 tcrayford: is the signature correct?

15:21 jfields: it's a no-arg method call, so as far as I can tell, yes.

15:22 tcrayford: I ain't got much then.

15:24 dakrone: is there a way to unroll a sequence without apply? I want something like (foo (unroll [1 2 3])) -> (foo 1 2 3)

15:24 tcrayford: why the dislike of apply?

15:25 kotarak: dakrone: (eval `(foo ~@[1 2 3])), *yuk*

15:25 dakrone: because I don't want it to actually be applied

15:25 I need to unroll things for java interop inside a macro

15:25 tcrayford: kotarak: that's ugly :(

15:25 kotarak: ,(list `foo [1 2 3])

15:25 clojurebot: (sandbox/foo [1 2 3])

15:25 kotarak: ,(list* `foo [1 2 3])

15:25 clojurebot: (sandbox/foo 1 2 3)

15:26 kotarak: dakrone: list* is what you want, then.

15:26 dakrone: kotarak: cool, thanks

15:27 kotarak: (defmacro to-string [& args] (list* '.toString args))

15:27 dakrone: similar to apply: (list* :a :b :c [:d :e :f])

15:28 dakrone: kotarak: that does the trick for this, awesome! :)

15:28 kotarak: dakrone: glad it helps

15:29 in fact apply does use list* internally: (apply f a b c d) => (.applyTo f (list* a b c d))

15:30 dakrone: here's how I'm using it: http://gist.github.com/401546

15:33 tcrayford: is reduce lazy?

15:33 stuartsierra: no

15:33 jfields: where's the pastie address?

15:34 stuartsierra: paste.lisp.org

15:34 tcrayford: cheers

15:35 jfields: does this work in 1.2?: http://paste.lisp.org/+24KV

15:36 it looks like calling an abstract method from the ctor fails in Clojure 1.1

15:36 and I'd like to report it, but not if it's already fixed in 1.2. and I don't have a 1.2 easily available.

15:36 stuartsierra: I think that will always fail with 'proxy'

15:36 jfields: oh, it's by design, okay. what should I do instead?

15:37 stuartsierra: avoid it if possible

15:37 jfields: would love to, but it's a 3rd party lib.

15:37 stuartsierra: gen-class *might* work

15:38 otherwise, you'll have to write a wrapper in Java

15:39 That's an appalling design, by the way.

15:39 tcrayford: log4j :/

15:39 stuartsierra: sheesh

15:39 tcrayford: jfields: does clojure.contrib.logging help at all?

15:40 kotarak: dakrone: http://paste.lisp.org/display/99248

15:40 jfields: uhm, not sure, why would it?

15:40 tcrayford: it provides some wrappers around log4j

15:40 depends on what you're doing

15:41 stuartsierra: Apache Commons Logging might also help.

15:42 cemerick: I'm seeing some odd behaviour with interfaces generated with deftype...i.e. (instance? Foo instance) failing even though (class instance) returns Foo (or, something with the name Foo). This anomaly resolves itself if I re-eval the Foo defrecord and recreate the instance....

15:43 dakrone: kotarak: you sir, are a gentleman and a scholar

15:43 and you are also really good at making me feel dumb :)

15:43 * kotarak bows.

15:43 kotarak: dakrone: don't feel dump!

15:43 s/b/p

15:43 dakrone: should have thought of the thresh operator to begin with

15:44 * kotarak always remembers: The master should always be humble and kind to the pupil. Because on other topics the pupil is the master and the master the pupil. (Or something like that...)

16:05 lancepantz: do lein plugins have to be dev-dependencies?

16:05 if i make a plugin a regular dependency, will it be transitive?

16:06 kotarak: But than everyone will get your dependency. Whether they use lein or not. Not the correct use, I think.

16:13 lancepantz: goo point kotarak

16:14 *good

16:18 kotarak: ,1d6

16:18 clojurebot: Invalid number: 1d6

16:18 kotarak: clojurebot: 1d6

16:18 chouser: 1d6

16:18 clojurebot: 6

16:18 It's greek to me.

16:18 kotarak: 2d6

16:18 clojurebot: 5

16:18 kotarak: 6d6

16:18 clojurebot: 19

16:18 hiredman: 1d2+20

16:18 clojurebot: 22

16:20 kotarak: ,1.5e6

16:20 clojurebot: 1500000.0

16:21 kotarak: ,4e0.5

16:21 clojurebot: Invalid number: 4e0.5

16:21 kotarak: ,1.e6

16:21 clojurebot: 1000000.0

16:25 kotarak: ,.5

16:25 clojurebot: java.lang.Exception: Unable to resolve symbol: .5 in this context

16:27 ninjudd: kotarak: should lein dev dependencies be transitive across multiple dev dependencies?

16:27 kotarak: ninjudd: dunno, I don't use lein

16:28 ninjudd: ha!

16:28 good man

16:28 kotarak: ha?

16:28 o.O

16:28 ninjudd: sometimes i wish i didn't use it

16:28 * kotarak is the author of the clojuresque gradle plugin.

16:29 kotarak: ninjudd: then - well - don't use it

16:33 ninjudd: kotarak: do i have to write groovy to use clojuresque?

16:34 lancepantz: kotarak: this is my first time looking at clojuresque, it looks really cool

16:34 kotarak: ninjudd: well, you can pretend that it's some arbitrary dsl. For 90% of the projects that's enough.

16:35 tcrayford: reduce is pretty neat: http://bit.ly/dh2hmm

16:35 sexpbot: "tcrayford"

16:36 ninjudd: kotarak: i doubt i'm in the 90%

16:36 kotarak: ninjudd: just a sec

16:37 ninjudd: which is why it is so hard to do what i want in lein

16:38 kotarak: dang. the "usual" paste bin has hiccup. :/

16:40 ninjudd: technomancy: are lein dev dependencies transitive across multiple dev dependencies?

16:41 technomancy: so if B has a dev dep on C and A has a dev dep on B, will A get C in lib/dev?

16:41 technomancy: ninjudd: no, dev dependencies are not transitive

16:42 ninjudd: technomancy: seems to me they should be

16:42 technomancy: otherwise, how can someone make a lein plugin that depends on another lein plugin?

16:43 technomancy: no, if I use Emacs/swank to develop clojure-http-client, that doesn't mean everyone who uses clojure-http-client should also be forced to download it

16:43 ninjudd: that's not what i'm saying

16:43 i'm working on a lein plugin for compiling protocol buffers

16:44 kotarak: ninjudd: http://pastebin.org/237085 a half-way complicated build script, which defines some subprojects and a custom runNailgun task

16:44 ninjudd: for such custom stuff, you'll have to know a little groovy, but that's a matter of an afternoon

16:45 ninjudd: how can i get a dev dep for my plugin to be available to someone using my plugin?

16:45 technomancy: do i have to make it both a dev dep and a regular dep?

16:45 technomancy: oh, I see. if A has a regular dependency on B and C has a dev dependency on B, C will pull in A on "lein deps"

16:45 because the regular dependency *is* transitive

16:46 ninjudd: so if i have a dev dep on A, it will pull in B too

16:46 ok, so in my case i just need to make the library both a dev and regular dep

16:46 kotarak: cool, i'll take a look

16:48 stribb: hi there, can someone tell me why all the line numbers in my errors are 0?

16:48 ataggart: stribb: because the code was entered in at the repl?

16:49 stribb: no, first arg: java -cp clojure.jar clojure.main ~/clojure/sudoku.clj

16:49 ataggart: ah, no idea then.

16:49 lancepantz: stribb: put a pastie up

16:50 ninjudd: technomancy: problem is that it really is only a dev-dependency, not a regular dependency

16:50 stribb: lancepantz: of the code or the commandline session?

16:50 lancepantz: code

16:50 go ahead and put your trace as well

16:50 ninjudd: technomancy: so people who aren't doing development will get the dep anyway

16:51 stribb: http://pastebin.org/237090 # code

16:52 http://pastebin.org/237091 # terninal session

16:53 (using the stable 1.1 release)

16:55 kotarak: stribb: http://pastebin.org/237094

16:56 stribb: kotarak: so that makes a big array of items then applies to hash-map? cute

16:56 but .. the code isn't really my problem right now, it's how to develop it :|

16:56 kotarak: stribb: well, that was your code.

16:57 stribb: your flatten-pairs is better written as reduce. And your error stems from the missing apply.

16:57 stribb: ok :)

16:58 however, without the hint about which line the bug is on, I'm going to be coding in the dark a little

17:00 ataggart: that's what makes working in the repl so handy

17:00 kotarak: stribb: I can only sketch my dev style: I work only in properly set up projects. I edit code in a file and send it from the editor to a clojure server running in the background. Then I do testing from a Repl in my editor. Then the line numbers are always set up correctly. I use Vim with VimClojure. Emacs + SLIME does similar things, and I think enclojure and ccw work similar for the big IDEs.

17:02 stribb: yeah, I spent a while both on Linux and on the mac here trying to get a slime setup working

17:02 tcrayford: kotarak: confirm that the big IDE's all have repls

17:02 stribb: where's the problem?

17:02 stribb: somewhat stymied by the abundance of erroneous docs

17:03 kotarak: tcrayford: the problem is called "SLIME" ;)

17:03 tcrayford: I like SLIME

17:03 kotarak: tcrayford: but it seems tricky to set up correctly.

17:03 tcrayford: its not that hard

17:03 you follow the instructions on lein's readme

17:03 and use the emacs package manager

17:03 stribb: it might be easy to set up correctly, but it's hard to debug once it's set up wrong

17:04 * tcrayford shrugs

17:04 stribb: maybe by using aquamacs I'm going off-piste a bit

17:04 tcrayford: stribb: what problems are you having?

17:04 tomoj: I've had more trouble on the mac

17:04 in ubuntu it always works flawlessl/y

17:04 stribb: keeps waiting to establish a connection

17:04 tcrayford: are you just running M-x slime?

17:05 tomoj: gnu emacs for mac seems to work alright, but not great

17:05 tcrayford: tomoj: there's a fork out there somewhere with fullscreen support

17:05 tomoj: on github

17:05 using the cocoa emacs stuff

17:05 stribb: tcrayford: yes I was

17:06 tcrayford: stribb: I get that as well

17:06 just checked

17:06 I use lein for everything these days though

17:06 tomoj: cool, I just meant the clojure-mode/slime install process always seems to not work quite right on the mac

17:06 stribb: it says: java.io.FileNotFoundException: Could not locate swank/swank__init.class or swank/swank.clj on classpath: (NO_SOURCE_FILE:0)

17:06 on the inferior-lisp buffer

17:06 tomoj: that's not an emacs setup problem

17:07 you need lein-swank in your dev-dependencies

17:07 stribb: spent some tme grepping the net trying to find the file but couldn't

17:07 tcrayford: tomoj: he's not using lein (I don't think)

17:07 stribb: I'm not currently using lein

17:07 tcrayford: I'd reccomend it

17:07 it removes a lot of pain

17:08 stribb: I have no aversion to it but I don't yet know what it's about

17:08 tcrayford: before lein I didn't even use clojure (because of how painful it was)

17:08 tomoj: what are you using?

17:08 maven?

17:08 clojurebot: clojure-maven-plugin is http://github.com/talios/clojure-maven-plugin

17:08 tcrayford: he's just using slime from emacs

17:08 tomoj: oh...

17:08 tcrayford: which is sorta deprecated now iirc

17:09 tomoj: so you need to find a lein-swank jar and copy it in manually

17:09 tcrayford: nope

17:09 he needs the swank-clojure jar

17:09 (which he needs lein to get, yay!)

17:09 stribb: okay, assuming I can get somewhat comfortable with Clojure, I'd like a comfortabe dev environment to use with emacs

17:09 tomoj: oh, heh

17:09 tcrayford: stribb: install lein then

17:09 stribb: is lein a popular way?

17:09 ok

17:10 tcrayford: yeah

17:10 something like 90% of the clojure projects on github use lein

17:10 just make sure you read the wiki article about getting lein setup with slime/swank

17:10 tomoj: I don't see swank-clojure on clojars

17:10 stribb: splendid

17:11 tomoj: oh, there it is

17:11 http://clojars.org/repo/swank-clojure/swank-clojure/1.2.0-SNAPSHOT/swank-clojure-1.2.0-20100502.112537-13.jar

17:11 stribb: and is there a stable lein? lein 1.1.0 is good?

17:11 tcrayford: yeah should be fine

17:12 it has its own updating system (`lein update`) that should help

17:12 stribb: sorry, I shouldn't need so much hand-holding :(

17:12 tcrayford: stribb: are you on windows or unix?

17:12 stribb: no, os x: I couldn't bring myself to call it unix

17:12 tcrayford: that'll do

17:12 lein is somewhat icky on windows right now (from what I've heard)

17:12 see http://www.assembla.com/wiki/show/clojure/Getting_Started_with_Emacs

17:12 sexpbot: "Getting Started with Emacs | Clojure | Assembla"

17:13 stribb: thanks

17:13 tcrayford: but you probably want proper slime right?

17:13 stribb: ideally

17:13 tcrayford: with all the nice ide-like features and such

17:13 right

17:13 so install lein

17:14 tomoj: no need to customize inferior-lisp-program when using lein-swank

17:14 tcrayford: yeah

17:14 you just run `lein swank` inside a project directory and everything works

17:15 you have to follow the hacking instructions on lein as well, otherwise you can't use swank

17:18 stribb: and is the dev version of lein able to work with a stable clojure?

17:18 tcrayford: yes

17:18 or a new clojure, or whatever you want

17:18 stribb: good stuff

17:18 tcrayford: (I'm using, and happy with 1.2)

17:30 stribb: bah,

17:30 Exception in thread "main" java.lang.IllegalAccessError: flatten is not public (classpath.clj:1)

17:30 so I guess lein dev isn't compatible with clojure 1.1 after all

17:31 tcrayford: is there any reason you want to be using 1.1?

17:31 stribb: tcrayford: I happen to like stable versions

17:31 tcrayford: fair nuff

17:32 stribb: if the git head is stable enough, fine

17:32 kotarak: tcrayford: 1.2 broke several times pretty hard

17:32 tcrayford: I have an older version of lein that I use with 1.1, works fine

17:33 stribb: meh, in for a penny, in for a pound

17:41 alexyk: ninjudd: so I realized when I tried to convert a defn to defmacro like you suggested yesterday, I have to replace each let [x...] with let [x# ...], along with x's usage, to avoid symbol capture errors, correct?

17:41 ninjudd: alexyk: yes, that's right

17:42 alexyk: ninjudd: painful for large defn

17:42 I ended up just doing a functional param to do the guts, even though it's a bit slower with parameter passing

17:43 ninjudd: alexyk: if you need those let values in the guts though, you have to do symbol capture

17:43 alexyk: that's probably better.

17:43 alexyk: ninjudd: using ~'x syntax?

17:43 if I were to do a macro

17:44 ninjudd: alexyk: right, in the lets, but not where you are using them

17:44 or you may need it both places...

17:45 yeah, you do

17:45 alexyk: ninjudd: so would I say, (let [~'x (make-x)] ... x) ?

17:45 ninjudd: alexyk: no, i was wrong. it would have to be (let [~'x (make-x)] ... ~'x)

17:45 alexyk: argh, even uglier

17:46 ninjudd: that is only if the guts need those let values

17:55 zakwilson: It appears in my testing that using keywords as map keys is slower than using strings. Why is that?

18:00 ataggart: microbenchmarks are fun

18:01 stribb: tcrayford: thanks. It's still not working but I'm tired and I'll get back to it fresh tomorrow

18:01 cheerio

18:03 Drakeson: Do you happen to know why clojure-mode does not enable font-lock-mode by default in recent emacs ( ?

18:11 defn: man i wish i could have made it to the pragprog clojure thingamajig

18:11 all these tweets are making me jealous

18:13 * ataggart sticks fingers in his ears

18:14 ataggart: a co-worker I introduced to clojure went

18:14 I'm stuck in the office

18:22 tcrayford: defn: agreed

19:24 technomancy: can you compile a binding form that rebinds a var that hasn't been required yet?

19:24 might have to eval there... ugh

19:51 * slyphon starts putzing around with deftype and hadoop's zookeeper

20:10 riddochc: I'm curious... the lancet run-once logic at the end of chapter 6 of programming clojure rules out using any of clojure's built-in concurrency techniques... but it was written pre-futures.

20:11 Anybody revisited lancet lately to rethink the run-once logic?

20:16 raek: hrm, clojure.lang.Cons is not a list?

20:16 ,(list? (read-string "'foo"))

20:16 clojurebot: false

20:16 scgilardi: you may want seq?

20:17 raek: ,(class (read-string "'foo"))

20:17 clojurebot: clojure.lang.Cons

20:17 raek: I'm trying to reuse the clojure reader

20:17 for a toy language of mine

20:18 scgilardi: for detecting "form like things", seq? is the right predicate.

20:18 raek: ah...

20:19 the doc of list? is pretty clear...

20:19 "Returns true if x implements IPersistentList"

20:19 technomancy: raek: the list? predicate is not really much use.

20:19 you might prefer the seq? predicate

20:19 oh, wups

20:19 yeah, what he said

20:20 scgilardi: :)

20:20 raek: my goal is to make a homoiconic stack-based toy language

20:21 that eventually will be compiled into JVM byte code

20:21 hiredman: raek: and you get why 'foo is a list to the reader?

20:21 or a seq as the case may ne

20:21 be

20:21 raek: 'foo -> (quote foo) ?

20:22 hiredman: right

20:22 raek: the ' is only syntactic sugar, right?

20:22 hiredman: right

20:22 raek: so, I will make a language that is defined in terms of clojure data structures

20:25 riddochc: Hm. Perhaps lancet isn't really used outside of being a book example, on account of leiningen.

20:26 lancepantz: riddochc: lancet is pretty dead, aside from the implementation within in lein

20:26 tomoj: are vectors and maps not "form-like things"?

20:26 ,(seq? '[foo])

20:26 clojurebot: false

20:27 hiredman: tomoj: if you want to be inclusive of "things that don't print in parens" use coll?

20:27 tomoj: hmm

20:27 then you get more than I want, but maybe that's ok

20:27 hiredman: no, coll? is IPersistentCollection

20:27 not Collection

20:28 tomoj: not all IPersistentCollections have literal reader syntax, though, right?

20:28 hiredman: I believe there are three that don't

20:29 sorted map/set and queue

20:30 tomoj: ,(eval (-> (clojure.lang.PersistentQueue/EMPTY) (conj '+) (conj 1) (conj 2)))

20:30 clojurebot: DENIED

20:30 tomoj: d'oh

20:30 well, it doesn't work

20:30 I guess I'd really want to check specifically for lists, vectors, sets, and maps

20:31 arohner: what was the name of the fn to reset the methods on a multimethod?

20:32 tomoj: sorted-sets and sorted-maps self-eval just fine

20:33 actually, they eval to unsorted versions it seems

20:35 Conses eval like PersistentLists

20:37 why is it that you can't use with-meta on a Var? I mean, I know it's because they're not IObjs, but is there a reason for this?

20:38 technomancy: tomoj: maybe because you can't dup a var?

20:38 since they're not anonymous

20:39 tomoj: ah, that's why we need reset-meta! and friends I guess

20:39 technomancy: try vary-meta maybe?

20:39 tomoj: vary-meta requires IObj too

20:39 (it just calls with-meta)

20:39 technomancy: alter-meta! is what I meant

20:40 tomoj: unfortunately clj-sandbox blacklists it

20:40 s/un//

20:40 sexpbot: fortately clj-sandbox blacklists it

20:57 maravillas: that looks like a bug with sexpbot

20:57 tomoj: what does

20:58 maravillas: removed both "un"s from unfortunately

20:58 even though you didn't add a g flag

20:58 tomoj: yeah :/

20:58 imo any output at all there is a bug

20:58 maravillas: heh

21:00 tomoj: s/h.h//

21:00 wonder if it only takes literal strings, not regexes?

21:00 maravillas: hm

21:01 tomoj: s/w.*f/foo/

21:01 sexpbot: hm

21:01 tomoj: oops

21:01 s/o.*p/foo/

21:01 sexpbot: foos

21:01 tomoj: oh, neat

21:01 maravillas: http://github.com/Raynes/sexpbot/blob/master/src/sexpbot/plugins/sed.clj i'm assuming

21:04 lancepantz: anyone use the zenburn theme for emacs?

21:05 slyphon: i used to

21:05 forget what i'm using now

21:05 mmarczyk: I do

21:06 I remember technomancy posted a zenburn-coloured snippet in the widefinder days, plus zenburn is included with the Emacs Starter Kit, so perhaps he does also :-)

21:06 lancepantz: does it look like this: http://i.imgur.com/AjtAU.png

21:07 mmarczyk: nope

21:07 http://p.hagelb.org/wide_finder.clj.html

21:07 sexpbot: "wide_finder.clj"

21:07 mmarczyk: ^-- that's what it looks like

21:08 lancepantz: yeah, i didn't think i had it right

21:08 i'm using his starter kit, do you know how to enable it?

21:08 mmarczyk: (require 'zenburn) (zenburn), I guess

21:09 technomancy: lancepantz: M-x zb in the starter kit, but if you invoke it after invoking other color themes it won't look right

21:09 I always do it on a fresh instance.

21:09 mmarczyk: technomancy: might that mean you use different themes on different occasions?

21:10 technomancy: mmarczyk: I don't use a color theme when I'm going to be connecting to an instance from emacs -nw, since they usually don't look decent in a terminal

21:10 mmarczyk: technomancy: incidentally, I am overawed after reading your latest blog entry

21:10 technomancy: heh, overawed? that wasn't the intention. =)

21:11 mmarczyk: I keep it open and treat it as a TODO list :-)

21:12 slyphon: speaking of blog entries, i dunno if everyone had seen this but me, but this had me cracking up earlier today: http://james-iry.blogspot.com/2009/05/brief-incomplete-and-mostly-wrong.html

21:12 sexpbot: "One Div Zero: A Brief, Incomplete, and Mostly Wrong History of Programming Languages"

21:12 mmarczyk: slyphon: yeah! that's cool :-D

21:12 slyphon: oh man, i was dyin

21:13 i think the python one was my favorite

21:13 "Dutch programmer Guido van Rossum travels to Argentina for a mysterious operation. He returns with a large cranial scar, invents Python, is declared Dictator for Life by legions of followers, and announces to the world that "There Is Only One Way to Do It." Poland becomes nervous."

21:13 tomoj: putting all the stuff you'd normally put in a wm in something external sounds interesting -- could we do it in clojure?

21:13 need X11 bindings I guess?

21:14 s/stuff/config/

21:14 sexpbot: need X11 bindings I guess?

21:14 tomoj: grr

21:14 mmarczyk: slyphon: yup, that's a good one :-)

21:14 technomancy: tomoj: there's an X java library, but it's pretty ancient

21:14 * slyphon shudders

21:14 tomoj: yeah, I tried to find something once before and gave up

21:15 maybe you could have a thin server using a sane X library that clojure talks to?

21:15 slyphon: tomoj: you're scaring me, what are you considering?

21:15 mmarczyk: technomancy: out of curiosity, do you find it possible to do stuff for a couple of hours straight at your coding desk...? or do you take breaks often?

21:15 tomoj: I just would like very much to replace my xmonad config file with clojure

21:15 lancepantz: technomancy: can you think of why M-x zb would not be matched on my machine?

21:16 technomancy: mmarczyk: pee breaks mostly. =) but yeah, I sit down for a couple hours a day on average.

21:16 lancepantz: i tried from terminal, explicitly passing init.el and from aquamacs

21:16 * slyphon googles xmonad, looks at the first result and walks away muttering

21:16 mmarczyk: technomancy: that's so outlandish I'm dying to try it ;-)

21:18 technomancy: lancepantz: my bad; that's a personal alias. M-x color-theme-zenburn

21:19 lancepantz: technomancy: got it, thank you

21:20 tomoj: slyphon: :P

21:24 slyphon: argh

21:24 i really hate some rubyists

21:24 riddochc: slyphon: which rubyists?

21:24 slyphon: too much focus on "elegance" and "designer eyewear" and not enough focus on "robustness" or "correctness" or even "defensive programming"

21:25 there are too many toys out there

21:25 riddochc: Ahhh. Evidently, new glasses don't necessarily result in better code. ;)

21:25 * slyphon laughs

21:26 riddochc: I got new glasses last July, around the time I first heard about Clojure. They're not designer glasses, but they do. And I've come to quite enjoy Clojure.

21:26 tomoj: you want rubyists to publish less code?

21:27 slyphon: tomoj: there's a tendency in the ruby community to release projects that promise a lot, have a slickly designed project page, and really don't deliver the goods

21:27 there's a real heavy "self-promotion" and "hype" vibe in a lot of the community

21:28 riddochc: I'd be satisfied if *every* programmer spent a little more time with thinking about what they're doing and testing and such. I think a large part of the problem is independent of language, myself. The industry would be a *very* different place if having good code were more important than being first.

21:28 slyphon: indeed

21:29 tomoj: ah, yeah, I see

21:29 slyphon: i mean, not anything against this lib

21:29 http://outoftime.github.com/sunspot/

21:30 i've never used it

21:30 but if you were to pretend that it actually sucked

21:30 and then multiply that by 500 *other* projects that claim to do cool shit

21:30 tomoj: yes, rubyists do seem extraordinarily concerned about glamour

21:30 slyphon: exactly

21:31 it's fucking annoying

21:31 the other grouchy guys on my team used to refer to it as "pants", as every ruby developer we interviewd seemed to be wearing designer jeans on their interview

21:32 sorry, i'm done

21:32 Hodapp: it's okay

21:32 rant on

21:32 slyphon: :D

21:33 lancepantz: i know what you mean

21:33 slyphon: i guess we'll just have to wait and see what clojure's flaws are :)

21:33 lancepantz: makes me ashamed to be a ruby programmer at times

21:34 all the egobloggers too

21:34 slyphon: the thing that gets me is that i've been a professional developer working in ruby for the past 5 years, and have built some stable and even fairly complex systems in ruby that are in production

21:35 the problem is, everytime one of these 'egobloggers' makes a claim they can't back up...

21:37 lancepantz: i always get a kick out of blog posts with ass backwards code on them

21:37 slyphon: :)

21:37 lancepantz: i used to read leah culver's blog, the chick who founded pownce for that reason

21:38 slyphon: http://xkcd.com/386/

21:38 sexpbot: "xkcd: Duty Calls"

21:47 riddochc: clojurebot: who wrote you and where can I find your code?

21:47 clojurebot: code-review is <rhickey> yikes

21:48 riddochc: Hm. Not *quite* the variety of non-sequiteur I was expecting. ;)

21:48 tomoj: hiredman, http://github.com/hiredman/clojurebot

21:48 riddochc: Ahh. Thanks, tomoj.

21:49 tomoj: I wonder if clojurebot knows that

21:49 clojurebot: who is your master

21:49 clojurebot: c'est bon!

21:54 mmarczyk: wow, what a fantastic rant happened just now

21:54 way to go, slyphon! :-)

21:54 slyphon: hahahahaha

21:54 * slyphon bows

21:54 mmarczyk: I'm glad I haven't gone to sleep yet :-)

21:55 slyphon: "Be More Awesome: It's Important"

21:55 mmarczyk: :-)

21:57 riddochc: Have fun, everyone.

22:49 wahz: as a first guess, what kind of data building blocks would be suitable for a binary tree type structure? (e.g. vectors, records, etc)

22:49 with an eye on performance

22:49 (context is genetic programming)

22:50 from my early toy examples, records look pretty promising

Logging service provided by n01se.net