#clojure log - Dec 31 2009

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

0:01 arohner: technomancy: lexical scope is implemented as a stack of maps in the compiler

0:01 it's in compiler.java

0:02 technomancy: yeah, I've got that in front of me... but it's 5000+ lines. =)

0:02 if they're real clojure maps then they must be copied from the enclosing scope

0:02 since otherwise the enclosing scope couldn't have local-clearing done due to immutability

0:03 arohner: check out registerLocal()

0:03 that will point you at enough variables to keep you busy

0:03 :-)

0:03 technomancy: heh

0:03 thanks

0:03 arohner: yes, it's a real persistent map

0:04 technomancy: since functions compile to methods, function locals are just method locals that get nulled out after the function returns IIRC, but the enclosing scope is an IPersistentMap

0:06 arohner: LetExpr is also worth checking out

0:07 technomancy: soooo freaking spoiled by clojure

0:07 my brain cannot hold a single method that's longer than a page

0:08 devlinsf: technomancy: a direct deref causes the error too (no surprise)

0:08 technomancy: actually, that has nothing to do with clojure, I couldn't do that before I learned clojure either. never mind.

0:08 devlinsf: yeah, in Delay.java deref is implemented as just calling force

0:09 devlinsf: Yeah, I'm looking at the source too. Still, testing beat analysis every time :)

0:09 danlarkin: clojure makes me wary of namespaces that are much longer than a page :)

0:09 s/namespaces/files/

0:10 devlinsf: technomancy: Hey, I just used a future instead

0:10 technomancy: worker properly

0:11 technomancy: huh. futures are also thin wrappers around fns, albeit with a little more JVM infrastructure pulled in.

0:13 devlinsf: checking out future-call....

0:13 hugod: Adding a (println x) after (do-something x) makes things work too - is the argument being optimised away?

0:15 devlinsf: hugod: what about (println :foo) ?

0:16 hugod: devlinsf: that worked as well

0:16 devlinsf: Hmmm... futures are wrapped in an agent

0:18 technomancy: devlinsf: sort of... I think they actually just share a thread-pool with agents

0:18 devlinsf: Yeah, you're right

0:20 technomancy: well the main thing I'm learning here is that I'm not cut out to write a compiler

0:20 devlinsf: clojure.lang.Compiler?

0:22 It would be nice to have some of the static classes in their own package

0:22 easier to follow

0:22 at least, I think so

0:23 * technomancy concurs

0:23 technomancy: but I don't know Java, so...

0:24 devlinsf: I understand why it's like that. It's not an easy inheritance system to get right

0:25 But the random blocks of dead code 50 lines long?

0:25 It'd be nice to clean those out

0:26 technomancy: well I'd assume they were commented out before the move to git

0:26 back when finding stuff from your history was hard. =)

0:27 devlinsf: Yeah. Once 1.1 is official, then I'll bring it up

0:29 technomancy: wouldn't agonize over it too much since cinc will make it go away.

0:34 hugod: writing the delay body as a call to a local function closing over x works. adding a {:once true} hint to the local function breaks it..

0:35 devlinsf: hugod: But writing a local fn and closing over delay does NOT

0:36 technomancy: hugod: what's :once?

0:37 hugod: no idea - its used in the delay macro delay

0:48 technomancy: line 3845 of Compiler.java

0:48 if(fn.onceOnly) { fn.emitClearCloses(gen); }

0:48

0:49 looks like :once is only used for lazy seqs and delays

0:49 I wonder if lazy seqs would exhibit the same problem

0:50 but I'm headed off for today; bye folks.

0:50 Mec_: is there a simpler way to write: (. (SomeClass. initValue) method)

0:52 devlinsf: (-> initValue Someclass. .method)

1:16 defn: what's the difference between rest and next

1:17 ,(doc rest)

1:17 ,(doc next)

1:18 nevermind

1:19 replaca_: next supports nil punning

1:19 defn: ,(rest '()) => ()

1:19 chouser: next forces an extra step of a lazy seq in order to return nil it's empty

1:19 defn: ,(next '()) => nil

1:19 *nod*

1:19 replaca_: yup, you got it

1:19 defn: ty

2:10 hiredman: ~ping

2:10 clojurebot: PONG!

2:10 chouser: yay

2:12 I think the problem is that, because the last expr in a try block produces the value that will be returned, it is compiled in a "return" context (a.k.a. tail position)

2:13 therefore the locals are cleared before calling the final function

2:14 but if that final call throws an exception, you end up in the catch clause with your locals cleared.

2:16 ,((let [x :foo] (#^{:once true} fn* [] (try (#(throw (Exception.))) (catch Exception e (println "x:" x))))))

2:16 clojurebot: chouser: I don't understand.

2:16 chouser: :-(

2:21 emitClearLocals protects against this problem by using localsUsedInCatchFinally, but emitClearCloses (used only when :once is true) does not.

2:30 but the solution is so very far beyond me

2:31 I guess the simplest might be to skip clearing of closed-overs that are used in catch/finally clauses, but I don't think those are currently tracked.

3:17 LauJensen: Morning team

3:17 defn: 'lo Lau

3:20 LauJensen: welcome to the monkey house

3:20 LauJensen: I sure like them monkeys :)

3:21 defn: i always carry a minimum of three monkeys

3:21 ..just in case..

3:25 good evening cgrand

3:29 neotyk: morning

3:29 can someone help with clojure-test-mode

3:29 ?

3:30 defn: neotyk: what about it?

3:30 neotyk: well I don't have it :P

3:31 defn: what editor do you use?

3:31 neotyk: and when I do M-x package-install

3:31 emacsitor

3:31 defn: what's emacsitor?

3:31 neotyk: emacs

3:31 defn: when you do M-x package-install??

3:32 neotyk: now, in running session

3:32 so after M-x package-install

3:32 i say clojure-test-mode

3:33 and get message that swank-clojure.el exists

3:33 and no clojure-test-mode is installed

3:33 :/

3:34 is elpa recomended for aquamacs?

3:34 or should I focus on manual procedure

3:37 LauJensen: neotyk: It works I know that, but not if its recommended

3:41 cgrand: defn: good morning (or whatever time it is in your timezone)

3:41 neotyk: LauJensen: how do i get test mode?

3:41 LauJensen: neotyk: That I don't know - I'm very uncomfortable in OSX - I'm just saying that the ELPA install for Clojure-mode works fine

3:41 neotyk: clojure-mode is ok

3:41 clojure-test-mode is fail

5:39 LauJensen: I've added a custom search to my site, which runs through hackernews, lambda-the-ultimate, clojure.org etc for whatever you search for - is that usable for anyone, or just bloat? http://www.bestinclass.dk/index.php/blog/hackersearch/

5:43 I mean, there's one definite advange, if you search for "ikeda map" you actually get a Clojure implementation as the first hit - where else do you get that? :)

5:51 vy: LauJensen: 1337.

5:51 LauJensen: Exactly

6:33 fliebel: Good morning

6:35 Is there any way I can use a delay/future/atom/whatever without the need to use @ every time?

6:38 Or the other way around, use @ one a value if I'm not sure if it needs to be dereferenced or not.

6:49 somnium: fliebel: if youre not sure if its mutable then YDIW

7:00 fliebel: YDIW? what is that?

7:00 somnium: fliebel: you're doing it wrong ;)

7:00 fliebel: ah...

7:01 somnium: @foo expands to (deref foo), so you could write a fn that does that

7:02 fliebel: Well, the point is that if I put a delay in a map and along the way something does something to the data and puts it back, the rest of the application screws up thinking that it needs to @ it.

7:02 Yea, right now I wrote my own macro with a try in it.

7:04 somnium: fliebel: if you access a delay with force why do you need deref?

7:07 fliebel: somnium: whoa! That is magic! force just returns any value, that will work!

7:07 somnium: fliebel: no...

7:07 fliebel: ?

7:07 somnium: fliebel: delay is about laziness, delaying evaluation

7:08 fliebel: atoms are about identity and state

7:08 fliebel: somnium: I know, I mean that (force 1) just works, while (deref 1) throws.

7:09 Chousuke: fliebel: check whether it implements IDeref

7:10 fliebel: If I write delay on the bottom of a -> macro, will that delay the whole ->?

7:10 Chousuke: hm, yes.

7:12 fliebel: cool

7:12 I guess that would not work if -> where a function :)

7:13 Chousuke: can you help me unravel another stacktrace?

7:15 http://gist.github.com/266711

7:15 I hate those things… Wading through Java and Clojure internals to find your own function.

7:16 cemerick: fliebel: there's a lib somewhere in contrib that will filter out the noise, if you're so inclined

7:16 Chousuke: hm, wasn't it moved to clojure itself?

7:17 * cemerick has long since fallen behind on his contrib awareness

7:17 fliebel: cemerick: ah, godsend!

7:17 Chousuke: clojure.stacktrace, as of 1.1

7:18 fliebel: How do I use it? Just require it somewhere?

7:18 Chousuke: yeah.

7:19 though unless you get the exception in a repl, you'll have to catch it and print the stacktrace in the catch block.

7:20 fliebel: Hmmm, so just wrap everything in a try?

7:21 Chousuke: or run stuff from the repl

7:21 since you can access the last exception as *e

7:21 fliebel: hmmm

7:23 Chousuke: anyway, in that case it seems the error is in the utterson.core/reader function

7:24 ska2342: can someone please give me one example each for a "namespace-qualified" and a "package-qualified" symbol? Are they different in any way, except that one names Clojure-symbols and the other Java-classes?

7:24 Chousuke: ska2342: they're similar.

7:25 ska2342: Chousuke: similar, yes, but exactly the same? Have you ever come across an example where the order of evaluation mattered?

7:25 Chousuke: order of evaluation?

7:26 ska2342: Chousuke: according to http://clojure.org/evaluation the namespace-qualified symbols are resolved first.

7:26 Chousuke: I don't think it matters

7:26 you can never have a java class that would conflict with a clojure namespace.

7:27 ska2342: Why?

7:27 Chousuke: without getting weird errors everywhere, that is

7:28 ska2342: Hm. It's just that I'd like to *know* ;-)

7:28 Chousuke: the names should be unique. it'll just be a naming conflict. :/

7:30 ska2342: My problem here is "should be" vs. "are". Can't be vague when doing documentation.

7:30 Chousuke: I guess a package-qualified symbol is foo.bar.java.Class(/somefield) and a namespace-qualified is foo.bar/something

7:31 where foo.bar is a namespace, of course.

7:31 ska2342: Yes, that is my understanding, too. In that case they just look the same.

7:32 * ska2342 is nitpicking again

7:57 fliebel: What are the advantages and intended uses of structmap?

7:57 Chousuke: saving memory if you have lots of maps with the same keys

7:58 cemerick: largely replaced by deftype

7:59 fliebel: deftype? *opens repl*

7:59 Unable to resolve var: deftype :(

8:00 cemerick: fliebel: it's only in the 'new' branch

8:00 fliebel: I'm not on new...

8:06 So far defstruct is only giving headaches… Key's not in the struct are not showing up.

8:36 Hm, this is not the git channel, but does anyone know how to checkout master undoing merge I did?

8:37 It just shows "Your branch is ahead of 'origin/master' by 4 commits"

8:38 balint: fliebel: do you want to completely discard the 4 latest commits?

8:39 fliebel: no… well I don't know, i'm new to git. I merged in a branch. which contained 4 commits I guess… but I want to.. uhm unmerge that.

8:40 never mind… I'm just playing around, I don't desperately need it.

8:40 Chousuke: you can copy your current master to another branch

8:40 just do git co -b saved-master from the master branch

8:41 then git co master && git reset --hard origin/master

8:41 lpetit: memorize the version you want to take master back. Then edit .git/refs/heads/master and replace the version. That should do the trick, as far as I understand git

8:41 after all, master is just a label on a particular commit

8:42 Chousuke: you shouldn't need to edit any files directly :)

8:42 balint: lpetit: that's a bit "low-level" :)

8:42 lpetit: I understand, but that's the beauty of the simplicity of git :)

8:42 fliebel: It's not important enough for that stuff… I wanted to add a file before the merge instead of after, just to see how merging works so that I'm prepared when I actaully need to merge things for real, now it just did a fast worward, which is not half the fun :(

8:42 balint: fliebel: you can check what version want to return to by: git show master@{4}

8:43 lpetit: It's no porcelaine, not even plumbing, it's digging :-)

8:43 Chousuke: balint: he wants to return to origin/master

8:43 which can be done with git reset --hard origin/master

8:43 lpetit: indeed, that's the way to go

8:43 balint: Chousuke: ah, yep, you are right

8:43 fliebel: brrr, scary… I'll try it :D

8:44 Chousuke: fliebel: save your commits in another branch first

8:44 balint: fliebel: just make sure you still have the changes on another branch (e.g the one you merged master with) git reset --hard deletes them for good

8:44 fliebel: Chousuke: everything important is in simplify...

8:44 Chousuke: you can actually do it by just writing "git branch saved" on your current master

8:44 lpetit: fliebel: as long as you won't run a "prune" command, your commits won't be lost. Just steganographied :-)

8:45 Chousuke: it takes about the blink of an eye so you lose nothing by saving things :P

8:46 fliebel: ah, it worked...

8:46 Chousuke: then you can always checkout the saved branch and take a look at it.

8:46 I usually don't touch master at all

8:47 lpetit: fliebel: git is like clojure. Persistent trees and the like. Never does a destructive update. And garbage collection (of commits that are not referenced from any label -aka branch name-) is triggered by you, so in the mean time, it's still possible to view "dangle" commits

8:47 Chousuke: I do all development on other branches and then just generate patches against master. or merge master and the dev branch and then push the dev branch as a new master :)

8:47 fliebel: hmmm

8:48 Chousuke: git it really interesting in that you can actually combine completely different repositories

8:48 fliebel: what does this imply> error: Entry 'src/utterson/plugin/tagspages.clj' not uptodate. Cannot merge.

8:48 Chousuke: you can just pull a branch from a random repository into a local one.

8:48 fliebel: Chousuke: So I can merge like.. jQuery into Utterson? :P

8:49 Chousuke: well, not merge. not very easily

8:49 but you could have them in separate local branches.

8:49 fliebel: that is fun...

8:49 Chousuke: it's not very useful most of the time though.

8:50 usually you'd like branches to be part of the same tree...

8:50 fliebel: Can I pull one file from a previous revision and put it in the current one?

8:50 Say… 4 revisions ago...

8:50 Chousuke: well, that's not pulling

8:50 fliebel: check out, revert, whtever

8:51 Chousuke: I think git co HEAD~4 -- filename would do it

8:51 then you of course need to git add the changes

8:51 and commit them

8:51 rhickey: aargh - clojure-version still has trailing dash for release version

8:52 * lpetit quits the room silently ...

8:52 Chousuke: the index is another feature of git I like.

8:52 lpetit: hadn't it be corrected ?

8:53 Chousuke: it gives you more control over what you actually commit. :)

8:53 so I can bash on files without committing for a long time and then split out the changes into separate commits. helps keep things clean

8:54 fliebel: huh? cool...

8:54 Chousuke: fliebel: git add --patch

8:54 rhickey: lpetit: maybe when qualifier is missing, but other things are broken then

8:54 Chousuke: fliebel: though it's not very user friendly

8:54 fliebel: hm

8:54 Chousuke: fliebel: you can basically stage chunks of code instead of whole files

8:54 (staging = included in next commit)

8:55 fliebel: Chousuke: that must create a maze in your mind what belongs where and work with which code...

8:55 Chousuke: fliebel: well, sometimes.

8:55 fliebel: but sometimes it's also easy to see that you have made two unrelated changes in one file

8:55 combined with rebase that's also interesting :P

8:56 when I was mostly done with my reader I cleaned it up and that included rebasing it against a recent master, combining and splitting commits in the process :P

8:57 because I had some "random fixes" and "blah" commits in my local history

8:58 lpetit: rhickey: humm, I'm at work, but maybe I can take a quick look at that

9:00 rhickey: lpetit: thanks, but I'm on it

9:00 lpetit: ok

9:07 rhickey: want to release 1.1.0 before the end of the year ?

9:07 rhickey: lpetit: before the end of the hour, I hope

9:07 lpetit: :)

9:12 Was thinking (related to my reflexions on how to port an existing application to clojure) : doesn't we conflate two different things by creating new types via deftype, thus imposing 1/ a single implementation of datastructure for the type, and 2/ a single type for a datastructure ?

9:13 For 2/, I mean maybe I want to create a personalized datastructure with high performance, so I use deftype for this purpose. But then, I can just plug one implementation of a protocol for the type. If I want the exact same datastructure definition for another type, I have to recreate this type from scratch.

9:17 Currently, I see types that can be defined via deftype more like "technical types" aimed at allowing clojure core datastructures be written in clojure. But I "feel" it couldn't scale well for other use cases (more general business use cases). Something having to do with the protocols/types and multimethods impedance mismatch (sort of)

9:19 fliebel: ,(println "welcome back clojurebot, where have you been?") ;Is he really back?

9:19 clojurebot: welcome back clojurebot, where have you been?

9:20 lpetit: ,(clojure-version)

9:20 clojurebot: "1.1.0-alpha-SNAPSHOT"

9:20 lpetit: ,(doc deftype)

9:20 clojurebot: "([name [& fields] & [[& interfaces] & methods]]); Alpha - subject to change Dynamically generates compiled bytecode for an anonymous class with the given fields, and, optionally, interfaces and methods. The Name will be used to create a dynamic type tag keyword of the form :current.ns/Name. This tag will be returned from (type an-instance). A factory function of current.ns/Name will be defined, overloaded on 2 arities, t

9:20 lpetit: seems so

9:22 fliebel: Bleh…. If I require a ns in the ns declaration, how can the required ns use things from it's source?

9:23 lpetit: fliebel: huh ?

9:23 fliebel: haha, it's basically a circular dependency. I hit those over and over :(

9:24 lpetit: fliebel: time to refactor things then :-)

9:25 fliebel: yea… Is putting all the stuff needed by more than one in a third ns a good plan?

9:26 I have a defstruct that I need in multiple places

9:27 rhickey: http://clojure.blogspot.com/2009/12/clojure-11-release.html

9:27 fliebel: Hurray! (?)

9:28 lpetit: fliebel: probably

9:31 rhickey: splendid !

9:37 Am I totally wrong/off-topic with my above reflexions, or is it just not the right time frame for me to speak about that ?

9:53 cemerick: replaca: the new docs are looking pretty great, I hadn't looked at them lately

10:03 fliebel: How can this trigger a reflection warning? #(.contains #^String (or (:tags %) "") #^String (:body a))

10:05 Technically speaking contains takes a CharSequence, what do I do with that? It does work with a string...

10:16 Meh, moving the #^String a bit worked… silly stuff.

10:16 lpetit: ,(#(.contains #^String (or (:tags %) "") #^String (:body {:body "c"})) {:tags "hello"})

10:16 clojurebot: false

10:17 lpetit: ,(set! *warn-on-reflection* true)

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

10:17 lpetit: ,*warn-on-reflection*

10:17 clojurebot: false

10:17 chouser: 'or' loses type hints

10:18 lpetit: oh

10:18 chouser: apparently.

10:18 :-/

10:18 I haven't had my tea yet -- can't think... is there any way for a macro to get at metadata put on its calling form?

10:22 * lpetit remembers having seen this kind of discussion before ...

10:22 devlinsf: rhickey: Congrats on getting 1.1 out the door!

10:36 defn: chouser: The return value of invoke() is the value of the call expression. If the function call form has metadata, it may be used by the compiler, but will not be part of the resulting value.

10:40 rhickey: devlinsf: thanks for your help, and everyone else's!

10:40 devlinsf: n/p

10:40 rhickey: chouser: not right now

10:41 BrianB04: Morning all.

10:42 devlinsf: Oooh, just noticed something.

10:42 Should someone create a contrib 1.1 compatible branch?

10:42 lpetit: Bye all, cu next year !

11:25 BrianB04: I have a quick question: After building clojure + clojure-contrib, can they be moved, or do they hardcode the locations of each other anywhere during compiling?

11:27 Chousuke: BrianB04: you can move them

11:28 BrianB04: Chousuke: Great, thanks much. I built them in ~/src, but I have a habit of clearing that out from time to time.

11:29 the-kenny: BrianB04: They're just normal .jars. You can do with them everything you can do with every other jar

12:29 rbe: hi

12:35 arohner: rbe: hi

12:40 gko: Hello: which swank-clojure should be used? jochu's or technomancy's?

12:44 ghotli: i'm using technomancy's on ubuntu 9.10 with emacs23 and it works just fine

12:45 gko: OK, I'll try the technomancy's swank-clojure/clojure-mode.

12:46 ghotli: i had a lot of trouble getting swank-clojure to work on 9.04

12:46 if that's what your using.

12:46 i finally gave up and upgraded to 9.10 and it behaved.

13:06 gko: Yeah, I haven't used it for 4 months and thought I'll update the whole stuff... The jochu version have changed a lot since then..

13:14 Raynes: Is there a generally agreed on blog post or something that details setting up Emacs with Slime for Clojure for new users? I've been set up forever, but I'm not sure what to tell my friend who want's to get into Clojure. :\

13:15 I mean, I suppose I could get him set up, but I'd rather not reiterate instructions for installing ELPA and such if possible.

13:24 aldebrn: Raynes, I was going to try this http://en.wikibooks.org/wiki/Clojure_Programming/Getting_Started#Emacs_.2F_Slime_.2F_Clojure_on_Ubuntu_-_Tutorial

13:24 But can't vouch for its accuracy/clarity

13:24 Raynes: Maybe I should just write my own post :|

13:26 technomancy should write and maintain a tutorial for setting up Emacs for Clojure, and link to it from the clojure-mode or swank-clojure README. It would certainly end a lot of questions.

13:26 Considering that if I write a tutorial, it wont include instructions for emacs-starter-kit because I don't use it, so I doubt it would have his approval. :p

13:34 defn: I love technomancy, but I disagree with starter kits at least in the sense that I don't think anyone ever really learns anything about emacs unless they configure it themselves.

13:35 mebaran151: what's letrec in clojure?

13:35 gko: By the way, what's working version of swank-clojure with Clojure 1.1? HEAD of master?

13:35 defn: Raynes: that being said, I'd like to write an article on that

13:35 just more general, no emphasis on the starter-kit

13:35 gko: In my previous version, there was a "

13:35 swank-clojure-autoload.el"

13:36 defn: mebaran151: as of 2007 there wasnt one and you needed to use recur/loop

13:37 gko: but in the last version, none. So I checked out branch "clojure-1.1". This one runs OK, but I have to evaluate one expression before having the "Connected ..." (and clean buffer) message. If I then tries something like completion, I have a "Exception in thread "Read Loop Thread" java.lang.RuntimeException: clojure.lang.LispReader$ReaderException: java.lang.Exception: Invalid token: swank::".

13:37 Argh.

13:37 mebaran151: I can't recur loop: I want to write a recursive anonymous function that absorbs its environment

13:38 defn: gko: get elpa

13:38 mebaran151: to get started with Clojure, I think the Netbeans setup with the plugin is actually the best way

13:38 defn: mebaran151: http://osdir.com/ml/java.clojure.user/2008-07/msg00319.html would something like that work for you?

13:38 mebaran151: it *just works*

13:39 defn: gko: get elpa, then install swank-clojure clojure-mode slime and slime-repl

13:39 gko: defn: OK, I'll take a look.

13:39 mebaran151: actually I think letfn will do it....

13:39 gko: defn: is it the general Slime or a customized one ? I need it to work with Common Lisp too...

13:39 * mebaran151 needs to read the core api a little bit more carefully

13:39 defn: mebaran151: yeah thats right

13:40 letfn is letrec for funtctions only

13:40 mebaran151: says it allows a function to refer to its and its closed bindings

13:40 defn: functions*

13:40 mebaran151: *itself

13:40 seems like you could always wrap a recursive definition in thunk though no?

13:41 defn: mebaran151: thunk?

13:41 oh nvm

13:41 mebaran151: as in a closure

13:42 defn: yeah that seems reasonable

13:42 mebaran151: basically what I'm writing is a functional way to walk a neo4j namespace and build a nested hashmap one could use with clojure zippers

13:42 for recursive relationships, I thunk them

13:43 so you never infinite loop, but if you want to go back you can call the function and get the right subsection of the node-space

13:43 I think I reinvented the trampoline...

14:00 cupertinochad: Can I ask a simple newbie question?

14:01 tolstoy: cupertinochad: People often do!

14:01 cupertinochad: How can I get the ASCII value of a character?

14:01 dandersen: There is _always_ a Russian writer in every channel I join.

14:02 tolstoy: Heh.

14:06 aking: cupertinochad: (int \a)

14:06 ,(int \b)

14:06 clojurebot: 98

14:06 cupertinochad: Many thanks!

14:06 aking: ,(int \B)

14:06 clojurebot: 66

14:07 tolstoy: Any hints on how you might unit test a compojure based app?

14:08 Hm. Maybe the source code will help.

14:16 triddell: aldebrn: I wrote the tutorial you referenced earlier... it worked in Oct... not sure now... I will be trying is again on a new Ubuntu 9.10 setup soon though

14:18 mebaran151: the easiest way to get a repl is to use the lein repl command heh

14:18 just looking through the wikibook, it should probably reference lein

14:45 shr3kst3r: shouldn't "do" be in clojure.core documentation?

14:45 chouser: it's a special form

14:46 so like 'if', 'def', 'let', etc. it's over at http://clojure.org/special_forms

14:46 shr3kst3r: ah, cool, i was just wonder

14:47 i guess i got confused by "let" it is in both places

14:50 KirinDave: Is there a way in the args string of a defn to name it something else?

14:50 I'd like my signature to be [x y z] but for underlying reasons I want to use [& args]

14:53 cemerick: I liked your response to jfl on hackernews.

14:54 shr3kst3r: maybe something like defn f [& {:keys [x y]} args]

14:55 KirinDave: Ahh, I can actually set :arglists in the meta.

14:56 What's the right way to do that in 1.1? I'm confused over the #^ vs. ^ thing.

14:56 Is #^{} the right way moving forward?

15:08 chouser: KirinDave: ^ still has the old meaning for now. #^{} is correct

15:22 KirinDave: chouser: Got it.

15:22 shr3kst3r: I guess this is the right way: https://gist.github.com/91d213ba84940cf0fdfe

15:23 it's still less typing than redoing the arguments logic in the other function though

15:25 dabd: which version of clojure-contrib should be used with clojure-1.1.0

15:25 chouser: dabd: for now 'master', I believe

15:25 dabd: chouser: thx

15:54 notostraca2: can anyone tell me how to call a function on every value in a map for a certain key?

15:54 cemerick: KirinDave: Thanks. Comments like that are particularly pernicious.

15:55 notostraca2: like if I have {:key1 "bob" :key2 "phil"} and I want to change all :key1 s to "sally"

15:56 I can't seem to figure out clojure.walk

16:00 I'm really kinda stuck here

16:04 I keep getting the error

16:04 nth not supported on this type: Symbol

16:05 but I never call the function nth, so it must be in one of the library functions

16:08 chouser: cemerick: link?

16:09 notostraca2: a map will only have at most one value for a given key -- I don't think I understand what you want.

16:09 notostraca2: i have a vector of structs

16:09 and i need to go through that vector

16:10 chouser: ah, ok.

16:10 notostraca2: and call (ref-set) on each :img

16:10 (the value of each :img key)

16:11 chouser: ,(into [] (map #(update-in % [:a] inc) [{:a 1 :b 2} {:a 3 :b 4}]))

16:11 clojurebot: [{:a 2, :b 2} {:a 4, :b 4}]

16:11 chouser: notostraca2: something like that?

16:12 notostraca2: I am new to clojure, so most of that looks like gibberish right now -- what is %?

16:12 chouser: hm, sorry.

16:12 ,(into [] (map (fn [v] (update-in v [:a] inc)) [{:a 1 :b 2} {:a 3 :b 4}]))

16:12 clojurebot: [{:a 2, :b 2} {:a 4, :b 4}]

16:13 cemerick: chouser: I think KirinDave was referring to this: http://news.ycombinator.com/item?id=1023270

16:13 chouser: ,(into [] (map (fn [m] (assoc m :a (inc (get m :a)))) [{:a 1 :b 2} {:a 3 :b 4}]))

16:13 clojurebot: [{:a 2, :b 2} {:a 4, :b 4}]

16:14 chouser: notostraca2: those are all essentially the same

16:15 notostraca2: chouser: how do I ask clojurebot what these functions mean?

16:15 in particular into

16:19 KirinDave: cemerick: Pernicious but somewhat entertaining.

16:20 cemerick: The asshole college student segment is certainly on the rise at news.ycomb. If not in numbers, than at least in boldness.

16:20 cemerick: "My subjective view… Peace."

16:20 cemerick: Why didn't he just go whole hog and say, "You don't know me, muthafucka. Don't judge! *finger wag*"

16:21 arohner: ,(doc into)

16:21 clojurebot: "([to from]); Returns a new coll consisting of to-coll with all of the items of from-coll conjoined."

16:21 cemerick: KirinDave: I was really surprised at the reaction to the post in general. A lot of machismo, chest-beating junk. The girls and spiders thing was particularly striking.

16:22 KirinDave: cemerick: Yeah.

16:22 cemerick: Well unfortunately that's how a lot of americans, of which news.ycomb is particularly rich, view this sort of thing.

16:23 cemerick: There is really a paucity of education about functional programming or even practical concurrent programming in most CS programs in the US. It's sad because they were finally catching up but then this concurrent programming problem snuck up on them.

16:25 cemerick: I don't know if any geopolitical generalizations can be made, but the pendulum has definitely swung towards purely vocational training AFAICT.

16:28 KirinDave: cemerick: Since I am a product of more than 3 american universities I feel comfortable making that assertion. Justified? No. But comfortable? Hell yes.

16:28 cemerick: ;)

16:28 cemerick: But most people I know find the notion of functional programming to be something of a propellerhead sort of exercise.

16:31 cemerick: KirinDave: It's always been the case that the the majority have been "stuck" with the technologically-inferior options. PHP, VB, etc.

16:31 I suppose that's bound to continue.

16:33 job_: I've got a newbie question about namespaces; can anyone provide me some quick help?

16:33 cemerick: Happy new year, everyone. :-)

16:35 job_: It's probably dead-simple. I'm just not familiar with how to "import" (using that loosely) a Clojure file to the REPL.

16:37 q2: try (load-file) to straight upload text

16:37 otherwise (use) to import a library

16:37 or rather require / refer heh

16:38 job_: so I've tried load-file, but after trying to refer to some of the symbols in the namespace I defined in the file, Java can't resolve the given symbol.

16:39 Ah! Nevermind, got it. Braindead mistake.

16:39 Thanks,

17:03 notostraca2: chouser: I'm trying to figure out how to use what you showed me with ref-set

17:03 so that i can change the refs inside the structs inside the vector

17:05 chouser: it's usually best to have refs at outer levels rather than inner ones.

17:05 notostraca2: oh?

17:05 i will try that

17:06 so if my vector becomes a ref to a vector

17:06 i wouldn't use into [] would I?

17:06 technomancy: chouser: thanks for that explanation on bug #232; very interesting stuff.

17:06 re: locals clearing

17:08 chouser: notostraca2: the code I showed you would be the purely functional part.

17:08 if the code were in a fn names update-b or something, then you could appliy it to your ref-of-a-vector with (alter myref update-b)

17:09 notostraca2: ah ok

17:09 chouser: which is what you want -- pure functions doing most of the work, better for thinking and testing.

17:09 notostraca2: i'll try that, thanks

17:09 chouser: then small bits where you do some transactions and alters or whatever

17:11 technomancy: sure -- you showed the way, and I still can't see all the way to a solution.

17:29 * technomancy wonders if he should propose clojure.io now or give some breathing room between it and the 1.1 release

17:32 Chousuke: hm

17:35 piccolino: What would that be?

17:35 hiredman: technomancy: we need scopes to land

17:36 technomancy: piccolino: all the I/O-related functions from contrib that I've found I use all the time

17:36 want to open a discussion about standardizing them

17:36 piccolino: Ah, OK.

17:36 technomancy: I've found 90% of my contrib usage is for I/O functions

17:36 hiredman: scopes?

17:37 piccolino: Yeah, or just make a standard library.

17:37 hiredman: clojurebot: scope?

17:37 clojurebot: scope is at http://paste.lisp.org/display/73838

17:37 technomancy: piccolino: that's what I mean

17:37 hiredman: generic with-open sort of thing

17:37 piccolino: Oh, I meant a tighter relationship between core and contrib in general.

17:38 technomancy: piccolino: actually my secret ulterior motive is to abolish contrib. =)

17:38 hiredman: :D

17:38 piccolino: Awesome. Let's form a conspiracy. :)

17:39 technomancy: hiredman: looks handy. is that in the "new" branch?

17:39 hiredman: nope

17:39 it's no where

17:39 technomancy: oh, heh

17:40 hiredman: I'd hate to have clojure.io just be a wrapper over java.io

17:41 something like reader/writer but souped up into some kind of io dsl

17:42 technomancy: hiredman: so you'd rather iterate on an io lib to make it more idiomatic before getting it canonized?

17:42 chouser: I think you'd have to build it first (probably in contrib) so it could prove itself.

17:43 hiredman: good lord

17:43 chouser: you disagree?

17:43 hiredman: I think I'm thinking about a monad

17:43 chouser: heh

17:43 technomancy: mwahaha

17:44 hiredman: chouser: that's a good point

17:44 duck-streams has gotten a lot of use

17:45 technomancy: hiredman: I could see how getting an io lib in now would make it harder to get a better one in place in the future

17:45 needing to go through a deprecation phase makes things much more complicated

17:45 hiredman: clojure.nio

17:45 technomancy: but yeah, if we're just going by popular demand, duck streams is very proven

17:45 hehe

17:45 hiredman: :P

17:45 Chousuke: :P

17:46 monads are fine. just, forcing non-functional things into the functional world using them is something you need to think twice about.

17:47 hiredman: mm

17:47 Chousuke: they're just another method of abstraction.

17:48 hiredman: I was thinking something that sort of collects all the io operations together, and analyzes them before settling on a reader or an inputstream

17:48 but would be hard to make work everywhere

17:49 arg

17:49 we need scopes

17:49 technomancy: I wonder if we'll see an influx of interest in the next few weeks from people following their "1 new language a year" goals

17:51 Chousuke: clojure.org/todo is somewhat out of date btw

17:51 wdouglas: Haha quite the resolution

17:51 hiredman: maybe the reader pattern can be lifted even more, (io/lines [x FILE-STREAM-WHATEVER] do stuff here)

17:51 chouser: was that a yegge idea, or older than that?

17:52 1 lang/year I mean

17:52 hiredman: you almost always need to call reader and with-open in conjuction anyway

17:52 Chousuke: I'm going to stick with clojure for at least one more year. :)

17:54 technomancy: chouser: it's from the Pragmatic Programmer (book)

17:54 chouser: oh, ok.

17:54 * technomancy is looking at Duby for android dev

17:54 technomancy: I've heard the boot time for Clojure makes it untenable on those devices

17:55 hiredman: yeah, that looks like a good move

17:55 we've probably got a lot of time before 1.2 to figure it out. =)

17:55 Chousuke: that's one thing the jvm folks need to fix I guess.

17:55 chouser: nooo. I hope not

17:56 If 1.2 can beat our book deadlines, then we don't have to describe idiomatic use of defstruct, agent-errors, implicit head-holding...

17:56 Chousuke: so this time around will there be a 1.1.1?

17:56 chouser: doubt it

17:57 there was essentially no demand for bug fixes to 1.0

17:57 Chousuke: I saw one bugfix in the 1.0 branch :&

17:57 but some kind of process for those bugfixes would be good to have.

17:57 chouser: technomancy: I wonder if a "native" android target for cinc could do any better than what's currently done.

17:58 hiredman: if I recall ruby's io was nice, you could either do the block thing or not

17:58 chouser: Chousuke: I think we have a process, or at least a sketch of one. But without demand for the results it would just be busywork.

17:58 technomancy: chouser: probably. I guess the current compiler assumes hotspot is going to do awesome things, but that's not necessarily true with dalvik.

17:58 chouser: heh

17:58 Chousuke: chouser: hm, I guess so

17:58 technomancy: the dalvik compiler is way smarter than javac, but lacks hotspot from what I hear

17:59 is cinc the next logical step after 1.2?

17:59 hiredman: a dalvik code generation library would be nice

17:59 Chousuke: chouser: most folks using clojure in production seemed to be following master or have their own forks anyway

17:59 chouser: yeah

17:59 maybe cherry-picking their own bugfix patches. ...though if they do that, it would be nice to share back into a potential bugfix release.

18:00 Chousuke: I should make my reader good enough for cinc ;/

18:00 right now it's not much better than the java reader.

18:00 and the bootstrapping is done via hacks mostly.

18:01 it was still fun to write though.

18:01 hiredman: FileLineSeq, a lazy seq that you can call close on when you are done

18:02 dandersen: Happy UTC+2 New Year.

18:09 hoeck: dandersen: hopefully another good year for clojure!

18:09 hiredman: lisppaste8: url?

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

18:10 hiredman pasted "io/lines" at http://paste.lisp.org/display/92879

18:10 Chousuke: seems like the donation drive went pretty well too

18:14 hiredman: I've started putting dummy symbols in some of my macro calls to make them read like english

18:14 (react-on [Q to ::some-thing as X] ...)

18:15 where whatever is in the 'to' and 'as' spot is ignored by the macro

18:20 zmyrgel: any ideas why slime repl seems to freeze when I try to eval anything in it

18:20 slime repl seems to work ok with sbcl and clisp but not with clojure

18:21 technomancy: zmyrgel: how did you install it and how did you invoke it?

18:22 zmyrgel: manual installation from git repos and invoked it with M-- M-x slime clojure RET

18:22 technomancy: zmyrgel: there's been a change in slime from git that breaks clojure support. try installing via elpa as it recommends in the swank-clojure readme.

18:24 * technomancy needs to add that as a faq

18:26 zmyrgel: ok, I'll try that and see how it works out

18:30 technomancy: I've got a clojure.io that takes just the functions I use from duck-streams (about 90% of it) and adds a handful of java-utils functions as well

18:30 you think it's worth just taking all of duck-streams for compatibility's sake?

18:30 the ones I don't use are: append-spit with-in-reader make-parents write-lines file-str read-lines to-byte-array pwd with-out-append-writer with-out-writer

18:33 chouser: I think it would be good to leave out read-lines

18:34 technomancy: file-str should be dropped in favour of java-utils/file as well, though possibly file would be enhanced to support ~ like file-str does

18:35 chouser: you mean because of the "close it only when you've consumed the whole thing" issue?

18:35 that does seem quite problematic

18:35 chouser: yeah, that's the wrong way to go about closing files.

18:35 we need scopes. :-)

18:36 hiredman: I have my horizons stuff

18:37 chouser: yeah, I think rhickey implemented his as well. There must be some reason it's not in.

18:37 technomancy: could probably use to-byte-array... even though it doesn't do I/O itself, it's quite useful in many I/O-related contexts

18:38 why does duck-streams' *byte-array-type* have earmuffs? it can't be intended for rebinding use, can it?

18:38 hiredman: chouser: possibly he is planning something with streams

18:39 chouser: I think streams are dead.

18:39 hiredman: I thought there were just tabled

18:39 maybe I was looking at something out of date

18:41 chouser: I think lazier + chunked seqs got most of what he wanted from streams, but without most of the drawbacks.

18:44 but I don't know what would be holding up scopes, so there's clearly something I don't know about.

18:46 replaca: chouser: what are scopes?

18:50 technomancy: ok, so I put in everything except make-parents write-lines file-str read-lines pwd

18:50 and I added file, delete-file, and delete-file-recursively from java-utils

18:50 use those all the time

18:51 http://github.com/technomancy/clojure/blob/io/src/clj/clojure/io.clj

18:51 chouser: heh. useless link http://www.assembla.com/spaces/clojure/tickets/2-Scopes

18:51 technomancy: will send it to the mailing list later

18:51 clojurebot: scopes?

18:51 clojurebot: Huh?

18:51 technomancy: clojurebot: scope?

18:51 clojurebot: scope is at http://paste.lisp.org/display/73838

18:52 replaca: chouser: wow, that *is* a useless ticket!

18:53 chouser: ah, there it is.

18:53 replaca: chouser: ahh , the other link reminds me though. Thanks

18:53 chouser: and hiredman implemented it.

18:55 hiredman: except mine are cool because I called them "horizons" and the exception says you have a naked singularity if you try to use when-hrz outside of a horizon

18:56 replaca: technomancy: why are you dropping those funcs from clojure.io? I vote we keep them. I know some folks have issues with the behavior of read-lines and write-lines, though.

18:57 technomancy: replaca: pwd and make-parents just seem pretty useless

18:57 and java-utils/file is better than duck-streams/file-str

19:02 the earmuffs on *byte-array-type* are almost certainly a mistake, right?

19:07 replaca: is there a specific one you feel attached to?

19:09 you can't really say things are "getting dropped from clojure.io" anyway, considering it has only existed for about 15 minutes. =)

19:16 polypus: so what revision is clojure.io on these days?

19:17 technomancy: polypus: it only exists on the "io" branch on my fork of Clojure in github. I just created it today. there's nothing even vaguely official about it.

19:17 polypus: i know. just jestig :)

19:18 jesting

19:25 replaca: technomancy: (sorry, away for a minute) java-utils/file doesn't do ~ expansion (which is a thing to be encouraged in my book). I like both pwd and make-parents (though I'm not sure about the name of the latter).

19:26 technomancy: well, "dropped" in the sense of not being tranferred from duck-streams

19:26 the-kenny: Is there a way to refer to clojure 1.1.0 in leiningen? Looks like it isn't on build.clojure.org

19:27 replaca: of course both pwd and make-parents are simple wrappers around java stuff, but the underlying java is ugly compared to the wrapper

19:27 IMHO :-)

19:30 technomancy: replaca: I added ~ support to file when I moved it from java-utils

19:31 replaca: pwd doesn't make a lot of sense considering there's no notion of a "working" directory on the JVM

19:31 there's just "the directory you launched from"

19:32 replaca: well, there is the notion of "if I create a file "foo", what directory will it be in.

19:32 ?"

19:35 something like (.getAbsolutePath (File. ".")) might be a better implementation than what Stuart has. I don't know.

19:35 * replaca misses paredit in irc :-)

19:36 technomancy: well given that the very idea behind "working directory" varies based on platform, I am inclined towards making the user drop into Java for it or possibly moving pwd to java-utils.

19:38 but I dunno; I've never used relative paths at all

19:39 replaca: technomancy: oh, I use 'em all the time. But I'm not stuck on it.

19:40 adding ~ to file and some sort of make-parents are the two things I'd be more worried about. (Though in the end I don't care to much if it's in clojure or contrib)

19:41 technomancy: how about this: (mkdir path "..")

19:41 mkdir is much more general than make-parent

19:48 replaca: ,(doc mkdir)

19:48 clojurebot: No entiendo

19:54 replaca: technomancy: where is mkdir coming from? I don't see it in clojure (or are you proposing it as new?)

19:55 * hiredman just added auto paren closing to his gui repl

19:55 hiredman: so much nicer

19:55 replaca: hiredman: come on, just throw all of slime in there :-)

19:55 hiredman: yeah

19:58 replaca: technomancy: I think "mkdirs" would be a better name (a la java.io.File/mkdirs) since you want to make the whole chain. But it seems fine to me if it operates on strings

19:59 hiredman: :(

20:03 replaca: hiredman: ?

20:04 hiredman: strings

20:05 replaca: hiredman: you have a preference for java.io.File objects?

20:06 hiredman: I have a distaste for string manipulation

20:06 for? of?

20:07 http://www.thelastcitadel.com/lab/repl.ogv

20:07 replaca: mmm, ok. I don't have a strong opinion either way. (So long as we don't reimplement CL style pathnames!)

20:08 do I need to do something to my broswer to read that? Comes out all crazy!

20:09 * replaca has to run. NYE and all...

20:11 technomancy: replaca: I was thinking it would take the same args as file

20:13 it would operate on files or strings, like file

20:17 notostraca2: is there a version of map that isn't lazy?

20:22 any ideas?

20:25 chouser: you can wrap it in (doall ...)

20:25 or (vec ...)

20:26 or if you don't care about the results and just want side-effects, you can wrap it in (dorun ...) or use doseq instead.

20:27 notostraca2: I tried doall and dorun with map

20:27 and it seemed to have some other error, let me reproduce it

20:28 yeah, NPE after some kind of problem in clojure.lang.LazySeq.sval

20:41 this room seems to be less active than usual

20:45 chouser: the exception is almost certainly coming from your code. you could lisppaste the full stack trace.

20:59 notostraca2: chouser: I've given up on using map on this vector, and I switched it to a bunch of separate defs that i call functions on separately

20:59 not as good, but oh well

20:59 at least it works

21:16 chrisdone: what's the interest from .NETers been like for Clojure on the CLR?

21:24 ztellman: Is the implementation of a FIFO queue at http://rosettacode.org/wiki/FIFO#Clojure thread-safe?

21:24 it seems like two threads could get the same element

21:25 but maybe I'm missing something?

21:26 chouser: doesn't look thread safe to me.

21:26 ztellman: would making the atom a ref and wrapping the whole thing in dosync make it thread-safe?

21:27 chouser: also not very memory-efficient -- every item put in the queue will be held forever.

21:28 ztellman: yes, that would be much better.

21:29 also better to use a clojure.lang.PersistentQueue instead of a vector

21:30 ztellman: I'm asking because I'm making a thread-pool, and it seems like the easiest way to do it is to create two views on an infinite seq of promises

21:30 one for empty promises, and the other for promises which haven't been consumed yet

21:30 chouser: oh, dear. I suppose you could, but Java comes with good thread-pool classes. You could just use one of those.

21:31 ztellman: I'm constrained by needing to instantiate OpenGL contexts in my threads

21:31 I guess I could just check every time whether a context is active in the thread, but that seems even weirder than making my own thread-pool

21:31 neither option is all that great

21:31 chouser: in fact clojure wraps up a couple of them for agents, future, etc.

21:32 ztellman: are there any hooks into the thread creation for these pools?

21:32 chouser: hm...

21:33 * chouser reads javadocs

21:35 chouser: looks like it -- you can pass in a ThreadFactory

21:36 http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Executors.html

21:37 ztellman: oh, excellent

21:38 replaca: technomancy: (after some running around) yeah, that sounds good to me

21:38 ztellman: thanks chouser, I had pretty much resigned myself to doing this myself

21:39 chouser: ztellman: np. You know about 'proxy'?

21:39 ztellman: yeah, I've used it a few times

21:39 thanks

21:43 chouser: ztellman: do you feel like correcting rosettacode?

21:49 ztellman: chouser: I can't just now, but I can do it later if no one else does

21:50 technomancy: ok, gonna send off this clojure.io proposal then

21:51 chouser: arg. I hate this kind of problem.

21:51 oh!

21:54 nope

21:54 grrr

21:57 (:use [net.cgrand.enlive-html :only [xml-resource select]])

21:57 then later, (xml-resource ...)

21:57 But I get: Exception in thread "main" java.lang.Exception: Unable to resolve symbol: xml-resource in this context

21:58 how is that possible?

22:00 if xml-resource weren't in enlive-html, or enlive-html wasn't on the classpath, I'd get an error there in the ns form.

22:00 _mst: is that from the repl or slime? I've had surprising results from slime before when it hadn't picked up what namespace I was in

22:01 so the :use was going into one namespace but forms sent to slime got evaled in user/

22:02 chouser: I don't touch slime. I'm loading this file using clojure.main -i foo.clj

22:03 _mst: hm, youch

22:04 chouser: oh my. adding (prn xml-resource) right after the (ns ...) works -- prints the fn.

22:04 defn: happy new year everyone

22:04 * defn proposes a toast

22:04 defn: to Clojure!

22:05 * defn takes a sip of his wine

22:05 chouser: where are you -- in the atlantic somewhere?

22:06 defn: haha no, it's only 9:07pm here, not the new year. however, I am from Wisconsin-- we get started with the drinking early in the evening

22:06 chouser: hehe

22:06 defn: where are you from chouser?

22:06 chouser: Indiana

22:06 defn: ah, cool

22:07 so you can probably attest to some of the pain of no one caring about computer science in your area, then?

22:08 I'm in Madison, WI -- The University of Wisconsin has a decent CS program, but few of them could give a hoot about Clojure. They all want to learn Java to get jobs.

22:08 chouser: ah.

22:08 defn: "them" being the people I went to school with

22:10 chouser: yeah, I went to Taylor -- the CS department there is strong, but definitely more oriented toward getting work done than theoretical work.

22:10 but Clojure's pretty practical. I should find out if they want me to go tell them something about it.

22:10 defn: yeah i was just going to say -- i dont want to make it sound like applications aren't important

22:11 but i feel like clojure has more of a balance of the two than many are comfortable with

22:12 i was talking with my friend last night whom I forced to watch Rich's lecture "Are we there yet?" -- and we were talking about communication between two people and the flow of it -- sort of a tangent of the conversation we started with

22:13 hiredman: if anything clojure is more pratical because it brings more power

22:13 defn: there was this moment where we were talking about free association, and just for fun we started trading words back and forth, trying deliberately to make sure that each word was unrelated to the previous person's word

22:14 _mst: chouser: any chance you're somehow switching namespaces between your (prn ...) and the code that fails?

22:14 defn: those pieces were unrelated, and yet they were part of that "river" we called a conversation

22:14 it was very interesting to talk about rich's lecture in relationship to that scenario. very true stuff.

22:15 chouser: I just sprinkled those prn's around the file. The error changed. 8-|

22:16 defn: Does anyone know if there is something like a (render "filename.html") form in compojure

22:17 _mst: I'll be interested to know what it ends up being anyway :) I always enjoy bugs that make you question your own sanity...

22:17 defn: _mst: have you read coders at work?

22:17 _mst: yep, sure have

22:18 excellent book :)

22:18 defn: some fantastic bug stories in there

22:18 yeah i loved it

22:18 who was your favorite?

22:18 _mst: terribly edited, but excellent book :)

22:18 hm, I think I enjoyed Joe Armstrong's the most, actually

22:18 defn: yeah i enjoyed that as well

22:19 i really liked reading simon peyton jones

22:19 _mst: I don't have my copy at hand to remind myself why, but I remember being struck with how sane he was

22:19 yeah, his was good too. And Knuth's of course--I suspected putting that one last was a trick to get people to read the others first :)

22:20 defn: yeah, some of the guys in there reek of ... i dont know ... it's like you could smell why you didn't like them

22:20 _mst: haha yes, but I read his first anyway :)

22:20 jwz came off as kind of a jerk

22:21 chouser: phantom error. it's gone.

22:21 :-(

22:21 defn: most of his employers seemed to think he was arrogant

22:21 _mst: eugh :)

22:21 defn: so im not alone there?

22:22 chouser: I put the code back the way it was, and I'm still getting the new error. (A nice, reasonable error about bad xml data)

22:22 defn: when they asked him what he's been up to it was like "i dont really code much"

22:22 it's like...what?!

22:23 have you seen simon peyton jones with (forgetting his name...the erlang guy)

22:24 there's a video of them discussing the different approaches in a very cordial manner

22:24 oh duh -- joe armstrong

22:24 http://www.infoq.com/interviews/armstrong-peyton-jones-erlang-haskell

22:24 _mst: that's the one :) I don't think I've seen it

22:24 ah, thanks

Logging service provided by n01se.net