#clojure log - Dec 02 2008

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

0:00 mememe: Hello... Anyone using clojure in "real world"?

0:03 hiredman: clojurebot: the real world is <reply> wow #who, is that show even on the air anymore?

0:03 clojurebot: 'Sea, mhuise.

0:05 danlei: clojurebot reality is an illusion which arises due to a lack of drugs

0:05 clojurebot: reality is an illusion which arises due to a lack of drugs

0:05 clojurebot: Alles klar

0:13 jeremy____: Here's an easy question: Why does (bigdec 5) result in an exception, but (bigdec 5.0) works?

0:16 If I run (class 5), I get "java.lang.Integer", so I think I see why (bigdec 5) fails, since (bigdec x) appears to call BigDecimal.valueOf()

0:18 BigDecimal has a constructor which takes an int. Would it make sense to modify (bigdec x) to handle this case?

1:29 mibu: anyone using clojure-mode with the latest SVN head?

1:45 danlei: has someone already ported (or started) cl's format?

1:46 i'm thinking of doing it, but 1. i want to eschew double efforts, and 2. to be honest, i'm not sure if i would be able to do it properly

1:48 lvijay: daniel: do you have any real reason to do it -- besides fun itself, of course. because clojure has format which uses Java's java.text.Format

1:48 (doc format)

1:48 clojurebot: Formats a string using java.lang.String.format, see java.util.Formatter for format string syntax; arglists ([fmt & args])

1:48 danlei: well, i'll just paste my first attempt, it can do basic things like (fmt :p "~a" 'hello) and (format "~{~a~^, ~} [1 2 3 4]) any tips or critique are apprechiated

1:48 livijay yes, but i somehow miss format =)

1:49 lvijay: :-)

1:49 does it do the same for (format "~{A~^,~}" (range 10)) ?

1:50 danlei: just try it, it's maybe a horrible mess, i'm not a professional programmer

1:50 just a sec

1:50 lisppaste8: danlei pasted "format for clojure" at http://paste.lisp.org/display/71379

1:51 danlei: i included a few functions, macros from my tools, it's shorter actually ...

1:51 and sorry, it's not commented right now, i'll do that

2:02 i'm not sure, if the (fmt :p ..., (fmt :s thing is a good idea, maybe it should just return a string everytime

2:05 any tips on the code itself?

2:26 (fmt :p "~{~a~^, ~}.~%" (range 10 20)) works

2:29 but i'm afraid, the ~( directive won't be that easy

2:30 s/(/[/

2:51 Lau_of_DK: Good morning all

3:03 replaca: whois danlei

3:03 danlei: still there?

3:24 danlei: yes, i'm here

3:49 replaca: oops, I wandered away

3:49 danlei: still there :-)

3:50 ?

3:50 I've also been working on a CL-style format

3:51 look at http://github.com/tomfaulhaber/cl-format

3:54 danlei: replaca: ah, interesting. i'll have a look at it, thanks

4:04 replaca: nice, looks "cleaner" than my shot at it

4:11 replaca: you're trying to make it conform to the spec, right? in my version, i wanted a means for the user to define new directives in his own code via defdir. the directives are case sensitive in my version, so there's a bunch of chars left for own extensions.

4:12 replaca: are you working on a pretty-printer too?

4:36 Chousuke: CL format strings are scary.

4:37 danlei: but nice to have :)

4:37 Lau_of_DK: Chousuke: I miss -R

4:37 Chousuke: the format utility is also insanely powerful, yes.

4:38 danlei: i hope i'll get a working ~[ today ...

4:58 danlei`: hm ... how would one test, if the output goes to a fresh line?

4:59 Lau_of_DK: huh?

4:59 danlei`: well, i want to test, if something i will print is going to be on a fresh line

5:00 (for implementing ~&)

5:01 or is there something like ~& in javas format

5:06 Lau_of_DK: Beats me

5:11 lvijay: daniel`: afaik there isn't

5:13 danlei`: hm ... ok. i just asked in #java

5:13 Lau_of_DK: danlei`: have you looked at something like JCurses ?

5:14 danlei`: Lau_of_DK: i thought about something like that, too, but i'm not sure if i want the overhead

5:15 thanks anyways

5:16 Lau_of_DK: No probs :)=

6:15 AWizzArd: Moin moin

6:19 Chousuke: hm

6:19 the clojure website renders weirdly in IE6 :/

6:19 * Chousuke is unfortunately forced to use that browser now.

7:21 AWizzArd: Mornin' rhickey. I have a question: should one in principle be able to replace a specific .class file that was originally compiled with javac with one (or more) that were compiled from Clojure? When I put the clojure.jar on the -cp of the original application.

7:22 lvijay: this seems more like a java question than a clojure question. can you elaborate?

7:23 rhickey: AWizzArd: depends on the original class file. If you implement the same interfaces and hive it the same name, it should be the same as any other Java class. That said, you can't do everything in gen-class that you can in Java

7:23 AWizzArd: I think it's a clojure question.. As far as I understand it, I should be able to plug my clojure code (when compiled) into any existing java project.

7:24 rhickey: yes, I mean when I have the original.java source code and want to basically do the very same thing.

7:25 Do you have an example of what a java class can do and what isn't an option (yet) in Clojure?

7:25 rhickey: AWizzArd: you can't declare fields, access specifiers, exception types, annotations...

7:33 lvijay: rhickey: what is your opinion of allowing multiple exceptions in a catch phrase? (try ... (catch [RuntimeException Exception] (prn e)))

7:34 rhickey: lvijay: personally I'm not a big fan of catching exceptions by type, so it's not a priority

7:34 lvijay: ok

7:35 so is your typical advice is to just catch Exception? just curious, any reason why?

7:37 rhickey: lvijay: many

7:37 jeremy____: Here's an easy question I posted late last night, but I think everyone was asleep by then: When I run (bigdec 5), I get an exception, but (bigdec 5.0) works fine. If I run (class 5), I get "java.lang.Integer", so I think I see why (bigdec 5) fails, since (bigdec x) appears to call BigDecimal.valueOf(). BigDecimal has a constructor which takes an int. Would it make sense to modify (bigdec x) to handle this case?

7:37 rhickey: :)

7:38 it's complicated, and would take a while to explain, but Java's treatment of exceptions in signatures is suspect, and it forces a proliferation of exception types, a certain type of exception being thrown isn't necessarily connected to the cause you expected etc

7:40 lvijay: that is certainly true. I've had to run around the same thanks to java's different handling of checked and unchecked exceptions -- catch a checked exception and throw a runtime expception because the method's signature doesn't allow it and so on

7:43 rhickey: I think exceptions should just communicate: I couldn't do what you asked. If you want a conversation between the location of the problem and some higher-level logic you can dynamically bind funcitons

7:47 jeremy____: the reason it doesn't use the ctor is this:

7:47 (BigDecimal. 0.1)

7:47 0.1000000000000000055511151231257827021181583404541015625M

7:47 lvijay: ok. i'm sort of convinced. do you have any example code that establishes such a conversation? i agree with you about the conversational function that exceptions should play but i'm just trying to wrap my head around the same

7:48 jeremy____: rhickey: ah ok thanks

7:48 rhickey: jeremy____: so supporting int would mean a conditional, could do

7:49 lvijay: *wrap my head around what such an implementation would look like

7:51 rhickey: jeremy____: but it's a subcase of the more general 'should ints promote to longs?' question

8:44 AWizzArd: Btw, in Java there are exceptions I think that we have to catch, otherwise the program won't compile. If that is true, what happens in such cases with Clojure?

8:44 lvijay: clojure treats all excpetions as optional

9:01 rhickey: jeremy___: bigdec/bigint enhanced - prefer valueOf, but doing coercions amd supporting all single-arg ctors, including from String

9:01 svn 1135

9:06 AWizzArd: What is amd supporting?

9:07 oh ok

9:07 rhickey: a typo

9:07 Lau_of_DK: s/amd/and

9:07 AWizzArd: I just read something about amd processors.. so ;-)

9:17 jeremy___: rhickey: wow thanks!

9:34 RSchulz: Mornin' Folks. I need clarification on (proxy ...)

9:35 If I proxy an interface, I'm allowed to supply an incomplete implementation and the omitted methods will be supplied automatically, each with a function that throws USOE?

9:35 rsynnott: AWizzArd: the mandatory compile-time enforced exception handling in Java is a bit of an oddity

9:35 rhickey: RSchulz: yes

9:35 rsynnott: I don't think I've seen it elsewhere

9:35 RSchulz: Great. Laziness is a virtue...

9:36 rsynnott: *exceptions

9:38 RSchulz: rhickey: http://clojure.org/java_interop still mentions gen-and-load-class and gen-and-save-class. They're now defunct, right?

9:39 rhickey: RSchulz: right

9:39 RSchulz: OK

9:39 rhickey: doc will get revisited in release prep

9:48 RSchulz: rhickey: Are you aware of ACL2?

9:48 rhickey: RSchulz: I know of it, but never used it

9:49 RSchulz: Clojure would seem eminently amenable to what it does: Prove properties of programs. You latest post to the group reminded me of it.

9:49 The ACL part of the name is Applicative Common Lisp

9:49 The 2 refers to the theorem-proving superstructure added to it.

9:50 AWizzArd: rsynnott: I see. Well, I heared that it exists, and that many programmers "cheat" by providing empty handlers :-)

9:51 rhickey: RSchulz: I really should spend some time with it at some point

9:52 RSchulz: ACL2 is used and actively developed. They gave a paper at a workshop at the FLoC in Seattle in 2006.

9:52 Since it's CL-oriented, it would be a lot of work to port, but the concepts would surely be applicable.

9:53 And I have a pretty mature first-order theorem prover written in put Java...

9:53 "in _pure_ Java." (put?)

9:58 drewolson: hey all, i've been reading up on AOT compiling and i think i understand it to some extend. my question is this: if i want to release clojure code as a jar that can simply be run using "java -jar foo.jar" can i do it?

9:58 i'm thinking i'd use AOT compiling and add a default class to the manifest of the jar with a main- fn, correct?

10:00 Chousuke: I think you'd specify the namespace as the class in the manifest, and if that namespace has a main- then the jar will run that

10:01 drewolson: Chousuke: ah, gotcha

10:01 and i need to include the (:gen_class) in the namespace declaration?

10:01 Chousuke: hm

10:01 I don't know

10:01 you could check how clojure does it.

10:02 the jar has a main function now.

10:03 ah, clojure seems to use gen-class

10:04 drewolson: the docs say that the dash comes first, ie (defn -main ...)

10:04 i'm assuming this is correct

10:05 rhickey: drewolson: you've read: http://clojure.org/compilation ?

10:07 drewolson: rhickey: reading it now

10:29 so i've compiled my code and i can run it just fine with: java -cp /path/to/clojure.jar:classes org.drewolson.foo

10:30 if i wanted to place this into a jar, should i include clojure.jar within the jar as well? i doesn't seem to be able to find clojure if run something like

10:30 java -cp /path/to/clojure.jar -jar foo.jar

10:30 once the jar is created

10:30 rhickey: drewolson: -jar disables -cp

10:30 drewolson: ah, thanks :) need to learn more java

10:31 Chouser_: I don't know if it's the "right way", but I've had success unpacking the clojure.jar into my classes dir, and jar'ing up all of it together.

10:31 drewolson: Chouser: gotcha. let me give that a shot

10:31 rhickey: Chouser: that works

10:32 Chouser: I was wondering last night if watchers could have made your agent-based solution more declarative

10:32 RSchulz: rhickey: Are there any licensing implications or concerns on your part with that sort of "re-packaging" of Clojure? I know it's forbidden (and technologically precluded, if I understand correctly) for Sun's Java itself.

10:33 Chouser: Here's what I've got -- spoiler warning, this is a solution to a Project Euler problem: http://n01se.net/paste/BK1

10:33 rhickey: RSchulz: you just have to comply with CPL

10:33 walters: RSchulz: and not for OpenJDK for the JVM itself

10:34 drewolson: Chouser: if i place clojure.jar at the root of my jar file, should it be available in the classpath? or do i need to unpack it

10:34 Chouser: So watchers ... yes, that might work, but I'd have to think through the termination case.

10:35 RSchulz: But rt.jar is sealed, right? You can't recombine it and get a working JVM, right?

10:35 Chouser: drewolson: I'm really not that Java savvy yet, but I think you'd have to add the clojure.jar to your manifest classpath. or something.

10:35 drewolson: Chouser: ah yep, that's the ticket

10:35 RSchulz: I believe Chouser is right.

10:35 AWizzArd: As long I don't write into the clojure.jar but always use it exclusively for reading (= writing Clojure programs), then I can do anything I want with it, including writing commercial software. And inside that I can deliver the clojure.jar, right?

10:36 walters: RSchulz: legally? or technically? i don't see any barriers to either with openjdk; whether extending rt.jar is a good idea, i'm less certain

10:36 rhickey: RSchulz: I'm not speaking for Java, just Clojure

10:36 RSchulz: rhickey: Of course. I was just wondering if there were any comparable issues for Clojure. I didn't figure there were, but it is yours.

10:37 Chouser: so there's some kind of bug in my algorithm in agent-83 -- it gets the right answer sometimes, but not other times. I'd want to solve that first before trying watchers or pmap.

10:37 RSchulz: walters: I believe technically if you unpack rt.jar and rebuild it, it won't work as a source for all the classes it would ordinarily supply.

10:37 walters: I was under the impression that it was ensured cryptographically, but I'm not really sure about that.

10:39 AWizzArd: Was it right what I said about Clojures use in commercial products?

10:42 RSchulz: AWizzArd: Rich should weigh in, but if push comes to shove, it's the CPL (and a court, I suppose) that rules.

10:43 rhickey: AWizzArd: the CPL is specifically intended to allow commercial use

10:45 AWizzArd: Yes.. I am just unsure because I read above something that RSchulz talked about repackaging clojure. So, if I put it into my .jar file that I deliver to clients I would do something with the .jar, although I didn't touch its contents.

10:45 RSchulz: I was only asking! I didn't mean to imply anything.

10:45 AWizzArd: yes

10:46 Now I am curious as well

10:46 danlei: i'd like to know that, too (including of extracted clojure jar in ones jars)

10:46 rhickey: http://www.opensource.org/licenses/cpl1.0.php

10:46 rsynnott: it's a pretty liberal license (CPL)

10:46 AWizzArd: I understand it so far, that I am allowed to put the clojure.jar everywhere where I want, so, also into my own files.

10:46 gnuvince: rhickey: what are your thoughts on Clojure's standard library? Do you see something very complete like Python or Factor or something minimal?

10:46 AWizzArd: into my own apps

10:46 rsynnott: more or less with-attribution BSD with some patent-y paranoia added in :)

10:47 danlei: but isn't unpacking the jar for inclusion modification?

10:47 ianal

10:47 drewolson: interesting enough, it seems that adding clojure.jar to the Mainfest Class-Path only works if clojure.jar is in the dir where the jar is sitting, not within the jar itself

10:47 rsynnott: danlei: AAUI, CPL allows modification without distribution of source

10:47 rhickey: rsynnott: CPL is reciprocal for derivative works, not like BSD

10:48 rsynnott: ah, so it is

10:48 a little more restrictive, then

10:50 Chousuke: to me it seems clojure-contrib is becoming a kind of "standard library" for clojure.

10:51 rhickey: some of contrib will come with clojure

10:51 gnuvince: rhickey: you don't see contrib coming with Clojure?

10:51 danlarkin: I, for one, hope there will be tighter coupling between contrib and clojure proper in the future

10:52 Chouser: rhickey: I think watchers don't really help. They replace some imperative code in the action with some imperative code to set up the watchers.

10:52 rhickey: Chouser: but separate the two, no?

10:52 Chouser: yes

10:52 rhickey: that's worth something

10:53 Chousuke: I like the way that the "core" clojure is reasonably small

10:56 gnuvince: Chousuke: I like it too, but I'd rather be able to require useful libs without having to download a third party tarball

10:56 Chouser: hm, splitting out the imperative part may have led me to find my bug...

10:57 rhickey: Chouser: nice

11:01 dabd: hi all, some time ago I asked if the video from the semantic web meeting will be available. Any news?

11:02 Chouser: will sends from the action wait until watchers are complete?

11:02 AWizzArd: Apropos splitting.. is there some "explode" function in Clojure/contrib that let's me split collections at specific elements? Yes filter.. but: (filter #(not= % " ") "Hello World") ==> a sequence that destructed my string into single chars. For non string colls it works however.

11:03 rhickey: dabd: I don't think it will - the meeting was organized in a way that makes it difficult to produce a coherent video

11:04 AWizzArd: (explode " " "Hello moon") ==> ["Hello" "moon"] or (explode 4 [1 2 4 1 2 4 5]) = [1 2 1 2 5]

11:04 rhickey: Chouser: right now the watchers are synced with state update and run on action thread - I may revisit that

11:04 dabd: rhickey: ok. thx

11:04 Chouser: AWizzArd: (.split "Hello World" " ")

11:05 AWizzArd: yes, for strings this is nice and what I like

11:05 Chouser: AWizzArd: those two examples seem very different to me (string vs. vector)

11:05 You're sure you don't want ([1 2] [1 2] [5]) for your second example?

11:05 gnuvince: They'd be similar if your first example was (explode \space "Hello moon")

11:06 AWizzArd: Chouser: what you suggested is what I wanted, right

11:07 like http://www.zvon.org/other/haskell/Outputprelude/splitAt_f.html which also works for strings similar to .split

11:10 Chouser: btw, when I do (.split "Hello moon") ==> IllegalArgumentException: No matching field found: split for class java.lang.String

11:10 nevermind

11:11 Chouser: I'm not seeing anything like String's .split for seqs.

11:11 AWizzArd: right

11:11 danlarkin: isn't there partition-at or something?

11:12 AWizzArd: nope

11:12 danlarkin: I seem to remember a question like this from a few weeks ago

11:12 AWizzArd: and Clojures partition is not exactly like Haskells group

11:12 Chouser: there's clojure.contrib.seq-utils/partition-by but it's not quite right here.

11:15 replaca: danlei: good morning, saw your messages from last night (my time)

11:16 danlei: yes, my goal is to make my format it spec conformant

11:16 also fast (relatively speaking)

11:19 danlei: replaca: very nice, it was very interesting to see how you do it, after trying myself

11:20 replaca: do you have an idea about implementing ~&?

11:20 RSchulz: I was just trying to call the "quote" method in java.util.regex.Patter and couldn't get it to work.

11:20 Eventually it sunk in that it was because "quote" is a special form in Clojure.

11:20 Is there a way to call such Java methods?

11:20 replaca: danlei: yeah, create a wrapper stream that keeps track of column position

11:21 for efficiency, I'd like to analyze the compiled format to decide if I needed it

11:21 danlei: replaca: ah, i understand

11:22 replaca: I'd also like to make mine extensible, but not by case distinction

11:22 since I want "original" formats in ported code to "just work"

11:23 danlei: well, mine was just a quick hack, compared to yours. looks pretty neat, as far as i can tell

11:23 i'm glad that someone tackles it

11:23 lisppaste8: Chouser pasted "cut (for AWizzArd)" at http://paste.lisp.org/display/71413

11:23 AWizzArd: in (.split string "\\s") the regex is "\\s". I remember there was a discussion going on about "\s" vs "\\s"?

11:23 replaca: yeah, it's complicated to deal with all the cases, but that's part of the fun

11:24 danlei: =)

11:24 replaca: I've finally got myself to the point where I'm set up to do all the brackets

11:24 danlei: i'll go on working on my version, but i'm not going to try to make it conformant

11:24 Chouser: AWizzArd: yes, unfortunately split takes a String, not a Pattern, so you still have to do Java-like extra escaping.

11:24 AWizzArd: Chouser: yeah cool, that looks gread

11:24 oki, but no problem for me

11:24 although in contrib there is also a split function for strings no? Let me see...

11:24 danlei: are you already working on a pretty printer?

11:25 replaca: danlei: cool, I'm interested to see what you discover

11:25 Chouser: AWizzArd: you might choose to use re-split so you can use #""

11:25 AWizzArd: yes

11:25 danlei: replaca: for me, it's also kind of an exercise, not being a pro programmer

11:25 replaca: I'll keep pushing updates to github, so you can see what I'm doing

11:25 danlei: replaca: i'll definetely will

11:26 replaca: danlei: for me it's kind of an exercise, being a programmer :-) but also an attempt to make something useful that some people seem interested in

11:27 Chouser: RSchulz: works for me: (java.util.regex.Pattern/quote "asdf")

11:27 danlei: do you have any tips for my version? (anything looking "awful")

11:27 RSchulz: Chouser: But that's a single symbol, right?

11:27 drewolson: has anyone used rake/buildr for building clojure project (aot compiling, jars, etc) or is everyone using ant?

11:28 RSchulz: I tried (.quote #"\bfoo\b") and variations as was always rebuffed.

11:28 AWizzArd: Chouser: funny: (re-split ...) seems to be even more efficient than (.split ..)

11:28 Chouser: RSchulz: quote is a static method of Pattern, not an instance method.

11:28 RSchulz: D'Oh!

11:29 But it is true that java.util.regex.Pattern/quote is a single symbol, completely distinct from "quote".

11:30 Chouser: RSchulz: I think so. It's a little vague for me, since quote is a special form and therefore doesn't participate in namespace resolution in the "normal" way.

11:31 replaca: danlei: not particularly, at a quick read it looks pretty reasonable

11:31 danlei: I like using the multimethods to get extensibility

11:32 Chouser: RSchulz: yes, I guess so -- it seems that quote is only recognized as the builtin when it's using a nil namespace

11:32 RSchulz: (eval (list (symbol nil "quote") 5)) ==> 5

11:32 danlei: replaca: thanks

11:32 RSchulz: Chouser: That appears to be the case.

11:32 danlei: replaca: i'll let you knew if there is something new

11:32 Chouser: but replace 'nil' with anything else and it tries to look up a var

11:33 danlei: replaca: (and have an eye on your efforts)

11:33 achim_p: hi all

11:33 RSchulz: Chouser: You know your nick shares a lot of leading characters with Chousuke...

11:33 replaca: danlei: cool. My only note would be that outputing streams 1 char at a time would be slow

11:33 achim_p: is there a specific reason why a multimethod can't be called "bytes"?

11:33 Chouser: RSchulz: yes. I would apologize, but I was here first. ;-)

11:33 achim_p: lisppaste8: url

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

11:33 replaca: but I don't know how slow

11:34 RSchulz: Well, that answers that question.

11:34 (about lisppaste8)

11:34 cemerick: surprising to me -- is this specified by the IEEE float/double spec or something? (== 1 (- (float 1) Float/MIN_VALUE)) => true

11:34 danlei: replaca: yes, you're right. actually i also thought about it but then, i'm just trying to make it work, atm

11:34 lisppaste8: achim_p pasted "bytes" at http://paste.lisp.org/display/71414

11:34 AWizzArd: Moin achim_p

11:35 RSchulz: cemerick: It seems reasonable to me. MIN_VALUE has much to low a scale to change 1 when subtracted from it.

11:35 user=> Float/MIN_VALUE

11:35 1.4E-45

11:35 replaca: danlei: :-)

11:36 RSchulz: And 1 being equal to (float 1) happens because one is perfectly representable even in floating point.

11:36 Chouser: achim_p: nice one!

11:36 cemerick: RSchulz: yeah, but this is true as well: (== 1 (- (double 1) Float/MIN_VALUE))

11:37 RSchulz: Same deal. Doubles dont' have enough mantisaa to distinguish 1 and 1e-45.

11:37 It takes more than three bits for each decimal order of magnitude.

11:37 Chouser: achim_p: it seems you can use (defmethod user/bytes ...)

11:37 cemerick: my problem is I haven't the foggiest notion of how numerics are implemented at the ground floor :-)

11:38 RSchulz: Well, it's mostly in hardware, anyway...

11:42 achim_p: Chouser: thanks, that'll do for now. so you also think it's a bug? i wasn't entirely sure ...

11:44 Chouser: achim_p: I'm not sure either. Can't #^bytes be used as a type hint for an array of primitive bytes? I wonder if it's an incorrect iteraction with that feature.

11:45 rhickey: achim_p: bug, fixing now

11:46 achim_p: rhickey: cool, thanks!

12:06 cemerick: RSchulz: so (sorry to pick on you, but you seem to have an idea about what's what in this dept.) -- if I wanted to reliably "decrement" a float (such that the result would be the smallest legally-representable increment below a given float argument), would this do the trick?

12:06 (defn decfloat [#^Float f]

12:06 (Float/intBitsToFloat (dec (Float/floatToIntBits f))))

12:07 it seems to work, but I'm definitely in unfamiliar territory

12:08 rhickey: achim_p: fixed

12:08 svn 1137

12:09 Hun: you could just increment/decrement the mantissa bits. be aware of overflow.

12:09 cemerick: actually, I'd need to use (if (pos? f) dec inc) instead of just dec

12:10 RSchulz: cemerick: I'm surely not an expert and I'd have to think about that. However, I think you should consider carefully what you're trying to do, since the notion of a "smallest increment" of something that is an approximation of a real number is surely not well defined.

12:11 For one thing, that value will change with the exponent of the float, it would be sort of like a logarithmic / exponential progression of increments.

12:11 Hun: as long as you're just manipulating the mantissa, it's pretty close to integer handling

12:11 RSchulz: You can treat the mantissa like an integer, sure, but the point is that what a floating-point number represents (a real) is not meaningfully treated in this manner.

12:11 Hun: true.

12:12 RSchulz: cemerick: What is it you're actually trying to accomplish?

12:15 cemerick: RSchulz: I have a body of code that treats certain values as members of sets based on membership within an interval. i.e. given a "query" of 5, it would return intervals of [0 5], [1 6], etc. I'd like to be able to accept an arbitrary "query" value (say, 5), and increment or decrement it so as to exclude candidate intervals whose edges are equal to the query value. Thus, 5 => 5.0000001 or 4.9999999, and the results exclude [0 5] or [5 10], respectively

12:15 achim_p: rhickey: works perfectly, thanks!

12:16 cemerick: precision is entirely unnecessary, which is why I'm generally willing to be sloppy with the math (up to a point)

12:16 RSchulz: So you're trying to implement full-blown interval arithmetic?

12:16 Hun: cemerick: this distinction is pretty hard in floats. i wouldn't try it.

12:16 RSchulz: Have you looked for any existing Java libraries you could use or wrap?

12:16 Interval math is not trivial, as I understand it.

12:17 cemerick: RSchulz: No, by no means full-blown anything :-)

12:18 Hun: You'll have to excuse my math-oriented ignorance.

12:18 RSchulz: Well, I don't think you should be playing around with increments like that. Are you familiar with the distinction between open and closed interval endpoints?

12:19 It seems to me you only need to distinguish whether to use a < or > test vs. a <= or >= test at the respective endpoint.

12:19 And keep in mind that if you do this right, your code should work with all of Clojure's numeric forms, including rationals.

12:19 Hun: i would represent intervals as small objects, like ((1 . inclusive) . (2 . exclusive))

12:19 cemerick: RSchulz: Sure. I'm not in a position to implement open and closed intervals at this point, though. FWIW, the data are actually n-dimensional regions, not 1-d intervals, which makes the semantics of the implementation a little trickier.

12:19 Hun: and implement basic math en it

12:20 RSchulz: I agree with Hun. Represent your domain minimally, but not less than minimally.

12:20 It seems that that n-dimensional case is not fundamentally different, you just have a pair of bounds in each dimension instead of assuming just one (pair of bounds)

12:21 Hun: there's a nice chapter in SICP in which they implement a numeric tower... it's not exactly what you need, but i think the reduction step they use is applicable for your problem

12:21 cemerick: RSchulz: No, not fundamentally different. However, there's an existing codebase that I'm really not in the mood to significantly refactor.

12:21 RSchulz: Hun: is that in the 1st ed? I never "upgraded." And it's been a long time since I've cracked it open.

12:21 Hun: i only have the second edition here, so i only know it from there

12:22 RSchulz: kotarak: How's the tags generator coming?

12:22 Hun: it's fully available on the intarwebs for free

12:22 kotarak: working on it at the moment.

12:22 Noticed some stupid issues.

12:22 RSchulz: Hun: Ah. I didn't know that. Thanks for the tip.

12:22 cemerick: Hun, RSchulz: Is the bit-oriented decrement operation I pasted a bad idea because of likely precision/correctness issues, or is there a more fundamental problem with it?

12:22 kotarak: I shouldn't release software at half past midnight. :/

12:23 Hun: oh

12:23 sicp section 2.14

12:23 interval arithmetic

12:23 sounds exactly like what you need

12:23 RSchulz: I think it will (outside of boundary conditions at the extreme of the FP range) do what you want. But again, I'm not really an expert. I just play one on IRC.

12:23 Hun: cemerick: the problem is that the mantissa may over/underflow

12:23 and then Bad Things happen, unless you add a lot of careful code around

12:24 cemerick: Hun: which is only a problem when the base value is close to Float/MIN or Float/MAX, or the infinities, yes?

12:24 RSchulz: Yup. Same section (2.1.4) in the 1st. ed.

12:24 Hun: i'm currently writing a FPU... i know these things. you don't want to know what can happen

12:24 cemerick: nope

12:24 RSchulz: cemerick: What Hun just said ...

12:24 Hun: it is when the mantissa bits approach all 0 or all 1

12:24 RSchulz: Gack! You're writing a real FPU's microcode?

12:24 Why am I pretending to try to help?!

12:24 Hun: RSchulz: i'm writing a real FPU in vhdl

12:25 RSchulz: OK, then.

12:25 Hun: only ieee754.. but when i get that thing working, i think i did well enough :)

12:25 err

12:25 ieee single precision

12:25 rsynnott: oh, yep, college project?

12:25 RSchulz: Can you run it in a simulator? (I know _of_ VHDL, but very little _about_ it.)

12:26 rsynnott: think I had to do that in second year

12:26 RSchulz: yep

12:26 Hun: cemerick: you need to check if those bits (rightmost 23 in single, 53 in double) approach zeros or ones

12:26 rsynnott: otherwise it would be INCREDIBLY painful

12:26 RSchulz: I started writing FPU microcode for the Z80 as an HP co-op student (in the dim dark mists of time).

12:26 Hun: rsynnott: yep. we did a risc cpu for the last 3 weeks (which we implemented from scratch)

12:26 and now we add a fpu on top

12:27 RSchulz: IEEE754 allows de-normalized mantissas, right? (If I'm even saying that right.)

12:27 God. What a topic for a Lisp channel...

12:27 Hun: RSchulz: it allows it, but they aren't mandatory

12:27 i don't implement them in my hardware

12:27 RSchulz: But if they arise, they don't cause exceptions, right?

12:27 Hun: nope

12:27 RSchulz: Hun: Your "hardware" (the quote marks are necessary in this case...)

12:27 Hun: they have to be renormalized (extended) before carrying out operations

12:28 RSchulz: erm... nope. it runs on a fpga

12:28 RSchulz: Ah. But that's done inside the FPU when an operand is de-normalized?

12:28 Hun: which is de-facto hardware

12:28 RSchulz: Ah. Cool. What school are you at, if I may ask?

12:28 They've plainly got resources.

12:28 Hun: RSchulz: the fpu can use an extended format (like 40 bits for single and 80 for double) as an intermediate

12:28 university of applied sciences of augsburg, germany

12:29 we have a few xilinx spartan 3. and when we want to run on the real hardware, the prof wants to supervise

12:29 RSchulz: Well, it sounds interesting, though I prefer the world of symbolic computing, myself. I did the low-level stuff for long enough.

12:29 Hun: i did high-level common lisp for a year now. hardware is a nice change of perspective

12:30 RSchulz: Yes. Most anything gets tedious eventually. I really hate repeating myself!

12:30 cemerick: Are you squared away? Do you know how you're going to proceed?

12:31 Hun: me too. i wonder what i'll end up with in another year :)

12:31 RSchulz: Probably some kind of artificial mind project...

12:31 That does impeccable math.

12:31 Hun: a buddy is implementing a compiler for his own neural network language

12:32 and he's thinking of adding a vhdl backend

12:32 rsynnott: RSchulz: fpgas are very cheap these days

12:32 or small ones are

12:32 RSchulz: What about the hardware and software to program them?

12:32 Hun: serial cable

12:32 xilinx dev tools which are free for educational use

12:32 rsynnott: you can get a spartan 3 for 200 euro on a board

12:32 RSchulz: Wow. That's not bad.

12:33 rsynnott: and there are smaller things for less

12:33 Hun: when you're producing small series, you can get the chip pretty cheap, too

12:33 rsynnott: they tend to have serial/usb interfaces on the chip for programming

12:33 Hun: i remember the 3d-boards from sun blade 100 and 150 being a spartan :)

12:33 true

12:34 rsynnott: yep, that wouldn't be unusual for small production runs

12:34 Hun: i'm actually thinking of adding a spartan on my avr32 board :)

12:34 rsynnott: some weirder pci cards are based on them, too

12:35 * rsynnott nearly ended up working on an optimising compiler for vhdl after college

12:35 rsynnott: but no, I had to go into the games industry :P

12:35 Hun: hehe

12:35 RSchulz: Lots of money and actually lots of leading-edge stuff happens in gaming. As I'm sure you know.

12:36 How far are we from fully immersive VR? And how long after that 'til the Matrix??

12:37 Hun: what do you mean, 'til'?

12:37 rsynnott: RSchulz: I do server-side stuff

12:37 and more recently persistent browser games

12:37 RSchulz: Me too.

12:37 rsynnott: (another decision I kinda regret)

12:37 RSchulz: Among lots of other things. And mostly 'cause I don't have any one to whom to delegate that stuff...

12:38 Chouser: RSchulz: doc-find!? :-P

12:38 rsynnott: though the server-side stuff was painful around christmas

12:38 that's when they tended to launch call of duty whichever number it is now

12:38 RSchulz: Well, I couldn't really call it find-doc, could I?

12:38 I guess dgrep or doc-grep might have been better.

12:39 Hun: the board we use is available for 150$... pretty cheap, actually

12:40 runs with an internal 25MHz clock. that's pretty fast :)

12:40 rsynnott: some of the super-expensive Virtex chips go up to about 400MHz :)

12:40 Hun: whee

12:41 RSchulz: Hun: We here in the States aren't in the Matrix yet. We prefer to suffer for real.

12:41 rsynnott: (some of them also have handy builtin PPCs)

12:41 RSchulz: And those glitches in the Matrix make us uneasy.

12:41 Hun: i don't know if my current core can run at that speed... i think my longest combinatorial path is around 11ns

12:42 which i think would limit the max clock to about 100MHz

12:42 RSchulz: How many gates does it use?

12:42 rsynnott: Hun: pipelining! :)

12:42 Hun: i'd have to check, and the dev computer is not running

12:42 RSchulz: Roughly?

12:42 I'm just curious.

12:42 Hun: rsynnott: is hard, and others have done it at my university

12:43 i'm the first to build a fpu

12:43 rsynnott: our fpu project had to be pipelined

12:43 Hun: RSchulz: it says 5% of available gates

12:43 RSchulz: I split from EE to CS when I found out that semiconductor junctions behaved exponentially. That spared me the whole electrodynamics curriculum.

12:43 rsynnott: on the other hand, it was just a poor lonely FPU; we didn't build a processor

12:43 Hun: we include it in our main risc design

12:44 my current idea needs about 4 state machines inside the fpu. the main cpu only has a single one (but could use one for memory access)

12:45 kotarak: RSchulz: new changes to cljtags pushed

12:45 RSchulz: Great. That's in the Google groups file section?

12:46 kotarak: Ehm. No. On bitbucket.

12:46 RSchulz: Bitbucket? I don't know that one.

12:46 But you posted a URL in the group, right?

12:46 kotarak: http://www.bitbucket.org/kotarak/cljtags/

12:46 There's a download button in the top right.

12:46 gnuvince: bitbucket is to mercurial what github is to git

12:47 RSchulz: Mercurial is proprietary, right?

12:47 kotarak: no

12:47 RSchulz: Oh? Open Source?

12:47 kotarak: yes

12:47 www.selenic.com/mercurial

12:47 RSchulz: I know there's support for it in IDEA, but since I'm currently still a Subversion guy, I haven't paid much attention.

12:48 kotarak: mercurial is worth a try. Especially patch queues rock. :)

12:48 gnuvince: RSchulz: like kotarak said, open source. It's coded in Python (and some C for performance)

12:48 RSchulz: Python! Gack!

12:48 gnuvince: It's very nice, very simple, very fast.

12:48 kotarak: Better than spaghetti C with Perl.

12:48 gnuvince: taking pot shots at Git, are we? :)

12:49 RSchulz: Not yet.

12:49 kotarak: ;)

12:49 gnuvince: (not that I disagree)

12:49 * kotarak couldn't resist

12:49 RSchulz: For an IRC newbie: How do you get that * kotarak <color=blue>couldn't resist</color> thing to happen?

12:49 gnuvince: I don't mind git (though I mind the fanbois), but I have this gut feeling that Mercurial is just better written.

12:50 kotarak: honest: I think hg or git don't give each other very much

12:50 rsynnott: RSchulz: /me bla bla

12:50 Hun: with /me couldn't resist

12:50 gnuvince: RSchulz: /me foo

12:50 * RSchulz foo

12:50 RSchulz: Got it.

12:50 Did you ever hear Linus' talk at Google about Git? He sure comes off as arrogant!

12:50 jtoy: can anyone recomment anything simple for using sql in clojure?

12:50 kotarak: Hi *is* arrogant.

12:50 Chousuke: linus is arrogant

12:50 gnuvince: RSchulz: he is

12:50 Chousuke: but he always has a reason

12:50 RSchulz: OK, then. Just checking...

12:50 gnuvince: well, people sure are in agreement

12:51 rsynnott: jtoy: you could always talk to JDBC :)

12:51 gnuvince: But he *did* mention in that talk that the *only* other SCM worth using (in his opinion) was Mercurial.

12:51 RSchulz: You know, it's just that it wasn't long ago that I switched from CVS to SVN, and I'm not in the mood to switch again or learn yet another VCS scheme...

12:51 jtoy: is there something simple I could use kind of like activerecord, but for clojure?

12:51 blackdog: jtoy, clojure.contrib.sql

12:51 kotarak: RSchulz: SVN->hg is fairly simple.

12:51 Chousuke: gnuvince: wasn't that monotone?

12:51 kotarak: Yes, there are different concepts, but the handling feels very similar.

12:51 gnuvince: Chousuke: no, he said monotone sucked ass.

12:52 RSchulz: blackdog: Is that more than just a JDBC wrapper? Or is it more like a kind of ORM?

12:52 gnuvince: Chousuke: Mercurial was the only one that got a positive nod from him (though he immediatly followed it by "but, just use git instead")

12:52 blackdog: it's a simple interface to jdbc

12:52 gnuvince: CVS and Subversion really got whipped bad in that presentation

12:52 Chousuke: I think monotone filled his other requirements but his reason for dumping it was that it was too slow.

12:52 jtoy: blackdog: ok, so if i never do java programming, does that mean i need to go install jdbc also?

12:52 Chousuke: gnuvince: heh, yeah

12:53 * kotarak wonders what kind of ill VCS needs its users to run the a garbage collector.

12:53 blackdog: it's all in j2se

12:53 RSchulz: jtoy: I think you'll need JDBC drivers for the particular RDBMS you'll be accessing. That's always the case.

12:53 Chousuke: kotarak: why is that a bad thing, though?

12:53 jtoy: hmm

12:53 gnuvince: kotarak: by hand you mean?

12:53 kotarak: Yes. I expect the VCS to take care of this.

12:53 Chousuke: kotarak: git often does an automatic repack

12:53 gnuvince: Ditto.

12:54 Chousuke: but sometimes you want to run it manually too

12:54 kotarak: Chousuke: I prefer developming software instead of figuring out, whether I have to repack something.

12:55 Chousuke: kotarak: then don't figure it out and let git do it for you

12:55 gnuvince: For my personal use, I haven't been disappointed by hg so far.

12:55 also, it's 33% faster to type than git!

12:55 Chousuke: :p

12:55 is it 33% faster than git, though?

12:55 kotarak: Chousuke: there were bloody wars over at the git guys whether git should do that or not...

12:55 Hun: especially on dvorak. there it's about 50%

12:55 RSchulz: I like typing. It keeps my hands busy.

12:56 Chousuke: kotarak: well, it does waste time when you *don't* want to repack in some cases.

12:56 kotarak: in the end, it's configurable,

12:56 RSchulz: Giving you excuses for office light-sabre fights? (XKCD, you know)

12:56 Hun: RSchulz: me too, as long as it's normal text. typing code in code (doesn't matter that much which language) is worse

12:56 kotarak: In the end I found hg with patch queues and will never look back. :)

12:57 RSchulz: So is Subversion pass� alreayd?

12:57 gnuvince: kotarak: unless git just becomes the de facto standard and it's no longer possible to ignore

12:57 Chousuke: I have nothing against hg either though.

12:57 gnuvince: RSchulz: totally

12:57 RSchulz: I'm always on last year's trends...

12:57 Chousuke: I think both tools are excellent.

12:57 kotarak: gnuvince: sheesh to paint the devil on the wall!

12:58 jeremy_____: anybody ever use AccuRev?

12:58 eek

12:58 gnuvince: kotarak: just saying...

12:58 RSchulz: jeremy_____: Is that for cleaning your contact lenses?

12:58 kotarak: However there are already sign: on the list someone wrote "Are there projects for Clojure? I searched at github and only found 5". I would use Google...

12:58 jeremy_____: lol yes it makes my eyes water when I use it

12:59 gnuvince: kotarak: hmmm

12:59 Chousuke: I doubt git will take over

12:59 but DVCS systems might.

13:00 kotarak: That certainly.

13:00 Chousuke: I'm sure git and mercurial are capable of interacting with each other nicely, so in the end you could just use whichever you prefer.

13:00 heck, git is even pretty good with SVN :P

13:00 kotarak: git-hg and hg pull-git. :)

13:01 * rsynnott doesn't like git

13:01 rsynnott: at all

13:01 kotarak: That would be nice indeed.

13:02 RSchulz: Did we drive cemerick away?

13:02 cemerick: Did you solve your FP programming problem?

13:04 What is the essential concept of a monad? I keep seeing it all over the place (well, at least in the Scala and lately the Clojure worlds).

13:04 Chousuke: kotarak: how do you do local branches in hg btw?

13:05 RSchulz: All I can think of when I see the name is "monadic" as in "of arity 1".

13:05 Hun: as far as i know, it's `do these things in this order. and really do them.' that's the main point i got from reading 10 tutorials without learning haskell

13:05 kotarak: Not at all. My projects are too small to bother. I use patches with guards if necessary. (Which has the advantage, that a patch may belong to several "branches").

13:06 @Chousuke

13:06 RSchulz: It just suppresses or precludes or expunges any laziness?

13:06 Chousuke: kotarak: hm

13:07 kotarak: I like branches.

13:07 I made some even for clojure for playing with some local changes

13:07 kotarak: Chousuke: I like to experiment. I do that with patches. If I don't like the result I just delete them, otherwise I commit them in one go. No need for branches here.

13:08 Chousuke: I do that with branches in git :/

13:08 kotarak: As I said: patch queues completely bought me out for hg.

13:08 Chousuke: just branch, work on experimental stuff as normal, and merge to master if the changes end up being useful.

13:09 kotarak: I think, there is also this commit isn't really commit thing in git, which probably allows similar stuff as with patch queues.

13:09 Chousuke: well, it is a commit in that it adds the changes to the repository.

13:09 kotarak: I think commit -a does that. There is some step inbetween.

13:10 Chousuke: the stuff goes to a "staging" area

13:10 while you have uncommitted stuff you can switch between branches and bring the uncommitted stuff with you

13:10 kotarak: Yeah. Someone tried to sell me this as "really cool". But I don't get, what the difference is to mq.

13:11 Chousuke: if that's not what you want, you can "stash" them away in a temporary commit.

13:11 I suppose in git, local branches just serve the same purpose as patch queues

13:11 kotarak: So it the same as a patch or bzr shelf.

13:13 Chousuke: you can do your work in a branch and clean up the commits later into one "commit set" that you could merge nicely into the master tree.

13:13 danlarkin: and that's also git-stash, which is a FILO stack you can push uncommitted changes to

13:14 Chousuke: it's pretty cool in git actually, you can make all the commits you want with bad commit messages and a lot of typos or stupid mistakes and whatnot, and as long as you don't do it in a public branch, you can clean up stuff later and everyone will think your code is perfect :P

13:15 kotarak: That's something I banged against with hg: it typed non-sense in commit message but was too sleepy to notice. Now it's there and I can't get rid of it.

13:16 (Not the commit itself, only the message...)

13:16 danlarkin: oh and don't forget about git-commit --amend

13:17 that lets you amend the previous commit with no traces (as long as you haven't pushed anywhere yet... if you have it gets confusing for everyone)

13:17 cemerick: RSchulz, Hun: No, you didn't drive me away. wwmorgan straightened me out :-)

13:18 kotarak: As long as I didn't push, I can fix the history with hg also.

13:18 Hun: ah, ok :)

13:18 kotarak: With a bit more work, though.

13:20 RSchulz: cemerick: OK. Good. We did get a little sidetracked there...

13:20 Has anyone used the Zipper?

13:21 kotarak: yes

13:21 Cool stuff.

13:21 Chouser: clojure.zip or something else?

13:22 RSchulz: The Huet's Functional Zipper thing for doing tree editing.

13:23 Chouser: yeah, I believe that's what clojure.zip implements, and zip-filter is built on that. Very nice.

13:24 RSchulz: I have Huet's paper, but I haven't read it yet.

13:24 A little way down the line, I'd like to implement a tree editor oriented towards FOL formulas and SOL patterns.

13:25 Right now I do that stuff in Java, and it's mind-numbingly tedious and error-prone.

13:25 And opaque.

13:25 And my end users, who are not Java programmers, can't extend that part of my system.

13:26 I wonder if there are any Clojure implementations of unification (first-order or otherwise) out there?

13:57 Chouser: rhickey: if you care, here it is with watchers: http://clojure-euler.wikispaces.com/Problem+083

14:04 rhickey: Chouser: I expected no sends in calc

14:21 made re-pattern identity for patterns, now find-doc works with patterns too - svn 1138

14:25 technomancy: yeah, we need to get clojurebot announcing these kinds of things if only to save rhickey the bother of it. =)

14:26 wow, sourceforge creates RSS feeds for everything... except commits. awesome and useless.

14:27 using the github feeds will be a little less up-to-date, but way easier.

14:29 drewolson: technomancy: is someone mirroring clojure on github?

14:29 technomancy: clojurebot: git?

14:29 clojurebot: git is http://github.com/kevinoneill/clojure/tree/master

14:29 technomancy: drewolson: ^

14:29 drewolson: sweet

14:29 technomancy: indeed

14:30 hiredman: technomancy: svn info and svn log work on remote repos

14:30 drewolson: are patches accepted through github, or only svn style

14:30 hiredman: svn log -r $(svn info https://clojure.svn.sourceforge.net/svnroot/clojure |egrep "^Revision"|cut -d \ -f 2) https://clojure.svn.sourceforge.net/svnroot/clojure

14:30 ^- gets you the last commit log message

14:30 technomancy: hiredman: yeah, could shell out for that too. we really want "all commits since we polled last" though.

14:31 but that's not hard to adapt that to

14:31 drewolson: github is read-only unfortunately, patch submission is still old-school through the mailing list.

14:31 hiredman: there are also some svn java stuffs

14:31 http://svnkit.com/

14:31 technomancy: probably want to avoid external deps if we can though

14:32 hiredman: *shrug*

14:32 drewolson: technomancy: cool, just wondering

14:32 technomancy: oddly enough I've read plenty about parsing XML in clojure but nothing about shelling out yet, which is why I was leaning to the feeds solution

14:32 hiredman: whell

14:32 well

14:32 you shell out the same way you do in java

14:32 I forget exactly, but you can do it

14:32 technomancy: I know more Javanese than Java. =)

14:35 is there nothing simpler than this? (.. Runtime (getRuntime) (exec cmd))

14:36 walters: technomancy: nope

14:36 drewolson: maybe a system wrapper in contrib makes sense

14:36 (system cmd)

14:36 hiredman: technomancy: http://weblogs.asp.net/britchie/archive/2006/09/02/RSS-Subversion-Change-Log-.aspx

14:36 technomancy: drewolson: that seems like a no-brainer to me

14:37 drewolson: agreed

14:37 hiredman: ugh

14:37 drewolson: i think the name system is fairly idiomatic, several languages use it

14:37 technomancy: it should be one function call to call a shell command and return its output as a string

14:38 walters: well, should not encourage literal shell; subprocess invocation, sure

14:39 technomancy: yeah, not necessarily launching a new bash process or anything

14:39 walters: (system "touch foo") i.e. going through Unix shell is an API that will easily lead to security holes and tears for users; (system ["touch", "foo"]) is the right way to do it

14:40 technomancy: what do you mean by security holes? isn't executing untrusted code of any kind a security hole?

14:40 drewolson: walters: what does the vector buy you? not sure i understand.

14:41 walters: the problem comes when you want to change foo to come from user input

14:42 technomancy: there's nothing to stop you from evaling user input either... sanitization is the job of the caller

14:42 hiredman: clojurebot: jar directory?

14:42 clojurebot: jar directory is -Djava.ext.dirs=$LIBS

14:58 Chouser: rhickey: when watchers run, the agent's value has been set -- have sends been sent?

14:59 rhickey: Chouser: not yet

15:01 Chouser: beautiful.

15:02 and sends in watchers will go at (roughly) the same time as the sends held from the action?

15:03 rhickey: Chouser: yes, the very next thing. In what way does this matter for you? I've been thinking about taking the watcher notifications off of the action thread

15:04 drewolson: the docs on other libraries says that zippers should be available in the zip namespace, but the behavior i see in the repl is that it need to be qualified as clojure.zip. is this correct?

15:05 AWizzArd: drewolson: did you try to (require ...) or to (use ...) that lib?

15:05 Chouser: drewolson: no need to 'require' clojure.zip

15:06 drewolson: Chouser: right, i'm not requiring it, it works fine. but the doc examples show it as available under the namespace zip, whereas it is actually clojure.zip

15:06 Chouser: it may have been called just 'zip' in earlier versions of Clojure.

15:07 drewolson: gotcha

15:11 it looks like within the clojure-contrib source, several files are almost duplicates. like the following: clojure/contrib/enum.clj and clojure/contrib/enum/enum.clj

15:12 the only diff is the namespace line

15:12 duck1123: that's the support for pre-AOT locations

15:13 drewolson: ah, i see

15:13 duck1123: you want clojure/contrib/enum.clj if you're post-AOT

15:13 drewolson: cool, i assumed as much

15:29 technomancy: so it looks like split-with only splits sequences in half. is there anything similar that doesn't stop at the first match?

15:32 duck1123: technomancy: so you're basically looking for a partition-with?

15:32 technomancy: duck1123: sounds like it; thanks

15:32 duck1123: doesn't actually exist

15:33 technomancy: oh... yeah just realized that

15:33 duck1123: I'm trying to figure out what you're trying to acomplish

15:33 hiredman: a lazy-seq of split-with over a seq

15:34 zakwilson: I had to write my own when I needed that sort of thing (for parsing CSV).

15:34 technomancy: actually split-with is fine if I use recursion

15:44 Lau_of_DK: (doc wait)

15:44 clojurebot: I don't understand.

15:44 Lau_of_DK: noob

15:47 drewolson: is /usr/share the standard place to put jars used by several applications?

15:47 hiredman: I dunno that there is one

15:48 drewolson: ok, just wanted to make sure i wasn't missing something

15:48 hiredman: ubano, debian, or solaris may have their own convetion

15:48 clojurebot: jar directory

15:48 clojurebot: jar directory is -Djava.ext.dirs=$LIBS

15:50 Lau_of_DK: rhickey: before you commit the next svn in about 12 minutes, could you please wrap all those atomic* types in some nice clojure goo. Preferably so that I dont have to think very much about what I choose, but still get maximum performance

15:51 rhickey: Lau_of_DK: unlikely

15:52 Lau_of_DK: Its a good suggestion though

15:53 rhickey: No, atoms correspond to the other Clojure reference types, the other atomics don't

15:53 this isn't just to save you from importing java.util.concurrent.atomic

15:56 Lau_of_DK: I was just thinking, that in some cases its better to use atomicInt or something like that, than a ref. And I think that, that should be a concern of the compiler, and not me

15:57 rhickey: Lau_of_DK: couldn't possibly be, they have different semantics, a human will have to choose

15:57 Lau_of_DK: Ok, thats the conclusion I would reach myself, but I hoped you had some more insight :)

16:17 aquanaut: Is the 'clojure beta book' a good intro for someone without FP experience?

16:20 AWizzArd: In principle it is not the main goal of the book to teach FP. But as clojure is one of the (if not *the*) easiest FPL it can really make sense to have a look at it. The price is just one evening in the cinema with your gf and some popcorn.

16:20 That's for 2 hours of entertainment.. but the book is something you can have fun with for weeks :-)

16:21 aquanaut: Is it oriented towards java programmers adopting clojure?

16:21 AWizzArd: And if you enjoy Clojure you may even want to get rid of your gf.

16:21 aquanaut: Nah, We can't live without women.

16:21 AWizzArd: We can't live them, but also not without them.

16:21 danlei: if shes a good woman, she'll buy him the book ;)

16:21 Lau_of_DK: AWizzArd: That depends on where you live. In Poland the price of the books equals that of a 90m2 apartment with an old Mercedes incl.

16:22 AWizzArd: in London or Switzerland one could probably buy a mineral water for that amount of money

16:22 aquanaut: If anything

16:22 AWizzArd: So, try to get the salary that a programmer gets in London, but live in China.

16:23 aquanaut: read the table of contents, the preface and the example chapters

16:23 rsynnott: or one evening at the cinema alone with some more popcorn

16:23 (it's where they make all their money)

16:24 AWizzArd: aquanaut: in the TOC you will see that the preface will answer th question for who that book is and what you'll find in it.

16:24 aquanaut: Thx

16:25 AWizzArd: the TOC don't reflect yet fully what will be in the book. For example we can expect chapter 5, which is about functional programming, to be longer than this one page, as the TOC says :-)

16:27 technomancy: the book is definitely worth it.

16:28 RSchulz: aquanaut: I just finished the third beta of the book, and I found it very informative and easy to follow.

16:29 I've done a lot of Java, some Lisp and no FP to date.

16:29 aquanaut: Does it covers workflow setups IDEs, etc?

16:30 RSchulz: There's no real IDE support. Enclojure (for NetBeans) is not currently usable (compatibility something or other), but will be repaired in a few days.

16:30 technomancy: aquanaut: I don't think so

16:30 RSchulz: But it does cover basic CLI setup, yet.

16:30 technomancy: RSchulz: slime is an IDE, for any definition of IDE that makes sense

16:31 RSchulz: ..., _yes_.

16:31 aquanaut: it covers slime or point you to slime?

16:31 technomancy: it doesn't cover slime, I just meant that clojure has some IDE support

16:31 RSchulz: Sure, sure. But I don't live in that world. I don't recall seeing anything about it in the book, though. But I might have just glossed over it.

16:32 aquanaut: Ok. Basic CLI should be enough.

16:34 technomancy: what do you call a clojure programmer anyway... clojurist? clojurer?

16:34 clojurian?

16:34 RSchulz: "The Enclojed."

16:34 Chouser: I like clojurista, but clojurian seems common.

16:34 technomancy: clojurista sounds like it implies gender

16:34 Lau_of_DK: He's a Richarian

16:35 technomancy: I like clojurer since it sounds like conjurer, but I could go with clojurian

16:35 Chouser: oh, I suppose. I was thinking like Sandinista

16:35 Lau_of_DK: Seriously, its called a Clojurist

16:35 RSchulz: Then you could do clojuristo / clojurista, but it's kind of Latinate-specific. Other places it might not come of with the same gender feel.

16:38 hiredman: why does it matter?

16:38 RSchulz: _To whom_ does it matter? (Not me...)

16:38 technomancy: it doesn't; it's totally frivolous.

16:39 rsynnott: do people do this for other languages?

16:39 C-er?

16:39 :)

16:39 technomancy: only for dynamic languages, as far as I can tell.

16:40 hiredman: smalltalker

16:40 technomancy: smalltalker, schemer, pythonista, rubyist, haskellite.

16:40 (ok, I made that last one up)

16:40 RSchulz: Groovist?

16:40 technomancy: that should probably just be Groovy Dude.

16:41 hiredman: or a Groove

16:42 technomancy: just wait till you start getting into the compound nouns. (pride of lions, gaggle of geese, etc.) =)

16:42 RSchulz: Murder of crows.

16:43 What happens when someone invents the language called "Nude?"

16:43 technomancy: only one way to find out

16:44 there's a Clean language, so one must only imagine the existence of cleaning crews.

16:44 * technomancy is done w/ frivolity

16:44 rsynnott: how about brainfuck, theN?

16:45 technomancy: if you actually use it, worrying about what people call you is the least of your worries.

16:45 Chousuke: RSchulz: hm, Nude is something you could name a DE written in Nu :P

16:45 hiredman: clojurebot: clojure is also a very attractive hammer with a nice heft to it

16:45 clojurebot: c'est bon!

16:45 RSchulz: A "DE?"

16:45 Chousuke: desktop environment.

16:45 rsynnott: and the more you worry about what people call you, the more they are likely to call you something unpleasant :)

16:45 technomancy: hiredman: oh nice, how old is "is also" in clojurebot?

16:46 hiredman: uh, dunno, a week maybe?

16:46 RSchulz: Ah. KDE, etc.

16:46 Chousuke: Nu is a weird language.

16:46 it's got lispy syntax but it's not really a lisp :/

16:46 hiredman: next time I meet a carpenter I am going to call him a hammerista

16:47 technomancy: clojurebot: clojure?

16:47 clojurebot: clojure is cheating

16:47 hiredman: (from well outside of tool range)

16:47 technomancy: hiredman: shouldn't it tell you there's more?

16:47 Chousuke: maybe clojure programmers should be clojurors or something

16:48 hiredman: technomancy: also makes a vector, and on look up randomly picks from the vector

16:48 clojurebot: clojure?

16:48 clojurebot: clojure > scheme

16:48 technomancy: hiredman: gotcha.

16:50 mibu: say, what's the idiomatic way to convert an Iterator to a seq?

16:51 cemerick: mibu: iterator-seq

16:52 rhickey: (find-doc "iterator")

16:52 mibu: cemerick: thanks. it didn't appear in the Sequences doc page

16:52 rhickey: find-doc is your friend

16:53 cemerick: I like clojuremancers, myself

16:53 rhickey: cemerick: first I've heard that one

16:53 mibu: rhickey: yeah, it also doesn't appear in any doc section that I can recall. thanks about that one.

16:54 cemerick: rhickey: let Gibson be your guide :-P

16:56 hiredman: ok, even I am rolling my eyes at that one

16:56 mibu: I read something on the svn log that there is a new ref type--atom--is that a transaction free ref accessor?

17:01 rhickey: mibu: reference type, not transactional ref, it is like a synchronous agent, independent, shared-visibility state

17:02 mibu: rhickey: so, it's like using an agent in the same thread?

17:02 Chouser: rhickey: regarding agent ordering, I think it only mattered to me when I was touching the same state from both the action and the watcher

17:02 now that I've moved all the state manipulation to the watcher, I don't think I care anymore.

17:02 rhickey: Chouser: if the watcher had to be a send, would you care?

17:03 * technomancy lets gibson be his guide all the time

17:03 rhickey: mibu: when you say (swap! atom fn) it happens right there

17:04 mibu: rhickey: nifty

17:04 AWizzArd: rhickey: earlier today you mentioned that Clojure does not support annotations yet. So this means that if I hava java code and want to extend it, and this java code expects annotitions here and there, I can't do this right now in Clojure, but must do it in java, right?

17:04 mibu: technomancy: what's gibson?

17:04 rhickey: AWizzArd: right

17:04 technomancy: mibu: William Gibson, author of Neuromancer

17:04 mibu: oh

17:04 AWizzArd: rhickey: and are there plans to add annotations one day to Clojure?

17:05 mibu: haven't read it. what's the clojure connection?

17:05 hiredman: clojurebot: gibson is <reply>I love their guitars

17:05 clojurebot: Roger.

17:05 Chouser: rhickey: not quite sure what that means, but for this code I no longer care when the watcher happens, as long as its agent's value has been updated first.

17:06 * mibu is confused

17:06 cemerick: mibu: none, except -mancer is a good suffix to apply to anyone who wields the prefix to dramatic effect

17:06 technomancy: mibu: someone just said "clojuremancer" above

17:06 cemerick: neuromancer, necromancer, clojuremancer

17:06 it's been a long day

17:06 mibu: cemerick: ah ;-)

17:07 for a second, I thought there was a new clojuremancer project.

17:07 it's a cool name.

17:09 Lau_of_DK: clojuremancer is really bad if you ask me

17:12 mattrepl: rhickey: should I remove the "start-class" let from the patch? I was going for readability, but now it looks ugly to me.. maybe just rename the loop "c" to "lc" or find-field's "c" to "start-c"

17:12 mibu: Lau_of_DK: to me it sounds like the name of a clojure debugger

17:13 Kerris7_: clojuremancer sounds cool

17:13 do we have a name for clojure programmers yet :V

17:13 danlarkin: Chousuke: I looked at Nu a while ago, it's an impressive body of work... but I wasn't attracted to it

17:14 -1 for boring sounding names like "rubyist". +1 for names like pythonista and djangonaut

17:15 Chousuke: it's kinda just writing objc with different syntax

17:15 Chousuke: yeah

17:15 mibu: Kerris7_: Wiki says mancer is from mante�a which is divination. If you want to give clojure programmers a god complex, which most lispers already have, that would be a good choice. I'd go with something more humble.

17:17 technomancy: djangonaut is awesome

17:18 * mibu agrees about djangonaut

17:18 mibu: but clojurenaut doesn't cut it.

17:36 danlarkin: ok I can only think of one and I don't think it really implies the right things

17:37 clojurecrat

17:41 Chouser: clojurician, clojureer, clojurvator

17:47 jeremy_____: clojureposer

17:47 jk

17:47 Chouser: :-)

17:48 abrooks: pojure?

17:48 kotarak: clojurenator

17:48 abrooks: jurenyman?

17:49 Kerris7: Clojuron.

17:49 abrooks: jurke?

17:50 Kerris7: hahaha Jurkes

17:50 abrooks: jurenalist?

17:50 Chousuke: The Jurg

17:51 danlarkin: soup de jure

17:51 abrooks: du jour (de jure is a legal term)

17:51 * danlarkin sighs and bows his head

17:51 abrooks: :)

17:51 danlarkin: oh, sorry, du jure then

17:52 abrooks: I like the idea of "soup by-law" (de jure) -- reminicent of the Seinfeld Soup Nazi. ;-)

17:52 technomancy: sometimes FP feels like walking around with a stack of dishes that's really tall and just thinking "man, I want to set this down somewhere" but not being able to. =)

17:53 abrooks: technomancy: I know *exactly* what you mean. :)

17:53 technomancy: the funny thing is, the dishes don't fall over.

17:53 danlarkin: that is a good simile

18:00 technomancy: shouldn't this destructure so that it returns :b? (let [[a b] (:a :b)] b)

18:00 what am I doing wrong?

18:01 kotarak: Quoting the '(:a :b)?

18:01 technomancy: oh, duh

18:02 Chouser: another update, announced here because I know you're all just dying to read it: http://clojure-euler.wikispaces.com/Problem+083

18:14 drewolson: go go euler

18:17 jleslie: anyone here playing with compojure?

18:18 hiredman: jleslie: I have beening using it a little

18:18 mostly just replacing a few cgi scripts

18:19 jleslie: do you know if the 'route' function has been renamed or anything?

18:19 hiredman: I do not

18:19 jleslie: it's referenced in the docs but I seem to be getting Unable to resolve symbol: route in this context

18:19 alright, I'll keep poking around.

18:20 RSchulz: user=> (find-doc "route")

18:20 nil

18:20 Seems like there's nothing of that name, at least in doc strings.

18:21 Where do you see in the documentation? Which page?

18:23 hiredman: RSchulz: this is in the compojure webframe work

18:23 jleslie: this is from compojure's page on github

18:23 (GET "/greet/:name"

18:23 (str "Hello " (route :name)))

18:23 RSchulz: Oh. Sorry. I don't know anything about that.

18:24 jleslie: no worries.

18:24 hiredman: jleslie: I still see references to route all over the source

18:24 where are you using (route ...) ?

18:25 jleslie: hmm, perhaps i've buggered up the import on my servlet def.

18:25 hiredman: I am not sure but I think route is a hash, and not a function, so it most likely would not have a doc string

18:26 jleslie: does this look right: (ns jleslie (:use (compojure html http)))

18:27 hiredman: jleslie: how exaclt are you getting an error?

18:27 you visit the webpage and get a stack trace?

18:27 jleslie: (defservlet main-servlet

18:27 (ANY "/youdevice"

18:27 (ht-homepage)

18:27 (ANY "/youdevice/:user"

18:27 (route :user))))

18:28 that seems to throw the error when I startup compojure.

18:29 java.lang.Exception: Unable to resolve symbol: route in this context (NO_SOURCE_FILE:0)

18:30 hiredman: jleslie: try #(route :user)

18:30 I am not sure, but route may just be a hash bound in the environment where the function is run

18:33 jleslie: yeah, I think maybe my problem is something to do with me using that repl as the lisp mode in my emacs

18:34 if I do a restart everything seems ok.

18:35 hiredman: or wrap in []

18:36 it seems to expect either a function name in parens (this seems like bad idea) or a vector

18:40 technomancy: hiredman: everything in clojurebot right now works on a message/response basis. how would I use sendMsg outside of this cycle?

18:40 for instance, polling every so often for SVN changes and messaging the channel with them

18:43 jleslie: hiredman: thanks for the help! I understand now that route will onyl be bound when a request comes in so I can't play with it or evaluate things that refer to it in the repl.

18:44 hiredman: technomancy: just do it in another thread

18:46 technomancy: hiredman: sure, I'm just not sure how to invoke sendMsg. what should I pass as "this"?

18:48 hiredman: *bot*?

18:49 technomancy: ah, thanks

19:01 how do you just sleep a thread for a given amount of time?

19:01 how do you just wait f

19:01 (wups)

19:04 hiredman: technomancy: (Thread/sleep miliseconds)

19:04 technomancy: thanks

19:08 lisppaste8: technomancy pasted "svn announcements for clojurebot" at http://paste.lisp.org/display/71460

19:08 technomancy: (I haven't tested the IRC-specific portions)

19:09 hiredman: let me know what you think.

19:10 bonus fact: clojurebot will know "latest svn revision" automatically.

19:10 hiredman: oooh

19:10 technomancy: of course, it means someone could go in and change it to some bogus value

19:10 but it's got limiting so it won't spam the channel with 1139 messages if someone sets it to zero. =)

19:10 hiredman: well, we can set up a special cond clause for it

19:11 technomancy: if it's even worth worrying about

19:15 hiredman: do you run clojurebot out of a repl?

19:16 hiredman: technomancy: yes

19:17 clojure.lang.Repl clojurebot.clj

19:17 technomancy: hardcore

19:18 hiredman: *shrug*

19:18 I like to reach in and muck with it while it's running

19:18 technomancy: yeah, sounds handy

19:19 hiredman: I run it in a screen session, and I send code from vim using slime.vim

19:20 technomancy: has the bzr => gist bridge setup been working fine for you?

19:23 hiredman: uh

19:23 well, it works

19:24 and I don't reall think about it

19:24 but it is not ideal

19:30 lisppaste8: hiredman annotated #71460 with "*bot* is not a hash" at http://paste.lisp.org/display/71460#1

19:30 hiredman: huh

19:31 I guess I should have actually put comments there instead of just changing the code

19:31 technomancy: aha

19:31 what's a pojo?

19:31 RSchulz: Plain Old Java Object

19:31 technomancy: ah

19:32 hiredman: which is a misnomer

19:32 since in clojurebot pojo is a hash :P

19:32 RSchulz: Not "plain?" Not "old?"

19:32 POCO

19:34 technomancy: seems a more descriptive name could be picked in this case, yeah

19:35 RSchulz: I wrote a (Java) library akin to JavaScript hashes. I called it StructuredValue (all my names are prosaic.)

19:38 technomancy: oh, I meant the pojo variable in clojurebot

20:18 rosejn: rhickey: it looks like eval is broken

20:19 user=> (eval (list + 1 2 3))

20:19 java.lang.ExceptionInInitializerError (NO_SOURCE_FILE:0)

20:20 rhickey: rosejn: have you got a clean build? I get 6 here

20:22 rosejn: rebuilding now

20:23 rhickey: rosejn: make sure you: ant clean

20:25 rosejn: ok, found the problem

20:25 it works when I build with ant

20:25 but not with maven

20:25 I was trying to use the jar put in the target directory by maven

20:25 it works with the clojure.jar from ant though

20:49 technomancy: clojure makes me so happy... the combination of keywords-are-functions and being able to pass around functions as values is just so slick

20:59 RSchulz: rhickey wrote make sure you: ant clean

21:00 When I read that, I realized I'd just been "svn up; ant" -ing for ages without issue, even as the AOT stuff came along. Was I just lucky?

21:02 Chouser: RSchulz: maybe. That's what I usually do, but if anything inexplicable happens, "ant clean" is a first step

21:03 I've had to do that maybe a half-dozen times since March.

21:03 RSchulz: Inexplicable? What else is there? Computers _never_ do what I want!

21:04 ... Until I force them, that is.

21:04 "... The question is, who is to be master? ..."

21:05 Chouser: exactly. (= (ant clean) (gun :to-the 'head))

21:06 RSchulz: ... Did I say _that_??

21:08 Chouser: hm, how else do you force it? :-)

21:08 rosejn: So is maven supposed to work?

21:08 RSchulz: Well... If you know the name of a thing, you control it completely. That always seemed very Lisp-ish to me...

21:08 rosejn: or that is legacy or something?

21:09 RSchulz: Maven? Is it supposed to _anything_?

21:09 rosejn: I guess I just figured since there is a pom.xml, it was setup for maven.

21:09 I don't know what's typical in Java land though

21:10 RSchulz: Huh. There it is (the pom.xml). Well, I don't know maven, just that ... opinions differ as to its virtue...

21:11 rosejn: got it. I'll go with ant

21:11 RSchulz: After all, ant does work.

21:11 Chouser: I think maven as worked in the past, but I don't know how many people actually use it.

21:11 RSchulz: Seriously, you should probably make sure Rich knows that the pom is possibly amiss.

21:12 rosejn: I think he knows now. He clued me in to doing a clean ant build.

21:17 lisppaste8: hiredman annotated #71460 with "no str-join function " at http://paste.lisp.org/display/71460#2

21:18 Chouser: (apply str (interpose "," [1 2 3]))

21:19 hiredman: ah

21:20 I wrote is using interleave

21:20 which takes a seq

21:20 Chouser: (clojure.contrib.str-utils/str-join "," [1 2 3])

21:20 hiredman: so I had to use cycle

21:20 Chouser: yep.

21:20 good use of what you knew about. :-)

21:20 hiredman: anyway, I don't have clojure.contrib :P

21:29 are there any zipper xml processing example/tutorials out there?

21:33 Chouser: not much, I think.

21:33 http://netzhansa.blogspot.com/2008/10/trying-clojure.html

21:43 ns is hard

21:45 lisppaste8: Chouser pasted "zip, xml, zip-filter.xml example" at http://paste.lisp.org/display/71471

21:45 Chouser: hiredman: I had that laying around, if it helps at all.

21:46 mgs: Does clojure more or less seamlessly integrate with existing Java code?

21:47 Chouser: mgs: calling into existing Java code is completely seamless. Calling Clojure functions from Java was already pretty easy and recently got much easier.

21:47 mgs: all of my apps are JVM and I've been learning lisp recently and just found out about clojure. I don't want to go completely ecstatic but ... :)

21:47 that is so cool

21:47 Chouser: mgs: oh, it's okay. go ahead.

21:47 :-)

21:47 mgs: hahaha yayayayayaya!!!!!

21:48 i love learning that what i've already done is even more valuable than i thought!!

21:48 Chouser: which lisp have you been learning?

21:48 mgs: Is there anything special I should know about clojure, I just started on clojure.org, I had been using scheme.

21:48 scheme

21:49 I started with the little schemer :)

21:49 Chouser: clojure uses immutable things more than most lisps.

21:49 mgs: and started SITP

21:49 er

21:49 SICP

21:50 Chouser: and has more natural support for more data structures than most lisps.

21:51 mgs: i have played with haskell a tiny bit too

21:52 Chouser: The screencasts are the best introduction (if you don't want to pay for the book), if you don't mind the format.

21:52 mgs: well, this is very exciting! looks like i'll be up all night .. :)

21:52 Chouser: Then I'd look at the Data Structures and Sequences pages on clojure.org

21:54 mgs: i'll watch the screencasts now to start. i generally don't love programming screencasts (i feel like reading is much faster) but i'm super anxious to check it out.

21:55 Chouser: thanks a lot for the info!

21:57 hiredman: Chouser: thanks

21:59 mortis`: humbly requesting help, the imported symbols, eg: String, say that theyre' a class (class String) => java.lang.Class

21:59 yet they don't respond to methods on Class, eg: (.getName String) throws a NoSuchFieldError

21:59 is there some way to get to the class that the symbol String represents?

22:01 good evening

22:04 Chouser: mgs: I prefer reading too, but there's just not much intro material yet that's as good as the screencasts

22:05 drewolson: mortis`: i guess you could do (class (new String))

22:05 Chouser: mortis`: it's FAQ question number one! ...if we had a FAQ. :-)

22:06 mortis`: short answer: (identity String)

22:06 drewolson: mortis`: whoops, don't listen to me, answered the wrong question :)

22:11 Chouser: mortis`: http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b

22:12 clojurebot: FAQ #1 is http://groups.google.com/group/clojure/msg/8fc6f0e9a5800e4b

22:12 clojurebot: c'est bon!

22:39 mortis`: Chouser thanks

22:42 that was exactly what I was after

22:44 Chouser: you're welcome

22:59 lvijay: where can i get the list of commands that clojurebot responds to?

22:59 i know (doc X)

23:00 clojurebot: help

23:00 clojurebot: excusez-moi

23:00 lvijay: clojurebot: help

23:00 clojurebot: excusez-moi

23:02 Chouser: clojurebot: where are you?

23:02 clojurebot: http://gist.github.com/27733

23:03 Chouser: lvijay: you can pick through that code, I suppose.

23:03 lvijay: Chouser: thanks

23:06 clojurebot: how much do you know?

23:06 clojurebot: I know 70 things

23:08 lvijay: (- 2 3 (+ 3 9))

23:08 clojurebot: (- 2 3 (+ 3 9))

23:08 clojurebot: Titim gan �ir� ort.

23:08 lvijay: clojurebot: (- 2 3)

23:08 clojurebot: Excuse me?

23:08 lvijay: i'll just download the code and play with it at my repl

23:09 Chouser: lvijay: can you talk to him in private?

23:09 lvijay: i will

23:09 Chouser: I will

23:10 hiredman: huh

23:10 Chouser: I meant instead of downloading. but whatever. :-)

23:14 - is being interpreted as a range at line 127. I bet.

23:17 lvijay: quite possible

23:18 + and * don't work either

23:18 Chouser: hmph

23:20 lvijay: slash works tho

23:24 Chouser: (+ 1 2)

23:24 clojurebot: 3

23:24 Chouser: (* 2 2)

23:24 clojurebot: 4

23:25 hiredman: :(

23:25 bugs

23:51 mattrepl: it's come up a few times, but has anyone started playing around with pattern/structure matching for dispatching?

23:59 hiredman: bugs bugs bugs

Logging service provided by n01se.net