#clojure log - Aug 24 2010

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

0:00 redalastor: That one already have much of the nice things we like so it's going to be easier to transition people.

0:11 ihodes: augh! I forgot something.

0:11 technomancy: ihodes: heh; hey

0:11 was just looking at your patch

0:11 ihodes: i have a fix.

0:11 haha

0:12 technomancy: oh?

0:12 ihodes: i was just falling asleep, when i realized i forgot one case

0:12 technomancy: well don't let it keep you up at night. =)

0:12 ihodes: i had taken out the test for if there was no :min-lein-version specified. i'm pushing it up now

0:12 technomancy: oh right; I didn't even think about that.

0:13 ihodes: I skipped the patch that added :min-lein-version to lein's own project.clj since there's no trouble building lein with an older version of itself

0:14 ihodes: haha it's fixed now, committing

0:15 sending pull request :)

0:15 then i can sleep

0:15 technomancy: sweet; thanks

0:16 ihodes: sent. also, i think i'll start sending patches if that's ok: deselecting people from the pull requests is a drag haha

0:17 technomancy: how about if you send email to the mailing list describing where to pull from?

0:17 ihodes: by the way, was changing VERSION to LEIN_VERSION and exporting it ok? i realized i may have missed a better/different way to get the currently running lein's version

0:17 technomancy: yeah, if it's going to be exported it should be more specific; that's good

0:17 ihodes: i can do that, sure

0:17 technomancy: if it goes to the list then it's easier for others to apply it

0:17 ihodes: alright, good. for sure. and i'm not sure the bat script will work - don't know if LEIN_VERSION needs to be …exported?… from that on windows.

0:18 but cheers! I'll look into some issues tomorrow. thanks for the awesome project to hack on.

0:19 technomancy: dang; not sure about that. maybe you could mention it on the windows support thread.

0:20 ihodes: is that on the google group?

0:21 technomancy: yup

0:24 ihodes: alright, posted on the one Shantanu started. good night :)

0:24 technomancy: later

0:25 ihodes: ah and sorry about the over 80 lines–I'd double-checked that. i'll look into whatever caused that… and silly re: the < vs. lambda. gnight!

0:25 technomancy: it's all good

0:44 anyone familiar with c.c.zip-filter.xml?

0:45 trying to figure out what this means: (xml-> (xml-zip (xml/parse istream)) (tag= :components))

0:51 cemerick: technomancy: returns an xml zipper containing only <components> elements in the XML coming from istream IIRC

0:53 tomoj: only children of the root element, though, yes?

0:53 and it returns a seq of zippers, I think?

0:54 technomancy: I guess I need to read up on zippers

0:55 cemerick: tomoj: right, (tag= ...) is equiv to /tagname, not //tagname in XSL parlance

0:55 technomancy: someone was telling me it would be relatively easy to express that without contrib, but I don't know the clojure.zip ns well enough to say

0:57 cemerick: right, there's clojure.zip/xml-zip

0:58 technomancy: well, that's already being used; it's more a question of whether xml-> and tag= can be replaced

0:59 tomoj: wouldn't you have to go down and then search right?

0:59 I mean, you can just filter children looking at the tag, but then you don't get zippers back

1:00 technomancy: yes, but it's too late at night for me to attempt to dive into such a rich topic as zippers, so I'm fishing for easy answers. =)

1:00 tomoj: tag= at least can be removed because xml-> does it automagically :)

1:00 technomancy: oh... I can't get rid of contrib here anyway because (grumble grumble) delete-file-recursively, slurp*, and to-byte-array did not make it into clojure.java.io. =\

1:00 weak.

1:01 cemerick: The latter two are particular sore spots.

1:01 1.3.0-SNAPSHOT, here we come.

1:01 technomancy: cemerick: oh, I see that you spoke up for to-byte-array. nice.

1:01 shame it appears to have been too late.

1:01 cemerick: yeah, not enough though I guess.

1:02 tomoj: technomancy: do you use the results as zippers or just map zip/node over them?

1:02 technomancy: tomoj: here's a quotation from the file in question: ;; TODO: need documentation; I have no idea what this is for. Alex!!!

1:02 =)

1:02 tomoj: heh

1:02 cemerick: slurp* would never get in because of the * naming.

1:03 technomancy: tomoj: it's for walking over a set of XML files to remove duplicate entries, I think

1:03 cemerick: understandable I suppose; a proposal to save it must be accompanied by a better name for it.

1:05 I suppose I don't feel bad about snarfing delete-file-recursively into leiningen wholesale since I wrote it myself anyway.

1:05 msf: can any one throw me a pointer to where I can read up on reflection warnings and why I should care ?

1:06 tomoj: technomancy: read-components?

1:07 technomancy: tomoj: right

1:08 if I understood why it was necessary I could write up a test case; then I'd be more comfortable monkeying around in there

1:09 doh; now that clojure.core/slurp uses clojure.java.io/slurp it may actually make slurp* unnecessary

1:10 tomoj: think something like https://gist.github.com/fc267f2b16d88bff7acd should work if you also grab children from clojure.zip, but don't take my word for it :(

1:10 technomancy: tomoj: thanks; I'll take a look

1:11 cemerick: technomancy: shit, I had no idea slurp was now using reader!

1:11 :-D

1:12 technomancy: cemerick: yeah, complaint officially retracted!

1:12 cemerick: heh, with old argument style compatibility retained, even.

1:13 technomancy: well done, Mr. Halloway.

1:15 tomoj: isn't there a less ugly version of #(= (:tag %) :components) ?

1:20 slyrus: (fn [entry] (= (:tag entry) :components)) :)

1:20 technomancy: (comp (partial = :components) :tag)

1:21 slyrus: I'm not sure that's more readable

1:21 tomoj: maybe I want (filter-by :tag :components)

1:22 er

1:22 guess it would be (filter-by :tag coll :components) or (filter-by :tag :components coll)

1:30 slyrus: well, the new contrib layout certainly takes a lot longer to build

1:30 technomancy: well, there aren't a lot of good reasons why you'd have to build the whole thing

1:32 slyrus: ?

1:33 I can see not loading all of the jars, but I would imagine that one would want a full set of jars if they were building their own contrib

1:33 technomancy: sure, but why would you build your own contrib?

1:33 do you not trust build.clojure.org?

1:34 slyrus: it's not that I don't trust it, I just want to be able to build my own. what if I need to make changes?

1:34 msf: having trouble getting lein to talk to repositories.apache.org

1:34 technomancy: slyrus: then you'll probably be making them to one module at a time

1:35 msf: :repositories { "apache" "http://repository.apache.org/content/repositories/snapshot s/"}

1:36 agh

1:36 sorry

1:36 slyrus: technomancy: I like to avoid problems like msf's :)

1:37 msf: heh

1:38 slyrus: but, then again, I'm just a quasi-control freak used to building my own lisp environment and all of its libraries

1:49 technomancy: diffrent strokes...

1:52 slyrus: wachu talkin' bout Willis?

1:53 technomancy: ...for diffrent folks.

1:54 maravillas: hm, is it october 22nd yet?

1:55 * technomancy keeps hitting refresh on the system clock

1:55 technomancy: nope

1:56 maravillas: alas...i'll try again tomorrow

1:58 tomoj: whoa, I didn't realize what modularisation of contrib meant

1:58 that's awesome

2:01 slyrus: ok, finally that of a name for that bioinformatics-y package I've been thinking about

2:01 s/that/thought/

2:01 sexpbot: ok, finally thought of a name for thought bioinformatics-y package I've been thinking about

2:02 slyrus: whoops...

2:50 vIkSiT: 'lo all

2:50 jacortinas: lo

2:50 vIkSiT: how would you use a (dosync (alter)) with a merge-with (or any function that takes more than 2 args)?

2:50 hey jacortinas

2:50 jacortinas: noooo clue

2:54 LauJensen: Hello

2:56 ,(let [r (ref nil)] (dosync (alter r (partial merge-with +) {:a 1} {:a 1})) @r)

2:56 clojurebot: {:a 2}

2:56 LauJensen: vIkSiT: something like that maybe

2:56 vIkSiT: hey LauJensen

2:56 aaah

2:57 partial.

2:57 glad i learned how to curry

2:57 LauJensen, hmm that looks like a bad solution to my problem though. would you help me figure out another logic for it? :)

2:57 LauJensen: Shoot

2:57 vIkSiT: basically - i want to read one file at a time from a directory, do some computation on it, and store the result in a map.

2:57 at the very end, i need to combine my map into one (using merge-with +)

2:57 maps*

2:58 whats the best functional way to do so?

2:58 my uber-clunky version looks like https://gist.github.com/8feba443c12348f33eb7

2:58 which *works* as long as i can get that merge-with/ref taken care of..

2:59 tomoj: what's this (range (count (take 1 file-list))) ?

2:59 hiredman: (reduce (partial merge-with nil-safe-plus) {} (make-maps-from-files))

2:59 tomoj: (range 1) ?

3:00 hiredman: why are you using refs at all?

3:00 LauJensen: vIkSiT: Go with hiredmans recommendation, and dont use concurrency semtantics where there is no concurrency :)

3:01 hiredman: refs are not functional, they are a way to control mutation and make it "safe"

3:02 tomoj: doesn't your let also have an odd number of forms in the binding vector?

3:02 the inner let, I mean

3:02 no.. just unbalanced sexps

3:02 maybe I'm going blind

3:02 vIkSiT: aah.

3:03 tomoj, for your first question - i need to go through all files, so i just tried with one for now..

3:03 hiredman, yes indeed, i was just using it as a hack. the reduce method seems much cleaner

3:04 tomoj: don't forget that for is not a loop

3:05 vIkSiT: tomoj, ?

3:06 tomoj: ~for

3:06 clojurebot: for is not a loop

3:08 wwmorgan: vIkSiT: I posted an approach that uses the ->> macro. untested

3:08 vIkSiT: wwmorgan, aha, link?

3:08 wwmorgan: your gist

3:08 vIkSiT: I was thinking of the ->> as well, but couldn't fit it in..

3:08 k

3:08 tomoj: ,(do (for [i (range 10)] (println i)) 3)

3:08 clojurebot: 3

3:12 vIkSiT: hmm, how do i map a java function?

3:12 ah got it.

3:13 bsteuber: vIkSiT: you could wrap it in a clojure funktion

3:13 vIkSiT: ah

3:13 right

3:13 btw is ->> lazy?

3:14 for instance, i have about 1000 data files in that dir - not sure how well it will hold up.

3:14 hiredman: uh

3:17 wwmorgan: ->> is just a syntactic transformation. Since (->> a b c) becomes (c (b a)), it will be as lazy as c is.

3:17 sexpbot: => #<core$_GT_ clojure.core$_GT_@53cb30a4>

3:18 vIkSiT: ah

3:18 of course

3:21 bsteuber: I need to generate a java class with static fields (not methods) from clojure - is that possible?

3:21 LauJensen: Bjering: Status? :)

3:25 limux1972: where is the gen-and-load-class?

3:28 vIkSiT: hmm

3:28 so what would the best way to sort a map by value?

3:30 limux1972: when i reference gen-and-load-class, there is exception of unable to resolve var?

3:31 tomoj: ,(sort-by val {:a 3 :b 2 :c 1})

3:31 clojurebot: ([:c 1] [:b 2] [:a 3])

3:31 limux1972: also i found that the gen-and-load-class defined in genclass.clj not as private

3:31 LauJensen: "how to sort by value?" (sort-by val ..) .. its almost like english:)

3:32 tomoj: limux1972: does yours have a "(comment" before it?

3:34 limux1972: i don't know, i use the offical clojure.jar

3:34 that function have to uncomment, and build myself?

3:34 tomoj: if it's commented out, you're not supposed to be using it..

3:35 vIkSiT: sheesh.

3:35 LauJensen, tomoj - i couldn't find it :)

3:36 limux1972: ok, i will build one from soucre myself

3:36 vIkSiT: tomoj, LauJensen - given that returns a sequence of lists - how do you convert it back to a map?

3:36 (or do you not need to?)

3:37 tomoj: it would be somewhat silly to convert it back to a map

3:37 since you started with a map

3:38 vIkSiT: heh i get that..

3:38 i meant, converting an arrayseq into a map in general ..

3:38 clojurebot: paredit screencast is http://p.hagelb.org/paredit-screencast.html

3:38 vIkSiT: ... ?

3:38 LauJensen: (into {} ...) ?

3:38 vIkSiT: LauJensen, ah.. and that won't maintain the ordering right?

3:39 unless i do a sorted-map perhaps

3:39 LauJensen: Right

3:39 But like tomoj says, you have no motivation to convert it back

3:40 tomoj: sorted-maps are sorted by key

3:44 vIkSiT: LauJensen, right

3:44 tomoj, ah right

3:49 LauJensen: ,(reduce #(assoc %1 (val %2) (key %2)) {} {:a 3 :b 5 :c 1})

3:49 clojurebot: {1 :c, 5 :b, 3 :a}

3:49 LauJensen: vIkSiT: Of course you could switch them, but now we're way into silly town :)

3:49 vIkSiT: hehe

3:51 wow. stack overflow error when serializing last data structure

3:51 hmm, how do i customize my lein swank to give more memory to the JVM btw?

3:51 wwmorgan: ,(doc map-invert)

3:51 clojurebot: I don't understand.

3:53 neotyk: Hi

3:53 is there an easy way to "splice" a map?

3:54 macro gets map as argument, and wants to use it inside as keyworded arguments

3:55 Chousuke: ~@(apply concat themap)

3:55 clojurebot: Excuse me?

3:55 * neotyk trying it out

3:57 neotyk: Chousuke: works great, thank you

4:03 what is more idiomatic for macro when it expects some configuration in first argument to expect it as map or as vector?

4:07 spariev_: vIkSiT: I just added a line with JAVA_OPTS="$JAVA_OPTS -Xmx2048m" at the beginning of the lein script

4:07 vIkSiT: spariev_, ah. It looks like :jvm-opts in project.clj with ["-Xms2048m"] should work too..

4:07 AWizzArd: neotyk: I would say that this is a question of personal taste, but of course depends on the situation. Having many named fields makes accessing them easier and allows easier for optional key/value pairs.

4:09 neotyk: which would be better? 1. (a {:n v} ..) 2. (a [:n v] ..)

4:09 vIkSiT: hmm I think my issue may not be jvm memory.

4:09 spariev_: vIkSiT: yep, looks like I use ancient version of lein :) :jvm-opts is the way to go

4:09 vIkSiT: I get a stackoverflow trying to serialize a large datastructure using this serialize function : https://gist.github.com/3e3bdb1f0ca0ca72c5c6

4:09 spariev_, :)

4:10 how do you guys serialize large data structures? convert to json perhaps?

4:10 AWizzArd: neotyk: another option is to not pass a map/vector at all.

4:10 LauJensen: neotyk: According to the guidelines, unroll the map (fn :a 5 :b 3)

4:10 AWizzArd: But instead the macro accepts [arg1 arg2 & keys], and you can (apply hash-map keys)

4:11 Chousuke: or use the new destructuring feature :P

4:11 AWizzArd: And merge this with defaults.

4:11 yes true

4:11 Destructuring.

4:11 Chousuke: btw, why "new"?

4:11 Isn't that available already since pretty long time by now?

4:11 Chousuke: AWizzArd: it was introduced in 1.2 which was just released

4:11 so pretty new.

4:12 vIkSiT: or not. looks like json-read and write arent supposed ot map to clojure data structures

4:12 shucks

4:12 AWizzArd: Chousuke: ah okay

4:13 neotyk: Chousuke, AWizzArd, LauJensen I have that macro http://github.com/neotyk/ahc-clj/blob/24be2b2c51dd5a7fd36d5fe3230999ea6daeec8e/src/async/http/client.clj#L34

4:14 Chousuke: neotyk: why the destructuring form there? that's equivalent to just "config"

4:14 neotyk: Chousuke: because it is my first macro :-)

4:14 Chousuke: anyway, in that case I would go with a map for the configuration.

4:15 but hm, do you depend on the http client being bound to *ahc*?

4:17 You should avoid dynamic binding if you can. It hurts composability.

4:17 neotyk: Chousuke: yes, normally library provides async http client, but if you want to use your custom configured one, than I figured out that would be way to go

4:17 Chousuke: okay.

4:18 AWizzArd: neotyk: if this were not a macro, but a defn, how would you solve/prefer it then?

4:20 neotyk: AWizzArd: I don't see it been solvable with defn

4:20 Chousuke: You can but you'd have to pass around anonymous functions :/

4:20 neotyk: I like "new" destructuring a lot

4:21 AWizzArd: Macros are never needed. They just abstract away some syntax, and in this case, as Chousuke said, they spare you a (fn [])

4:21 Chousuke: Well, hm

4:21 Some things are not really possible with functions

4:22 AWizzArd: All is possible, from a mathematical point. But in that point saving to type duplicated code is not included.

4:22 Chousuke: I think some opengl clojure wrapper (possibly penumbra) does reflection in macros to generate bindings for opengl methods at compile time.

4:22 I don't see how that's even in theory possible without macros :P

4:22 AWizzArd: from the computational point it can be done without macros, even if that means the code would run slower

4:23 Chousuke: Well yeah, but that's pretty useless information :)

4:23 AWizzArd: Also, functions could write pure byte code directly.

4:24 neotyk: I would probably use keyworded args for config like here http://github.com/neotyk/ahc-clj/blob/refactor/src/async/http/client.clj#L24

4:24 Chousuke: neotyk: but you can't in this case because you have the body parameter. So go with a map.

4:25 AWizzArd: neotyk: btw, I think what Chousuke said before about {:as config} also applies to {:as options}.

4:25 You could just say 'options' instead

4:25 Chousuke: AWizzArd: actually not

4:25 the map form in that case causes "options" to become a map.

4:26 in the earlier case {:as config} is redundant because it doesn't follow a & and thus has different destructuring behaviour

4:28 AWizzArd: Oh right, a &. Good point.

4:28 Chousuke: but the & {:as options} form causes the args in the form of ":foo bar :some more" become {:foo bar :some more} which is then destructured normally; and since there's only :as, it just gets bound as is to 'options

4:30 neotyk: I've also modified a bit c.c/promise so I can check if it was delivered

4:31 do you think it is worth creating ticket and submitting a patch for it?

4:32 implementation is: http://github.com/neotyk/ahc-clj/blob/refactor/src/async/http/client/util.clj#L20

4:35 AWizzArd: neotyk: better ask rhickey first

4:40 Bjering: LauJensen, status is I am porting my C++ server + stressbot to Linux to rerun the trials there, even though I would be surprised if that changes alot.

4:41 LauJensen: k. I dont know how much it will change, but I remember in on of my blogposts on benchmarking, I could pick the windows user out from among the *nix users in the comments, just by looking at his results

4:42 Bjering: could be the difference is huge for jvm things. Doubt many shops runs heavy java servers on Windows.

4:42 For C++ the windows story is good.

4:48 I think it could be huge judging from this post... http://stackoverflow.com/questions/592303/asynchronous-io-in-java

4:48 it says in JDK6 they use select in windows, which is bad.

4:54 LauJensen: Interesting - Im wondering why you're porting the C++ server as well, isnt seeing how the Clojure version performs against your stressbot enough?

4:55 Bjering: It wont be the same hardware, reinstalling my main workstation is more job than fixing the minimal porting I will have to do. And to be fair, running on my 6 year old single-core Athlon git server I expect any version to perform less.

4:56 hmm, 8 years old even.

4:56 surprised it still runs...

4:58 AWizzArd: Bjering: did you think about trying to put your service on Googles App Engine?

5:00 Bjering: AWizzArd, no I haven't but dnolan also showed me Amazons service could be a good idea. Now all that said. I am currently running through local-host. I want to test _my_ code, not my internet. But I should probably learn/investigate those kinds of hosting solutions eventually.

5:01 AWizzArd: Yes, EC2 is also nice, though for very low-end hardware you will pay over 80$ per month, while at Google you get a much better starting point for roughly 0$ per month.

5:01 LauJensen: Bjering: Single-core isnt good for Clojure. GAE isnt good for Clojure Concurrency. You should try on a Linux box with at least a couple of cores

5:02 Amazon might be your best bet like dnolen said

5:02 AWizzArd: LauJensen: spending several hundreads for some hobby projects is not possible for everyone.

5:03 hundreds even

5:03 LauJensen: AWizzArd: Its not a hobby project

5:03 And besides, EC2 costs very little money

5:03 AWizzArd: Many thousand percent more than Google.

5:03 LauJensen: percentages can cheat - 5$ isnt much

5:03 Bjering: anyway, if the test on my old Linux machine are positive for jvm/netty vs the C++ I will have to get Linux to my dev-machine anyway and we can have more authorative test results. Or I could just send anyone a rar of both my C++ and Java/Clojure code and hear someone elses result.

5:04 LauJensen: And besides, he needs to work with agents which is a no go on GAE, so its not an option

5:04 AWizzArd: Depends on the design of his app. On Google he has 72 cores.

5:04 LauJensen: Bjering: Im a little pressed for time this week, otherwise I would have loved to help

5:05 AWizzArd: Bjering: what are your experiences so far? How much slower is the JVM, compared to C++ in this case?

5:05 Bjering: You are already helping, yesterday you taught me to get rid of reflection which was a x10 speedup that shifted the bottleneck :)

5:06 LauJensen: :)

5:06 Bjering: on my system, a call to partial is a 10x slowdown as well

5:07 Bjering: AWizzard, with java solution (and clojure solution, I have both versions), my machine starts taking alot of cpu load when I go above 7k stressbot clients, and totally hangs my machine at 35k clients. My C++ (using boost::asio for the network) takes 2% CPU when I run it using 4 threads, and 5% when it use 1 thread.

5:08 AWizzArd: 2% for 35k clients?

5:08 LauJensen: You wish

5:08 Bjering: Its interesting how the C++ solution perorms WORSE when allowed only one thread, I think its typical network congestion behavior... start getting a queue alot of CPU goes to maintaining that queue. Its a pretty hard point until everything is fine, and above it it is just bad.

5:09 AWizzArd: Bjering: did you read that article, about having 100k concurrent users on Netty?

5:09 Bjering: AWizzard, the C++ I stop at 50k clients. It has a hard peak at 64k when I run out of ephemeral ports for my stressbots.

5:10 AWizzard, yes, I suspect he has either alot less traffic per connection and/or he also run onther OS and get a proper NIO.Selector.

5:11 AWizzArd: So, why don't you then stay with the C++ solution? It seems to be working already and performs way better.

5:12 Bjering: AWizzArd, this is just a benchmark/test. The real app I will build will have a complext game world, and I think clojure would be an excellent match for modelling it and querying it, I expect to be MUCH more productive if I could pick clojure.

5:12 AWizzArd: I mean, I find it very interesting to see such comparisons, especially if it is not this minimal nonsense of the language shootout, but instead something realistic.

5:12 Bjering: Its a 18 month project eventually

5:13 Spending ~1 week picking core techonogy seems reasonable

5:13 AWizzArd: ah ok

5:13 And will your chat server take http requests?

5:13 Bjering: no

5:13 AWizzArd: Ah okay, so Netty offers also something else than this?

5:13 Bjering: Eventually it might be binary sockets using google protobufs, but this chat server user 0-terminated strings. As preferred by Flash XMLSocket.

5:14 yes

5:14 TPC-IP sockets

5:14 neotyk: AWizzArd: netty is convenience wrapper over nio, http is just one of protocols you can support there

5:15 AWizzArd: oh, good to know

5:15 I thought it is mostly a http server.

5:15 kumarshantanu: Bjering: Is this scaling required for user-facing HTTP stuff? or some back end thing? *curious*

5:15 Bjering: kumarshantuanu: Client facing, NON-http stuff.

5:17 neotyk: AWizzArd: well http is hell popular, right ;-)

5:17 Bjering: http or not is not the issue. Its the selector that takes all the time, and I have a stackoverflow answer that states java.nio on JDK6 use select on windows.... if that is correct and not avoidable that alone explains why performance becomes bad. Porting will show if that was the case.

5:18 neotyk: Bjering: I was able to simulate Reverce C10K on my mac with netty

5:18 with no problems

5:18 kumarshantanu: Bjering: This may be mildly OT -- did you look at ICE? http://www.zeroc.com/index.html

5:18 AWizzArd: Bjering: please, write down all those interesting infos, and write up a nice article about that.

5:18 hiredman: I think netty can use xnio now too, so you might look in to using that

5:19 neotyk: Also in grizzly we used to support aio

5:20 Bjering: kumarshantanu: Yes briefly, I think it is too tuned to model a typical MMO-world, my game wont be that typical.

5:20 neotyk: but aio is hard to get as jdk7 has not been released yet

5:21 Bjering: hiredman: Very interesting, defintly worth trying.

5:22 alright, pause on the port work... testing xnio first.

5:22 LauJensen: hehe

5:43 Bjering: found out why I cant fint xnio classes in my 3.2 netty jar... I will try to downgrade to 3.1 even though this post kind of states it wont be a point, it might not be considering the windows situation.. http://www.jboss.org/netty/community.html#nabble-td5190537

6:28 sunkencityryleh: I have a weird problem with pmap when I use pmap in a jar file (built with leiningen uberjar) it freezes after having run pmap (doesn't happen in repl, or with map) do I need to add some extra options for threading or what?

6:34 AWizzArd: sunkencityryleh: You don't need to do anything extra. This seems to be a more complex problem.

6:36 sunkencityryleh: AWizzArd: ok. It's pretty weird I thought that pmap would act as a drop-in replacement for map

6:39 hiredman: you need to call shutdown-agents, pmap uses the agent threadpools and the jvm waits for all the threads to exit

6:39 sunkencityryleh: hiredman: ah thanks!

7:14 how can I concat a string to a collection without adding each char as a separate entity :)

7:15 ,(concat '("foo" "bar") "baz")

7:15 clojurebot: ("foo" "bar" \b \a \z)

7:17 msf: how can I get clojure to print a full stack trace ?

7:26 sunkencityryleh: doh, of course conj works to append to the list :)

7:31 neotyk: msf: clojure.stacktrace/print-cause-trace

7:41 msf: thanks

7:42 LauJensen: sunkencityryleh: when you say freezes, do you mean that it hangs after having completed its run, not exiting the program ?

7:43 sunkencityryleh: LauJensen: yep. wrapping the pmap function in a (do (pmap...) (shutdown-agents)) solved the problem

7:44 LauJensen: good - Ive been bit by that before as well :)

7:45 sunkencityryleh: yep it's a problem that comes completely from outer space :) I was completely lost as to what the problem would be

7:47 rhudson: 'future has that issue as well

7:49 no_mind: any good tutorial on getting started with web development in clojure

7:49 I am trying my luck for past 2 hours to print hello world in browser

7:49 LauJensen: no_mind: I have a couple of my site

7:50 no_mind: LauJensen, url ?

7:50 LauJensen: http://bestinclass.dk/index.clj/2009/12/dynamic-interactive-webdevelopment.html

7:50 http://bestinclass.dk/index.clj/2009/12/beating-the-arc-challenge-in-clojure.html

7:50 http://bestinclass.dk/index.clj/2010/02/reddit-clone-in-10-minutes-and-91-lines-of-clojure.html

7:50 http://bestinclass.dk/index.clj/2010/02/reddit-clone-with-user-registration.html

7:50 no_mind: thnxs

7:50 LauJensen: Perhaps start with the arc-challenge one, thats the simplest. And then as a bonus, the entire site bestinclass.dk, blogging backend and all is written in Clojure and its open source

7:51 no_mind: aha

7:59 LauJensen: no_mind: And finally, if you make a new project with moustache, hello world is (def myapp (app [""] (-> "Hello World" response constantly))) (doto (Thread. #(run-jetty #'myapp {:post 8080})) .start)

7:59 the [""] means the url "/", ["hey"] would be "/hey" with or without the trailing slash

8:28 Bahman: Hi all!

8:33 pdk: (doc constantly)

8:33 clojurebot: "([x]); Returns a function that takes any number of arguments and returns x."

8:42 defn: http://xahlee.org/emacs/lisp1_vs_lisp2.html <-Curious to know what Clojurians think of this...

8:45 I think I agree with the basic premise: Too much jargon in clojure, haskell, etc.

8:45 The question then becomes how to remedy that

8:54 LauJensen: defn: Where do you come across this jargon in Clojure?

8:54 no_mind: LauJensen, trying your tutorials and constantly getting "java.io.FileNotFoundException: Could not locate hello_world__init.class or hello_world.clj on classpath: (NO_SOURCE_FILE:0)" I am running it through lein repl

8:55 LauJensen: no_mind: I never tried lein repl and I cant offer you support with lein (try technomancy), but the repos I uploaded should work if you type "lein deps && lein swank", then M-x slime from Emacs. Also one or 2 of them are executables, so "lein deps && jein jar && java -jar thatjar.jar" should work

8:56 (Im thinking of the reddit clone)

8:56 no_mind: why cant we have something simple in clojure for this ?

8:56 raek: "lein deps && lein repl" should be suffficient

8:57 LauJensen: no_mind: Isnt it simple though? :)

8:57 raek: no_mind: did you do a lein deps?

8:57 no_mind: raek, yes

8:58 raek: which repo?

8:58 this one? http://github.com/LauJensen/bestinclass.dk

8:58 no_mind: raek, it is a fresh project I created with lein new

8:59 LauJensen: raek: No that one is more tricky to install as it is married to nginx

8:59 raek: ok, and you do a (ns ... (:use hello-world)) or something?

8:59 defn: LauJensen: I guess now that I consider it there isn't jargon, but I wonder about how Clojure is presented to someone new to FP, Lisp, Java, etc. I get the sense that in Clojure there are these infinite possibilities which people starting out /don't want to know about/ because they make the language seem daunting

8:59 LauJensen: http://github.com/LauJensen/cloneit

9:00 raek: That one I think - I gave him 4 blogposts to scrape through

9:00 defn: the number of choices in Clojure causes paralysis

9:00 clojurebot: "[Clojure ...] feels like a general-purpose language beamed back from the near future."

9:00 defn: just choosing an editor becomes an exercise in learning them all

9:00 raek: it says that it can't find your hello_world.clj file

9:00 did you put it in src/ ?

9:00 no_mind: yes

9:00 and set the CLASSPATH as well

9:00 LauJensen: defn: I dont think people ever hear the word 'idiomatic' thrown as much around anywhere else than here, but still its not a void word that only we understand. I cant really think of any jargon

9:00 raek: lein does the classpath things for you

9:00 defn: choices are nice, but they cause paralysis in noobs

9:01 raek: do you have an underscore or a hyphen in the file name?

9:01 LauJensen: defn: paralysis is also nice, ... nice and relaxing

9:01 defn: for instance, if im just learning clojure, i dont care to know which functions are lazy

9:01 i dont care to know how to thread forms

9:01 raek: (ns hello-world) should be in src/hello_world.clj

9:02 Raynes: Methink's I'd like to know that map is lazy and what the significance of that is before it bites me in the ass.

9:02 defn: i guess my goal is to just arrive at some sort of meaningful subset of clojure's features which could be used without explaining 50 years of computer science

9:03 no_mind: raek, yes

9:03 raek: that should work.

9:03 defn: id like to teach a class at a local college on clojure but there will be limited time available to me

9:04 maybe im just underestimating students, but the depth to so many aspects of clojure (which attracts me) might be a turn off to others who are familiar with more "conventional", "main stream" languages

9:05 raek: lein new foo && cd foo && echo '(ns hello-world)' > src/hello_world.clj && lein repl

9:06 (require 'hello-world)

9:06 this works for me

9:07 defn: i guess the question im asking is, what is a smooth way to introduce a new paradigm without overwhelming them

9:07 them being students

9:07 LauJensen: defn: We have these wonderful entry points for noobs that are so easy to get started with, like try-clojure.net, the Eclipse and Netbeans IDEs which automatically install Clojure. But what all of these (especially the first) need is a good interactive tutorial

9:07 rhudson: defn: Might be worth taking a look at SICP to see what it starts with

9:08 LauJensen: rhudson: starts with an algorithm for approximating square root

9:08 defn: LauJensen: amen

9:08 rhudson: I was thinking more of what forms & functions it starts with

9:09 Raynes: I don't get "interactive tutorials".

9:09 defn: I've actually written several tutorials that I've abandoned because at some point (usually early on), I find myself digging /way/ to deep

9:09 too*

9:09 Raynes: I've never had any desire to run through a JavaScript powered tutorial when learning a new language, but that's just me.

9:10 defn: explaining things which have elements which require explanation, which have elements which also require lengthy explanations and references to wikipedia articles and dusty, stuffy sounding book titles

9:10 dnolen: SICP starts at the right place and keeps going, there's very little math in it (at least in the way that most people have been brain-washed by)

9:10 defn: like "The Structure and Interpretation of Computer Programming"

9:10 for so many novices that is a huge turn off

9:10 It sounds very ivory tower

9:10 dnolen: defn: huh, the only I hear complain about SICP are people who already know how to program.

9:11 Raynes: Not that I wouldn't welcome an interactive tutorial in try-clojure if somebody wanted to waste their time on it, as long as it isn't me. ;)

9:11 defn: id really like to build a ruby-koans, but for clojure

9:12 http://github.com/edgecase/ruby_koans

9:12 LauJensen: defn: But I think before we undertake this mission of bringing in the hordes, we should ponder one of lifes most profound mysteries: Why is PHP so popular?

9:12 defn: LauJensen: haha :D

9:12 AWizzArd: Because it started lightweight.

9:13 Raynes: LauJensen: Maybe Rich should proclaim his hatred for programming languages and say he doesn't know how to design a language.

9:13 AWizzArd: Same with HTML+JS vs. Java Applets.

9:13 LauJensen: I mean, this insanely inconsistantly designed language, which is so verbose and ugly and tedious to work with and debug, why is it the 5.th most deployed language in the world?

9:13 AWizzArd: MySQL.

9:13 Raynes: s/programming languages/programming/

9:13 sexpbot: LauJensen: Maybe Rich should proclaim his hatred for programming and say he doesn't know how to design a language.

9:13 AWizzArd: All those solutions that started out totally crappy but lightweight won. Twitter. Google.

9:13 defn: AWizzArd: agree on all of your points there.

9:13 CSS could be in that camp as well

9:13 AWizzArd: Win a big userbase and then improve.

9:13 LauJensen: Raynes: Ive made many blogposts where Rich had the opportunity to post hatefilled flamebaiting comments, but he never grapped it :(

9:13 bobo_: php is popular because you dont need to know any programing at all to use it. in fact. its easier to use if you dont

9:14 LauJensen: haha, true

9:14 defn: AWizzArd: in a way you're sort of discussing what I was trying to puzzle out earlier

9:14 a subset of clojure which does almost nothing

9:15 so it is almost too easy for people new to the language to get their heads around

9:15 LauJensen: defn: I think maybe we should just accept that Clojure is primarily for serious people and Raynes. Its not possible to bring the hordes to a functional lisp and not have it run away

9:15 :)

9:16 defn: LauJensen: On the one hand I want to keep my relationship with Clojure discrete, personal.

9:16 * Raynes lols

9:16 defn: On the other I would to write it on a stone tablet and distribute it to the masses.

9:16 :)

9:16 LauJensen: defn: tell me which hand to chop off, right or left?!

9:16 I want to see Clojure grow as well. But for wide adoption in the industry, takes a lot longer than wide adoption in teenage communities

9:16 defn: hmmm, left, so you can keep easy access to your parens

9:17 LauJensen: defn: I meant I wanted to cut off your hand with the stone tablet :)

9:18 defn: It's like enjoying a band but knowing that if you put up too many flyers, the lead singer is going to eventually do a deodorant commercial.

9:19 In this case the lead singer would be Stuart Halloway.

9:19 pdk: isnt that sort of why trent reznor killed himself

9:19 defn: (I kid S.H.)

9:19 pdk: HMMMMM

9:19 LauJensen: defn: You know Rich has a music carrer on his resume right?

9:19 defn: LauJensen: I do.

9:19 LauJensen: Thankfully he failed

9:19 defn: Which I have found fascinating and inspiring.

9:20 I studied music, and I often feel like a fish out of water in the CS circuit.

9:20 Raynes: I can't write songs to save my life.

9:20 LauJensen: defn: Well, now you can team up with Rich and have Raynes do back up on his Banjo

9:21 defn: ha!

9:21 pdk: wait

9:21 wrong guy

9:21 defn: pdk: yeah I didn't think Reznor killed himself?

9:21 pdk: kurt cobain i mean

9:21 defn: pdk: maybe you meant Kurt C.?

9:21 Yeah

9:22 I don't know -- the whole thing about having real anxiety over whether or not you're popular, while I think it's normal and human, is totally irrational and ridiculous

9:22 You just use what you love and make things you enjoy. Why overthink it?

9:22 Raynes: I didn't know Kurt Cobain had a real reason for killing himself other than typical suicidal depression, but I digress.

9:22 pdk: i thought his case was more that he was worried about ending up a sellout

9:22 defn: I think heroin played a role. Is this #clojure?

9:22 Raynes: defn: Aye, good point.

9:23 pdk: psychoactive substances do help in understanding macros

9:23 :p

9:23 Raynes: As does a good night sleep.

9:23 LauJensen: We have #clojure-casual I think, ready to receive theories on why KC killed himself

9:23 defn: Thinking about it before you sleep is best.

9:23 (IMO)

9:24 pdk: cmon now

9:24 Raynes: defn: Thinking about it while you drift off to sleep will result in answers and insight in the morning.

9:24 pdk: don't tell me you've never heard it brought up during the review process of an rfc

9:24 Raynes: My very own midnight oracle.

9:24 defn: Raynes: yeah...

9:25 Raynes: Oh, nice. chouser finally got ops or foundership transfered?

9:25 defn: pdk: I haven't had the "pleasure" of being involved in any of those.

9:25 pdk: doogie chouser

9:25 * defn chuckles

9:25 pdk: the hit new retro inspired classic tv show

9:25 defn: What's his catch phrase?

9:26 It's a sitcom, so you need one.

9:26 pdk: ummm

9:26 good point

9:28 Raynes: Aw man. My last Irclj commit had a borked issue-closing commit message.

9:28 I did "Closes 2#" instead of "Closes #2"

9:30 LauJensen: Raynes: Ive always wondered, is it true that this is how you get your mail? http://i.imgur.com/V698o.gif

9:31 Raynes: LauJensen: Absolutely.

9:39 I just closed Irclj's last issue. I feel so warm and fuzzy inside.

9:39 LauJensen: Congratz :)

10:19 emh: is there a way to write Clojure strings without having backslashes escaped, or have a macro do it? I have a lot of latex strings in my Clojure code

10:19 s/escaped/interpreted/

10:19 sexpbot: is there a way to write Clojure strings without having backslashes interpreted, or have a macro do it? I have a lot of latex strings in my Clojure code

10:20 pdk: when you enter them it's going to process the string to evaluate the escape chars before it gets passed off to any function/macro anyway

10:20 so youll probably have to bite the bullet here

10:20 and output two \\s where you want one

10:20 two \s rather

10:21 emh: ok

10:21 chouser: emh: there's no way to get a literal double-quote in clojure code without a backslash. A shame, but that's where we are.

10:22 you might consider putting such strings in some other file and processing it, rather than trying to embed very many such strings in your code.

10:22 emh: yeah, I've been doing that for bigger chunks

10:26 I also defined a bunch of functions like (section "Section") and (par "Some text...") that output the latex functions for the most commonly used functions

10:26 chouser: that's a good idea. could write a macro to generate such functions for you.

10:27 emh: yep

10:30 arkh: a java method declared as 'void' returns nil when run from clojure, is that true?

10:32 chouser: arkh: yes

10:32 arkh: chouser: thanks

10:38 defn: chouser: Can I make a casual suggestion for your next project. (After JoC)

10:38 chouser: defn: ha! sure.

10:38 defn: s/\./\?

10:39 clojure-koans : http://github.com/edgecase/ruby_koans

10:40 MayDaniel: http://github.com/relevance/functional-koans/tree/clojure

10:40 defn: noooo!!!

10:40 * defn spent 4 hours working on clojure-koans the other day

10:41 * slyrus keeps typing #x instead of 0x

10:41 defn: I think I'll keep writing my own anyway... I think there is a lot of room for narrative in the koans.

10:42 and I think I'd still suggest a masterful version of clojure-koans to chouser. :) Reason being, I look at JoC and I see these narratives, these stories.

10:43 It seems like something he and fogus would be able to master in a way that sticking to the script doesn't achieve.

10:43 Like "nil pun with care"

10:44 fogus: defn: I want to check that out at some point. At the moment I'm working on something else that I think people will enjoy

10:44 defn: fogus: If you think people will enjoy it, then not working on it (at this particular moment) is the only thing you're doing wrong.

10:44 :)

10:45 fogus: I think people will enjoy this other thing better. ;-)

10:45 no_mind: which IDE has support for clojure except for Emacs ?

10:45 defn: no_mind: many

10:45 no_mind: netbeans, eclipse, vim

10:45 pdk: isn't there an intellij plugin

10:46 defn: yeah there's one of those

10:46 there are some standalone IDEs

10:46 pdk: expect a lot of emacs chauvinism from folks either way though

10:46 no_mind: eclipse and netbeans are too heavy and vim has no GUI

10:46 mrBliss: no_mind: http://www.assembla.com/wiki/show/clojure/Getting_Started

10:46 pdk: where are these standalone clojure ides

10:46 bozhidar: the intellij plugin is pretty buggy I think

10:46 defn: no_mind: what do you use right now?

10:46 no_mind: geany

10:46 mrBliss: <mrBliss> no_mind: http://www.assembla.com/wiki/show/clojure/Getting_Started

10:46 <pdk> where are these standalone clojure ides

10:46 <bozhidar> the intellij plugin is pretty buggy I think

10:46 <defn> no_mind: what do you use right now?

10:46 defn: so you run linux I take it?

10:46 mrBliss: <no_mind> geany

10:47

10:47 pdk: an exchange so nice we posted it twice

10:47 no_mind: yes I run linux

10:47 defn: no_mind: ever use textmate?

10:47 no_mind: textmate ? isnt it osx only

10:48 defn: yeah, but danlucraft has been working for i think 2 years now on "redcar"

10:48 which is sort of an open source, cross-platform textmate

10:48 Raynes: no_mind: Vim does have a GUI.

10:48 defn: which can use textmate bundles

10:48 Raynes: There is gvim.

10:48 chouser: defn: you'd want me to write koans?

10:48 defn: chouser: heh now I feel like I've disrespected you somehow

10:48 slyrus: ,(aset (byte-array 32) 0 12)

10:48 clojurebot: java.lang.IllegalArgumentException: No matching method found: aset

10:48 chouser: well no, I just don't know what koans are about

10:49 no_mind: last time I used redcar, it kept on crashing. Let me try again

10:49 chouser: I mean, I'd write puzzles for people to solve?

10:49 defn: I just read Joy of Clojure and I think there is way you have with the /narrative/, your examples, the way you and fogus and chosen them is so purposeful, and you have had this experience

10:49 slyrus: how do I set values in a byte-array?

10:49 qbg: To test a ns foo.core, leiningen 1.3 creates a ns foo.test.core. Is this the current idiomatic test ns name?

10:49 danlucraft: no_mind: crashing? that's not good.

10:49 defn: chouser: sort of -- the puzzles are not hard so much as they demonstrate little bits of edge cases

10:49 slyrus: do aset-byte?

10:49 qbg: contribs has tests in the form of foo.test-core

10:49 slyrus: s/do/d'oh/

10:49 sexpbot: d'oh aset-byte?

10:50 no_mind: yup crashing. You are typing code in full swing and boom! The editor window disappeared :(

10:51 danlucraft: no_mind: I honestly have not had that happen to me for a loong time. When was this?

10:51 no_mind: about 4 months ago

10:51 fogus: defn: They look similar to the LIttle Lisper/Schemer/MLer series no?

10:51 no_mind: I am using Sun JDK

10:51 danlucraft: no_mind: hmm. well, try it again. it's more stable now for sure. Clojure editing is shit though

10:51 no_mind: the auto-indenter goes mad :)

10:51 defn: danlucraft: i just set up the newest version of redcar after being out of the game for 8-9 months. great project.

10:52 danlucraft: defn: thanks :)

10:52 defn: danlucraft: what's with rubyzip, is it?

10:52 i suppose i could google it but I saw it while I was installing and was curious

10:52 no_mind: hmm

10:53 danlucraft: defn: on windows it downloads and unzips gecko for the htmltab

10:53 defn: ah-ha

10:53 no_mind: why cant we have a geany plugin for clojure. That IDE is pretty stable and I can generate exactly same screenshots as redcar, with geany :)

10:54 slyrus: i don't suppose there's any support for unsigned bytes tucked away somewhere?

10:54 defn: rude no_mind, but well, i dont know anyone who uses geany

10:54 danlucraft: no_mind: screenshot level compatibility is very powerful thing

10:54 defn: no offense

10:55 Raynes: I know a couple of people who use Geany, but really not many.

10:55 defn: no_mind: what's the reason for not using a more full-featured editor like vim or emacs?

10:55 no_mind: I was joking. But screenshot level compatibility is a major game changer in several cases. :)

10:55 I used to use Vim

10:55 danlucraft: ah, ok Gtk2

10:55 no_mind: used it for 11 years

10:55 then got fed up and wanted to try something new

10:55 * Raynes is an Emacsen4lyfe.

10:55 no_mind: tried every kid on the block

10:55 defn: with what no_mind?

10:55 no_mind: and settled for geany

10:56 defn: you said you were "fed up", but I'm curious with what

10:56 it edits text -- it has a big user base, lots of plugins

10:56 no_mind: with Vim and more than vim the boring command line

10:56 danlucraft: no_mind: interesting choice. what are the main draws of Geany in your view?

10:56 defn: no_mind: ever heard of gvim?

10:56 Raynes: And Cream.

10:57 I've heard lots of good things about cream.

10:57 defn: Cream, gedit, geany

10:57 * dnolen_ just dawned on him why datalog is a good fit for Clojure

10:57 defn: I've used them -- but the base of users on those editors is small enough that you wait for a feature like a clojure plugin for 4 years.

10:57 no_mind: danlucraft, small install file size, easy on RAM plus gives you symobol and function list for every doc you open in left hand doc. So jumping functions is easy. Apart from all other features of standard IDE

10:57 defn: which is why no_mind is posing this question in the first place

10:57 Raynes: defn: Cream *is* Vim.

10:57 It's just an easier to use Vim.

10:58 danlucraft: defn: I'd love to work on clojure support next, but there's just so much to do :)

10:58 no_mind: defn, I wanted to try something which is not vim or emacs

10:58 defn: right, like that whatchamacallit "easier" emacs

10:58 it just breaks compatability

10:58 bah humbug

10:58 danlucraft: defn: david byrne integrated the enclojure repl a few weeks ago

10:58 defn: /the/ david byrne?

10:58 danlucraft: but haven't heard much from him since...

10:59 Raynes: defn: Really? I was pretty certain that Cream was fine with typical Vim plugins.

10:59 danlucraft: defn: no

10:59 defn: danlucraft: heh

10:59 Raynes: you used the word typical

10:59 what if I want atypical

10:59 Raynes: defn: I'm pretty sure you can use ANY Vim plugin with Cream, but I'm not familiar enough with it to say.

11:00 defn: Raynes: nor am I tbqh -- I remember using it about 4-5 years ago

11:00 I just don't see why, if it's functionally equivalent, you wouldn't just graduate to vim at some point

11:01 you use the menus for awhile and learn how to do it all with a :, and then you move on

11:01 Raynes: Maybe that's what they're aiming for.

11:01 defn: I used the emacs menus for a little while, but then I turned the ugly toolbar off -- it's just a distraction

11:01 It reminds me of filters in photoshop

11:02 You want to make a button, so you make a button, and then you spend 30 minutes applying filters and undoing

11:02 if I need a gaussian blur I'll M-x gaussian-blur

11:02 Otherwise I don't need it in my face

11:03 danlucraft: no_mind: interesting, thanks. one of the few editors I have never tried

11:45 slyrus: do boolean arrays use 1 bit per element?

11:47 chouser: hm, I'm having trouble finding a definitive statement, but I doubt it.

11:47 "Arrays of type boolean are accessed and modified using the byte array instructions baload and bastore"

11:48 if you want your bits packed, you'll probably have to pack and unpack them yourself.

11:50 slyrus: pack and unpack them out of what? unsigned numeric types?

11:50 fun...

11:50 s/unsigned/signed/

11:51 I was all set to pack them out of bytes until I realized that bytes are signed and they probably take up more than one machine-byte per byte (4?)

11:51 pdk: remember

11:52 high storage overhead is the wave of the future

11:52 no_mind: is there a pastebin for clojure ? or should I use generic pastebin

11:52 slyrus: cheap whole genome sequencing is the wave of the future

11:52 Raynes: no_mind: gist.github.com, hpaste.org, paste.factorcode.org, paste.pocoo.org, and several others have Clojure-specific highlighting.

11:53 gist.github.com is my personal favorite.

11:53 LauJensen: gist.el is my personal favorite

11:54 Raynes: That isn't a website.

11:54 ;)

11:54 no_mind: ok

11:54 arkh: is CamelCase used for defrecord?

11:54 er .. that wasn't camelCase

11:54 anyway, mixed case?

11:55 cemerick: Generally, yes.

11:55 arkh: cemerick: is that because it's making a Java class?

11:55 cemerick: Yes.

11:55 arkh: cemerick: cool - thank you

11:58 sorry, I've always wondered this, too. For a Java class, would you say "UDPServer" or "UdpServer" ? Wondering if the acronym would stay caps.

12:00 pdk: itd stay caps

12:01 arkh: pdk: thanks

12:01 pdk: look at the convention in java standard library, sun has an online javadoc for it

12:01 cemerick: yeah, keep acronyms capitalized in general

12:02 arkh: pdk: oh duh ... like 'HttpURLConnection" - but then that alternates. I suppose HTTPURLConnection looks silly : /

12:09 slyrus: ok, how about chars? are they really 2-bytes? if so, that will probably work.

12:15 bobo_: cant i open multple files at once in emacs? *.clj actually opend a file named *.clj

12:15 fsmunoz: cheers

12:16 Bjering: Alright, what I learn today is that computers have become faster the last 8 years :)

12:18 fsmunoz: Small problem here, just wanted to check if it's something known/trivial or not: I've installed lein (self-install, etc, etc) and while it creates a new project it refuses to do anything else (namely, test/repl/swank, probably more) with an error like: Exception in thread "main" java.lang.NoClassDefFoundError: _j2se_j9=1119744. Any pointers?

12:20 mrBliss: bobo_: you could try dired

12:22 Bjering: For those following my chat-benchmarking-adventures (I really should get a twitter account atleast...) I have now compiled C++ versions to my ancient Linux machine. It can handle 3000 clients at 26% CPU load. The java/netty version handles 3000 clients at 32% CPU load. That is more the kind of difference I expected. Seems I have a strong case that Java6 NIO impl on windows is what is holding back my results. Tomorrow I'll learn/install Linux...

12:22 bobo_: Bjering: daily blog updates atleast!

12:24 mrSpec: that doesnt realy open the files? it lets me pick the files and open them?

12:24 durka42: is there a good way to build regexes from common components, or have string interpolation in regexes? it's hard to concatenate #"" patterns with str because you can't have unmatched parens inside #"", so (str #"ab(" *thing* ")") doesn't work

12:26 cemerick: Bjering: it's almost accepted wisdom at this point that NIO is slower in general than "classic" IO

12:29 Bjering: cemerick, well there is little wisdom involved in benchmarking. Should be easy enough to proof either way. In C++ asynch is THE way as the other option is native threads and that is bad. On the jvm any benchmark on Windows seems wrong to me, as I learned today how my C++ server and jvm server are comparable on Linux, but on windows my C++ server (IOCP) is x100 faster.

12:30 I'll make a "classic" IO approach with the jvm-version once I have a powerful wellconfigured Linux ev environment set up and we will see if I agree :)

12:32 slyrus: here's my first cut at 2-bit "arrays" if anyone's interested: http://gist.github.com/547843

12:33 cemerick: Bjering: there's been lots of benchmarks. *shrug* First result for googling "slow nio benchmarks": http://www.thebuzzmedia.com/java-io-faster-than-nio-old-is-new-again/

12:33 "NIO is x% slower" has been a conclusion coming from various independent benchmarking efforts for a few years IIRC.

12:33 dnolen_: Bjering: so the Clojure version on a Linux box is comparable to your C++ version?

12:34 Bjering: dnolen_: Didi it with the java version (which was eqvivalent to my clojure version on my Windows), but yes.

12:35 cemerick: Throughput isnt my problem, no of connections and no of sends / reeives is.

12:38 no_mind: need suggestion on this http://hpaste.org/fastcgi/hpaste.fcgi/view?id=29422#a29422

12:39 dnolen_: Bjering: so are you going to go ahead and build yr app in Clojure? ;)

12:41 Bjering: dnolen, most likely. I will have to learn to use Linux though :) Any tips? I know basic stuff, like chmod, ls, passwd etc. But I want an in depth overview of things like how the filesystem should be organized /usr vs /etc vs /var etc. What is THE book/online resource to learn whese things?

12:42 ie, I have been a user (on Solaris, 15 years ago), never an admin...

12:43 dnolen_: Bjering: heh I'm a Linux newb myself. That said I find Ubuntu to be the friendliest easiest to work with. Also there's a lot of info online on SuperUser etc.

12:44 bobo_: yeh, ubuntu is realy easy to use

12:59 jkkramer: durka42: re-pattern creates a regex from a string

12:59 ,(let [c "c"] (re-pattern "ab(c)"))

12:59 clojurebot: #"ab(c)"

13:00 jkkramer: er...

13:00 ,(let [c "c"] (re-pattern (str "ab(" c ")")))

13:00 clojurebot: #"ab(c)"

13:00 durka42: yes, but you lose the raw-string benefits of #""

13:00 ,#"(\(\))"

13:00 clojurebot: #"(\(\))"

13:00 durka42: ,(re-pattern (str "(\(" "\))"))

13:00 clojurebot: Unsupported escape character: \(

13:00 akhudek: hey, is there a native clojure construct similar to a maybe monad?

13:00 durka42: ,(re-pattern (str "(\\(" "\\))"))

13:00 akhudek: a let-maybe perhaps?

13:00 clojurebot: #"(\(\))"

13:01 durka42: akhudek: there's if-let, i don't really know what you want let-maybe to do

13:01 LauJensen: akhudek: does clojure.contrib.monad count?

13:02 akhudek: I thinks if-let only takes a single binding pair, not a list.

13:03 LauJensen: I don't really want to go that far, but I notice that I often end up using a lot of nested if-let's.

13:03 LauJensen: akhudek: Sounds like you're on an imperative path

13:04 akhudek: That could be. I'll stare at the code some more.

13:04 arohner: akhudek: have you seen the arrows?

13:04 ->, ->>

13:04 sexpbot: java.lang.Exception: Can't take value of a macro: #'clojure.core/->>

13:04 jkkramer: you can destructure in the if-let binding, if that helps any

13:04 that can be confusing to read, though

13:06 akhudek: here is the code in question: http://pastebin.com/9zkVV7ij

13:06 perhaps I'm just thinking too imperatively

13:07 mrBliss: akhudek: I've had the same problem, mostly for user input

13:08 chouser: cond might be useful there

13:15 akhudek: not sure this is any better. http://pastebin.com/3eQ1v2SZ

13:17 akhudek: a little cleaner then my refactor http://pastebin.com/R9AZT5uQ

13:18 chouser: if you want to postpone the let and destructuring until it's needed, I think you're essentially forced into the nested-if style

13:18 which isn't necessarily bad.

13:19 akhudek: yeah. I suppose it's a better performing solution. Thanks for the input.

13:48 chouser: rhickey: are you around?

13:48 rhickey: chouser: yep

13:48 for a few minutes

13:48 chouser: ok, a couple quick things.

13:49 one, just wanted to let you know we can update the IRC channel topic now if needed.

13:50 rhickey: ok

13:50 chouser: two, do you have any interest in a proposal for new syntax for character and/or string literals in the near term, to address some things I've mentioned before? http://paste.lisp.org/display/91391

13:52 rhickey: chouser: many of those seem non-problems to me, is there some sort of priority to them?

13:52 chouser: no, the only reason for bringing it up now is release timing.

13:53 and that I've fielded two questions in the last week or so about double-quotes in strings.

13:53 rhickey: chouser: well, splitting that list up is the first step in getting any of it on the table

13:53 chouser: if you've no appetite for it, I won't bother writing up a real proposal.

13:54 yeah, I think it'd be two things -- an addition string syntax to allow double quotes without individual escaping, and a new syntax for literal Characters (deprecating the old one)

13:55 I'm sure for anyone that doesn't work heavily with strings these things are unlikely to seem important.

13:56 rhickey: the latter in particular seems not pressing

13:57 LauJensen: .. strings are pretty common nowadays :) I think the double quoting sounds nice, I have no problem with the character literals

13:57 rhickey: I'm running at 2, anything else?

13:57 chouser: nope, I'm good. thanks for your time.

13:57 rhickey: sure, so proposal for quotes welcome

13:58 jkkramer: rhickey: any chance you'll be processing new CAs soon?

13:58 rhickey: jkkramer: just did some - how recent?

13:59 jkkramer: i put mine in the mail last monday, the 16th

13:59 i'm in NY so shouldn't have taken long to ship

14:00 rhickey: jkkramer: yes, but after I last checked - I'll grab it soon

14:00 gotta run

14:00 jkkramer: rhickey: ok thanks

14:00 arkh: chouser: +1, newline consistency would be good

14:02 chouser: +1 on triple quotes (does my opinion matter? heck, who cares! throwing it out there ;)

14:03 serp_: what are triple quotes?

14:03 chouser: """something like this"""

14:03 arkh: nothing is escaped in triple quotes, right?

14:04 chouser: arkh: that's independant

14:04 so -- opinions welcome. I'll try to come up with something consistent and compelling to propose.

14:05 perl has q or qq followed by a pair of "grouping" things like () {} or <>

14:06 ruby has %q followed by a similar pair

14:07 python has triple quotes """ or '''

14:07 technomancy: chouser: I'm particularly interested in use/require => uses; lots of complaints over that wart.

14:08 chouser: precede the python one with r to turn off \n stuff, or use q instead of qq in perl to do the same thing.

14:08 technomancy: yes, me too. But others have pushed on that one, so I won't get in their way.

14:08 technomancy: though in my mind the current behavior of defrecord expands the scope of the use/require improvements required

14:08 technomancy: here's my list: http://p.hagelb.org/1.3-hopes-and-dreams.html

14:09 chouser: technomancy: excellent. I'm uncertain about :like and don't know what "dots" means

14:10 technomancy: dots are just like ruby's test/unit's output for every passing test

14:11 arkh: not totally related but I've enjoyed python's multiline regex's, too

14:11 made possible by triple quotes

14:12 LauJensen: technomancy: could you explain in danish what a non-transitive-aot is ?

14:12 MrHus: I for one love python's string's http://docs.python.org/release/1.5.1p1/tut/strings.html

14:12 technomancy: LauJensen: cemerick implemented it and made a ticket: http://www.assembla.com/spaces/clojure/tickets/322

14:12 LauJensen: Thanks

14:13 ah yes

14:16 chouser: clojure's string and regex literals already support multiline

14:17 and with (?x) you can include extra whitespace, comments, etc. in your clojure regex.

14:17 arkh: cool - I wasn't sure if clojure supported multiline regex but that's good to know :)

14:17 technomancy: chouser: agreed that :like needs more discussion and usage, but it's really hard to experiment with it outside clojure.core due to the hardcoded nature of ns

14:19 chouser: can't you just branch clojure itself, or even just have a lib that does (in-ns 'clojure.core) and mucks about as necessary?

14:19 LauJensen: I also dont see why we cant have (import '(some.javalib.*)) - There has been talk of future advantages by not having this for about 3 years, but Ive yet to come across one

14:19 cemerick: chouser: what did you have in mind for char literals?

14:19 chouser: I guess there's still friction there. maybe enough to reduce experimentation.

14:20 cemerick: something that would use matching shortcuts for chars and strings (unlike \newline and "\n" today)

14:21 cemerick: LauJensen: There are probably unsolvable semantic issues with wildcard imports given the array of classloader configurations that are possible.

14:21 chouser: cemerick: and therefore remove the need to remember the special table of character names: \newline, \space, \tab, \beep, \backspace

14:21 oops, \beep isn't there

14:21 cemerick: That, and wildcard imports are just as bad as use, w.r.t. knowing what the hell is in your namespace. :-)

14:22 LauJensen: cemerick: As I understood rich it wasnt because of limitations, but because he could add some compiler optimizations if he withheld - I just dont think he's gotten around to it

14:22 chouser: you have to do \07 instead of \beep

14:23 cemerick: chouser: not sure there's a lot of room for that, if you're keeping \n, etc. in strings...which I'd think is a must-have.

14:23 chouser: oops, that doesn't work. you have to do "\007" or something.

14:23 cemerick: yeah, I know.

14:24 maybe #:\n instead of \newline

14:24 ugly but simple

14:24 cemerick: aaaaaagggh! ;-)

14:24 what does \newline emit on windows?

14:24 chouser: it better be the same as "\n"

14:25 which had better be the same as "\012"

14:25 and therefore not the same as (newline)

14:25 cemerick: misery

14:27 chouser: it's C's fault. the ASCII names are "carriage return" and "line feed" aren't they? \r makes sense then, but where did \n come from?

14:31 mebaran151: anybody know of a good binary serialization format for Clojure: I'm thinking of porting MessagePack for some binary RPC goodness, but I'm wondering if there's a better solution out there.

14:32 cemerick: mebaran151: yeah, the one I wrote some months back and still haven't put on github :-/

14:32 chouser: We've used google protobufs with reasonable success.

14:33 mebaran151: you guys think porting the messagepack rpc system might be useful? The binary format looks like a decent fit for clojure. I feel like I could do something better with the defrecord and defprotocol magic though, whereby you'd get your records back.

14:33 noidi: chouser, do you have a wrapper that converts the Java objects to Clojure data structures, or deal with the objects directly?

14:34 chouser: we've progressed from the latter to the former and beyond.

14:34 still no permission to opensource it though. :-/

14:34 mebaran151: the MessagePack people brag their binary format is quicker than protobufs, but I'm looking for a nice preworking solution

14:34 noidi: beyond sounds intriguing :)

14:34 mebaran151: I'm also intrigued by the beyond

14:37 chouser: what we've got now doesn't require generating any java code for your .proto files -- it works with streamed protobuf descriptors directly (to allow dynamic use of new message types)

14:38 mebaran151: that's what turned me off to protobufs in the beginning

14:38 chouser: we don't yet parse .proto files ourselves because we don't need to, but it might be fun to add for the heck of it.

14:38 mebaran151: I couldn't figure out a good way to integrate it with our build structures

14:40 chouser: read messages are exposed as IPersistentMaps that do the reading/parsing lazily, so if you never ask for a field that's encoded at the end of the buf, that part of the buf won't be parsed.

14:40 you write messages with just a message type and a regular clojure map

14:41 if it's a literal clojure map, much of the work is done at compile time.

14:41 but I should stop talking now because it's not useful unless I release, and I'm not allowed to release.

14:41 and my mother taught me bragging is rude. sorry.

14:43 noidi: :)

14:48 mrBliss: I notified some guy on github that he had uploaded his private ssh key. Now he has deleted it but you can still see his key when you look at his commits :D

14:48 arj_: I'm playing around with the new agent functions in 1.2. But I can't seem to get set-error-handler! to work

14:48 I've set the error-mode to :continue

14:49 and when I send a func like #(1/0) off to an agent I get the exception in the main thread it seems

14:50 chouser: that's because 1/0 will generate an exception at *read* time.

14:50 ,(read-string "1/0")

14:50 clojurebot: java.lang.RuntimeException: java.lang.ArithmeticException: Divide by zero

14:50 akhudek: hmm, is there any way to get clojure.core/print-method to work with user defined hierarchies?

14:50 arj_: ah

14:50 chouser: perhaps try #(/ 1 0)

14:50 arj_: aha

14:51 chouser: akhudek: I think that would break everything as user defined hierarchies don't include java classes.

14:51 arj_: yeah that has the same effect as throw "something"

14:51 cemerick: chouser: OMG, clojure does static code analysis! ;-)

14:51 chouser: cemerick: at *read* time!!!

14:51 cemerick: mind the ;-)

14:51 arj_: I'm printing in my error handler, but I can't see the output anywhere

14:51 * fogus is running to write a post about how Clojure is a statically typed language

14:51 arj_: maybe it's something with slime

14:52 chouser: akhudek: but you can add your own things to the default hierarchy if you want.

14:52 AWizzArd: fogus: the Clojure compiler statically checks that everything is an Object or primitive or Array? ;-)

14:52 akhudek: chouser: how would I go about doing that? and is it worth bothering with?

14:53 currently I have a bunch of records for first order logic concepts and have overloaded .toString for each

14:53 I'm defining a custom print-method for each record individually

14:53 chouser: akhudek: hm... with records, you should be able to have them extend some protocol of your own, and write a print-method for that protocol.

14:54 akhudek: I haven't tried that myself yet. Last time I mucked with such things we were using :type metadata on regular maps instead of records.

14:54 akhudek: hm, ok let me see if that will work

14:58 chouser: hm, not working here. It's still picking up the default print method for records

14:59 oh, because those are installed individually when you do defrecord. meh

15:01 and even without that, it's using the PersistentMap print-method. hmph.

15:04 duncanm: is there a reason why copy in clojure.java.io doesn't use buffered streams?

15:04 hiredman: chouser: wfm

15:06 akhudek: yeah, doesn't seem to be a way to do it cleanly

15:06 I have Object toString overloaded in the defrecord and that works fine for str

15:06 oh well, no big deal

15:06 hiredman: http://github.com/hiredman/Arkham/blob/master/src/arkham/core.clj#L13

15:07 akhudek: hiredman: that's what I'm doing at the moment

15:09 but I have about 10 records in a hierarchy and though there might be a way to avoid 10 defmethods

15:10 hiredman: to get what chouser is saying to work I think you would have to remove the specific records print-method

15:10 chillitom: anyone seen kotarak?

15:14 chouser: hiredman: when I do that, I still only get IPersistentMap's print-method, not the one I installed for the protocol.

15:14 oh!

15:14 nope, still fail.

15:15 and if I use deftype instead of defrecord, I the the print-method of Object

15:15 I get the

15:16 like the multimethod is totally ignoring the interface inheritance

15:16 hiredman: could be an artifact of the name munging going on behind the scenes

15:16 chouser: I don't think that happens anymore

15:17 hiredman: it must, at least for defrecords

15:17 or, I guess classloader shuffling

15:17 chouser: oh, no, I screwed up my test for deftype

15:17 yeah, it does classloader stuff now

15:22 ok, I was doing a couple things wrong.

15:22 akhudek: this works, but may not be worth doing: http://gist.github.com/548144

15:22 for records you need both remove-method and prefer-method

15:23 for defmethod, make sure you use the interface name (eg. user.Pair) not the protocol name (eg. user/Pair or just Pair)

15:24 fogus: @chouser: This is why I went the path of toString for my presentation.

15:24 chouser: smart

15:24 akhudek: oof, yeah, that is actually less concise than simply overloading print-method for each record

15:25 I'm using a macro to remove duplication as well

15:25 chouser: you can't extend .toString through right? Have to implement inline in the defrecord?

15:26 fogus: @chouser: I believe that is correct

15:27 Exception: Object is not a protocol

15:27 chouser: we're still going to want a better mix-in mechanism for deftype/defrecord. The dynamism of extend is beautiful, but when you can't use it the consequences are either repeated code or giant ugly macros.

15:28 for fingertree I've so far gone with the giany ugly macro approach.

15:28 giant

15:30 chillitom: kotarak, just trying to get vimclojure going, the pathogen way

15:30 how can i tell if it's worked, i get no syntax highlighting or anything

15:32 kotarak: chillitom: you call to pathogen#runtime_append_all_bundles() must come before the "filetype plugin indent on".

15:34 chillitom: kotarak, the pathogen call is the first thing in my .vimrc

15:34 kotarak: chillitom: ok. at least "set nocompatible" should come before the pathogen call. Where did you place the vc files?

15:36 chillitom: okay i've added set nocompatible. vimclojure is in ~/.vim/bundles/vimclojure (hg checkout)

15:37 sorry bundle

15:37 not bundles

15:37 kotarak: chillitom: this won't work

15:38 chillitom: checkout the repo somewhere else and make a link "ln -s $HOME/check/out/path/vim $HOME/.vim/bundle/vimclojure-2.2.0-SNAPSHOT

15:38 chillitom: okay

15:40 done

15:41 kotarak: chillitom: does it work?

15:41 chillitom: no highlighting yet

15:41 kotarak: hrmpf

15:41 chillitom: is that the best way to tell

15:41 ?

15:42 kotarak: chillitom: you can try "set ft?" (w/o ")

15:42 :set ft?, that is <- note :

15:42 chillitom: filetype=

15:43 kotarak: chillitom: then the detection does not work

15:44 chillitom: i did just get an error about clj_highlight_builtins being deprecated at startup

15:44 but :set ft? is still blank

15:44 kotarak: That's a good sign!

15:45 chillitom: do you actually edit a clojure file?

15:45 chillitom: yeah i open a labrepl .clj file.. no highlighting

15:45 on ft set

15:45 no ft set

15:45 kotarak: Try manual: :set ft=clojure

15:46 chillitom: colours!!

15:46 kotarak: chillitom: what is the exact name of the file?

15:47 lenw: hi all - i am learning and stuck - http://gist.github.com/548174 - often hangs on (connect-server ...) - any pointers welcome

15:47 chillitom: labrepl.clj

15:48 my .vimrc is very basic

15:48 kotarak: hmm...

15:48 chillitom: just a sec

15:48 chillitom: only "syntax on" and "filetype plugin indent on"

15:48 after pathogen call and set nocompatible

15:49 lenw: chillitom: which clojure plugins do you have ?

15:49 chillitom: just VimClojure

15:49 kotarak: chillitom: http://paste.pocoo.org/show/254049 this should be minimum

15:50 lenw: i have let g:clj_highlight_builtins=1

15:50 let g:clj_paren_rainbow=1

15:50 kotarak: lenw: that's ok. Their name and default will change in 2.2

15:50 chillitom: kotarak, that's pretty much what i have

15:51 plus let vimclojure#HighlightBuiltins = 1

15:51 let vimclojure#HighlightContrib = 1

15:51 let vimclojure#ParenRainbow = 1

15:52 kotarak: chillitom: hmm... that's not so nice. Then things should actually work.

15:52 chillitom: i see that HighlightContrib isn't valid i'll remove that

15:52 should I enable DynamicHighlight ?

15:52 kotarak: chillitom: yeah. It's removed. It hadn't any meaning anyway. Never get around to statically define the contrib stuff.

15:53 chillitom: it will have no effect unless you specify also vimclojure#WantNailgun = 1. Please leave that off for the moment. First let's get the static stuff straight.

15:53 chillitom: I feel so close.

15:54 highlighting is working for other source file types

15:55 and setting ft works.. how does the filetype detection work?

15:55 i always meant to learn to write vim highlighters

15:55 kotarak: chillitom: look in $HOME/.vim/bundle/vimclojure-2.2.0-SNAPSHOT/ftdetect/clojure.vim

15:55 There should be an autocommand setting the filetype

15:56 chillitom: au BufNewFile,BufRead *.clj set filetype=clojure

15:56 kotarak: exactly

15:57 chillitom: missing something more from my .vimrc?

15:57 kotarak: chillitom: can you paste it somewhere?

15:57 KirinDave: cemerick: Nice article on setting up a maven repo. It's actually hard to find simple step-by-steps with the right amount of detail.

15:58 chillitom: kotarak, sure, one second

15:58 cemerick: KirinDave: thanks :-) I'm waiting for the hate mail to come pouring in. ;-)

15:58 KirinDave: Well that's inevitable

15:58 Your post is well written and useful. Nerd hate is _inevitable_

15:58 kotarak: cemerick: ah, let me check... *harharhar* ;)

15:59 chillitom: kotarak, http://paste.pocoo.org/show/254055/

15:59 cemerick: KirinDave: If they're not hatin', you're not trying hard enough.

15:59 chillitom: where's the article, i could use an intro to maven

16:00 LauJensen: AWizzArd: How do you handle phones etc, that have the qwerty keyboard?

16:00 KirinDave: cemerick: So I've been doing this big total reorg of my desktop in preparation for my new job and the writing stuff.

16:00 cemerick: Are you into those kinds of desktop minimalism hacking exercises?

16:00 cemerick: KirinDave: nah, it's a whirlwind over here. I clean up once every few months or so.

16:01 KirinDave: cemerick: This is my new desktop & work organization setup.

16:01 cemerick: http://cl.ly/26oh

16:02 kotarak: cemerick: dang, you mentioned gradle and even Ivy. pfff

16:02 KirinDave: cemerick: The dark desktops are for work. The light ones are for non-work stuff.

16:02 cemerick: kotarak: I figured you'be happy for that! :-)

16:02 kotarak: cemerick: I am. thanks :)

16:02 cemerick: KirinDave: oh, *that* desktop. Thought you meant meatspace. :-)

16:02 KirinDave: cemerick: Noh

16:03 Although that is gonna be a project too.

16:03 mebaran151: can you do tiled setups on MacOS X? I've become addicted to my compiz gridding plugin.

16:03 KirinDave: mebaran151: Not sure what you mean.

16:03 AWizzArd: LauJensen: i still can type on qwertz, just slower, now after 4 years. And they typically show which letter a key will produce :)

16:03 cemerick: kotarak: np -- I'm not hip to gradle, but getting people straight w.r.t. repos is definitely common cause.

16:03 AWizzArd: LauJensen: but anyway, I have Neo installed on my mobile phone.

16:03 LauJensen: figures :)

16:03 mebaran151: basically, you can set it up so all your windows take up the exact amount of sapce and arrange themselves according: using the numpad you change their relative sizes to one anohther and don't waste any screen space

16:04 cemerick: KirinDave: I've never been able to make peace with spaces. Anything more complicated than Cmd-Tab is too much for me to develop muscle memory for.

16:04 Probably the same reason I simply can't cope with emacs.

16:05 KirinDave: cemerick: Ha.

16:05 neotyk: rhickey: I've extended c.c/promise to be able to check if it was delivered? already, do you think it would fit c.c? http://j.mp/cblJgg

16:05 KirinDave: cemerick: Well I am just drilling myself to be more organized.

16:05 cemerick: Also these long weeks at microsoft where I am in get-the-fuck-out limbo

16:05 it's fun to pass the time

16:05 I think I'm going to rent some shop time and build a new desk from scratch

16:05 http://lifehacker.com/5617021/diy-plank-desk-inventively-hides-your-cord-clutter

16:06 cemerick: It's a good impulse. I'll have to get square eventuallly.

16:06 KirinDave: Easy design.

16:06 And looks nice.

16:06 And a very solid functional idea.

16:06 LauJensen: KirinDave: Interesting to see a trimmed setup on OSX - Wheres your new gig?

16:06 KirinDave: I just need some time with a table saw, power sander, and a router to get it done right.

16:06 LauJensen: I'm lead engineer for BankSimple now.

16:07 Well, as of Sept 13 next mo

16:07 cemerick: I've been on an ikea table for the past 4 months or so. It's been good enough so far.

16:07 KirinDave: But as it stands we're already starting serious design stuff.

16:07 cemerick: That'd be the base for this.

16:07 LauJensen: ah ok, congrats :)

16:07 KirinDave: LauJensen: Thanks.

16:07 cemerick: KirinDave: that means the invites will flow like water, right? ;-)

16:07 LauJensen: KirinDave: It you really want lean and clean, try Arch / Awesome

16:07 * hiredman built a desk from a 8x3 door

16:07 KirinDave: cemerick: Once we have a product, sure.

16:07 LauJensen: ?

16:07 cemerick: details, details

16:07 KirinDave: link plx

16:07 cemerick: But of course.

16:08 Right now we're in a protracted debate about scala or clojure for the engine to implement the API.

16:08 LauJensen: KirinDave: www.archlinux.org, http://awesome.naquadah.org/

16:08 kotarak: cemerick: yes, indeed. I hope people now also understand what a SNAPSHOT means and why it is NOT-a-release(tm) and then sun will shine, birds will sing etcetc

16:08 KirinDave: LauJensen: Sorry, I demand copy and paste works properly before I use desktop linix

16:08 Err, linux.

16:08 LauJensen: Works fine KirinDave

16:08 cemerick: kotarak: one step at a time, right? :-)

16:08 KirinDave: LauJensen: Copy styled text to another buffer. :)

16:08 kotarak: cemerick: right. :)

16:09 chillitom: kotarak do you have anything else in your .vimrc that it might be worth me trying too?

16:09 LauJensen: KirinDave: styled? Sounds like bloat

16:09 KirinDave: LauJensen: Incorrect.

16:09 Like tabluar data.

16:09 LauJensen: KirinDave: What are you discussing in regards to scala vs clojure?

16:09 kotarak: chillitom: no. that should be it. Everything else is unrelated.

16:09 KirinDave: LauJensen: I think Alex loves Scala and I love Clojure.

16:09 chillitom: kotarak, okay thanks

16:09 KirinDave: I argue that Scala's benefits are in succint definitions of systems that benefit from static typing.

16:09 LauJensen: KirinDave: Hmm, I have a few blogposts that he might like then :)

16:09 KirinDave: It's very good at that.

16:09 kotarak: chillitom: I'm running a little bit out of ideas.

16:10 KirinDave: I think for network services like an API with synchronization requirements, Clojure is still superior.

16:10 kotarak: chillitom: you could try to put the ftdetect file directly into ~/.vim/ftdetect

16:10 chillitom: is there something i can do to check the au command is being run?

16:10 KirinDave: Both integrate equally easily into a larger deployment framework.

16:10 kotarak: chillitom: lemme check

16:10 KirinDave: And Scala's speed advantage on primitives is mostly lost in API parsing, routing, and general data munging.

16:10 I argue we should use Scala for analytics and cloud ops. There, it will shine.

16:11 chillitom: kotarak, okay if i run the au command by hand it works just fine

16:12 KirinDave: LauJensen: If you have input on that, I'm happy to take it!

16:12 chillitom: I wonder why it isn't being picked up by vim/pathogen

16:12 kotarak: chillitom: you can check with au BufNewFile *.clj

16:12 LauJensen: KirinDave: I fail to see how Scala would be a better choice than Clojure for analytics and cloudops, unless you have a strong preference for large codebases and object orientation

16:12 chillitom: kotarak, yeah no command set

16:13 KirinDave: LauJensen: Scalas java interop is more natural than Clojures, I think, when you have something like Hadoop you want to plug into.

16:13 LauJensen: Maybe that's my broken assessment.

16:13 kotarak: chillitom: did you try to move the ftdetect/clojure.vim?

16:13 LauJensen: KirinDave: Have you seen Stuart Sierras hadoop integration lib ?

16:13 KirinDave: Yes

16:13 I think anyways, what was it called?

16:13 LauJensen: clojure-hadoop

16:13 chillitom: kotarak, nope, but i might just add the line to my .vimrc and be done with it

16:13 KirinDave: Ah, no. I think I saw another cloud op framework demo the other night.

16:13 hiredman: ~scala {((x: Any, y: Any) => (f: Function2[Any, Any, Any]) => f(x, y))(1, 2)((x: Any, y: Any) => x)}

16:13 LauJensen: KirinDave: With it you get to work on native Clojure datastructures, using nothing but Clojure

16:13 clojurebot: Any = 1

16:14 LauJensen: If Scala can beat that in terms of interop, I'd love to see a code example

16:14 kotarak: chillitom: ok. But I'd really like to understand that...

16:14 cemerick: btw: http://bit.ly/b5fCI4

16:14 the other step

16:14 KirinDave: LauJensen: Ultimately I am going to have to yield a little. I am the only clojure guy and there are two big fans of scala. :)

16:14 tomoj: clojure-hadoop kind of bugs me with print-dupiness

16:14 KirinDave: LauJensen: So I am trying to keep the API layer as Clojure because having refs and a very clean model for distributed and async ops will be hugely helpful.

16:15 LauJensen: Ok

16:15 KirinDave: But I like Scala and want to learn more of it.

16:15 I feel like it's so much tho. Reminds me of C++

16:15 hiredman: but scala is so ugly

16:15 KirinDave: Everything, everything, everything in the hard-boiled syntax.

16:15 hiredman: ~tell me about scala

16:15 clojurebot: Scala often gets in the way when trying to write neat code -- seen in #scala

16:16 danlarkin: hiredman is on the case, heads will roll

16:16 chillitom: kotarak, moving it worked just fine, first time

16:16 KirinDave: hiredman: Most people take their version of "ugly" as "related to C++"

16:16 But then they give Scala a pass because static typing is so *familiar*

16:16 kotarak: chillitom: hmmm ok...

16:16 LauJensen: KirinDave: I tried Scala for a little while. Felt alot like every other imperative language I ever tried, except more complex

16:16 KirinDave: It seems like a Big Mistake™ to many to just step back from static typing.

16:17 kotarak: chillitom: can you check with ":script" what is loaded before your .vimrc?

16:17 KirinDave: LauJensen: Well it's certainly less asinine than java or python, so I like it there.

16:17 mabes: KirinDave: have you seen cascalog? (http://github.com/nathanmarz/cascalog) I've only played around with it but it seems to be a selling point for using clojure on the analytics side of things

16:17 KirinDave: mabes: I saw a demo of it the other night @ the bay area clojure meetup that Runa hosted. Was rally cool.

16:18 LauJensen: If you said, "We need a big OO system, what OO language will you go to?" I'd probably say Scala.

16:18 LauJensen: Now if you took the "OO" out, then it's Clojure or PLT Scheme.

16:18 chillitom: kotarak, i'll move it back and take a look

16:18 KirinDave: Maybe I should try writing an MBE system in PLT Scheme.

16:18 And I really hope one day we can have Conditions and Restarts in Clojure.

16:18 fogus: KirinDave: Congrats on the gig

16:18 KirinDave: fogus: Thanks.

16:19 That's the _one_ thing I miss from Common Lisp.

16:19 Conditions and restarts are still 5 years ahead of everyone else's error handling.

16:19 kotarak: chillitom: pathogen should be loaded before runtime/filetype.vim

16:20 KirinDave: c.c.error-kit is kind of a hacky start with conditions and restarts. (Not really, I believe, but close?)

16:20 chillitom: kotarak, http://paste.pocoo.org/show/254063/

16:20 KirinDave: kotarak: I dunno about that...

16:21 LauJensen: KirinDave: I just dont see the novelty in OO anymore. I guess subconciously Ive started associating it with every single bad software experience Ive had, and Ive yet had a really bad one with Clojure

16:21 (if you disregard the stacktraces ofc)

16:21 chillitom: kotarak, looks like pathogen is loaded second

16:21 kotarak: chillitom: yeah. debian does stupid things. Try "filetype plugin indent off", then pathogen, the "filetype... on" again in your .vimrc

16:22 chillitom: kotarak, okay i'll give it a go

16:22 KirinDave: LauJensen: I agree. The most frustrating part is that most people don't understand what the fuck OO is or why it's meaningful.

16:22 LauJensen: Ask most people to define the essential features of OO and they get it radically wrong.

16:22 LauJensen: KirinDave: What, they dont say model entities as objects? :)

16:23 chillitom: kotarak, no change

16:23 KirinDave: LauJensen: They go, "Um.. Identity, Inheritance... Encapsulation..... umm..."

16:23 Ffffuuu

16:23 Yes No No.

16:23 fogus: Do people actually say identity?

16:23 KirinDave: Yes.

16:24 Which I guess is a valid answer.

16:24 And I suppose it's meaningful.

16:24 kotarak: chillitom: then, I'm afraid you have to somehow tell Debian *not* to load the filetype stuff. Pathogen has to come first. (Or just put the clojure.vim in .vim/ftdetect instead of the bundle...)

16:24 KirinDave: But when I try and tell people that Erlang, for example, is a pretty OO language in practice they tell me I don't understand OO.

16:24 *grumble*

16:24 LauJensen: KirinDave: If they said identity fused with state I would have been happy :)

16:24 fogus: Erlang is the only OO language

16:24 KirinDave: Ha.

16:24 LauJensen: eh? Erlang isnt OO

16:25 KirinDave: In practice, it is strongly OO.

16:25 fogus: Indeed

16:25 KirinDave: Every design is a giant intercommunicating hierarchy of objects.

16:25 LauJensen: Explain please

16:25 KirinDave: It's _very very very_ oo

16:25 chillitom: kotarak, thanks for your help (and for vimclojure)

16:25 LauJensen: Oh, so you mean each player in the network is an object?

16:25 hiredman: actors as "active objects"

16:25 fogus: Messages messages messages

16:25 KirinDave: And the only way they communicate is asynchronous asymmetric messages.

16:26 LauJensen: Yea I see what you're saying

16:26 kotarak: heck, C is OO.

16:26 LauJensen: I remembered an essay by an Erlanger a while back, where he said when people asked him if Erlang was OO (which was usually the first question), they typically danced a little "yes, well, no, not exactly, maybe", and he wanted them to just come out and say "no, and theres a good reason for it"

16:27 KirinDave: kotarak: Not really

16:27 hiredman: ~oo sucks

16:27 clojurebot: http://www.sics.se/~joe/bluetail/vol1/v1_oo.html

16:27 KirinDave: You can write OO C, but..

16:27 kotarak: OO is not a property of a programming language.

16:27 KirinDave: kotarak: I'm not sure I agree with that.

16:27 I mean, what is Io then?

16:27 fogus: hiredman: How do I teach clojurebot that "Erlang is the only OO language"?

16:28 chillitom: OO is old hat.. next.

16:28 hiredman: clojurebot: Erlang is the only OO language

16:28 clojurebot: Roger.

16:28 hiredman: clojurebot: erlang?

16:28 clojurebot: erlang is http://clojure.googlegroups.com/web/erlang.clj

16:28 hiredman: bah

16:28 kotarak: A programming language? Maybe with special support for OO stuff? Even VimL is OO....

16:28 hiredman: clojurebot: erlang?

16:28 clojurebot: Erlang is the only OO language

16:28 fogus: yay!

16:29 KirinDave: I should pretend to do a little work for microsoft.

16:29 Pardon me, please

16:29 fogus: I guess this is why no one gets the OOP question right, because everyone has a different answer.

16:29 KirinDave: fogus: Except that Kay gave us a really clear definition and he fucking defined it.

16:29 fogus: Err, coined it.

16:30 fogus: KirinDave: His ideal was the motivation behind my Erlang statement. ;-)

16:30 KirinDave: fogus: Everyone else just perverts the essence with useless clutter, frequently implementation details.

16:31 fogus: Whoops... gotta run. Good luck all.

16:31 patrkris: kotarak: have you updated vimclojure for clojure 1.2?

16:33 kotarak: patrkris: release will be soon. Here is a snapshot: http://bit.ly/cpwPay

16:33 patrkris: kotarak: coolio

16:36 ssideris: so, I have installed leiningen, slime, swank clojure and I have started a project with dependencies etc

16:37 how can I run a piece of clojure that depends on one of the jars that leiningen downloaded?

16:37 chouser: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme LateBinding of all things." -- Alan Kay, 2003. http://c2.com/cgi/wiki?AlanKaysDefinitionOfObjectOriented

16:37 ssideris: spedifically, I'm trying to run this: http://github.com/ztellman/penumbra/blob/master/test/example/game/pong.clj

16:38 dnolen_: ssideris: you need to make sure you got the native deps with: lein native-deps

16:38 ssideris: might be borked right now, need to upload a version of lein-deps that works with lein 1.3.0 later this evening

16:38 ssideris: you can then just start a repl and load the examples

16:39 with: lein repl

16:39 ssideris: yeah, I have the latest lein and it didn't work

16:39 hm I've started swank and I've connected to it from emacs

16:39 dnolen_: ssideris: sorry, not a machine that I can push to clojars with for that project

16:39 ssideris: would starting swank in the dir of the project take care of the classpath?

16:42 dnolen_: ssideris: you need to unpack the native libs

16:42 ssideris: penumbra github repo has some manual instructions

16:44 ssideris: dnolen_: ok, I suppose penumbra is a special case, but in general, if it was a pure java dependency that I was using what would the steps be to run something that has a dependency that's already been downloaded using lein deps?

16:44 dnolen_: ssideris: yes, it would been simpler, native deps complicates things

16:45 technomancy: LauJensen: for what it's worth I hereby retract my half-hearted endorsement of the MS Natural 4000.

16:45 it feels like typing on butter. so mushy.

16:45 ssideris: dnolen_: yes, but I don't even know how to handle the simple case :-)

16:45 LauJensen: Its scratched from the list :)

16:45 But in all honesty, AWizzArd got me hooked on Das Keyboard + NEO

16:46 ssideris: LauJensen: even with all the l33t value, isn't Das Keyboard a bit overpriced?

16:46 LauJensen: ssideris: I live in Denmark, everything is overpriced

16:46 And compared to everything else. No, its an OK price for a quality keyboard

16:46 ssideris: London here, I know what you mean...

16:46 LauJensen: I think it costs the same as my Dinovo Edge actually

16:46 danlarkin: technomancy: why do you dec the MSN4k?

16:47 technomancy: danlarkin: the keys are hell of mushy

16:47 there's no crispness at all

16:47 danlarkin: I like mine

16:47 crispiness is just more stress on your fingers

16:47 LauJensen: eww, danlarkin likes mushy keys :((

16:47 ssideris: dnolen_: any advice on the simple case?

16:48 technomancy: with mushiness you just get the feeling you don't know the exact amount of pressure you need to use to have it register

16:48 so you end up pushing harder than you need to

16:48 dnolen_: ssideris: lein deps, lein repl, that's it

16:48 danlarkin: technomancy: ...maybe you do

16:48 technomancy: with a buckling-spring mechanism, it's really obvious when it clicks, so a lighter touch may be used

16:49 danlarkin: I am confidently applying the correct amount of pressure :)

16:49 ssideris: dnolen_: and then (load "/src/myproject/myfile.clj") ?

16:49 technomancy: danlarkin: also for it to be comfortable I have to put it in my lap, but it's so huge

16:49 if I could just chop the numpad off it would be an improvement

16:50 danlarkin: no accounting for taste I suppose

16:50 dnolen_: ssideris: more like "src/myproject/myfile", drop the .clj

16:51 technomancy: danlarkin: how come you're standing up for it? hasn't it caused you a bunch of kernel panics?

16:51 danlarkin: well, the drivers

16:51 but the keyboard itself I like!

16:52 chillitom: guys, i'm interested in what your clojure development cycles are like

16:52 technomancy: danlarkin: well it's still probably the best if you have RSI issues and can't spend over $100 on a keyboard.

16:52 ssideris: dnolen_: seems to work from the lein repl, but shouldn't the same work from a swank started in the project dir using "lein swank"?

16:52 technomancy: my thinkpad keyboard has been giving me wrist-aches

16:52 Raynes: I use an MSN4k. :(

16:52 I actually like the keyboard.

16:52 chillitom: do you edit code in a .clj file then (use ...clj) it after each change?

16:53 Raynes: I'm siding with danlarkin on this one. I've become quite attached to this keyboard over the past 2 years.

16:53 <3

16:53 pdk: which kb is this

16:53 technomancy: have you guys ever touched a Model M? it's like a religious experience.

16:53 Raynes: I haven't. I can't afford that thing.

16:53 danlarkin: technomancy: I've used a model M. did not like

16:54 ssideris: I've heard a lot about model M, but I'm uncertain about any keyboard that makes a lot of noise

16:54 chouser: chillitom: sometimes, though more likely to do (require ...). Othertimes I use (load-file "foo.clj"), and sometimes just send forms to the repl from vim

16:54 Raynes: Er, well, a Das anyway. I've not looked at model Ms.

16:54 chillitom: chouser, do you need the nailgun client set up to send from vim?

16:55 Raynes: ssideris: das offers silent models: http://store.daskeyboard.com/Das-Keyboard-Professional-Model-Silent/dp/B003M549A2/175-9245098-7665938

16:55 chillitom: i only have basic vimclojure set up so far

16:55 chouser: chillitom: that's one way to do it. I usually use a screen-based approach. less to break.

16:55 ssideris: Raynes: a good to know for when I can spare the money :-)

16:56 nteon: does the silent one feel the same?

16:56 Raynes: The most I've ever spent on a computer accessory was $100 for the Logitech Performance MX that I'm using now.

16:57 technomancy: Model Ms are only $70

16:58 ssideris: chouser: btw, I saw your blog post about doing the Euler problems in clojure... have you published any solutions anywhere yet? (I'm trying the same myself)

16:59 chouser: ssideris: that's old -- haven't done any in a long time. several of mine (though not all) are at http://clojure-euler.wikispaces.com/Problem+001

16:59 bozhidar: I love my das keyboards

16:59 but most people around me hate them

16:59 ;-)

16:59 Raynes: I'll happily take 'em off your hands.

16:59 ;)

17:00 ssideris: chouser: thanks, I mainly want to see how idiomatic my solutions are (they don't feel like they are particularly)

17:00 chouser: ah. well, the ones on that wiki are all over the map, but they should at least give you some ideas

17:01 of course mine are all over the map too -- these are learning experiences for everyone, myself included.

17:01 ninjudd: ,(first (seq (for [i [1 2 3 4]] (do (println i) i))))

17:01 clojurebot: 1

17:01 1 2 3 4

17:01 chouser: ninjudd: chunked seq

17:02 ninjudd: chouser: how do i make it not realize the rest?

17:02 ssideris: lazy-seq

17:02 chouser: ninjudd: depends a bit, I suppose.

17:03 ,(first (for [i '(1 2 3 4)] (do (prn i) i)))

17:03 clojurebot: 1

17:03 1

17:03 lancepantz: so vectors are chunked and lists aren't?

17:04 chouser: a seq on a vector is chunked and lists are unchunked seqs, yes.

17:05 ninjudd: chouser: ok, using a list fixes my problem. thanks

17:05 chouser: np

17:11 chillitom: is use of -> and ->> encouraged?

17:11 mebaran151: chillitom: if your code naturally pipelines, I would suspect yes

17:11 chillitom: doesn't changing evaluation orders like this make script scanning files more difficult

17:12 mebaran151: I mean the point is that the evaluation order is clearer that way

17:12 ,(-> 1 inc #(* 2 %1))

17:12 clojurebot: java.lang.ClassCastException: clojure.lang.Symbol cannot be cast to clojure.lang.IPersistentVector

17:13 kotarak: chillitom: use of -> and ->> is fine and encouraged if it makes sense.

17:14 mebaran151: ah, I didn't know you couldn't pass an anonymous function

17:14 kotarak: ,(let [m {:a {:b {:c :hello}}}] (-> m :a :b :c))

17:14 clojurebot: :hello

17:14 mebaran151: (-> 1 inc (* 2))

17:14 kotarak: ,(-> 1 inc (* 2))

17:14 clojurebot: 4

17:14 technomancy: does clojurebot know about dinc?

17:14 ,(-> 2 dinc)

17:14 clojurebot: java.lang.Exception: Unable to resolve symbol: dinc in this context

17:15 mebaran151: what's dinc?

17:15 technomancy: hiredman: dude!

17:15 kotarak: o.O dinc?

17:15 technomancy: mebaran151: double-inc!

17:15 mebaran151: because + 2 hurts?

17:16 technomancy: we clearly need a more succinct way to express (comp inc inc)

17:16 mebaran151: dinc is actually one character longer than + 2

17:17 (dinc i) vs. (+ i 2) 7 to 8!

17:18 technomancy: you're counting chars instead of tokens though.

17:18 mebaran151: with the proper parser support, we could have +n prefix support

17:19 (+2 i) but this is of limited utility

17:32 sts193: can anyone help or point me to a guide for a beginner trying to get into clojure?

17:35 lancepantz: sts193: i like this one: http://java.ociweb.com/mark/clojure/article.html

17:38 sts193: thanks!

18:08 burritoboy: what does "binding forms" mean in this sentance? Clojure uses vectors to denote function arguments or binding forms.

18:09 defn: burritoboy: (let [foo (+ 1 1)] foo)

18:09 alexyk: dnolen_: ping

18:09 defn: => 2

18:09 (defn bar [foo] foo) (bar 2) => 2

18:10 alexyk: what do folks use to grep through a list of files with a sexp, collecting matches?

18:10 sexps from contents

18:10 defn: i have something alexyk

18:10 burritoboy: defn: ah maybe I shouldn't try to understand that part yet, I don't quite get that yet

18:10 alexyk: mean regexps

18:10 defn: shoot

18:11 defn: http://github.com/defn/walton/blob/master/src/walton/core.clj#L38

18:12 alexyk: i know it's not pretty, but it's fast

18:13 alexyk: defn: cuute! I actually want to parse same #clojure, but say extracting only nicks. Can I use it?

18:13 (for social graph and such)

18:13 so my regexp would be -!- (\w+) or something

18:13 defn: depends on your logs

18:14 but yeah i think that's sufficient

18:15 alexyk: defn: but you collect sexps, not regexps?

18:15 defn: sexps yes

18:15 (((( )))) is valid

18:16 alexyk: maybe i misunderstand what you are looking for

18:16 alexyk: defn: so how'd I collect regexps? I want to collect say all nicks in all logs, i.e. all users

18:17 defn: unique users or a vector of all occurrences

18:18 what should your data look like when you run this on your logs, the result?

18:20 alexyk: defn: unique users are ok. Unix, someting like: grep '-!- (\w+)' *.log | sed <get nick only> | sort | uniq

18:20 then we have a list of all nicks in the logs.

18:21 defn: depends on what your logs look like

18:21 alexyk: defn: you also seem to use 1.1 packages from contrib, they changed in 1.2 right?

18:22 defn: alexyk: yeah my code is so out of date, and yes i feel very guilty about this

18:22 alexyk: defn: do you run against 1.1?

18:22 defn: in that code yes

18:26 alexyk: nice thing, walton. Results, not often clear, but may be for some :)

18:27 defn: alexyk: it needs some TLC. i'm cutting it in half so it will be a client-side lib that queries a backend API on my server

18:27 and then i need to build a new front end for the web

18:30 dnolen_: alexyk: pong

18:31 alexyk: dnolen_: looks like you git add'ed a bunch of crap in Clojure.tm! :)

18:31 like, Untitled 2, Untitled, Cale 2, etc

18:31 Cake

18:33 dnolen_: alexyk: No those are aria42's changes. Those are real commands, the files just need renaming

18:33 alexyk: aha

18:33 dnolen_: alexyk: have you played around with it? eval last sexpr works reasonably well now. The main things is making it work on all "atoms" so to speak.

18:34 alexyk: dnolen_: basic sent to repl is great, will try more things

18:35 dnolen_: alexyk: yeah a lot of the goodness is totally aria42's work. It's coming along.

18:35 arohner: when clojure reads a (ns) declaration, is there any reason why it can't blow away the existing ns entirely? Remove all vars, all aliases, etc.

18:36 dnolen_: the next things are: better eval last sexpr, jump to definition, and pretty stacktraces.

18:37 arohner: I really hate that changing an existing alias in an ns declaration requires an (ns-unalias) at the repl. Slime/clojure should handle that without exploding

18:39 technomancy: arohner: it's on my todo to make a blow-away-ns slime command, but a patch would make it happen sooner =)

18:39 arohner: technomancy: I might do that

18:54 mebaran151: I'd like to extend clojure.lang.Keyword to implement a third party interface? Can protocols help me do this?

19:05 Raynes: chouser: ping

19:28 notsonerdysunny: http://pastebin.com/1vQNfQ72

19:28 I am kind-of new to this jar and java stuff.. I tried to package the jreality.jar along with its native dependencies and upload it to the clojars org .. I am having trouble with the simply requiring a class in the namespace that is available in on one of the jars that I have packaged together .. can anybody help? The link to the paste is given above..

19:29 I verified that the jar actually contains what I wanted using jarexplorer

19:33 tomoj: you don't require java classes, you import them

19:33 (try (:import [de.jreality.plugin JRViewer]) instead)

19:39 Raynes: tomoj: (:import de.jreality.plugin.JRViewer) ought to work, right?

19:48 tomoj: indeed

20:55 crowbar7: So, I havev a couple of questions

21:06 What is a nicer way to deal with this XML? IE. Not calling the URL twice would be good. (apply str (interpose " " (interleave

21:06 (zf/xml-> (z/xml-zip (parse url )) :txt_forecast :forecastday :title zf/text)

21:06 (zf/xml-> (z/xml-zip (parse url )) :txt_forecast :forecastday :fcttext zf/text))))

21:06 (apply str (interpose " " (interleave

21:06 (zf/xml-> (z/xml-zip (parse url )) :txt_forecast :forecastday :title zf/text)

21:07 (zf/xml-> (z/xml-zip (parse url )) :txt_forecast :forecastday :fcttext zf/text))))

21:07 Those last 3 lines

21:12 tomoj: (let [x (z/xml-zip (parse url))] (apply str (interpose " " (interleave (zf/xml-> x ...) (zf/xml-> x ...)))))

21:12 crowbar7: k

21:12 thanks

21:13 That should speed up my call quite a bit

21:14 rhudson: small point, but instead of (apply str (interpose " " blah)) you can use (clojure.string/join " " blah)

21:15 crowbar7: I'm guessing that would be quicker then interpose

21:25 tomoj: I already have that code in a let block

21:39 tomoj: crowbar7: hurrah

21:40 crowbar7: So, now that parse itself is it's own let block it will only go fetch that url the first time then work off a saved immutable state the second time I call it?

21:40 err

21:41 a binding in a let block

21:45 tomoj: right

21:48 crowbar7: cool

21:49 Well, that gets my IRC bot finding the local forecast

21:49 Raynes: $fcst Eldridge, AL

21:49 sexpbot: Raynes: 3:47 PM CDT

21:49 Raynes: TODAY: Clear. Lows in the mid 60s. North winds around 5 mph in the evening then becoming light.

21:49 Raynes: TONIGHT: Sunny in the morning then becoming partly cloudy. Highs in the lower 90s. North winds 5 to 10 mph.

21:50 Raynes: crowbar7: What service are you using? Just curious.

21:50 I specifically tried to find a JSON-based service, to no avail. I ended up using wunderground.

21:51 crowbar7: that is what I use as well

21:51 wunderground

21:52 Raynes: It's an okay API. I just can't stand parsing XML.

21:53 crowbar7: seemed easy enough, I think weather.com has a faster api as my friends php bot can scrape it faster.

21:53 Raynes: Yeah, but weather.com is horridly inaccurate.

21:53 crowbar7: however his forecast function is totally borked, so I wrote my own for my bot.

21:54 Raynes: Is your bot on github (or elsewhere) by any chance? :>

21:54 crowbar7: Not yet

21:54 He is really poorly written, but once I get a couple more features I will stuff him on there.

21:54 He is in one file

21:54 Raynes: crowbar7: Are you using any IRC libraries or frameworks, or did you roll your own connection handling stuff?

21:55 crowbar7: I used pirc

21:55 I did roll my own for a little bit, but found pircbot to have quite a load of nice features I could just call.

21:55 Raynes: crowbar7: http://github.com/Raynes/irclj You might be interested in that. I wrote it specifically to replace Pircbot in sexpbot. It's somewhat modeled after it.

21:56 crowbar7: nice

21:57 I hate using the wall hacked method in pirc bot

21:57 Raynes: No such annoyances in Irclj. :>!

21:58 crowbar7: I see that

21:58 clojurebot is nice but coding something with the pop queue framework hiredman wrote is a little over my clojure head. :p

21:59 Raynes: raek: If you want, you could add trattern as an example bot. I've been meaning to mention that.

22:00 crowbar7: I actually want to get a clojure asterisk framework written

22:00 I have some stuff for my work that uses a Java backend. might try to convert it to clojure with a rewrite someday. :p

22:00 dealing with asterisk

22:01 Raynes: Neat.

22:03 crowbar7: Pircbot is a pretty nice framework. I actually pretty much copied it's flood protection.

22:04 crowbar7: nice

22:05 Crowbar7: that is much better

22:06 * Raynes is off to sleep.

22:10 jsanda: does leiningen support specifying dependencies on libraries/modules that are of type pom instead of the maven default jar type?

22:12 i tried [group/artifact "version" :type "pom"] but leiningen still tried to pull down a jar module

23:24 technomancy: jsanda: that's not supported yet, but it wolud be easy to add if you are so inclined

23:47 jsanda: technomancy: i am inclined :-)

23:48 technomancy: jsanda: act soon and your patch may be included in 1.3.1

23:49 jsanda: when are you releasing 1.3.1?

Logging service provided by n01se.net