#clojure logs

2008-04-01

09:13Chouserabrooks: that's not true (about python's tuples and hashes)
09:24Chouserpython: ({(1, 2): 3})[(1,2)] ==> 3
09:25ChouserI think in python the key is required to be immutable.
09:43rhickeyanyone try the ants yet?
09:44abrooksChouser: Zounds! You got me! :) I'm pretty sure the same is not true of lists (I know I've run into something like this) but I should (apparently) go recheck.
09:44abrooksrhickey: I did last night. Very slick. And tiny.
09:45rhickeyabrooks: what platform? I only tried on OS X and Ubuntu
09:45abrooksGentoo Linux, Sun 1.6.0.05
09:46abrooksrhickey: I'm about 3/5ths through the audio. Does the audio glitch for you or is that just my player?
10:04rhickeyyes, there are glitches that occurred in the video transfer, sorry. I tried to clean them up as much as possible. I'm told the final video will have clean audio...
10:04rhickeybut I didn't want people to have to wait any longer
10:05rhickeyis it bearable?
10:10abrooksrhickey: I think it's bearable. Much of the glitching seems to correspond with slides on locking which sets the right mood IMO. :)
10:10rhickeyfunny
10:17abrooksChouser: Python lists and dicts have a __hash__() which raise an exception. Object are hashed by their instance. (Which is what I recalled happening to everything.) Tuples (as you point out (as in clojure)) are hashed by value.
10:25ChouserIt's funny all the different places people come from when arriving at Clojure.
10:26ChouserLots of Java, CL, and Scheme of course, but also some Haskell, Scala, Python. Not much PHP, though.
10:27abrooksBug? This works just fine (at first) (re-seq #"[0-9]+" "123,312,99018") however, this (re-seq #"\d+" "123,312,99018") ... and now the bug ... after invoking the second form at the REPL, the first form breaks with an IllegalArgumentException thrown by the reader.
10:27abrooksrhickey: --^
10:27abrooksI suppose I should post this to the group to give more detail.
10:28Chouserno need
10:28Chouserit's the backslash
10:28abrooksChouser: Must... not... say... uncharitable... things... about... PHP.
10:28Chousercurrently #"" uses the same escaping rules as a string, so want #"\\d+"
10:29ChouserThere's been discussion about changing that.
10:29abrooksChouser: I tried that as well -- I realized the escaping issue. The bug is that the first form fails after issuing the second. Try it.
10:30Chouseryeah, the second form leaves the reader in a broken state.
10:30abrooks... and that seems like a bug.
10:30rhickeyyes, and a java bug prevents the workaround
10:31rhickeyhad to be pulled
10:36abrooksSo the lesson is "don't break the reader".
10:36rhickeyfor now
10:36ChouserI think some of the proposed escaping rules for #
10:37Chouserfor #"" would reduce the frequency that people actually run into that bug.
10:37rhickeybut the most common case is a bad escape in a regex, so when I change that it will happen less often
10:38abrooksheh
14:10ChouserIf want to parallellize CPU-intensize work, I should use agents not threads. But what if I have IO-blocking tasks? Does it make sense to interact with Java threads directly?
14:38rhickeyyou can use send-off for blocking tasks. they use a different (non-fixed) thread pool
14:39Chouseroh! cool.
15:24wabashrhickey: Are you the author of Clojure?
15:24rhickeyyes
15:40wabashWow. You have my admiration. Now I understand about interned strings and clojure. I'm a FP newbie, but maybe if I study hard, I'll be able to contribute in some way in the future.
15:41rhickeyinterned strings?
15:47wabashYes, as I think it was called...... I asked about java vs. clojure in regards to string interning. I called it "pooled"...
15:48rhickeyok
15:51Chouserrhickey: I think I'll have some code for Clojure Contrib. My email is chouser at sourceforge.
15:52rhickeyChouser: great!
15:52ChouserI have to clean it up -- mainly come up with a sane namespace.
15:58abrooksChouser: You've finished noiski! ;-D
15:59abrooksChouser: I assume this is the xpath replacement?
15:59Chouserabrooks: yeah, I'm pretty sure I like using it well enough in its current form -- I'd like to get it out there.
15:59ChouserI'm less sure about the triples stuff yet.
16:01abrooksChouser: We've only been poking at the tripples now for what... five, six years? I don't think one month of Clojure would change that. :)
16:11Chouser:-)
16:16wabashrhickey: At some point if you need work on documentation, I would like to contribute.
16:27rhickeywabash: thanks - the wiki is a good place for that
18:22Chouserrhickey: you want a single file per namescape, directly in clojure-contrib? Do we need a trunk subdir?
18:22ChouserI assume you want CPL license, do you also want the copyright in your name?
18:24rhickeyI guess we should do standard SVN structure, so yes, trunk
18:24rhickeyyes CPL for all
18:24rhickeyCopyright in author's name ok
18:24rhickeysame header as in Clojure code is good
18:25Chouserok
18:25rhickeyI can't say I've planned this all out :)
18:27Chousernp, as long as you don't mind me bugging you as I go along.
18:27rhickeysure
18:28rhickeyglad to have the help
18:28rhickeyvery psyched to see the nascent community
18:30Chousergood! I'm happy to be a part of it.
18:30ChouserI hope it stays that way for you. I have a project right now where the community serves mainly to provide me with guilt about how little I'm keeping up with the project. :-/
18:31ChouserSo I try to mask the guilt by working on clojure code instead. :-D
18:31rhickey:)
21:17jonathan_clojure has regexes!?!? awesome
21:24jonathan_sometimes it's hard to keep up with language features. Nice problem to have :)
23:03jonathan__great article here, the bipolar Lisp programmer http://www.lambdassociates.org/blog/bipolar.htm
23:53abrooksjonathan_: Interesting article.