#clojure logs

2008-04-14

11:20Chouserwould it be unacceptible for < and > to use Comparator interface, so they would work on non-numbers?
11:31rhickeyI don't think so, but might be ok to have some sort of compare function that worked on both numbers and Comparables. < and > might at some point be inlined.
11:32Chouserok. Perhaps (lt) and (gt) that use .compareTo ?
11:33rhickeysomething like that
11:33Chouserok
11:34MarkJPlet's say I have a function: (defn my-eval [x] (eval x)), How would I call that from java with RT.var(..).Invoke()
11:34MarkJP?
11:34MarkJPI guess the question is, what would I pass into invoke
11:34MarkJP?
11:35rhickeywhat do you want to eval?
11:35MarkJPI tried passing back the Object I get back from LispReader like so: clojure.lang.LispReader.read(new PushbackReader(new StringReader("'(+ 1 2 3)")),
11:35MarkJP false, new Object(), false)
11:36MarkJP'(+ 1 2 3)
11:36rhickeythat should eval to 6
12:27drewrre lisppaste8!
12:35kpreiddrewr: all set?
12:35drewrkpreid: Yup, thanks!
12:35drewrlisppaste8: url
12:35lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
12:36lisppaste8drewr pasted "test" at http://paste.lisp.org/display/59111
12:38rhickeycool
12:39Chouserdrewr: does that log the IRC conversation as well?
12:39drewrChouser: No. :-/
12:40Chouserok
17:56vincenzHi
18:11Chouservincenz: ni!
18:11Chouserer, hi!
18:21vincenzthe knights of ni?
18:24vincenzclojure that is
18:53vincenzDoes the designer of clojure come in here at times?
19:20rhickeyI'm here now
22:10frodwithtrying to get used to the arrow notation, not sure if I quite grasp it yet. Is there an -> way to write (new PushbackReader (new InputStreamReader (. client (getInputStream))))?
22:44Chousernope
22:45Chouser-> syntax is good for patterns like: (a (b (c (d)))), which becomes: (-> a b c d)
22:47Chouserthe deep nesting has to be on the first argument. In your example it's the second arg that's nesting.
22:49ChouserI do have a macro that would let you do: (>>_ (getInputStream) (new InputStreamReader _) (new PushbackReader _))
22:51Chouseroops, I mean: (>>_ (getInputStream) (. client _) (new InputStreamReader _) (new PushbackReader _))
22:58Chouser(defmacro >>_ [& exprs] (list 'let (apply vector (mapcat #(list '_ %) exprs)) '_ ))
23:07frodwithhmm, thanks Chouser.
23:12landonfHowdy
23:32Chouserhi