#clojure log - Oct 20 2010

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

0:28 notsonerdysunny: Hello everybody...

0:28 Good Morning

0:29 I remember reading that the concept of "private" is only convention .. and it is easy to acess the namespace private vars with some special syntax

0:29 can anybody correct me If I am wrong?

0:29 or can you tell me how to acess the private vars..

0:30 it can very usefull from the repl

0:32 zkim: notsonerdysunny: I think it's #'foo/private-var

0:50 LauJensen: Morning guys

0:59 notsonerdysunny: zkim: I don't quiet get it

0:59 let us say I am in namespace user

0:59 and spread is a private variable in 'clojure.core

1:00 actually spread is a function

1:00 can you show me how to call it from 'user namespace

1:00 zkim: notsonerdysunny: so I believe #'clojure.core/spread would work

1:00 ,(doc spread)

1:00 clojurebot: No entiendo

1:00 zkim: duh

1:00 (#'clojure.core/spread arg1 arg2)

1:00 ,(#'clojure.core/spread arg1 arg2)

1:00 clojurebot: java.lang.Exception: Unable to resolve symbol: arg1 in this context

1:01 zkim: ,(#'clojure.core/spread 1)

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

1:01 zkim: what's the arglist for spread?

1:01 ,(#'clojure.core/spread [1 2 3])

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

1:01 zkim: ugh

1:02 notsonerdysunny: well, you get the idea

1:03 notsonerdysunny: zkim .. I wan't to run the (clojure.rep/source #'clojure.core/spread)

1:03 zkim .. I wan't to run the (clojure.repl/source #'clojure.core/spread)

1:03 zkim: but does not seem to work

1:03 zkim: notsonerdysunny: i think source takes a symbol?

1:04 ,(doc source)

1:04 clojurebot: "clojure.contrib.repl-utils/source;[[n]]; Prints the source code for the given symbol, if it can find it. This requires that the symbol resolve to a Var defined in a namespace for which the .clj is in the classpath. Example: (source filter)"

1:04 notsonerdysunny: yea thanks zkim

1:04 it does work..

1:53 duncanm_: dum de dum

1:57 Derander: duncanm: my brother's name is duncan.

1:57 our last name is Moreland

1:57 are you my brother?

1:58 duncanm: no i'm not

1:58 Derander: just checking

2:24 _rata_: hi

2:33 G0SUB: _rata_

2:33 _rata_: G0SUB, what?

2:33 G0SUB: _rata_: I just greeted you :)

2:34 _rata_: hi :)

2:34 can an agent contain refs?

2:37 G0SUB: _rata_: yes.

2:38 _rata_: thanks

2:38 tomoj: Licenser: yo

2:38 err

2:38 LauJensen: yo

2:39 Licenser: hi tomoj

2:39 _rata_: is there a predicate that returns true for lists, vectors, sets and seqs, but not for maps?

2:39 tomoj: sorry misping

2:42 sets aren't sequential

2:42 why do you want such a predicate? just curious

2:43 G0SUB: ,(map #(and (coll? %) (not (map? %))) [[1 2 3] '(1 2 3) #{1 2 3} {:a 1 :b 2 :c 3} (seq [1 2 3])])

2:43 clojurebot: (true true true false true)

2:44 G0SUB: _rata_: ^^^^^

2:44 _rata_: G0SUB, thanks again :)

2:45 G0SUB: _rata_: you are welcome.

2:46 _rata_: tomoj, because I'm writing a function called choice that for maps selects one key based on the weights given by the values, but when the function receives another collection, I want it to assume a uniform distribution

2:47 tomoj: #(and (not (map? %)) (coll? %)) ?

2:48 _rata_: tomoj, yes, that works

2:49 tomoj: hmm

2:49 what if you make a Distribution protocol and implement it for maps and collections?

2:49 then you could create custom distributions with reify or whatever too

2:49 _rata_: I don't think such a basic function requires so much sophistication

2:50 tomoj: sure, I was thinking a suite of distribution-related functions

2:50 _rata_: It's just an appendix of the program... it's indeed in the misc.clj file :)

2:50 yeah, that would be great

2:50 tomoj: I guess incanter already has something like that

2:51 _rata_: I suppose clojure.contrib.probabilities.finite-distributions is for that, but could understand it

2:54 s/could/couldn't/

2:54 sexpbot: <_rata_> I suppose clojure.contrib.probabilities.finite-distributions is for that, but couldn't understand it

2:58 LauJensen: Hi tomoj, hows the screencast coming along?

2:58 tomoj: that's what I was going to ask you about

2:58 G0SUB: LauJensen: are you coming to Conj?

2:58 LauJensen: G0SUB: Unfortunately not - I fly out to Frankfurt this monday for Conj Labs

2:58 tomoj: I'm working on some code now and I was considering recording so I can go back and look and what I was doing

2:59 G0SUB: LauJensen: what about cgrand?

2:59 LauJensen: G0SUB: He'll be there

2:59 G0SUB: LauJensen: OK. Will miss you at the Conj.

2:59 LauJensen: Yea dont rub it in - I already feel guilty for not going :)

2:59 tomoj: hmm.. guess I will watch and try to clip out parts that look good

3:00 the point to try to get a rough guess about whether my paredit chops are good enough yet for your satisfaction :)

3:00 LauJensen: hehe - Yea Im really hoping I'd be impressed. Its been a while since I added something new to my toolbox

3:02 tomoj: if you were not impressed, I am enough of a zealot to believe that it's only because I haven't yet achieved paredit nirvana

3:02 (and thus should delay any screencasting)

3:03 Derander: I only use paredit for slurp, barf and raise

3:03 I am underutilizing it

3:03 G0SUB: LauJensen: hehe

3:03 LauJensen: Derander: Makes me barf as well

3:03 Derander: aw

3:03 LauJensen: tomoj: Well - I'd be happy to do a preview of it before you go live :)

3:03 tomoj: thanks

3:04 LauJensen: And note, Im not an unfair critic - If its cool, I'll use it, if not, I'll tell you why I think I have a better alternative

3:04 * Derander is going to sleep now.

3:04 G0SUB: tomoj: are you doing a paredit screencast?

3:05 tomoj: I'd like to

3:05 Derander: I'd like to watch

3:06 G0SUB: tomoj: cool. let me know if you need any help in choosing what features to show :)

3:07 TobiasRaeder: morning everybody

3:09 tomoj: my notes so far https://gist.github.com/c811ee55a2a136291f7c

3:09 er, https://gist.github.com/raw/c811ee55a2a136291f7c/34514ed44e968fa754d57c486741a04fe2feeb36/paredit.org

3:09 eh, guess gist does a decent job at that .org

3:39 esj: Morning good people

3:41 lypanov: morning esj

4:02 lpetit: hi there

4:03 esj: morning brother-of-lau

4:04 LauJensen: Morning guys

4:07 raek: how is "Lau" pronounced in Danish anyway? With a diphthong like German "au"? With or without stød?

4:28 tomoj: hmm.. I just felt like I wanted to extend a protocol to [Ljava.lang.Byte;

4:28 does that even make any sense?

4:28 hiredman: no

4:29 if you are going to extend it something it should be [B

4:29 tomoj: oh

4:29 so can you extend to [B

4:30 LauJensen: raek: Its not too different from "wow" :)

4:32 esj: morning Lau, didn't see you wander in

4:33 LauJensen: Morning esj. I greeted you 30 minutes ago when you walked in :)

4:33 tomoj: aha

4:33 esj: LauJensen: no, that was your brother, Laurent.

4:33 tomoj: you can do (extend-protocol FooProtocol io/*byte-array-type* (...))

4:33 esj: anyway....

4:49 LauJensen: Anybody here with some design-fu and 5 minutes to spare?

4:56 * lypanov has only design-criticality no fu

5:44 ossareh: will something like this cause a memory issue eventually? (defn loop-with-delay [delay-ms fn] (Thread/sleep delay-ms) (fn) (loop-with-delay delay-ms fn)) (loop-with-delay 1000 #(prn "hello"))

5:45 memory or fd issue..

5:47 Chousuke_: ossareh: use recur instead

5:47 LauJensen: ossareh: Its similar to this

5:47 ,(letfn [(tst [] (tst))] (tst))

5:47 clojurebot: java.lang.StackOverflowError

5:47 LauJensen: And yes it will overflow due to a limitation of the JVM. Do what Chousuke_ said instead

5:47 ,(letfn [(tst [] (tst))] (recur))

5:47 clojurebot: Execution Timed Out

5:47 lypanov: anyone other than me want a llvm based clojure after all the crap with oracle?

5:48 Chousuke: lypanov: wait, what.

5:48 LauJensen: even

5:48 lypanov: (yeah i know it has a huge downside - no java integration)

5:48 Chousuke: LauJensen: why did that time out

5:48 why did it even work?

5:48 LauJensen: Chousuke: Because clojurebot kills it if it doesnt return after 10 secs. It will never return

5:48 ossareh: Chousuke: thanks! (and LauJensen too)

5:49 Chousuke: LauJensen: no but you made a function that calls itself.

5:49 LauJensen: then you just called recur

5:49 where's the recur target?

5:49 what.

5:49 LauJensen: Chousuke: The function itself or loop constitute recur targets

5:49 (defn call-me [] (do stuff) (recur)) calls itself

5:49 Chousuke: LauJensen: but you don't call recur within the function

5:50 LauJensen: hehe, right, I misplaced it

5:50 ,(recur)

5:50 clojurebot: Execution Timed Out

5:50 Chousuke: huh

5:51 lpetit: ,(macroexpand-1 '(recur))

5:51 clojurebot: (recur)

5:51 lpetit: hum

5:51 ossareh: (doc recur)

5:51 clojurebot: Pardon?

5:51 ossareh: ,(doc recur)

5:51 clojurebot: No entiendo

5:51 lpetit: ,(doc recur)

5:51 clojurebot: Gabh mo leithscéal?

5:51 lpetit: argh

5:51 lypanov: lol

5:52 ossareh: lypanov: what crap with oracle?

5:52 lypanov: ossareh: suing google over dalvik for example.

5:52 i'm just waiting for who is next.

5:52 Chousuke: recur is a special form

5:53 so the doc for it is on the website

5:53 lypanov: and seeing what oracle did with openoffice, i trust them even less than i trusted sun to keep the jvm going well.

5:53 * ossareh doesn't want to go through this one again

5:54 lypanov: ossareh: ah, already discussed? one sentence conclusion would be fine :)

5:54 * lypanov is just fearing, doesn't know much

5:54 LauJensen: lypanov: What happend to openoffice?

5:55 lypanov: LauJensen: http://arstechnica.com/open-source/news/2010/10/oracle-wants-libreoffice-members-to-leave-ooo-council.ars

5:56 ossareh: lypanov: to the best of my knowledge the google / dalvik situation has no baring on any languages running on the JVM. dalvik is cross compiler from java code to another VM. Oracle are suing google because they beleive some IP is being infringed upon in the dalvik VM. (disclaimer: this is what I get from SF coffee shops - I've not read much about it)

5:57 lypanov: google went dalvik route exactly so they could ignore then suns control over what java is.

5:57 LauJensen: lypanov: Well. Oracle has always been clear in their intent. I dont think they can kill Java though.

5:58 lypanov: they own java and with the dalvik move they made that clear.

5:58 given the openoffice move, whats next, attacks on icetea?

5:59 ossareh: btw afaiu it more relates to the use of the java language. so yes, i agree with you, it has nothing to do with clojure.

5:59 i

5:59 oops

5:59 i just don't think oracle is going to continue the jvm in a way we might like seeing 3 years from now. and i don't want to use mono... so yeah.

6:02 ossareh: LauJensen: that worked very nicely - thanks

6:02 LauJensen: np

6:09 notsonerdysunny: how would one compare two strings .. is there a native function?

6:09 for ordering

6:10 esj: i'd use the java .equals

6:11 but probably a better way exists

6:11 LauJensen: ,(sort [ "cde" "abc"])

6:11 clojurebot: ("abc" "cde")

6:11 jarpiain: ,(doc compare)

6:11 clojurebot: "([x y]); Comparator. Returns a negative number, zero, or a positive number when x is logically 'less than', 'equal to', or 'greater than' y. Same as Java x.compareTo(y) except it also works for nil, and compares numbers and collections in a type-independent manner. x must implement Comparable"

6:12 LauJensen: or the other way around

6:12 ,(sort #(compare %2 %1) [ "cde" "abc"])

6:12 clojurebot: ("cde" "abc")

6:12 LauJensen: notsonerdysunny: good enough for ordering?

6:13 esj: pretty slick

6:16 cgrand: little known feature, all fns are potential comparator, Clojure knows ho wto turn an order fn in a comparator

6:16 ,(sort < [5 4 8])

6:16 clojurebot: (4 5 8)

6:16 cgrand: ,(sort > [5 4 8])

6:16 clojurebot: (8 5 4)

6:17 notsonerdysunny: (compare [1 2 3] [4 5 6])

6:17 ,(compare [1 2 3] [4 5 6])

6:17 clojurebot: -1

6:17 notsonerdysunny: thanks LauJensen

6:18 LauJensen: np

6:18 cgrand: ,(sort (comp - compare) [ "cde" "abc"])

6:18 clojurebot: ("cde" "abc")

6:18 cgrand: (comp - XXX) reverse the XXX comparator

6:18 notsonerdysunny: cool .. :)

6:19 8)

6:19 8]

6:19 8*)

6:33 noidi: ,(meta (with-meta 'foo {:type :foo}))

6:33 clojurebot: {:type :foo}

6:34 noidi: ,(meta ^{:type :foo} 'foo)

6:34 clojurebot: nil

6:34 noidi: why the difference?

6:34 Chousuke: noidi: you're putting the metadata on the list (quote foo), not on the symbol foo

6:34 noidi: what makes it even stranger is that the reader macro works e.g. for vectors

6:35 Chousuke, ah, of course :)

6:35 Chousuke: noidi: since it's read-time.

6:35 ,(meta '^{:type :foo} foo)

6:35 clojurebot: {:type :foo}

6:37 noidi: thanks

6:43 notsonerdysunny: (doc ^)

6:43 clojurebot: Unmatched delimiter: )

6:43 notsonerdysunny: (doc ^ )

6:43 clojurebot: Unmatched delimiter: )

6:43 notsonerdysunny: (doc '^ )

6:43 clojurebot: Unmatched delimiter: )

6:43 notsonerdysunny: ,(doc '^ )

6:43 clojurebot: Unmatched delimiter: )

6:45 noidi: notsonerdysunny, http://clojure.org/reader

6:45 under "macro characters"

6:47 notsonerdysunny: thanks noidi ..

7:00 noidi: "Use the bang! only for things not safe in an STM transaction."

7:00 has this been elaborated somewhere?

7:00 i.e. what things are and are not safe

7:01 Chousuke: noidi: referentially transparent functions are safe

7:01 noidi: For example, I have a function that adds an event listener to a Swing widget. Should I add the bang or not?

7:01 Chousuke: probably.

7:02 though I suppose if the unsafeness is obvious, you might not have to. :/

7:02 noidi: I think that guideline would be simpler if it talked about side effects and not STM transactions

7:02 but apparently some side effects are OK, since e.g. println does not end in a bang

7:02 Chousuke: I suppose the ! is meant to convey "this function looks safe, but is not!"

7:03 noidi: yeah, makes sense

7:07 so maybe the rule of thumb for code not part of clojure itself could be "end the function name in a bang iff it calls a function ending in a bang"

7:09 Chousuke: or if it does io but that is not immediately obvious

7:10 LauJensen: Chousuke: if thats the case then add-actionlistener doesnt require a bang, but actionlistener! would

7:13 Chousuke: maybe

7:13 or maybe it's just preference :P

7:15 noidi: I still think that either the rule is not detailed enough, or println & co are named wrong

7:16 the "not safe" part is quite ambiguous. is incorrect operation "not safe"? or only the loss of data?

7:17 Chousuke: well, I suppose println is safe because it only prints things multiple times

7:17 which usually doesn't affect anythign

7:17 but adding even listeners more than once probably is not safe

7:17 event*

7:18 writing to a file certainly is not safe.

7:18 noidi: yeah

7:19 println in a transaction is a bug, but it doesn't get the program (or the rest of the system) in a messed up state (unless your doing something very very wrong, like driving another program with commands in your stdout:)

7:26 So maybe the revised rule of thumb could be "End the function name in a bang! iff either of the following is true: a) The function calls a function ending in a bang. b) Someone will get in trouble if the function gets called 1000 times when you only asked for one." :)

7:30 _Vi: Why "(complie qqq)" fails with just "No such file or directory" when there is no "classes" directory? I think it should create one automatically or explicitly tell user to do it.

7:40 LauJensen: Im very happy to announce that Conj Labs is expanding our operation to new areas, read more about it on our new website http://conj-labs.eu/ or here http://news.ycombinator.com/item?id=1810777

7:41 Big thanks to lypanov and esj for helping with the site :)

7:41 lypanov: http://www.conj-labs.eu/

7:42 (first one didn't work for me, saw the old one, could just be silly safari)

7:43 LauJensen: lypanov: its your cache

7:44 lypanov: aye, seems to be! congratz on new site!

7:44 * lypanov wishes he was in a company that would entertain him with such at training

7:45 LauJensen: Thanks!

7:47 TobiasRaeder: @LauJEnsen Grats, sounds really nice and @lypanov me too, well might have to opportunity to visit the next conj-lab, a bit depending on the location :D

7:48 LauJensen: TobiasRaeder: Next lab is in London, pretty close to you

7:48 * lypanov mainly limited by his extreme lack of cash flow else he'd come :P

7:48 TobiasRaeder: @LauJensen Frankfurt is about the same i guess but yeah. Nice when is it?

7:48 If my company doesn't pay i might just put some cash aside for it ;)

7:48 LauJensen: TobiasRaeder: All details are on the site, November30-December2

7:48 TobiasRaeder: ah okay, didnt see the new date already announced

7:49 LauJensen: Its just out today

7:49 Just now actually :)(

7:49 TobiasRaeder: :)

7:53 cemerick: LauJensen: European domination around the corner, it seems? :-)

7:53 Congrats :-)

7:53 LauJensen: cemerick: Thanks buddy

7:54 Raynes: Morning cemerick.

7:54 cemerick: Morning

7:54 Raynes: And LauJensen <3

7:54 esj: Hello Raynes

7:54 cemerick: Raynes: Damn, it's Raynes on a schedule! ;-)

7:55 Raynes: I woke up before the alarm went off, thankfully.

7:55 I hate waking up to an alarm.

7:55 Might as well slap me in the face to wake me up.

7:55 :\

7:56 cemerick: Mmm, radio is always better.

7:56 lypanov: that reminds me, need to get one of those big light things.

7:56 esj: this year I finally cracked and got one of those slowly lighting lamp guys. Its great.

7:56 comes with canned bird song too :)

7:56 Raynes: I set my phone's alarm tone to a Rooster.

7:56 It only makes sense, living in Alabama and all.

7:56 * rhickey wakes up working

7:57 cemerick: Raynes: That sounds *horrible* :-P

7:57 rhickey: sometimes way too early

7:57 Raynes: Oh, trust me, it is. Loud.

7:57 cemerick: rhickey: I can sympathize with that one.

7:58 Some days, I quite envy folks that trickle into work @ 9AM, after having gone to breakfast, or picking up a coffee and a paper or something.

8:00 chouser: working from home, from asleep to typing in IRC in ~2 minutes

8:01 though calling that "work" is of course a stretch

8:18 Drakeson: Where did clojure.contrib.io/spit go?

8:20 Raynes: Core.

8:21 lpetit: (doc spit)

8:21 clojurebot: "([f content & options]); Opposite of slurp. Opens f with writer, writes content, then closes f. Options passed to clojure.java.io/writer."

8:21 lpetit: (ns-resolve 'spit)

8:21 ,(resolve 'spit)

8:21 clojurebot: #'clojure.core/spit

8:22 Drakeson: Raynes: oh, cool.

8:22 thanks

8:23 ,(resolve 'slurp*)

8:23 clojurebot: nil

8:24 Drakeson: is clojure.core/slurp now similar to clojure.contrib.io/slurp*?

8:26 Raynes: Drakeson: Yeah. It uses clojure.java.io/reader.

8:26 So, it can slurp URLs and such.

8:27 Drakeson: I remember slurp was getting the encoding wrong. does clojure.java.io/reader care about encoding of the file?

8:27 something like reading utf-8 as latin-1

8:31 LauJensen: in .io you could set that as an argument

8:31 tomoj: what is the difference between clojure.java.io and clojure.contrib.io?

8:32 Drakeson: tomoj: the latter is gone

8:32 tomoj: oh, I see

8:32 gone in 1.3.0-SNAPSHOT ?

8:32 Drakeson: yes

8:32 tomoj: shoot

8:32 Drakeson: it's for the better

8:33 spit is the new io/spit, slurp is the new io/slurp*, ...

8:34 tomoj: hmm

8:34 I don't see io/spit or io/slurp* in 1.2.0, are they only in the snapshot?

8:34 Drakeson: yes.

8:35 oh, wait, what?

8:35 tomoj: I don't see clojure.java.io/spit or clojure.java.io/slurp*

8:37 oh, I misparsed

8:37 got it

8:37 Drakeson: no more (:require [clojure.contrib.io :as io]) on top of every ns

8:38 cemerick: contrib.io still exists, it's just a bit more sparse now

8:38 Chousuke: Instead it will be clojure.java.io :P

8:38 rhickey: Tag line of the day - The CA is a hurdle, get over it!

8:39 cemerick: rhickey: should set that as the channel topic or something :-P

8:40 rhickey: cemerick: I like the idea of having CAs at the Conj

8:40 cemerick: rhickey: I suggested it to wooby a while back -- haven't heard whether it's a go or not

8:40 presumably, you could print off a stack and leave them on the sponsor table or whatever

8:41 (in the worst case, that is)

8:42 Drakeson: I wish I could put (:require [clojure .string .xml ...]) to mean (:require [clojure [string :as string] [xml :as xml] ...])

8:43 cemerick: some flavour of auto-aliasing has been discussed at length before

8:43 it's a bit of a gnarly problem

8:44 rhickey: cemerick: I'm sure we can, but I'm not carrying blank CAs on the plane - we can print some at the office there I presume

8:44 cemerick: heh, yeah, I wouldn't have suggested differently

8:45 rhickey: cemerick: so, it's a go

8:45 * cemerick pictures rhickey w/ one of those rolling legal folios with CA's spilling out

8:45 cemerick: excellent

8:45 rhickey: Many Conj attendees already have CAs

8:45 cemerick: Yeah, I'd figured. Might as well get it to 100%.

8:47 rhickey: not really a goal - I only want people who want to contribute. CAs on their own are just more work for me

8:48 lpetit: rhickey: so how many CA to print, btw ;-)

8:48 Emeka: hi

8:48 rhickey: we can get show of hands day one and print as needed

8:49 kryft: CA?

8:49 clojurebot: CA is Contributor Agreement: http://clojure.org/contributing

8:49 kryft: Ah

8:49 Well, that was handy.

8:49 I wish the bot could handle all my stupid questions. :)

8:49 Chousuke: heh

8:50 kryft: Ah, I finally have time to read JoC again. Chapters 6 and 7 (functional programming and laziness) are coming up. *drool*

8:51 I can't wait to start coding.

8:51 Also, I can't wait to replace matlab with incanter. ;)

8:53 jave: hello

8:54 TobiasRaeder: hi :)

8:54 jave: I'm trying to make a macro that wraps the deftemplate macro in enlive

8:55 but aparently I dont understand macros, so I have some issues

8:56 TobiasRaeder: just go ahead and make a gist or pastepin of the code you got or explain what your exactly trying

8:56 jave: `(deftemplate x "x.svg" [] ~@(y "a" :1 :2))

8:56 deftemplate is an enlive macro

8:57 I want to mace a macro "y" that returns a list like ([:1] (lala) [:2] (lala2))

8:58 and have it be spliced into the arg list of deftemplate

8:58 the "y" macro seems to work when I examine the output with macroexpand

9:02 TobiasRaeder: @jave can you make a gist with your macro etc?

9:02 @jave just to have the complete code at one glance

9:02 jave: hmm ill try

9:03 havent used gist before, but its basicaly a paste service?

9:04 TobiasRaeder: yeah

9:04 or pastebin or whatever you feel comfortable with

9:04 jave: yes

9:05 Raynes: $whatis gist

9:05 sexpbot: gist = http://gist.github.com

9:06 Raynes: It also has Clojure highlighting.

9:06 But then again, lots of things do these days.

9:08 jave: http://gist.github.com/636376

9:08 so basically I just want to make a macro that uses macros to build long argument lists

9:09 but aparantly I'm missing something

9:10 it feels like the backtick operator doesnt work the way I'm used to

9:11 chouser: jave: I don't think you need ~ on any of the right-hand forms

9:12 jave: hmm yes ive been experimenting with that. the svgtemplate macro wants function object there so it felt better to evaluate them there. but I dont think its necessary either, no

9:14 chouser: you generally only use ~ when you have some data local to the macro itself that you want to insert into the form your macro is generating

9:15 jave: ah

9:15 chouser: but, does that fix your problem?

9:15 jave: no

9:15 problem is I get stuff like "java.lang.IllegalArgumentException: Wrong number of args (15) passed to: PersistentVector (NO_SOURCE_FILE:157)" that doesnt tell me anything

9:16 Raynes: It tells you a lot, actually.

9:16 chouser: yeah, I just spotted that

9:16 jave: hmm oh?

9:16 Raynes: $ ([1 2 3] 3 4 3)

9:16 sexpbot: java.lang.IllegalArgumentException: Wrong number of args (3) passed to: PersistentVector

9:16 Raynes: Something like that is happening somewhere.

9:17 chouser: overview-unit appears to expand to a list whose first element is a vector, like Raynes just showed.

9:17 Raynes: A place where a vector is being used as a function and being passed the wrong number of arguments.

9:17 Vectors actually *are* functions, but they only take one argument (an index to look up within themselves).

9:17 jave: so, thats probably what I'm not getting then

9:17 Raynes: $ ([1 2 3] 1)

9:17 sexpbot: ⟹ 2

9:18 jave: I wanted to splice in a list like that in another list with ~@

9:18 but thats not quite the right way then?

9:21 chouser: it might work for overview-unit to simply be a function

9:22 when a macro expands to a list, Clojure will try to evaluate that list. When a function returns a list, you have just a list

9:26 jave: uhm, now it works, sort of

9:26 gary_poster: maravillas: I'm around now :-)

9:47 s450r1: rhickey: I'm glad to read you're interested in taking CAs at the Conj. I have mine ready to turn in :-)

9:47 _fogus: chouser: That sounds very Zen!

10:00 esj: _fogus: good point, macros and Zen have the same root: suffering :)

10:01 _fogus: esj: Quote of the day!

10:02 esj: :)

10:04 Raynes: $max

10:04 sexpbot: The most users ever in #clojure is 289

10:04 Raynes: ~max

10:06 $max

10:06 sexpbot: The most users ever in #clojure is 290

10:06 Raynes: Oh boy, it's working.

10:06 * Raynes dances off into the sunset.

10:06 cemerick: hrm, clojurebot had it up in the mid 300's a while back

10:06 Raynes: cemerick: I just now wrote that plugin.

10:06 So, the maximum users right now is all it's ever known.

10:07 cemerick: I figured...but if we can get the old number to plug in as the real known basis... :-)

10:07 ~max

10:07 feh

10:07 Raynes: clojurebot: ping

10:07 clojurebot: PONG!

10:07 cemerick: clojurebot has been vacillating between genius and short-bus lately.

10:08 Raynes: I thought you said you wouldn't be around today?

10:08 I kind of wish I hadn't have packed yesterday. I have absolutely nothing to do but sit on nails and wait for tomorrow morning. :\

10:08 cemerick: plans changed, I get to bother all of you for another 7 hours or so

10:09 lypanov: Raynes: go port clojure to llvm.

10:09 Raynes: and stand up. nails are bad.

10:09 Raynes: Whoa, horsey. I only have a day. ;)

10:10 lypanov: do half of it then! :P

10:10 Raynes: :p

10:10 lypanov: the other half can be finished over the coming 6 months

10:12 cemerick: clojure-on-chicken still seems like a better target

10:12 Raynes: Bawk

10:15 lypanov: cemerick: on llvm has the advantage that in short term java libs can also run atop of vmkit and transition the rest over time

10:15 * lypanov shoots colloquy for letting him enter a blank line

10:15 Raynes: lypanov: You never actually sent a blank line.

10:16 lypanov: even worse. i see one.

10:16 Raynes: The IRC protocol doesn't accept blank messages.

10:16 lypanov: can't reproduce. i either entered a space or no one sees what i see and colloquy is smoking something good.

10:21 cemerick: lypanov: I don't think "transitioning" java libs is a realistic option/objective.

10:21 lypanov: then no transition, keep using them. but still requires vmkit no?

10:24 cemerick: Only if using jvm libs is an absolute requirement. ClojureCLR certainly doesn't use them.

10:24 lypanov: i'm confused.

10:24 cemerick: Thus the chicken/gambit target, both of which have rich libraries.

10:24 Or ObjC.

10:24 lypanov: what do you mean by "transitioning" libs isn't a realistic objective then if you don't think we need existing jars?

10:26 cemerick: We're talking past each other. You suggested llvm as a better host option because we can use jvm libs, which I don't really think is a driving consideration for a Clojure host platform.

10:26 e.g. if you need jvm libs, use the....jvm :-)

10:26 lypanov: ah no, i was just saying that llvm has the added bonus that current code would actually work.

10:27 i don't personally feel that in the long term the java side of things is at all important.

10:27 cemerick: I think it's critically important, if you care about the jvm or its libs. :-)

10:27 lypanov: but good bindings to both existing c libs, and existing jvm libs, is just dang useful.

10:27 cemerick: If not, then you might as well target a platform that is maximally suitable.

10:28 lypanov: agreed. so, llvm :P

10:28 cemerick: hah

10:29 lypanov: don't know enough on chicken to comment.

10:29 cemerick: As schemes go, it's pretty damn nice. Compiles to C as an intermediary.

10:29 There was a fellow from apple in here a while back.

10:30 I half suspect the next impl will come out of nowhere -- someone knocking on it for a year quietly to avoid the bikeshedding, etc.

10:30 lypanov: scala llvm just randomly appeared.

10:31 * lypanov hopes so

10:32 cemerick: lypanov: there's scala on llvm? Link?

10:32 I see some msg board chatter about the possibility, but nothing concrete.

10:32 lypanov: http://github.com/greedy/scala

10:34 cemerick: thanks; very early days, then

10:34 lypanov: *nod*

10:34 and not much activity

10:37 cemerick: http://github.com/greedy/scala/blob/HEAD/README.llvm

10:37 the remaining stuff looks like fun :P

10:37 cemerick: Yeah, I just skimmed that :-)

10:38 Aside from the geek porn aspect, I don't have any real use-case for a non-JVM/CLR Clojure, so it's all a bit academic.

10:38 Chousuke: something that starts up really quickly would be nice

10:39 chouser: Chousuke: amen

10:39 and better access to unix

10:39 lypanov: and c libs bindings that don't make you want to kill bunnies

10:39 Raynes: chouser: Your finger trees talk is on the first day of the Conj isn't?

10:39 I'm pretty eager to hear that one.

10:39 chouser: yep

10:39 cemerick: I knew that would bring out the command-line jockeys...

10:39 Raynes: Goody.

10:39 chouser: cemerick: :-)

10:39 Chousuke: chouser: what's the status of your FT implementation anyway?

10:40 chouser: Chousuke: I estimate about 2 days from being done enough to talk about. :-P

10:40 Chousuke: heh :P

10:40 cemerick: hell, what about a parrot/perl 6 hosting of clojure?

10:40 Raynes: Parrot would be fun.

10:40 cemerick: That might actually be attractive. *tons* of libs.

10:41 Raynes: I've been meaning to play with Perl 6. I wish they had threads implemented though. :(

10:41 cemerick: Wow, they've really got the duke nukem forever release schedule down pat, huh?

10:41 Raynes: They're doing Star releases every month now.

10:41 Chousuke: well, DNF came through. :D

10:41 cemerick: I've no idea what that means.

10:42 Chousuke: and it looks awesome enough.

10:42 Raynes: Star releases being "Okay for you to use, but be careful and expect bunnies to be killed."

10:42 cemerick: ah

10:42 and none of the frills included…like threads? :-O

10:42 Raynes: No threads yet.

10:43 cemerick: http://rakudo.org/announce/rakudo-star/2010.09

10:43 No macros yet either.

10:46 chouser: met some people at strange loop who have a *lot* of rather well-engineered perl5 code to manipulate human genome data

10:47 and who work with biology folks who have been forced to learn perl5 to do their jobs, and aren't really interested in learning something else

10:47 lypanov: bah. automatically rewriting perl5 into clojure can't be any more difficult that human language parsing. i'd say just automate it.

10:47 poor biologists :(

10:48 cemerick: I was sorta excited about the prospect of perl 6 until clojure came along

10:48 chouser: so, they're hoping perl6 actually flies sometime soon

10:48 Raynes: This is why we can't have nice things.

10:48 chouser: cemerick: me too. now I'm ruined for any language with mutable collections or locals

10:49 cemerick: chouser: clojure on perl.....

10:50 chouser: perl6's macros and grammar manipulation were the main thing catching my eye

10:50 lypanov: chouser: it screamed "20 year project" to me

10:51 the specs took longer to write than i imagine most of clojure impl took.

10:57 chouser: hah! the mongodb query language is (mostly) homoiconic

10:57 lypanov: true. just data structures.

10:58 chouser: right

11:09 s450r1: chouser: I was pretty interested in Perl 6 when they first started talking about it as well, but then encountered Ruby, and decided not to wait. Now, clojure's come along and totally ruined me ;-)

11:10 * chouser nods

11:12 s450r1: ... and I have to use C# 1.1 at work...

11:13 * s450r1 weeps bitterly

11:13 chouser: but you can do macros in C#, can't you? AST re-writing?

11:17 edoloughlin: Cake looks nice. The persistent JVM would be a boon for those of us without the time to learn both Emacs and Clojure at the same time!

11:24 lypanov: edoloughlin: its helping me a lot. vimclojure (if you have experience there) isn't bad at all either.

11:34 s450r1: chouser: ah, you made me look again... as far as I can tell, you can do run-time macros in C# 3.0 and later, but not compile-time macros. When I looked a couple years ago, I seriously considered the Boo programming language which does have compile time macros, but they were dropping .NET 1.1 support :-p

11:34 edoloughlin: I'm using Eclipse & Counterclockwise. Mylyn is its killer feature.

11:36 s450r1: I console myself with the thought that we'll probably be moving to .NET 3.5 (maybe 4) within a year, and that hopefully Clojure for .NET will be more production-ready by then.

11:38 chouser: s450r1: huh, I don't know what a run-time macro would be

11:43 s450r1: chouser: I got that phrase from http://themechanicalbride.blogspot.com/2007/03/runtime-macros-in-c-30.html

11:47 lpetit: chouser: isn't runtime macros somehow always reevaluated when called, something like that ? (so that you don't have to recompile every dependent code when you change a macro ?

12:00 chouser: lpetit: hm, dunno

12:00 Drakeson: how does one do with-local-vars now?

12:05 bhenry: https://gist.github.com/8dbce1459f942b64c3a2 this makes output for a spreadsheet. i'm using ring. can i send the report as it fetches without holding onto the head? as it is now, a large report would create a giant string and send it to the browser all at once.

12:16 s450r1: lpetit: that seems to be case for the link I posted above. The author created a Macro.GetValue method that takes an Expression tree that automatically gets converted from a "lambda function", manipulates that Expression tree, compiles the manipulated Expression tree into a function and runs the function.

12:18 lpetit: s450r1: yep. I think CL has runtime macros, too ..

12:24 chouser: s450r1: but if you can keep a refernce to that compiled expression and use it each time, that's essentially the same as clojure macros, isn't it? code manipulated and compiled once, then reused as needed at runtime

12:26 jonasen: I can't get ants.clj to run with latest clojure. It fails on (send-off animator animation). Is it just me and my setup or can someone confirm this?

12:27 Kruppe: s450r1: Could I get a link to what you guys are talking about? Sounds interesting but I missed the link.

12:27 dnolen: jonasen: latest clojure like 1.2.0?

12:27 s450r1: Kruppe: http://themechanicalbride.blogspot.com/2007/03/runtime-macros-in-c-30.html

12:27 jonasen: dnolen: no, 1.3.0-master-SNAPSHOT

12:28 according to (agent-error animator) it's a NPE

12:28 Kruppe: s450r1: thanks :)

12:28 dnolen: jonasen: that's under some big changes, probably should wait for things to settle down.

12:31 jonasen: or build your own 1.3.0 from a rev prior to the dynamic stuff.

12:34 SirNick: Is there any way to use defrecord and overwrite the seq method? Doing it directly results in a duplicate method error

12:34 chouser: if your defrecord isn't going to be a regular map, you want deftype instead

12:35 Hm... "C# cannot translate arbitrary expressions or code blocks into data, only lambda functions so we will need to nest our expression inside one"

12:36 SirNick: chouser: but then I won't get the hashCode function or being able to use assoc

12:36 chouser: SirNick: yeah, you'll have to write those yourself

12:36 lpetit: chouser: sure, the code examples are a demonstration that it would not scale well "as is"

12:36 SirNick: drat

12:36 thanks

12:36 chouser: SirNick: some day we'll have a set of such functions available as a map to be merged into your deftype via extend

12:37 but I don't know of such a thing yet

12:37 SirNick: chouser: yea that would be quite nice

12:38 s450r1: chouser: that sounds right. But the amount of code and brittleness of the code for the macro the author wrote seems painful. I'd rather have Lisp's macros ;-) Still, it's good to keep in mind.

12:39 Kruppe: chouser: is it just me or is clojure slowly getting all the tools for typical O-O

12:39 Chousuke: typical, except immutable? :P

12:40 Kruppe: Chousuke: haha true i suppose.

12:40 nathell: contrib devs: is issue #98 looked at?

12:40 Chousuke: Clojure has no "native" tools for data encapsulation as far as I know.

12:40 chouser: Kruppe: it's had most of them for quite a while

12:40 Chousuke: closures. :-P

12:40 Chousuke: chouser: well, I guess :P

12:41 Kruppe: chouser: well yeah, you could use closures to roll your own. Like people do in scheme.

12:41 chouser: closures for encapsulation, multimethods and heirarchies for inheritence and polymorphism

12:42 Kruppe: chouser: deftype and defrecord plus protocols and this potential map of functions you could add to something

12:42 chouser: maps with type metadata for "type", that is the grouping of values into objects

12:42 jonasen: dnolen: It works with a rev from 2010-10-14

12:43 chouser: namespaces for grouping methods

12:43 it's all there, just not all glommed onto the same "class" concept

12:44 and not all at best JVM speed until deftype and defprotocol

12:44 Kruppe: chouser: yeah. Almost feels like I can use CLOS in clojure now (almost).

12:44 dnolen: jonasen: makes sense, the dynamic stuff landed right after that. You'll probably have to wait a while for all that to shakeout.

12:45 jonasen: dnolen: ok, thanks!

13:02 amalloy: ~source defn

13:16 qbg: Hmm... :static -> :dynamic; 1.3 is going to be a huge change from 1.2...

13:19 ohpauleez: qbg: it's going to be a big change, but for 80% of all development, nothing will change. Your code will just be magically faster

13:19 I pulled that percentage out of the air, it very well could be higher, but I don't see it being much lower

13:20 qbg: Meh, using binding on a var bound to function always felt strange anyways

13:21 Still, with the semantic changes, I'd be tempted to push the version number much closer to 2.0, but then again, I'm not Rich

13:22 ohpauleez: Well it's going to be 1.3, but we're branding it as Clojure3. We have a whole marketing team on it

13:22 </java joke>

13:22 qbg: *pained groan*

13:25 chouser: once upon a time, the major version number was going to match the age of clojure in years

13:25 cemerick: ohpauleez: man, that wasn't even funny :-P :-)

13:26 duncanm: i'm coding some stuff with incanter, and i always :require the incanter libraries

13:26 but everytime i start up SLIME, i get these warnings: WARNING: flatten already refers to: #'clojure.core/flatten in namespace: incanter.transformations, being replaced by: #'clojure.contrib.seq-utils/flatten

13:26 why is that happening?

13:26 ohpauleez: chouser: so the minor version isn't that far off then

13:26 cemerick: haha I do what i can

13:26 chouser: ohpauleez: good point

13:27 lrenn: duncanm: you're using an old version of lein-swank.

13:27 cemerick: lrenn: I suspect not, those warnings are coming due to incanter's ns decl's

13:28 raek: duncanm: note that swank-clojure.el (the elisp package, not the clojure lib) is deprecated

13:28 duncanm: oh

13:28 lrenn: oh, missread that. I LuaJenson got the same errors yesterday due to an old swank dep.

13:28 duncanm: lrenn: lemme fix

13:29 lrenn: where can i get the latest version?

13:29 raek: i'm using lein

13:29 and i have :dev-dependencies [[swank-clojure "1.2.1"]]

13:30 lrenn: duncanm: no, i was wrong. this seems to affect other libs because flatten was added to clojure.core

13:30 duncanm: it's just that I ran into it yesterday with lein-swank i immediately thought of that.

13:30 raek: ok. great! then at least that is not the problem. (just checking)

13:31 duncanm: lrenn: but shouldn't :as be scoping the name inside a namespace?

13:31 cemerick: duncanm: you're seeing those messages because incanter is `use`ing namespaces that contain functions of the same name as functions in clojure.core.

13:32 They'll only go away when incanter switches to use the clojure.core versions of those fns

13:32 duncanm: cemerick: instead of 'require as'... so, no harm then

13:32 lrenn: duncanm: what version of contrib are you using?

13:32 duncanm: 1.2.0

13:32 cemerick: duncanm: well, the fns in question were migrated into clojure.core, so incanter doesn't actually need the references to c.c.seq-utils etc.

13:33 duncanm: right

13:34 okay, so my dev env isn't as messed up as i thought

13:34 onwards to more bugfixing

13:34 thanks!

13:37 amalloy: hooray, mailed in my CA today

13:38 soon: fix all those damn doc ambiguities that have been bugging me

13:40 cemerick: amalloy: Thank you, ahead of time :-)

13:41 ohpauleez: amalloy: You beat me, I need to get on that!

13:46 lrenn: i wonder if it makes sense for clojure-contrib to do what swank-clojure did...(when-not (ns-resolve 'clojure.core 'flatten)

13:57 amalloy: lrenn: that's an incomplete expression. what is it that swank-clojure did with flatten?

13:59 lrenn: amalloy: http://github.com/technomancy/swank-clojure/blob/master/src/swank/util.clj

13:59 it then evals the defn.

14:14 rickmode: Ring question: I'm getting NullPointerException at flash.clj:11 when trying to use wrap-flash. Anyone familiar with Ring's wrap-flash?

14:18 lrenn: rickmode: wild guess, but are you using the wrap-session middleware? It looks like it would be required.

14:19 rickmode: lrenn: I tried that too. Something like (def app (-> #'my-routes (wrap-session) (wrap-flash) ......))

14:20 bhenry: rickmode can you gist the stacktrace?

14:21 rickmode: bhenry: ya... one sec while I figure out gist (I use github, but haven't used gist yet)

14:23 lrenn: rickmode: (def app (-> my-routes wrap-session wrap-flash))

14:23 amalloy: rickmode: if you're using emacs, there's a package to have it create gists for you

14:23 rickmode: lrenn... oh... no parens? odd

14:23 amalloy: I'll look into that, thanks

14:24 amalloy: I use aquamacs (I need the mac training wheels still)

14:24 Raynes: The parens are just irrelevant. They don't hurt anything.

14:24 amalloy: heh. no training wheels for windows users, so i just dove in

14:24 Raynes: $ (-> "a" (println"))

14:24 sexpbot: java.lang.Exception: EOF while reading string

14:24 Raynes: $ (-> "a" (println))

14:24 sexpbot: ⟹ a nil

14:24 Raynes: Except ones eyes, that is.

14:24 ;)

14:25 amalloy: ,(macroexpand '(-> "a" println))

14:25 clojurebot: (println "a")

14:25 amalloy: ,(macroexpand '(-> "a" (println)))

14:25 clojurebot: (println "a")

14:25 rickmode: lrenn: http://gist.github.com/636998

14:25 er. bhenry: http://gist.github.com/636998

14:25 Raynes: It only puts parens around them if they aren't already there.

14:26 rickmode: my source file: http://gist.github.com/636999

14:27 amalloy: the one i've seen trip people up a few times is

14:27 ,(-> [1 2] ((fn [[a b]] [b a])))

14:27 clojurebot: [2 1]

14:29 amalloy: people seem to forget the extra layer of parens around the fn to insert [2 1] into the invocation rather than the definition

14:29 bhenry: rickmode: when does the null pointer exception happen? what are you running?

14:29 Raynes: $ ((-> [a b] (fn [b a])) 1 2)

14:29 sexpbot: ⟹ [2 1]

14:29 rickmode: bhenry: hitting any page. E.g., hitting http://localhost:8080/

14:30 bhenry: okay

14:30 rickmode: bhenry: runs fine w/o wrap-flash

14:31 Raynes: rickmode: Your first mistake is hitting those pages. Don't hit them! Just tap them very gently.

14:31 amalloy: Raynes: but my way is cooler. you don't get many excuses to include [[...]] or ((...)) in a single line of clojure

14:31 rickmode: Raynes: alas the web is a blunt instrument.. lol

14:40 amalloy lrenn: ugh... it's order dependent. I need to put wrap-session *after* wrap-flash. The wrapper are used bottom up with respect to the order in the the thread (->) call. So lrenn you were right. It was my guess too, but I had the order wrong.

14:41 Thanks guys. Just talking about it got me to the solution and a deeper understanding of these wrappers.

14:47 nickik: anybody used sandbar?

14:49 rickmode: nickit: I looked at it. It seems cool and I'm learning stuff looking at it. However it embodies a certain type of web site, so it isn't a general framework. I'm sticking with compojure myself.

14:51 nickik: @rickmode i use compojure to. Sandbar just provides some stuff you can use with compojure (or a other framework)

14:51 *too

14:51 thats what brenton does in his blog too

14:52 rickmode: nickit: indeed. Looking closely at the form and validation stuff specifically, it embodies a certain style of form and validation. Specifically how it renders inputs with labels and how it renders error messages.

14:53 nickit: can't hurt much to try it / learn it.

14:53 cemerick: the form stuff is interesting; I generally go for spring-security for auth things though

14:56 rickmode: cermerick: Does the use of Spring flow smoothly with Clojure? (I haven't considered using any Java libs / frameworks mainly because I'm not a fan of the bloat.)

14:57 cemerick: rickmode: Spring in general, no; spring-security, yes

14:58 It's a very slim module, focused solely on auth stuff

14:58 rickmode: cemerick: is there a clojure wrapper? (perhaps that even necessary)

14:58 er.. perhaps *that's not* even necessary

14:58 cemerick: it's fundamentally declarative

14:59 tonyl: hello

14:59 cemerick: You rope a servlet filter into your app via an extension to the web.xml

14:59 tonyl: does anybody know if clojure has a language specification somewhere?

15:00 cemerick: If you're not up to speed with that world, it's probably a day or two of fiddling...but then you have a highly reliable and well tested auth system with *tons* of plugins for e.g. oauth, openid, ldap, etc etc.

15:00 tonyl: or how does clojure-clr is following clojure in jvm?

15:03 so no language spec? just the api documentation and what is explained in clojure.org?

15:03 rickmode: cemerick: I did java web stuff for years, so that's not a problem for me. I've used Java nearly exclusively from 2000 on, so I have a healthy appreciation of what it got right (GC, package structure, anonymous classes, inner classes) and a strong distaste for using it now.

15:03 amalloy: tonyl: language specification? i mean, the syntax is "lisp", and the standard functions are the API docs. there's nothing left to specify

15:03 cemerick: tonyl: there is no formal language spec, no

15:03 what amalloy said :-)

15:04 tonyl: what about the interoperability with the jvm?

15:04 amalloy: just the special form . and some convenience macros

15:04 Raynes: Why would that be in a spec? You can't interop with the JVM on the CLR.

15:04 kmc: amalloy, there's more a language than syntax and standard library

15:04 amalloy: (which are all in the API docs)

15:04 kmc: there's this thing called "semantics"

15:04 rickmode: tonyl: Clojure is layered on top of those host language and runtime. It doesn't hide it.

15:04 tonyl: true

15:05 kmc: Clojure differs from Common Lisp in a number of ways, syntactic and semantic

15:05 cemerick: rickmode: In that case, I'd absolutely say use spring-security. I fundamentally wouldn't trust a reimplementation of such a thing if I could lay my hands on one that's trusted and widely vetted

15:05 Raynes: . is the interop form on the CLR too

15:05 tonyl: thanks for clarifying it guys

15:05 kmc: don't forget that every special form constitutes new syntax

15:05 Raynes: cemerick: Good point.

15:06 kmc: it's a dumb lie that "Lisp syntax is just parentheses"

15:06 cemerick: kmc: untrue; let, do, etc are special forms, but not syntactic constructs

15:06 kmc: cemerick, how do you figure?

15:06 cemerick: Keywords, symbols, reader macro bits are.

15:06 Raynes: -> (doc let)

15:06 sexpbot: ⟹ "Special Form: Please see http://clojure.org/special_forms#let"

15:06 kmc: Lisp languages have three layers of syntax; special forms are the top layer

15:06 cemerick: kmc: because they follow standard fn call semantics

15:06 kmc: no they don't

15:06 not even close

15:07 the fn call semantics are eval, then apply

15:07 that doesn't tell you how to resolve a 'let'

15:07 cemerick: ok, I retract that :-)

15:07 kmc: or a 'fn'

15:07 if i type (let (x 3 y 4) x) into DrScheme, it says "syntax error"

15:07 because in Scheme you write (let ((x 3) (y 4)) x)

15:07 cemerick: But the point being, `fn` isn't syntax.

15:07 kmc: but in Clojure you write (let [x 3 y 4] x) and not (let [(x y) (y 4)] x)

15:07 now, tell me how this is not syntax

15:07 cemerick: well, arg lists/vectors *are* syntax

15:08 kmc: no i mean, "let" has syntax, it expects a vector of even length

15:08 but in Scheme, it expects a list of pairs

15:08 you can map between these two trivially; it's really silly to say that this arbitrary choice is part of the semantics of "let"

15:08 cemerick: OK, defining syntax of enclosing forms is not the same as being different syntax.

15:09 kmc: cemerick, what i'm saying is that the old claim that "Lisp syntax is just s-expressions" is false and disingenuous

15:09 to write syntactically correct Lisp / Scheme / Clojure you need to know how each special form works

15:09 cemerick: well, I wouldn't argue with that

15:09 chouser: kmc: how about: Clojure's syntax is simple and regular compared to most non-Lisps

15:09 cemerick: But special forms themselves are not syntax the way, e.g. #"regex" is.

15:10 kmc: chouser, i'll agree with that

15:10 R6RS is quite explicit about the fact that Lisp-like languages have three syntactic layers, while most languages have two

15:10 chouser: kmc: cool. I've also been uncomfortable with "lisp has no syntax"

15:10 technomancy: I don't think anyone actually says "lisp has no syntax" apart from being tongue-in-cheek.

15:10 kmc: Lisp syntax *is* just s-expressions, if Lisp is just a language for writing nested lists

15:11 it's 'eval' that imposes that third layer

15:11 rickmode: kmc: maybe the wording should be "lisps have minimalist syntax"

15:11 kmc: well, that depends

15:11 how many special forms does CL have?

15:11 i don't know, really

15:12 turbofail: maybe the wording should be "lisps have as much syntax as you feel like adding or using"

15:12 cemerick: kmc: There's way more syntax in clojure that is unassociated with special forms. They're not the determinant of the degree of syntax that exists.

15:14 kmc: don't know what you mean

15:14 hiredman: regex literals have syntax, but are not a special form

15:14 kmc: right

15:15 there's also reader macros and other stuff i didn't talk about

15:15 which even further supports my claim that "lisp has no syntax" is a dumb lie

15:15 but is not central to that claim

15:15 hiredman: well regex's are more or less reader macros, clojure just doesn't expose an extension mechanism for reader macros

15:15 kmc: even the untyped lambda calculus has one special form :)

15:15 amalloy: heh. i made the original dumb, lying claim, and i have to say i've been convinced

15:16 cemerick: amalloy: is that what this whole thing is about? :-)

15:16 kmc: amalloy, i don't mean to call you personally dumb etc.

15:16 it's an oft-repeated claim which has been annoying me a lot

15:16 hiredman: the point of lisp is, regular syntax (first thing in a list drives how the list is evaluated) and the ability to add syntax via macros

15:17 amalloy: kmc: i know. if i'm offended i'll let you know by breaking into your house and leaving a note

15:17 kmc: haha

15:17 tonyl: what about vectors and maps? are they extended syntax just structures?

15:17 hiredman: they are literal syntax for structures

15:17 amalloy: anyone have experience with cascalog? i'm researching ways to persist hadoop's map/reduce output to mysql, and was quite pleased to see cascalog listed as the only wrapper around Cascading

15:18 hiredman: just like () is literal syntax for list structures

15:18 tonyl: but lists literals can be called as a fn

15:19 hiredman: nope

15:19 list literals are evaluated as function application

15:19 kmc: think of your whole program as being inside an explicit (quote)

15:19 tonyl: ok, makes more sense now

15:20 hiredman: vector literals are also evaluated

15:20 kmc: then, that list literal is passed to eval

15:20 hiredman: they just are not evaluated as function application

15:20 tonyl: what are vectors evaluated into?

15:20 kmc: (eval [inc 3]) ⇒ [2 3]

15:20 (eval (inc 3)) ⇒ 4

15:20 err

15:20 (eval [inc 3]) ⇒ [inc 3]

15:20 hiredman: tonyl: into vectors that have their arguments evaluated

15:20 kmc: hmm that's not right either

15:20 hiredman: ,[(inc 1)]

15:20 clojurebot: [2]

15:21 defn: ,(eval [inc 3])

15:21 clojurebot: DENIED

15:21 kmc: because the symbol 'inc' will get resolved to a function value

15:21 defn: oh..right..

15:21 arkh: basic ns issue and using leiningen: Exception in thread "main" java.lang.Exception: namespace 'arkh_utils' not found after loading '/arkh_utils' (core.clj:1)

15:21 my core.clj starts like this: (ns syslog-relay.core (:use [arkh_utils]) ...)

15:22 hiredman: if vectors were not evaluated then [(inc 1)] would be the same as '[(inc 1)]

15:22 arkh: arkh-utils

15:22 tonyl: but they are evaluated, but not into a fn

15:23 hiredman: lists are not evaluated into a fn unless they start with the special form that tells the compiler to evaluate into a fn

15:23 arkh: hiredman: I thought dashes were substituted with underlines?

15:23 hiredman: they are evaluated as a function application

15:23 arkh: yes, in filenames

15:23 Raynes: arkh: In file names.

15:23 hiredman: arkh_utils.clj should have the namespace arkh-utils

15:23 turbofail: is there a repo for clojure-in-clojure?

15:23 arkh: oh ... (:use [arkh-utils])

15:23 hiredman: but also

15:24 ~namespaces

15:24 clojurebot: namespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it

15:24 tonyl: ,(werw 3 4)

15:24 clojurebot: java.lang.Exception: Unable to resolve symbol: werw in this context

15:24 tonyl: ,'(rwer 4 5)

15:24 clojurebot: (rwer 4 5)

15:24 kmc: ,(doc rwer)

15:24 clojurebot: No entiendo

15:24 kmc: hehe

15:24 tonyl: hehe

15:25 arkh: hiredman, Raynes: thanks - that was it. Silly me!

15:25 tonyl: yeah i was testing that lists are alway being evaluated as a fn call unless they are quoted

15:26 hiredman: I very much recomend writing a lisp interpreter

15:26 tonyl: yeah, that is what I am going to try to do

15:26 hiredman: in clojure?

15:26 tonyl: I am reading on compiler and interpreters and was thinking of using a subset of clojure to implement

15:27 :P I need to do more reading apparently

15:28 thanks for helping me understand a bit more

15:30 arkh: ... hmm, and moving away from s

15:30 er, 'single segment namespaces'

15:31 hiredman: like, my guess for the bytecode that clojure emits for a vector like [(inc 1)] is, resolve the var inc, load the constant 1, call IFn.invoke(Object), create an array of size 1, load the result of the invoke into the array, call IPersistentList/create

15:31 er

15:31 IPersistenVector/create

15:32 IFn.invoke being a function call (inc 1)

15:35 tonyl: ,(eval [(inc ^Integer 1)])

15:35 clojurebot: Metadata can only be applied to IMetas

15:35 tonyl: interesting

15:37 hiredman: http://www.infoq.com/presentations/Towards-a-Universal-VM if I recall the presentor mentions simulating runtimes on the jvm, which is restrospect was it kind of, "well of course", but when I first heard him say it it really tied together a lot of loose ends in my mind

15:37 which in retrospect was kind of

15:38 tonyl: thanks for the link

15:38 cemerick: what's that java-in-java project? That was interesting.

15:38 hiredman: maxine

15:39 amalloy: tonyl: also, clojurebot won't do eval

15:39 ,(map class [1 (int 1)])

15:39 clojurebot: (java.lang.Integer java.lang.Integer)

15:43 hiredman: maxine has a lot of stuff stubbed out, so for example, if I try to run jetty I get a NotImplemented exception

15:43 tonyl: ,(eval (inc 4))

15:43 clojurebot: DENIED

15:43 amalloy: aww. i guess that's not surprising. but at any rate, (int 1) is an int rather than an Integer

15:43 tonyl: thanks for the headsup amalloy, just starting here :P

15:43 amalloy: tonyl: he implicitly evals everything starting with a comma, but you can't call eval directly because it would stop him from imposing security restraints

15:43 tonyl: yeah, understandable

15:43 arkh: amalloy: how is it an int when (class (int 1)) returns Integer?

15:43 amalloy: arkh: (class) has to box it back into an Integer before you can call class

15:43 tonyl: ,(type (int 1))

15:43 clojurebot: java.lang.Integer

15:43 arkh: amalloy: oh yeah

15:43 tonyl: so clojure doesn't use primitives?

15:43 hiredman: int is a function, but not really, so it can return primitives

15:43 arkh: p.s., if there were ever a tree primitive, they should call it an 'ent'

15:43 amalloy: tonyl: only in very limited ways, though this is being expanded in 1.3 as i understand it

15:43 hiredman: tonyl: as of 1.2 clojure functions can only take Objects and return Objects

15:43 locals inside functions can be primitive

15:44 Raynes: $ (class (Integer. 3))

15:44 sexpbot: ⟹ java.lang.Integer

15:44 Raynes: ~max

15:44 hiredman: What happened to max?

15:44 amalloy: ,(* 1000000 1000000)

15:44 clojurebot: 1000000000000

15:44 amalloy: ,(* (int 1000000) (int 1000000))

15:44 clojurebot: java.lang.ArithmeticException: integer overflow

15:44 tonyl: but in cases like this (def count 1) that is a primitive

15:45 or is it boxed too

15:45 amalloy: tonyl: no, it's boxed

15:45 tonyl: dang, alright

15:46 if they change that in 1.3 that would speed up some use cases

15:46 but they would lose metadata functionality... mm.... interesting

15:47 hiredman: uh

15:47 Integers can't have metadata regardless

15:48 tonyl: duh, that's true :P

15:48 I wonder what could they loose then.

15:49 I need to dig in more into the source code

15:49 chouser: What you lose is that primitives are not Objects. This complicates everything.

15:50 hiredman: indeed

15:50 tonyl: an example would be methods invocations?

15:51 chouser: tonyl: to the JVM there is no such thing as a funcion. Clojure functions are JVM methods that take 0 or more Object methods and return an Object

15:51 right there you lost the ability to pass in or return primitives

15:52 tonyl: wow, big hurdle.

15:54 chouser: In 'master' right now, some Clojure functions are JVM static methods that can take args of different types. They can't be closures and Clojure will look at them when compiling a call to one of these in order to generate the right method call signature.

15:54 hiredman: hey, will you be in NC?

15:54 amalloy: clojure functions are actually classes with invoke methods, right, not individual methods

15:55 hiredman: chouser: yessir

15:55 chouser: amalloy: no such thing as an individual method on the JVM, so right.

15:55 hiredman: fantastic! can't wait to meet you.

15:55 hiredman: :)

15:58 tonyl: so if the JVM supported individual functions would clojure had gone that way instead of a fn maps to a java class?

16:00 amalloy: probably not. that doesn't map well to closures

16:01 hiredman: the different between a first class function that closes over lexical scope and a an object is close to nil

16:01 difference

16:01 amalloy: closures are implemented as a java class, with a constructor that takes N args corresponding to the lexical bindings it closes over

16:01 i think

16:03 hiredman: infact as oo is very simulationish, using objects to simulate a language runtime makes a certain kind of sense

16:03 chouser: (let [a 1 b 2 c 3] (show (fn [x y] (+ x y a b c))))

16:03 [ 3] <init> (long,long,long)

16:04 amalloy: right

16:04 also, an optional map for metadata: [ 2] <init> (IPersistentMap,long,long,long)

16:06 tonyl: wow, that just blow my mind, to kind of know how clojure is structure from Java

16:06 *blowed

16:06 amalloy: chouser: oh, clever. i found that out by looking at javap, but show is a teeeny bit easier

16:06 *blew :)

16:06 chouser: amalloy: :-)

16:06 tonyl: amalloy: thanks :P

16:22 ddonnell: what's the clojure equivalent of ruby's File.expand_path(File.dirname(__FILE__))

16:24 jjido: how can I make a future that starts after the caller completes some bookkeeping only (to prevent the future operations from using stale data)?

16:25 amalloy: jjido: well, the best way would be to do the bookkeeping first :P

16:26 jkkramer: ddonnell: i don't think there's an easy __FILE__ equivalent

16:27 ,(.getAbsolutePath (java.io.File. ""))

16:27 clojurebot: java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)

16:27 amalloy: jkkramer: that's the cwd, not the script file

16:27 ,(System/getProperty "user.dir")

16:27 clojurebot: java.security.AccessControlException: access denied (java.util.PropertyPermission user.dir read)

16:27 jkkramer: i know, just showing what the rest of it would be

16:27 chouser: ,*file*

16:27 clojurebot: "NO_SOURCE_PATH"

16:28 jkkramer: ah, right

16:28 amalloy: jjido: but if you needed to, you could do something like (let [args (promise) f (future (do-stuff-with @args))] (deliver args (updated-bookkeeping-data)) f)

16:29 ddonnell: thanks

16:32 jjido: amalloy: that looks like what I want to do

16:36 alexyk: ok so everybody pumped for conj? conference, not just the function?

16:38 technomancy: so pumped.

16:39 mefesto: im pumped :)

16:40 tonyl: I wish I could, maybe next year

16:40 chouser: my pumped/worried ratio is going up as my slides approach completion.

16:40 alexyk: chouser: technomancy: can't believe I'll see the men behind the nicks! this is so cool

16:41 don't worry about the slides, you can just stand and bask :)

16:41 technomancy: I hope the badges have room for nicks on them as well as names.

16:41 alexyk: I'm having a problem of calling people by nicks

16:41 chouser: alexyk: Don't say things like that.

16:41 alexyk: ninjudd is especially hard to shake off

16:41 jweiss: oh, good call, although my nick is pretty easy to guess from my name

16:41 chouser: alexyk: like "bask" I mean. Calling me "Chouser" is fine.

16:42 alexyk: chouser: bask in the gratitude of teh IRC users I mean :)

16:42 chouser: alexyk: I understood, just not the direction my ego needs to be nudged.

16:42 alexyk: chouser: ok, then go get 'em slides! :)

16:43 jweiss: wow, 312 users in here now. the channel doesn't seem that much more active though

16:43 chouser: right-o!

16:43 alexyk: exceeded #scala a while ago

16:43 * jweiss scoffs at scala

16:43 chouser: Scala seemed to have a lot of draw at Strange Loop. More than Clojure, I think.

16:44 alexyk: scala is nice, I was surprised by teh warm reception there, since my shift of focus a bit back... but they go together against pure Java I'd say

16:44 Scala folks see Clojure in much friendlier terms than vice versa

16:45 jweiss: i really dont' know enough about scala to actually scoff. i just didn't see anything about it that made me want to learn it.

16:45 chouser: hm, as in Scala guy might think "at least Clojure is functional" and a Clojure guy might think "bah, Scala is all mutable"?

16:45 alexyk: chouser: remind the speakers to write their nicks on the badges; or, in fact, the organizers to ask folks to write them while registering

16:45 Chousuke: scala has scary syntax :P

16:45 alexyk: chouser: Scala is as mutable or immutable as you want :)

16:46 Scala has void space instea of parens!

16:46 teh vacuum is so empty there, cold and dangerous

16:46 tokens can just mash together! brrrrr

16:47 chouser: I'd bet the badges are all printed by now, don't you think?

16:47 technomancy: I'll have my github shirt on that has a blank on the back for you to fill in http://github.com/________ in marker

16:47 alexyk: chouser: yeah, but people can use things called "pens" in teh 20th centiry!

16:48 technomancy: well, at least the speakers have big pics! the rest we'll have to imagine from github ones

16:48 e.g. lancepantz has an animal there, and ninjudd a cartoon

16:49 defn: you here?

16:49 defn: alexyk: i am

16:49 are you my roomate?

16:49 alexyk: defn: you bet! I'l arrive at 4 pm in fact

16:49 ninjudd: alexyk: that is me in contrasty mode

16:50 alexyk: ninjudd: really you? looks very abstract!

16:50 defn: alexyk: my flight leaves at 7:30am tomorrow morning -- i should be in by around 11am

16:50 alexyk: defn: and I'll have a mtg right away... if you like I can call the hotel and tell them to give you the key if you like

16:51 btw, how about some beer tmrw evening? do folks have plans already?

16:51 defn: alexyk: that might be nice -- im going to try and take a nap, i need to take a bus at 2:30am this evening so I'm going to be a little bit out of it

16:51 beer == good

16:51 alexyk: I learned there's an unnannounced dinner for sponsors

16:51 and I wonder what we nonsponsors are gonna do

16:51 defn: let's crash it and act like we're with Akami

16:52 ;)

16:52 chouser: heh

16:52 alexyk: defn: that's an option, and we may end up with them anyways :)

16:52 mefesto: did someone mention beer? :)

16:53 alexyk: lots of it! if that airport dive serves any good one... NC is not known for beer is it?

16:53 made of tobacco leaves may be

16:53 defn: i know Asheville has some coice brew

16:53 choice*

16:53 unfortunately that's ~7 hours away if memory serves

16:53 alexyk: but we're gonna be stuck in the airport right?

16:53 jweiss: i'm a local if you guys are looking for a place to hang

16:53 defn: ding ding ding!

16:55 alexyk: jweiss: wow cool! how about we'll get a group going and ping you

16:55 defn: ,(conj ["clojure"] "love")

16:55 clojurebot: ["clojure" "love"]

16:56 alexyk: ok so we'll see if we can get a group and ping the locals

16:56 to escape into the wild

16:56 lancepantz: wow, we get in at 5:45

16:57 Raynes: lancepantz: 5:45PM Thursday?

16:57 lancepantz: yeah

16:57 Raynes: What timezone?

16:57 alexyk: lancepantz: not bad, coming from the wrong side and all :)

16:57 lancepantz: nc time

16:58 yeah, i think the car is picking me up at like 7am

16:58 Raynes: lancepantz: I should be there about two hours before you.

17:04 alexyk: ok I think I got a reasonable quorum for a pitcher or two!

17:05 mefesto: alexyk: add me to that list please :)

17:06 alexyk: second pitcher filled!

17:08 how do we check when a nick was last seen here? does clojurebot do that still?

17:08 chouser: ~seen stuarthalloway

17:08 clojurebot: no, I have not seen stuarthalloway

17:08 Raynes: sexpbot has a $seen command.

17:08 $seen stuarthalloway

17:08 sexpbot: stuarthalloway was last seen quitting 721 hours and 10 minutes ago.

17:08 Raynes: Rocked his world.

17:08 chouser: wow

17:09 alexyk: ~(/ 721 24)

17:09 clojurebot: (/ 721 24)

17:09 Raynes: $ (/ 721 24)

17:09 sexpbot: ⟹ 721/24

17:09 chouser: heh

17:09 Raynes: $ (/ 721 24.0)

17:09 sexpbot: ⟹ 30.041666666666668

17:09 Raynes: Also, you're looking for a comma.

17:09 ,3

17:09 clojurebot: 3

17:10 alexyk: wow, nice arrow there sexpbot

17:10 thx Raynes

17:10 Raynes: I <3 my arrow.

17:10 alexyk: $seen somnium

17:10 sexpbot: somnium was last seen quitting 587 hours and 50 minutes ago.

17:10 chouser: ,(print "/me is stoked")

17:10 alexyk: $seen liebke

17:10 sexpbot: liebke was last seen quitting 669 hours and 39 minutes ago.

17:10 clojurebot: /me is stoked

17:10 alexyk: these people, are they taking vacation in September or what?

17:10 Raynes: chouser: I'm stoked to see/meet you in person. :3

17:10 And see your finger trees talk.

17:11 chouser: :-)

17:11 alexyk: the whole program is a feast

17:11 duncanm: i'm starting to use transients, and i have a line of code that used to do (apply conj a b c)

17:11 alexyk: I wish I had a paper JofC to get it signed

17:11 Raynes: Luckily, it's way before cemerick's, so I wont be asleep yet.

17:11 ;)

17:11 duncanm: now 'a' is a transient, and (apply conj! a b c) doesn't work anymore

17:11 joly: I'm hoping for leftovers. Any word on whether we'll get video after the event?

17:11 duncanm: because the signature of conj vs. conj! is slightly different

17:11 Raynes: joly: It's been confirmed that it will ve taped.

17:12 alexyk: they put liebke last and I'll have to head for the airport, what a shame

17:12 chouser: duncanm: a and b are elements, and c is a seq of elements?

17:12 joly: Raynes: sweet! I'll be looking forward to it

17:13 Raynes: alexyk: What? I thought Stuart Halloway's talk was last?

17:13 duncanm: chouser: a is the seq

17:13 Raynes: alexyk: Or are you only staying for the first day?

17:13 alexyk: Raynes: ah right

17:13 Raynes: Well, even that isn't the first.

17:13 alexyk: that's what I meant: shame, shame! :)

17:13 Raynes: s/first/last/

17:13 duncanm: chouser: i switched it to (reduce conj! ....) maybe that's working now

17:13 sexpbot: <Raynes> Well, even that isn't the last.

17:13 alexyk: sexpbot: can you pass the Turing test?

17:13 Raynes: rhickey has a loooooooo...oooong keynote as the last talk of the day on Friday.

17:13 alexyk: Raynes: that's what we're paying for!

17:14 jkkramer: duncanm: are you aware of 'into'? it uses transients under the hood

17:14 alexyk: flights out are idiotic, teh latest I could get was 5:50 pm

17:15 chouser: I'm leaving the next morning

17:15 * jkkramer is driving...12 hours

17:15 cemerick: Raynes: You'll either be amused or irritated; hopefully not snoring :-)

17:15 alexyk: jkkramer: from where?

17:15 jkkramer: rochester, ny

17:15 alexyk: jkkramer: RPI?

17:15 cemerick: that's a brutal drive

17:15 Raynes: cemerick: It's pretty late in the day man, I can't promise anything. ;)

17:15 jkkramer: going to stockpile some books on tape

17:15 cemerick: I drove to Durham once. Not fun.

17:16 Raynes: jkkramer: That would have been my drive if cemerick hadn't raised money to buy me plane tickets. :<

17:16 alexyk: I should have stayed till Sunday too, but the flight is done

17:16 Raynes: Well, I wouldn't have been able to go in the first place...

17:16 jkkramer: alexyk: no...i went to RIT

17:16 Raynes: But still, had I been able to, that would have been my drive.

17:16 alexyk: jkkramer: right, mixing remote parts of NY here :)

17:16 defn: alexyk: sorry im at work doing 3 things

17:17 alexyk: you have my cell # yes?

17:17 Raynes: defn: Did you get my PM?

17:17 alexyk: defn: yep, so I'll call on touchdown ~ 4 pm

17:18 chouser: #clojureconj tweets will likely also work well for organizing last-minute social groupings

17:18 defn: got it buddy, thanks

17:18 alexyk: chouser: yes, my iPad 3G will be catching those

17:19 defn: clojureconj.ataconapp.com is something the shop I work for built for Rails Rumble -- it's a little rough around the edges, but it's handy if you're looking for a schedule and recent #clojureconj tweets

17:19 alexyk: but good old cells are still more reliable I think; we'll see what works best

17:20 U555: is there a conference coming up?

17:20 alexyk: U555: tmrw! http://clojure-conj.org

17:20 * alexyk goes back to typesetting the thesis

17:20 alexyk: s

17:21 * defn is not jealous

17:21 defn: (and yet he is)

17:21 amalloy: Raynes: mutter. sometime this week i'll see if i can get sexpbot to know about days, weeks, etc

17:22 Raynes: amalloy: I was about to mention that to you. ;P

17:22 amalloy: just caught up with the backlog

17:22 (of #clojure messages)

17:22 clizzin: i don't suppose anyone here uses slime and vimpulse together?

17:23 fhd: Is there a function that returns true when the argument is a vector and otherwise false?

17:23 jkkramer: ,vector?

17:23 clojurebot: #<core$vector_QMARK_ clojure.core$vector_QMARK_@18aa6a7>

17:23 chouser: (doc vector?)

17:23 clojurebot: "([x]); Return true if x implements IPersistentVector"

17:23 jkkramer: er, yeah

17:23 fhd: chouser: Thanks!

17:23 chouser: was looking for "isvec" and such :P

17:24 chouser: :-)

17:24 Raynes: -> (doc list?)

17:24 sexpbot: ⟹ "([x]); Returns true if x implements IPersistentList"

17:24 amalloy: ,(vector? (transient []))

17:24 clojurebot: false

17:24 Raynes: map? seq? etc

17:24 The names are consistent.

17:24 amalloy: ,(vector? [])

17:24 clojurebot: true

17:24 jjido: do promises get garbage collected normally if nobody holds reference, even if they are not realised?

17:24 chouser: ,(ifn? {})

17:24 clojurebot: true

17:25 U555: I wasn't aware people so involved with clojure were in this channel

17:25 amalloy: jjido: i'd be surprised if the answer were no

17:25 U555: looking at the conference lineup

17:25 chouser: jjido: should be -- it's just an object

17:26 jjido: ok thanks

17:26 Raynes: U555: That's one of the things I love about Clojure. You don't have to go far to reach the 'team', if you will.

17:26 * jkkramer is embarrassingly excited about the conj

17:27 chouser: jjido: there's CountDownLatch and an atom in there, but I don't know of any reason either of those would break GC

17:27 * technomancy too; goes and changes his pants

17:27 jkkramer: it's hard to resist gushing about it to normals

17:27 * nDuff ponders whether it makes more sense to do a direct Augeas JNA wrapper in clojure, or to lightly wrap the existing Java bindings

17:27 Raynes: technomancy: I have to save all my pants for the plane. :(

17:28 amalloy: Raynes: good thing you're not driving, then. you'd have to spread the same supply over a longer period

17:28 Raynes: amalloy: No, I mean I expect to void myself several times on the planes.

17:28 I've never been on a plane before.

17:28 amalloy: ah

17:28 Raynes: Not so hot on heights.

17:28 alexyk: Raynes: I hope you're older that 7! :)

17:29 errkle: nDuff: different library, same situation. came here to contemplate the matter

17:29 Raynes: alexyk: 4, actually. Mommy says I'm special.

17:29 U555: "it's hard to resist gushing about it to normals" <--- surely you mean muggles

17:30 alexyk: Raynes: tell mommy she did a good job with those Lisp preschools!

17:30 duncanm: how do i force a LazySeq (produced from filter)? isn't doall?

17:30 amalloy: Raynes: my HS physics teacher told me that, while he know how planes worked, he always worried that if he stopped believing mid-flight it would crash

17:30 duncanm: dorun

17:30 alexyk: Bernoulli effect is all you need to repeat, as a mantra

17:31 U555: duncanm why do you want to force it?

17:31 * alexyk wonders if anybody remembers the Bernoulli drives

17:32 turbofail: the bernoulli effect is not what gives an airplane most of its lift

17:32 chouser: alexyk: not sure I ever saw one

17:32 alexyk: turbofail: well it doesn't hurt :)

17:32 amalloy: turbofail: but the real explanation is too complicated. i prefer the bernoulli one

17:32 alexyk: chouser: I got one in 1993, before they renamed it zip drive

17:33 chouser: oh, I didn't know they were the same thing. I think I must have read bernoulli drive ads in Byte or something.

17:33 duncanm: is there a perf difference between sorting a Seq and a Java array?

17:33 alexyk: chouser: thet had a bigger cartridge. I still have one for Mac SE/30, it's SCSI!

17:33 technomancy: wow, zip drives... not quite old enough to be retro-cool, but getting there.

17:33 amalloy: duncanm: not much. sort is a call to Collections/sort

17:34 or maybe i'm thinking of shuffle

17:34 duncanm: hmm

17:34 amalloy: ~source sort

17:34 hiredman: I think my first linux install was on a zipdisk

17:34 alexyk: technomancy: take some Seattle air with you in a jar for nostalgic exiles

17:34 chouser: duncanm: clojure.core/sort will copy whatever you give it into a new array and call Arrays/sort on it

17:35 alexyk: technomancy: or some good coffee :)

17:36 technomancy: I haven't figured out how to make actual Good Coffee myself yet, just to recognize it when I drink it.

17:36 tea is much easier to get right while traveling, as long as you can get water that's hot enough.

17:37 alexyk: technomancy: alas, it can't be reproduced outside ot Seattle :(

17:37 nDuff: alexyk, ...you mean "Italy", right?

17:37 chouser: I have a terrible time getting good tea while travelling

17:37 * nDuff gears up for holy war

17:37 chouser: and my standards are pretty low

17:38 technomancy: chouser: well it still takes some effort, but it helps that the only external dependency is boiling clean water.

17:38 alexyk: nDuff: nope! "Italy" means, gimme 10 euros cause you look American! :)

17:38 chouser: technomancy: oh, I see -- making it yourself.

17:39 * alexyk misses JoeBar in Seattle so much

17:39 amalloy: chouser: yes, as long as the TSA hasn't started banning tea on flights that should be an easy way to make decent tea

17:49 fhd: Yeah, just released another version of Clostache :)

17:49 Anyways, gotta get some sleep too. Bye!

17:51 defn: chouser: i added you as a presenter on clojureconj.ataconapp.com for your presentation.

17:51 jjido: ,(doc deliver)

17:51 clojurebot: "([promise val]); Alpha - subject to change. Delivers the supplied value to the promise, releasing any pending derefs. A subsequent call to deliver on a promise will throw an exception."

17:51 chouser: defn: thanks

17:55 jjido: why does promise come before val? is that more English: (deliver someone val)... Then in Java notation, which would be better? deliver(someone, val) or deliver(val, someone)?

17:56 chouser: someone.deliver(val) ?

17:56 jjido: chouser: no choice here heh

17:56 thanks

18:00 alexyk: defn: Atacon sounds "attaboy"! :) atatcon! good conference! here's a rawhide

18:01 defn: what, reload to get tweets?!

18:04 defn: after signing in with Twitter, tweets update

18:10 ninjudd: tried to do cake install in github checkout, am getting: /opt/portage/usr/lib/ruby/1.8/fileutils.rb:243:in `mkdir': File exists - /home/alexyk/.m2/repository/org/clojure/clojure/1.2.0 (Errno::EEXIST) -- ?

18:11 why would it want to mkdir for clojure??

18:12 ninjudd: that was a bug that has been fixed

18:12 alexyk: ninjudd: I just did a pull right now

18:12 shoul I repull

18:12 ?

18:12 ninjudd: just remove /home/alexyk/.m2/repository/org/clojure/clojure/1.2.0

18:13 i may need to do that automatically in that error case

18:13 alexyk: ninjudd: my valuable clojure is there! promise you'll put it back?

18:13 ninjudd: yes

18:13 alexyk: ok

18:14 hmm it's not even a directory :( rm it

18:16 ninjudd: after rm, cake install finishes fine

18:22 duncanm: hmm, how do i use lein repl?

18:22 i can't figure out how to load my source files

18:23 amalloy: ,(doc load)

18:23 clojurebot: "([& paths]); Loads Clojure code from resources in classpath. A path is interpreted as classpath-relative if it begins with a slash or relative to the root directory for the current namespace otherwise."

18:23 ninjudd: alexyk: thanks. i checked in a change to fix it automatically in the future

18:23 hiredman: uh

18:24 if you have everthing laid out in the proscribed manner in ./src then you can just use require to require your namespaces

18:24 alexyk: ninjudd: cool! I voted for cake in #clojureconj tweet. :)

18:24 amalloy: ninjudd: any plans for a lein-like javac task? i just discovered i can't build cascalog with cake because it uses the lein javac hook

18:25 ninjudd: amalloy: cake supports java compilation out of the box

18:26 amalloy: i tried cake compile and got 40 errors

18:26 ninjudd: alexyk: thanks!

18:27 amalloy: (this after cake deps)

18:27 ninjudd: amalloy: is it because it is trying to hook a non-existent function?

18:27 amalloy: no, they were javac errors

18:28 ninjudd: amalloy: this is building cascalog from the source?

18:28 amalloy: yeah

18:28 fresh github

18:29 lancepantz: amalloy: i'll take a look at it, just a second

18:29 i've been meaning to check out cascalog anyways

18:30 amalloy: it looks like the issue is build path somehow. cake isn't seeing the hadoop jars

18:31 (ie it's invoking javac fine, but seeing the wrong build path)

18:32 lancepantz: amalloy: so you get the exception when you run 'cake compile'?

18:32 amalloy: yeah

18:33 lancepantz: no problems on my box

18:33 amalloy: huh

18:33 duncanm: does a list-comprehension run anything in parallel?

18:34 amalloy: [compile] /home/akm/src/clojure/cascalog/src/jvm/cascalog/MemorySourceTap.java:29: package org.apache.hadoop.fs does not exist

18:34 [compile] import org.apache.hadoop.fs.Path;

18:34 and then a few dozen more just like it

18:35 lancepantz: amalloy: what os?

18:36 amalloy: ubuntu 10.04

18:36 duncanm: i have a bit of code right now that's running slow

18:36 amalloy: duncanm: no, it doesn't

18:36 lancepantz: k, let met try on an ubuntu box

18:36 duncanm: i'm looping thru a list, and basically keeping a gap buffer during the iteration

18:37 i have an entry and some bins and i'm trying to put the entry into one of the bins based on some criteria

18:38 if the entry fits into an existing bin, then i put it in and return a new seq of bins, if it doesn't fit, i add a new bin to the end with the entry

18:38 http://gist.github.com/637492

18:38 amalloy: duncanm: you sound like you're reinventing a medium-size wheel here. is there some reason you need to do the loop by hand?

18:39 duncanm: amalloy: i'm trying not to

18:39 amalloy: i'd just use map if i know that an entry *always* fit into something

18:40 (map f coll) only returns an answer as long as coll, but in this case, there are times when i need it to be coll+1

18:40 amalloy: so you have...a set of predicates you're testing or something?

18:40 duncanm: amalloy: the link above has a snippet of the code

18:41 amalloy: yeah, i just want to be sure i'm reading it right since i don't know what your "trails" are

18:42 duncanm: amalloy: a trail is a seq of entries

18:42 an entry is a PersistentHashMap

18:43 amalloy: lancepantz, ninjudd: could it be i'm using an old version of cake?

18:43 lancepantz: possibly, try doing a cake upgrade

18:45 amalloy: duncanm: perhaps you want update-in

18:45 duncanm: hmmm

18:45 amalloy: maybe...

18:45 lancepantz: amalloy: it just compiled one of our redhat boxes too

18:46 i think we have an ubuntu one too, i'll double check that one

18:46 amalloy: (update-in all-buckets [(get-bucket-for item)] (fnil conj []) item)

18:46 duncanm: fnil?

18:47 amalloy: ,(doc fnil)

18:47 clojurebot: "([f x] [f x y] [f x y z]); Takes a function f, and returns a function that calls f, replacing a nil first argument to f with the supplied value x. Higher arity versions can replace arguments in the second and third positions (y, z). Note that the function f can take any number of arguments, not just the one(s) being nil-patched."

18:47 amalloy: ,(update-in {} [:test] (fnil conj []) :val)

18:47 clojurebot: {:test [:val]}

18:49 amalloy: ,(update-in {:test [10]} [:test] (fnil conj []) :val)

18:49 clojurebot: {:test [10 :val]}

18:49 amalloy: duncanm: that way you can be agnostic about whether a bucket already exists

18:52 lancepantz: i no longer get compiler errors with 0.5.3 but it hangs forever at what looks like some kind of debug output

18:52 lancepantz: that happened to me once

18:52 we've been trying to figure out how that happens, but its very inconsistent

18:52 ctrl-d out then run it again

18:53 amalloy: i get it consistently

18:53 well. apparently not consistently. 3 times in a row, then the fourth worked

18:53 lancepantz: after a cake kill all?

18:54 amalloy: no, just a ctl-c. lemme try that

18:54 yes, still getting it

18:54 lancepantz: built fine on this ubuntu box

18:55 has this happened to you before on other projects?

18:55 amalloy: the debug output has happened before, though i can't remember when. the problem i had with compiling before, no

18:55 lancepantz: yeah, the debug, i think its unrelated to compiling

18:56 amalloy: http://gist.github.com/637522 if you're interested in debug output

18:56 lancepantz: ty

18:57 amalloy: huh. and again, worked on exactly the fourth try. this is interesting

18:57 lancepantz: yeah, i got the same thing that one time

18:57 really

18:57 amalloy: believe it or not

18:57 gonna try from scratch one more time

18:57 damn. first try this time. must have been a coincidence

18:59 lancepantz: it's happening pretty consistently on this redhat box

18:59 duncanm: amalloy: but then i'll need to come up with some form of key

19:02 amalloy: duncanm: uhhhhh...it's pretty easy to use the integers from 0 to infinity as a key if you don't have any meaningful primary identifying feature

19:03 lancepantz: amalloy: let me know if you find any correlations with that debug output

19:04 i've got to get some stuff done before going to nc

19:04 hiredman: technomancy recomends http://github.com/toolmantim/bananajour for conj goers

19:04 duncanm: amalloy: but i need entries that go into the same bin to 'hash' to the same key

19:04 technomancy: yes, it's great for any conf where the wifi may be shaky

19:04 duncanm: the same 'trail'

19:04 technomancy: gotta let the codes flow

19:13 amalloy: duncanm: just make (get-bucket-for-object) take an object and the current map then, if you must

19:26 sdeobald: Out of curiosity, is there a convenience function that anyone's aware of which basically does the opposite of 'bean'? -- construct a zero-arg bean, set a bunch of properties, return that obj.

19:28 amalloy: sdeobald: i'm not sure that would be possible. the class has to be known at compile time, and at compile time it can't know what properties you'll be setting, right?

19:29 sdeobald: Hmm.

19:29 The class needs to be known. It doesn't need to know what setters it's planning on calling, though, does it?

19:30 hiredman: you can use reflection

19:30 amalloy: no. but those setters have to exist

19:30 sdeobald: True.

19:30 hiredman: right

19:31 I'm going to assume that's a no, then. ;)

19:33 alexyk: ninjudd: say I use cake install to create a jar our of a project A, A.jar. I then make it a dependency of a project B. A has src/a.clj. I used to (require 'a) when in A. How do I achieve the same effect in B now?

19:34 hiredman: ~namespaces

19:34 clojurebot: namespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it

19:35 ninjudd: alexyk: just require it the same way

19:36 alexyk: hiredman: right; my A files are all declared in namespace A. I'm a bit confised on teh interplkay of A.jar on the class path with src/a.clj and that declaring (ns 'a)

19:39 raek: jar files work somewhat like additional src/ directories, if that makes any sense

19:41 if foo/bar/baz.clj exists in some jar file (which is, basically, just a zipped directory) or in the src/ directory (or in any other directory/jarfile on the classpath), then you can (require 'foo.bar.baz)

19:44 _rata_: hi clojurians

19:50 alexyk: the problem was naming files with dashes in them

19:52 _rata_: I'm having a difficult time designing a clojure program... I'm trying to implement a CTCM (continuous-time Markov chain) simulator and would like to make it entirely based on immutable data, so each time I call gen-event it returns a copy of the state passed to it with the corresponding changes

19:54 the problem is that the state contains mutually-referencing objects... or at least that's the way I think will make the program run faster

19:57 I can't figure out a way to make the state immutable

19:58 and efficient

19:58 amalloy: _rata_: a recurring subject in #clojure

19:59 you can't get mutally-referring immutable objects (maybe changing with pods?), but you have a couple options

20:00 hiredman: you can via indirect references

20:00 amalloy: you can have a top-level hashmap, which maps type1 objects to type2 objects, and vice versa

20:01 which i think is the same as what hiredman just said, but i'm not sure. care to expand, hiredman?

20:01 _rata_: what's pods?

20:01 *what are

20:02 hiredman: you can keep a ref of objects globaly, and generate your immutable data structure with references into the "global"

20:03 amalloy: RH is working on pods for 1.3 or some future version. i don't really understand them, but they're supposed to magically fix every problem we have

20:03 hiredman: meh

20:03 _rata_: hahahahaha

20:04 amalloy: seriously though, i think the idea is to have well-defined boundaries for mutation of objects, which would probably allow this sort of thing

20:04 cpfr: hey is there an elegant way to pass a list of arguments to a function as a lis

20:05 amalloy: um. pass a list as a list? you just pass it. do you mean, you have N separate items but your function wants a seq, or the reverse of that?

20:05 jjido: How do you wait for two promises in parallel? put one of the waiters in a future?

20:06 ,(doc &)

20:06 clojurebot: Titim gan éirí ort.

20:06 amalloy: jjido: wait for both, or for the first one?

20:06 hiredman: what is the diference between waiting serially and waiting in parallel?

20:07 jjido: cpfr: use (defn myfunc [& args] ....args is now a list...) (myfunc arg1 arg2 arg3)

20:07 hiredman: (answer: none; if you feel there is one feel free to present proof)

20:07 danlarkin: hiredman: parallel is faster, of *course*

20:07 jjido: amalloy: wait for EITHER

20:07 hiredman: PARALLEL AND MUNCTIONAL

20:07 FOR MEN

20:07 jjido: hiredman: not in CPS

20:08 hiredman: there will only be one promise delivered

20:08 cpfr: jjido, is there any simpler way

20:08 hiredman: there is no way to do that without polling in a loop

20:08 cpfr: I didn't define this function

20:09 hiredman: e.g. wait in one promise till a timeout then wait on the other

20:09 jjido: cpfr: your question is not clear

20:09 amalloy: hiredman: can you do it even with a loop? there's no non-blocking deref for promises as far as i know

20:09 hiredman: amalloy: you can simulate one

20:10 pmbauer: ,(doc apply)

20:10 clojurebot: "([f args* argseq]); Applies fn f to the argument list formed by prepending args to argseq."

20:10 pmbauer: @cpfr ?

20:10 jjido: hiredman: I don't see why I need that, my solution looks like it would work: (future (workwithp1 @p1)) (workwithp2 @p2)

20:11 cpfr: pmbauer, jjido allow me to make it more clear

20:11 amalloy: then you leave deadlocked threads scattered all over the jvm, jjido

20:11 cpfr: assume (defn add [x y] (+ x y))

20:11 hiredman: what amalloy said

20:11 jjido: amalloy: should I care?

20:11 hiredman: yes

20:11 cpfr: and assume add is some function i didnt write

20:11 amalloy: jjido: um, yes? they won't get GCed

20:11 hiredman: that is a horrible thing to do

20:11 cpfr: i wish to be able to do (add '(2 3))

20:11 amalloy: ,(apply add [1 2 3 4])

20:11 clojurebot: java.lang.Exception: Unable to resolve symbol: add in this context

20:12 amalloy: ,(apply + [1 2 3 4])

20:12 clojurebot: 10

20:12 cpfr: ,(apply / [10 2])

20:12 pmbauer: yep

20:12 clojurebot: 5

20:12 cpfr: amalloy, well I feel stupid now

20:12 thanks :)

20:12 amalloy: jjido: you could do it your way, if you provided some "special" value that your promises should never return

20:13 jjido: amalloy: hiredman: ok, I see what I need. I will use only one promise and make it a pair (x, y)

20:13 amalloy: yes, i agree that's better

20:14 jjido: or a map {:x p1result, :y p2result}

20:14 amalloy: jjido: your architecture may make this hard, but i like [result, where-it's-from]

20:15 hiredman: a pair is very respectable

20:15 _rata_: amalloy, how are "well-defined boundaries" for mutation of objects?

20:16 amalloy: like i said, i don't know much about pods. he's supposed to be talking about them at the conj this weekend

20:16 hiredman: well one set of boundaries would be a thread

20:20 ivey: Is Colin Jones in here?

20:22 _rata_: mmmm... I don't understand pods yet, but will read about it

20:23 where's going to be the Conj?

20:24 TeXnomancy: ivey: how's the beach? =)

20:25 ivey: TeXnomancy: Nice. Cool breeze, waves lapping on the shore. Barge just went by.

20:25 defn: intense jealousy starting to crop up... must suppress anger...

20:25 ivey: heh, I earned it. Also, sharing a 1.5 bath really old house with inlaws

20:26 so it's a little nuts. I went to pick up takeout and had to go early to wait at the bar.

20:26 moogatronic: had to cause a beer sounded delightful?

20:27 amalloy: _rata_: north carolina

20:27 ivey: had to, because a bourbon sounded damn near essential

20:27 moogatronic: lol. yeah, i try to avoid stays with inlaws when possible, unless there is a damn-nice unrelated outcome potential.

20:28 ivey: It's a free beach house on the water. It's an OK trade-off.

20:31 _rata_: amalloy, do you know if they are making videos of the presentations?

20:36 amalloy: they want to, but last i heard it was up in the air

20:36 Raynes: No, they are.

20:36 amalloy: nice

20:36 Raynes: @clojure_conj confirmed it to me in a tweet a few days ago.

20:36 I assume whoever is behind @clojure_conj would know.

20:36 _rata_: ok, nice

20:37 amalloy: hm. too bad i'm already busy next weekend or i could have my own one-man mini-conj watching them all

20:37 defn: the fact that there arent 3 simultaneous presentations going on at any given time slot makes the video thing a lot easier

20:37 no need for 3 nice video cameras, people to handle A/V stuff, etc.

20:40 _rata_: oh, this problem is very difficult to solve... I want an immutable data structure that you say change x to y and it changes it recursively on every place where there's an x

20:40 amalloy: _rata_: see clojure.walk

20:40 it looks like you might want that

20:40 _rata_: it could be the key or the value of a map or anything into a collection

20:41 amalloy: ~source macroexpand-all

20:41 clojurebot: Gabh mo leithscéal?

20:41 _rata_: amalloy, ok, I'll check it

20:41 amalloy: clojurebot: contrib?

20:41 clojurebot: contrib is http://github.com/richhickey/clojure-contrib/tree/master

20:41 qbg: _rata_: What big O do you want?

20:41 hiredman: ,(doc mexpand-all)

20:41 clojurebot: "clojure.contrib.macro-utils/mexpand-all;[[form]]; Perform a full recursive macro expansion of a form."

20:42 ivey: chouser: finally got my CA done, and posted to the list with that xml code from weeks back. any updated thoughts on where it might belong?

20:43 amalloy: _rata_: http://github.com/clojure/clojure/blob/master/src/clj/clojure/walk.clj

20:43 _rata_: amalloy, but I think clojure.walk will go over the entire collection... not just the places where there could possibly be an x... I need a way to specify where an x could appear

20:43 amalloy: ,(doc tree-seq)

20:43 clojurebot: "([branch? children root]); Returns a lazy sequence of the nodes in a tree, via a depth-first walk. branch? must be a fn of one arg that returns true if passed a node that can have children (but may not). children must be a fn of one arg that returns a sequence of the children. Will only be called on nodes for which branch? returns true. Root is the root node of the tree."

20:43 _rata_: qbg, lineal in the size of the places where x could appear ^

20:44 chouser: ivey: I saw your email, but haven't had the time yet to look at the code or anything

20:44 it may be fine in lazy-xml

20:44 * _rata_ going to eat something... come back in a while

20:44 ivey: kk no hurry. just trying to maximize my free hack time this week

20:44 amalloy: _rata_: you can use clojure.walk with a specialized inner function

20:45 technomancy: ssshhhh... the longer the CA takes to process the more time he has to work on leiningen. =)

20:45 _rata_: amalloy, ok, maybe that's what I'm looking for :)

20:46 ivey: heh

20:49 technomancy: how do you decide whether you're in TeX mode or not?

20:50 technomancy: ivey: TeXnomancy is my alt. nick for when I reconnect and my old connection hasn't dropped yet. better than just adding a dash on the end or some such =)

20:50 alexyk: latex nomancy; bibtex nomancy; ...

20:51 ivey: latexnomancy is for after-hours

20:51 alexyk: indeed

20:57 * defn chuckles

20:57 defn: alexyk: get to bed!

20:58 alexyk: defn: call the hotel or you'll have to walk around it!

20:59 defn: haha

20:59 speaking of which, did you call them?

20:59 alexyk: trying to get warm, eyeing pretty ladies inside drinking martinis

20:59 defn: is that proust?

20:59 alexyk: defn: I delegated it to you! :)

21:00 I'll follow up on your findings

21:00 defn: haha, i dont think they'll take someone's request: "hey uh, i want a key to Alexy's room."

21:00 alexyk: not proust, just me :)

21:00 defn: OK, I'll call them then

21:01 defn: i could try to social engineer it for kicks

21:01 alexyk: defn: you can get into rhickey's room that way too!

21:01 defn: bahaha, im imagining myself with a giant toothy grin, arms spread as if waiting for a hug: HI!!!

21:02 as he walks into his room

21:02 alexyk: as he slowly turns a corner with a Tazer!

21:03 defn: little does he know I packed a /Samurai sword!/

21:03 alexyk: defn: rhickey is the ultimate ninja of this realm, so you'd have no chance

21:03 defn: Conj /this!/

21:03 that's what I'd say...

21:04 alexyk: into /that!/ will be the last thing you'll hear...

21:04 defn: ah, clojure humor...

21:04 the pinnacle of comedy

21:05 the zenith, the apex

21:05 alexyk: the summit of subtlety!

21:05 the culmination of the apogee

21:06 * alexyk walks to the old land-line Cisco phone to call za Hilton

21:06 defn: land-line Cisco phone, you say?

21:06 Is that a land line nowadays?

21:06 alexyk: it has an old voip wire coming out of it

21:06 bulging with packets

21:07 bb

21:07 defn: kk

21:09 alexyk: ok "David," you're all set

21:09 or we hoep so!

21:10 (why is it when people hear Devin, they repeat David?)

21:10 defn: good question

21:11 I get called all sorts of names, usually by older folks

21:11 alexyk: well they don't say Devil at least

21:11 defn: Davin, Dovin, Daven, Dev-on

21:11 alexyk: DEVONThink!

21:11 defn: do you use it?

21:12 alexyk: I have it, but not use it... :(

21:12 defn: it's a neat idea but sort of hard to use

21:12 i used it a long time ago though, it mighe be better on my shiny new MBP

21:12 alexyk: I hoard all kinds of tools for teh Mac... ok back to thesis :)

21:12 defn: alexyk: as long as we're getting to know eachother I think I'll share last night's dream with you:

21:12 I had a dream about minnows -> frogs -> toilet -> scientists + evolutionary biology.

21:13 alexyk: hmm

21:14 as long as the scientists are unharmed

21:14 defn: there were minnows living in toilets that were morphing into new species, i had scientists studying my toilet, so whether they were harmed or not is i suppose debatable

21:15 okay get back to your thesis, i think ive sufficiently embaressed myself for the evening

21:15 thanks for calling the hotel, seeya in ~18 hours

21:15 alexyk: defn: dreams with toilets are quite typical of adolescents fumbling for identity, nothing to be embarrased about! see ya!

21:16 defn: hahaha -- well played

21:23 alexyk: ok #clojure! get ready for teh FIRST EVAR Conj 2010! Go Clojure! over and out

21:26 tomoj: aww shucks

21:26 I didn't know it was so soon

21:27 maravillas: not coming tomoj?

21:30 gary_poster: seems we're on opposing schedules. i just saw your question about groups in the triangle area a couple days ago...wanted to mention that i don't know of a clj user group in the area, but there is http://trifunc.org that meets sporadically

21:30 tomoj: didn't get funded in time

21:30 oh well

21:31 gary_poster: maravillas: still here for a few more seconds :-) thanks, cool!

21:32 maravillas: ah, great :)

22:04 jjido: My future does not get fired http://gist.github.com/637783

22:05 I see the printlns though

22:09 ok must be something in coroutine

22:11 _rata_: amalloy, the problem with clojure.walk is that it calls the inner for every element in the collection, not just where I know they could be inside the hierarchy of objects... hierarchy in the sense of nested data structures

22:12 hiredman: you may want to look at clojure.zip

22:12 amalloy: _rata_: no, it calls inner for every element at the top level. prewalk and postwalk only delve deeper because they include another walk call

22:12 _rata_: ah ok

22:13 amalloy: if your inner function *sometimes* calls walk again, you can control the recursion. though maybe clojure.zip is a better solution; i've never used it and hiredman is a smart guy

22:14 * amalloy looks up clojure.zip

22:16 hiredman: ,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next (zip/replace 5))

22:16 clojurebot: [5 {:changed? true, :l [], :pnodes [(a (b (c d) e) f) (b (c d) e)], :ppath {:l [a], :pnodes [(a (b (c d) e) f)], :ppath nil, :r (f)}, :r ((c d) e)}]

22:16 hiredman: ,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next (zip/replace 5) zip/root)

22:16 clojurebot: (a (5 (c d) e) f)

22:18 amalloy: three nexts? if it's starting from the root and traversing depth-first, i don't understand why it takes three nexts to get to b

22:19 hiredman: ,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/node)

22:19 clojurebot: a

22:19 hiredman: ,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/node)

22:19 clojurebot: (b (c d) e)

22:19 hiredman: ,(-> '(a (b (c d) e) f) zip/seq-zip zip/next zip/next zip/next zip/node)

22:19 clojurebot: b

22:19 amalloy: ah

22:19 thanks

22:36 ,(map (comp vector zip/node) (take-while (complement zip/end?) (iterate zip/next (zip/seq-zip '(a (b (c d)) e)))))

22:36 clojurebot: ([(a (b (c d)) e)] [a] [(b (c d))] [b] [(c d)] [c] [d] [e])

22:38 hiredman: ,(pl (↕map (replicate 3 (↕apply vector $ (↕map range $ 10 inc · inc · inc) call · ⌽* $ 10 · call · (⌽+ -2) map)) shuffle)))))

22:38 clojurebot: ([10 70 30 60 40 80 50 100 20 90] [90 30 100 70 10 50 80 40 20 60] [70 100 50 10 60 80 40 90 30 20])

22:39 amalloy: hiredman: wow, some kind of character-encoding issue there. half of your message looks like gibberish to me

22:40 hiredman: I recommend you remedy the character encoding issue immediately. you're not ircing if you're not in unicode

22:42 danlarkin: hiredman: the RFC might have something to say about that!

22:42 Derander: hiredman: what does ⌽ and ↕ mean in that code?

22:42 what do*

22:43 hiredman: clojurebot: transformr?

22:43 clojurebot: transforml?

22:43 clojurebot: ping?

22:43 clojurebot: PONG!

22:44 hiredman: clojurebot: transform

22:44 clojurebot: transform is http://github.com/hiredman/odds-and-ends/blob/8a84e6ddbad9d71f714ba16c3e1239633228a7eb/functional.clj

22:44 hiredman: pl is a code rewriting macro

22:45 Derander: oh interesting

22:47 hiredman: ,(pl (λ.x (in x) 1))

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

22:47 hiredman: ,(pl (λ.x (inc x) 1))

22:47 clojurebot: java.lang.ClassFormatError: Illegal field name "." in class sandbox$eval4689$fn__4690

22:47 hiredman: ,(pl (λx (inc x) 1))

22:47 clojurebot: 2

22:48 dnolen: fun

22:48 amalloy: oh. so those silly symbols are all supposed to be there? not an encoding issue after all, then :P

22:49 dnolen: amalloy: λ <- silly symbol?! blasphemer

22:49 amalloy: the first one didn't have any lambdas :P

22:49 dnolen: ;)

22:50 amalloy: if i'd seen a lambda i would have immediately assumed hiredman was up to some kind of tricks

22:52 hiredman: danlarkin: all rfcs that mention other encodings shall be embraced and extended

22:53 danlarkin: :'(

23:26 _rata_: buuu http://confreaks.net/videos/127-elcamp2010-clojure

23:28 arrummzen: Is "Macro Expansion Time" during compile time or during runtime?

23:28 (Is it more like macro expansion in C or lazy evaluation in Haskell?) =)

23:29 hiredman: right before compile time (the expansion actually happens as the first step in the compiler)

23:29 arrummzen: Thanks =)

Logging service provided by n01se.net