#clojure log - Dec 16 2010

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

0:00 joshua__: Is there really not a macro? function in clojure?

0:00 omg... omg.. I could use find-fn quite possibly to answer that..

0:00 amalloy: joshua__: i was about to say...

0:01 joshua__: what are some good input outputs to try?

0:01 #'when true?

0:01 Lajla: chousuke, clojure on minun silmäkuopissani, ota sen niistä.

0:01 amalloy: the problem is so many things will return true for that

0:02 you need a way to specify multiple constraints, like {[#'when] true, [#'inc] nil}

0:04 joshua__: I think there might be a but (find-fn #'when true) returned nil

0:04 actually.

0:05 nvm

0:05 dnolen: ,(lazy-seq (lazy-seq (lazy-seq nil)))

0:05 clojurebot: ()

0:05 dnolen: the bane of my existence.

0:05 technomancy: sounds like a nursery rhyme

0:14 joshua__: What is the clojurey way to print the the first item of a vector in a list of vectors?

0:15 (map (fn [x] (println (first x)) vector-lists) ?

0:15 Raynes: (doseq [[x] vectors] (println x))

0:17 joshua__: amalloy: I reimplemented it in terms of filter.

0:17 amalloy: sweet

0:18 Raynes's way is best, but for entertainment value: (dorun (map (comp println first) vectors))

0:18 joshua__: https://gist.github.com/743070

0:19 is there a way I can load the function into sexpbot so you guys can see it in action?

0:19 hnparser.main> (find-fn [1 2] 3)

0:19 bit-or

0:19 bit-xor

0:19 +

0:19 unchecked-add

0:20 amalloy: joshua__: no, sexpbot is theoretically stateless

0:20 joshua__: hnparser.main> (find-fn [[1 2]] 1)

0:20 first

0:20 rand-nth

0:20 omg omg hilarious

0:20 rand-nth

0:20 amalloy: hah

0:20 joshua__: Going to be funny when your given that more complicated inputs and functions that have random results pop up in the list from time to time.

0:22 I want to try to work find-fn into a genetic algorithm at some point.

0:22 My mind keeps thinking that it would be a really cool thing to include, but its not clicking as to why so I want to investigate.

0:23 amalloy: joshua__: i don't understand why you want to use println at all here. just return the result of the filter (wrap it in a (set) if you like)

0:24 joshua__: it will return [something #something-function] for each item

0:24 but I figure something-name is what people really want.

0:25 amalloy: (map (comp str first) (filter ... ))?

6:03 jk_: i'm just starting to use agents and find the documentation confusing. it says that send will (apply your-func agent-state &args)

6:03 but it looks like what actually happens is just (apply your-func &args)

6:04 is that right? if i want to use the existing state i have to explicitly reference it ?

6:04 or dereference it, rather?

6:05 &(doc send)

6:05 sexpbot: ⟹ "([a f & args]); Dispatch an action to an agent. Returns the agent immediately. Subsequently, in a thread from a thread pool, the state of the agent will be set to the value of: (apply action-fn state-of-agent args)"

6:07 jk_: oh nm, i see what i'm doing wrong. my function i'm passing is not solely a function of the existing state

6:07 it's too late

6:16 auser: hola

7:52 mrBliss: technomancy: check your .gitconfig in your dotfiles repo on github

8:26 dsop: is there a way to reload jetty (compojure) instead of going through lein run all the time?

8:28 GOSUB: wow, Ken Wesson is apparently quite taken aback by the enhanced primitive support in 1.3.x

8:30 cemerick: I'm hoping Stuart's will be the last word on that one.

8:40 GOSUB: cemerick: yeah. I love the way he cleverly said "This argument is based on the (provably wrong) presumption that "still slow" means "equally slow". The difference is percentage points vs. order of magnitude. Test it for yourself."

8:40 I wonder what Ken would say now...

9:17 dsop: is there a let that I cna use to extract from a list, something like mlet [_ bla foo] ['to ignore' 'bla' 'foo'] so that bla is bound to 'bla' ?

9:17 chouser: the feature is called "destructuring"

9:17 dsop: thx

9:17 AWizzArd: ,(let [[_ a b _ c] '(1 2 3 4 5)] (println a b c))

9:17 clojurebot: 2 3 5

9:32 SergeyD: Hi, is there a way I can do constructor dispatch in Clojure for deftypes? For example:

9:32 (deftype Type1 [^double x ^double y])

9:32 (deftype Type2 [^double x ^double y])

9:32 (def constructor-dispatch Type1)

9:32 (new constructor-dispatch 1 2)

9:32 (def constructor-dispatch Type2)

9:32 (new constructor-dispatch 1 2)

9:32 Is using java reflection on deftype's host class is the simplest option?

9:33 Chousuke: you can't use new like that.

9:33 but you can make constructor-dispatch a function that creates either Type1 or Type2 depending on whatever.

9:35 SergeyD: Chousuke, then I have to repeat parameter list for every construction, right? "(if (cond1) (Type1. x y) (Type2. x y)"

9:35 Chousuke: you can make a macro for that.

9:36 could look something like (conditional-new [x y] cond1 type1 cond2 type2 cond3 type3)

9:37 where it expands to (cond cond1 (new type1 x y) cond2 (new type2 x y) ...)

9:38 SergeyD: Chousuke, thanks. I have the feeling there is a better way. I will think more

10:11 schitti: Can some help me install clojure

10:11 I'm using lein

10:11 I've checked out the git repo, and when I do lein self-install

10:11 I get this error:

10:11 WARNING: certificate common name `*.github.com' doesn't match requested host name `github.com'.

10:11 Failed to download https://github.com/downloads/technomancy/leiningen/leiningen-1.4.1-SNAPSHOT-standalone.jar

10:30 Raynes: technomancy: Ping

10:36 pjstadig: Raynes: probably not for a couple more hours

10:36 Raynes: pjstadig: I've got all day. :>

11:33 jcromartie: Would it make sense to build stateful UI components as compojure middleware?

11:45 Derander_: is clojure-refactoring-mode broken? I can't seem to get it working on clojure 1.2

11:47 jweiss: is there an easy way to test that all the keys from map1 are in map2 and the values also match? (map2 might have extra keys)

11:53 alpheus`: (= map1 map2)

11:56 mduerksen: jweiss, alpheus: (= map1 (select-keys map2 (keys map1))

11:56 jweiss: mduerksen: ah thanks

11:57 alpheus`: I missed that you meant to ignore extra keys in map2

12:05 ohpauleez: Raynes: ping

12:05 does that kid even go to school?

12:05 haha

12:23 GOSUB: ohpauleez: he is home-schooled.

12:23 ohpauleez: I was just pinged and reminded of that

12:23 I totally knew that too

12:24 GOSUB: ohpauleez: Ok.

12:24 is headius Mr. Nutter?

12:25 headius: yes

12:25 GOSUB: headius: oh, it's great to see you on this channel :)

12:26 headius: I hover :)

12:27 GOSUB: headius: good, good!

12:33 that thread on the mailing list is a phenomenal waste of time.

12:34 * GOSUB wonders if Ken is actually Dr. John Harrop (of Flying Frog fame) in disguise.

12:35 technomancy: GOSUB: or erik naggum back from the graaaaaave?

12:36 GOSUB: technomancy: oh, please, Erik Naggum was not that bad :)

12:37 cemerick: Jon Harrop has actually turned into a pretty decent presence on the list, last I knew anyway.

12:37 GOSUB: technomancy: I believe Erik was the embodiment of XKCD #386 - http://xkcd.com/386/

12:37 cemerick: I asked that John. he told me that he is not the same John. go figure!

12:38 I was quite surprised by that statement. (the flying frog signature is missing, so I kind of believed him)

12:40 cemerick: Holy crap that thread is a disaster. :-( :-(

12:41 GOSUB: completely

12:41 even Stu is pissed now.

12:41 cemerick: I'm surprised he hasn't gotten the banstick at this point.

12:42 or, moderation bar, perhaps :-P

12:43 technomancy: it made me switch to reading by digest

12:44 GOSUB: cemerick: that will make it worse. let's try to persuade him into R-ing the FM :)

12:44 cemerick: "R-ing"?

12:44 GOSUB: cemerick: reading the fine manual.

12:44 cemerick: never gonna happen.

12:44 There's no manual anyway.

12:45 GOSUB: cemerick: STFA (search the fine archives)

12:45 STFA or STFU.

12:46 cemerick: Well, he disagrees with the design decision that's been made, settled, and already bikeshedded to death. Reading isn't going to stop anything.

12:46 GOSUB: cemerick: I doubt if he understands the decision or its implications completely.

12:49 Clojure/core guys should release the video of Rich's talk about new features ASAP.

12:55 and the thread is alive again...

12:56 jcromartie: can I make a type callable?

12:57 chouser: jcromartie: implement IFn

12:57 jcromartie: what if it's a built-in type?

12:57 like regexes created with #""

12:57 chouser: ah. nope, can't do that yet

12:57 jcromartie: it's probably not a good idea to enable that

12:58 technomancy: it's a great idea

12:58 jcromartie: maybe I should just suggest regexes implement IFn

12:58 technomancy: it just won't work =(

12:58 jcromartie: it's a terrible idea

12:58 because it enables monkey patching

12:58 chouser: no

12:58 jcromartie: protocols and namespaces are explicit in what they define

12:58 chouser: if IFn were a protocol instead of a Java interface, you could do it

12:58 without monkey patching

12:58 jcromartie: right

13:00 GOSUB: chouser: since IFn is a Java interface, what happens when a deftype implements it? where does the implementation live?

13:02 jcromartie: In the namespace where deftype was used?

13:03 GOSUB: jcromartie: how's that monkey patching then?

13:03 may be I misunderstood something...

13:04 jcromartie: I'm talking about extending existing types to implement IFn, but there's no clean way to do that.

13:04 like regexes

13:04 GOSUB: jcromartie: ah, right.

13:06 chouser: It think there's actually no way, without having #"" produce something that's not a regex.Pattern

13:06 technomancy: the problem is making IFn a protocol would slow things way down

13:06 chouser: technomancy: would it?

13:06 technomancy: chouser: I asked rich about it at emerging langs, that's what he said

13:06 chouser: oh. :-(

13:07 technomancy: it gets in the way of hotspot

13:07 which made me very sad

13:07 chouser: yeh

13:07 yeah, me too

13:07 technomancy: I would actually be happy with an alternate reader syntax for clojure regexes that didn't work for interop but had other nicer features like IFn

13:07 since I've never used regexes for interop

13:07 but I don't think that would fly

13:07 pjstadig: you mean a ....*gasp* wrapper

13:08 * chouser plays ominous music

13:08 technomancy: I've never liked #"" syntax anyway; we should make /foo.*bar/ be a clojure.lang.Regex

13:08 danlarkin: you use regexes for interop all the time, you just don't know it!

13:08 pjstadig: class ClojureRegex extends Regex implement IFn

13:09 * cemerick desperately hopes technomancy is kidding

13:10 danlarkin: pjstadig: Pattern is Final :(

13:10 pjstadig: nooooooooooo

13:12 jcromartie: awesome by the way: http://www.ibm.com/developerworks/java/library/j-clojure-protocols/index.html?ca=drs-

13:12 this really helped me understand why protocols are a big deal

13:12 and then I went to design something using them, and realized why it was a better way than classes right away

13:13 they seem like a more principled version of mixins

13:17 but what about inheritence?

13:17 if you had behavior that could truly be inherited, what would you do there?

13:18 chouser: jcromartie: mix it in

13:18 GOSUB: jcromartie: have the behavior tucked away in a map and the merge in your implementations inside the extend call.

13:20 LOPP: hm

13:21 if I have a website where new articles are added contantly (which requires rebuilding indexes on DB to allow fast searches) which DB would you recommend

13:22 GOSUB: LOPP: you are on the wrong channel. Please try #mongodb

13:23 jcromartie: GOSUB: yeah, probably

13:23 bobo_: LOPP: from that info only, any db

13:23 jcromartie: GOSUB: hah

13:23 GOSUB: what's wrong with Couch? :)

13:23 or how about FoxPro

13:23 GOSUB: jcromartie: dog slow :-P

13:24 chouser: Multinode Oracle cluster

13:24 GOSUB: jcromartie: plus, no ad-hoc queries, etc.

13:24 jcromartie: they should call it OuchDB.

13:25 jcromartie: I don't know why Damien Katz is now working on porting OuchDB to mobiles. doesn't make sense.

13:26 jcromartie: OuchDB eh?

13:26 I thought "dog slow" was relative

13:26 GOSUB: jcromartie: indeed. dog slow compared to MongoDB.

13:26 jcromartie: I'm looking at it for an accounting, where the data is highly denormalized

13:26 Mongo is fast but it comes at a cost

13:27 * GOSUB has a production MongoDB cluster with 100GiB data.

13:27 GOSUB: jcromartie: what's the cost?

13:27 jcromartie: nice

13:27 well maybe I shouldn't speak too soon

13:27 it's not as mature as CouchDB, and there have been data loss situations

13:28 google couchdb data loss vs. mongodb data loss

13:28 mongodb wins

13:28 GOSUB: jcromartie: I agree, but those happened with people who were not well informed.

13:28 jcromartie: 2x hits

13:28 hm

13:28 GOSUB: jcromartie: don't care about that because those blogs were written by clueless tinkerers.

13:28 jcromartie: they never cared to read the manual.

13:29 jcromartie: even at Foursquare, a huge mess.

13:29 jcromartie: I mean "First, there are many scenarios in which that server loses all its data no matter what."

13:29 GOSUB: jcromartie: the mongodb people have always cared to explain where the problem was.

13:29 jcromartie: yeah

13:30 GOSUB: jcromartie: we, for example, never lost any data because we cared to read.

13:30 dnolen: GOSUB: CouchDB gives you P2P replication. That's not even remotely in the scope of Mongo.

13:30 jcromartie: Mongo basically requires a cluster

13:30 GOSUB: jcromartie: granted that CouchDB has a lot of great features, especially replication.

13:30 dnolen: +1

13:30 jcromartie: I'm not trying to rag on Mongo

13:30 I played with it and I liked it

13:30 dnolen: so CouchDB on mobile makes plenty of sense.

13:30 jcromartie: that was before Couch had the JavaScript interface

13:30 GOSUB: jcromartie: I am not trying to diss couchdb either.

13:31 dnolen: what about erlang? is it possible to run couchdb without erlang?

13:31 jcromartie: my big problem with both is the question of paging results

13:31 cemerick: CouchDB makes sense in a *lot* of scenarios.

13:31 jcromartie: Erlang can be tiny.

13:31 dnolen: data sync across heterogenous devices is painful task. CouchDB makes that much simpler.

13:31 GOSUB: jcromartie: how tiny can erlang be?

13:32 dnolen: GOSUB: erlang VM runs in about 40mb-50mb of RAM, that's not mobile unfriendly.

13:32 jcromartie: it would kill an iPhone app

13:33 GOSUB: I am wrong there

13:33 I guess mobile Couch is not Erlang

13:33 GOSUB: dnolen: what kind of devices are you talking about? iPhone has 256MB RAM

13:33 jcromartie: in that case, they will lose a lot of things that come free with erlang.

13:34 jcromartie: yeah

13:34 GOSUB: anyway, I really hope CouchDB shines. after all, CouchDB is the one which started this non-relational database revolution.

13:35 jcromartie: I am seriously considering it, though. The only issue is that lack of ad-hoc queries.

13:37 GOSUB: jcromartie: take a look at mongodb for that. it's been amazing.

13:37 * GOSUB discovered two awesome things in 2009. Clojure & MongoDB

13:38 jcromartie: but I do like the Couch HTTP interface, which seems like a real bonus too

13:38 and basically means there is no driver to speak of

13:39 dnolen: GOSUB: considering what most iPhone apps do (besides games), 206MB of RAM is plenty. But yeah, when the devices hit the next step, 512mb, will be a more realistic option.

13:39 jcromartie: I've just got to try it.

13:39 I guess...

13:39 GOSUB: dnolen: you are right.

13:40 jcromartie: I need to come up with a solution for serializing and deserializing defrecords

13:40 GOSUB: jcromartie: jsonify?

13:41 jcromartie: maybe

13:41 haven't looked into it

13:48 LOPP: yep mongo DB looks promising

14:05 dnolen: nice! thinking Clojure for Java programmers, http://blog.factual.com/devblog/aaron/thinking-in-clojure-for-java-programmers-part-1-—-a-gentle-intro/

14:08 chewbran1a: anyone have any experience using cascading (or cascalog) with amazon's elastic map-reduce?

14:10 technomancy: chewbran1a: ohai

14:10 chewbran1a: technomancy: hey how's it going?

14:11 I just saw this: http://www.cascading.org/2009/04/amazon-elastic-mapreduce.html

14:11 very intriguing

14:14 right now I'm looking into what's involved in saving data into simpledb, then spinning up elastic map-reduce with cascalog/cascading

14:15 I was originally planning on dumping data into couchdb as an intermediary data store, and then transfering data over to aws to run jobs on, but this looks like a much more simplified architecture

14:16 technomancy: IME things involving hadoop are rarely simpler than the alternative

14:16 but I haven't used cascalog

14:17 chewbran1a: well I was planning on using hadoop either way, but not having to migrate the data from a remote couchdb instance into aws for hadoop is much simpler

14:20 technomancy: ah, I see

14:21 chewbran1a: going to be generating a lot of small data I need to process

14:22 fliebel: chewbran1a: If you use couch, be sure to do mass updates in that case, otherwise the HTTP overheat will be prohibitive.

14:26 chewbran1a: fliebel: yeah I hear you, most of the requests will be coming in sporadically from different sources, so if I wanted to do a mass update I would have to queue up all the requests and then push them, which isn't necessarily a bad option, its just not how the actual data is coming in

14:45 jcromartie: is there any way to have interactive prompts from Clojure when using Slime?

14:45 like, (read-line)

14:45 (which doesn't work in a Slime REPL)

14:46 or at least not a swank repl

15:01 oh http://stackoverflow.com/questions/1113705/java-input-in-clojure-with-read-line-not-reading-properly-in-emacs

15:13 jweiss: what's the functional way to do this. i have a list of fn's, a pred, and an initial value. i want to pass the initial value to the first fn, and keep feeding the result back into the next fn in the list, as long as the result passes the pred.

15:15 fliebel: jweiss: I think -?> does that.

15:15 kind of...

15:15 jweiss: fliebel: yeah but that's a macro

15:16 and the pred is just null? :)

15:16 i want my own :)

15:23 cemerick: ,(last (filter #(< % 10) (reductions #(%2 %1) 0 [inc (partial * 5) (constantly 50)])))

15:23 clojurebot: 5

15:23 cemerick: jweiss: ^^

15:24 hrm, that won't work if any of your fns return nil; it's a start, anyway

15:24 fliebel: cemerick: Why filter?

15:25 cemerick: I'm thinking take-while suits better.

15:25 cemerick: that's ensuring that your predicate holds (in this case, (< % 10)

15:25 jweiss: cemerick: seems like take-while could work

15:25 cemerick: sure, either-or

15:26 fliebel: cemerick: But with filter, if it returns false, and then true again, it will still take the true value. or am I sleepy?

15:26 chouser: oh, I *really* want to be able to load/reload an arbitrary .class file at the repl

15:26 cemerick: fliebel: no, you're right.

15:27 * cemerick is clearly the sleepy one

15:28 chouser: I can use .defineClass of clojure.RT/baseLoader to load a class file

15:29 and I thought, because of the cache stuff mentioned in the code there, that if I then refer to that class by name, I would get the one I loaded.

15:29 alas, it is not so.

15:29 does anyone have any hints for me?

15:31 jk_: chouser: what about using classloader tricks directly like: http://tutorials.jenkov.com/java-reflection/dynamic-class-loading-reloading.html

15:31 that might break clojure itself though...

15:37 bobo_: any *MQ or other library that has pub sub implemented?

15:38 chouser: jk_: hmm, thanks.

15:50 ohpauleez: I love the Clojure community, I just want everyone to know that

15:50 I really appreciate all of you

15:51 I don't think I've ever seen a thread on the mailing list like the one that's happening now, before this point

15:51 and the best part is NO ONE is attacking that dude, everyone is TRYING to help

15:51 and no one has done a one line response

15:52 bobo_: you got me curious, what thread? im to bad at reading the mailing list

15:53 ohpauleez: bobo_: Only read this if you have an hour to spare: http://groups.google.com/group/clojure/browse_thread/thread/59a22dcbc6be628f/72e2141ab404e7e2

15:53 chouser: and please resist any urge to add to it

15:53 ohpauleez: You'll notice I haven't already :)

15:54 bobo_: is it worth an hour? =)

15:54 ohpauleez: The sooner that dies, the better off we'll all be

15:54 chouser: bobo_: no

15:54 ohpauleez: bobo_: no

15:54 it isn't

15:54 bobo_: ok, il pass then!

15:54 chouser: wise choice

16:46 dsop: hmm sometimes I wish when-let doesnt bind if the binded val is ()

16:53 amalloy: cemerick: josh and i got that findfn thing from last night working, and integrated into sexpbot as a plugin:

16:53 $findfn [#{3 1} #{6}] #{1 3 6}

16:53 sexpbot: [clojure.set/union clojure.core/into]

16:56 36DAAVIGZ: $findfn [{:foo "abc" :bar 123} :bar] {:foo "abc"}

16:57 What just happened there?

16:57 amalloy: 36DAAVIGZ: i don't know; i think there's some kind of network thing going on atm

16:58 $kill

16:58 sexpbot: KILL IT WITH FIRE!

16:58 Raynes: I'm sshing in to find out.

16:59 amalloy: Raynes: no, it's working. but it isn't finding an answer to his question for some reason

16:59 Raynes: amalloy: Get out of my screen session, you stalker.

16:59 amalloy: Raynes: dude, i told you, i barely know how to use screen

16:59 ohpauleez: haha

16:59 joshua__: $findfn [:bar {:foo "abc" :bar 123}] {:foo "abc"}

16:59 sexpbot: []

17:00 Raynes: amalloy: I have *got* to find a way to shut this apache logging off. /me tries mattrepl's trick.

17:01 joshua__: &(dissoc {:foo "abc" :bar 123} :bar)

17:01 sexpbot: ⟹ {:foo "abc"}

17:02 amalloy: joshua__, Raynes: we can debug this in #() without bugging #clojure

17:02 Raynes: Or #sexpbot

17:15 ohpauleez: Raynes: do you want a pull request for the clj-github stuff or do you just want to peek at the commit log first?

17:15 Raynes: ohpauleez: A pull request would be nice and tidy, if you have a moment.

17:16 ohpauleez: Totally

17:17 scottj: What's the official site of the chrono date library? Is there a better joda wrapper?

17:18 brehaut: scottj: clj-time is a decent joda wrapper

17:18 technomancy: chrono got renamed to clj-time. =(

17:18 brehaut: oh

17:20 scottj: technomancy: and abandoned?

17:20 brehaut: I don't think chrono/clj-time is the same as clj-sys/clj-time

17:20 technomancy: dunno

17:21 Raynes: clj-sys is the canonical page.

17:21 http://github.com/clj-sys/clj-time

17:21 Definitely not abandoned.

17:21 scottj: Raynes: I think that's another project that happens to have the same name

17:22 Raynes: If you're looking for a Joda wrapper, either way, that's the project you're looking for.

17:24 ohpauleez: Ooh, tests! I like you already.

17:25 ohpauleez: :)

17:26 Raynes: ohpauleez: Going through the commits as we speak.

17:26 ohpauleez: awesome, thanks

17:29 Raynes: ohpauleez: Added you as a collaborator so you'll have write access to the repo. Your first order of business can be to pull your pull request if you like. <3

17:29 ohpauleez: Raynes: Thanks man! I appreciate it

17:52 joshua__: Where can I find a summary of changes in clojure from 1.1 to 1.2?

17:53 (especially with focus on changes to how namespaces work)

17:53 https://github.com/clojure/clojure/blob/1.2.x/changes.txt

17:54 * technomancy can't think of anything that changed about namespaces

17:54 joshua__: I have a function that runs in 1.1 but doesn't run in 1.2

17:55 amalloy: joshua__: see my comment in #sexpbot

17:55 it looks like derive throws an assertion error if you call it with bad args, instead of something more polite

17:56 joshua__: How do you catch an assert?

17:56 nvm

17:56 Raynes: (catch AssertionError e ...)

17:56 joshua__: $source derive

17:56 sexpbot: derive is http://is.gd/iRPrX

17:56 amalloy: joshua__: fixed

17:57 i'll push in a sec

18:00 clizzin: does anyone happen to know how clojure.contrib.json compares to jackson via clj-json in terms of performance when reading json strings into clojure maps?

18:07 dakrone: clizzin: a very non-scientific comparison: http://p.writequit.org/json-perf.html

18:10 clizzin: dakrone: excellent, thank you. this jives with my own even less scientific comparisons.

18:12 dakrone: clizzin: you're welcome

18:13 rata_: hi

18:18 has anybody found this error before? Var incanter.core/$data is unbound

18:22 clizzin: dakrone: btw, would you be able to point me to the source for those json tests? it'd be useful to read them.

18:23 dakrone: clizzin: lemme throw up a github project with it

18:25 clizzin: https://github.com/dakrone/jsontest based off of https://gist.github.com/316675

18:25 clizzin: dakrone: cool, thanks! maybe it can even become scientific over time. ;)

18:26 dakrone: it's very hacked up, so take it with a block of salt

19:21 krumholt: Hi. is there a page about the clojure in clojure compiler?

19:23 ohpauleez: krumholt: For the design and benefits, or do you want to see the project on github?

19:24 krumholt: a page about the plans and who is working or planning on working on it would be nice :)

19:25 ohpauleez: krumholt: All design docs and proposals are on here: http://dev.clojure.org/display/design/Home

19:25 awesome reads, all of them

19:25 krumholt: very nice. thanks

19:26 ohpauleez: you're totally welcome

19:40 joshua__: http://blog.factual.com/devblog/aaron/thinking-in-clojure-for-java-programmers-part-1-%E2%80%94-a-gentle-intro/ (enjoying this article)

19:40 (very basic though)

20:14 zemariamm: Hello veryone

20:14 I'm trying to write a simple webapp using ring and appengine-magic

20:15 however I can't find out how to use more than one ring handler in appengine-magic

20:18 joshua__: brehaut, so you think defn should have been deffn?

20:19 brehaut: no i dont :)

20:19 that would be ugly and annoying to type

20:19 joshua__: Oh! I thought you were agreeing with him that it was a bad name for some reason.

20:19 My bad.

20:19 brehaut: ah true

20:20 i should edit that, its ambiguous

20:20 amalloy: where is this ambiguous statement?

20:20 brehaut: hacker news

20:20 amalloy: http://news.ycombinator.com/item?id=2014565

20:21 joshua__: clearer now?

20:22 joshua__: yea

20:22 brehaut: cool

20:22 joshua__: I'm not sure how I read it so wrong so many times in a row. It seems pretty clear what you meant once I knew what you meant. haha

20:22 brehaut: haha that was my blind spot too :P

20:55 zemariamm: just posted a question on st regarding handlers and ring

21:13 joshua__: Considering trying to scrape all of delciious..

21:22 Decided against it.

21:36 How do you delete all tagged text in emacs?

21:36 Like the stuff you've highlighted.

21:39 C-w for those that were wondering.

21:44 amalloy: joshua__: text between mark and point is called the region, btw

21:44 joshua__: amalloy, thanks. I'll try to use the proper term in the future.

21:44 amalloy: there's an option to delete the region when you type something, emulating the behavior of more modern apps

21:46 ah, there it is. it's called delete-selection-mode; you can customize it as usual with M-x customize-variable

22:02 joshua__: ls

22:02 oops, this isn't my terminal

22:03 amalloy: src/ bin/ awesome.clj

22:23 duck1123: If I run a lazytest watcher and a compojure app from the same repl, I find that the compojure app doesn't reflect the changes I make. Anyone know why?

22:24 joshua__: Coolest application I've ever seen: (update :posts a-post (merge a-post {:id (second (re-matches #"item\?id=(\d+)" (:link a-post)))}))

22:24 oops

22:25 http://questvisual.com/

22:26 _ato: wow

22:30 amalloy: joshua__: i have never been so sad to own an android

22:31 Raynes: joshua__, amalloy: I've never been so sad to not own... well.. anything.

22:35 m7d: i have a weird question for this forum, but someone might know the answer if they had to build tokyocabinet-java for OSX

22:35 i am trying to tell configure where to find jni.h and am having trouble with it

22:36 on os x, jni.h is located here: /System/Library/Frameworks/JavaVM.framework/Headers

22:36 and if i do export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework

22:36 and then ./configure it should pick it up, but alas it isn't

22:37 interestingly, sudo port install tokyocabinet-java fails for the same reason

22:37 i need it for jiraph, the clojure graph database

22:37 any ideas?

22:37 tokyocabinet is installed just fine

22:38 just need the java bindings

22:59 lancepantz: m7d: you're in luck

23:00 it's really easy if you're using cake master

23:00 from jiraph route, use cake install-native

23:00 *root

23:44 auser: um... so what does this error mean: Duplicate method name&signature in class file?

23:44 rather, anyone know?

23:45 joshua__: Where would you go for the best intro to using mongo db in clojure?

23:45 I don't know what it means, but it sounds like you have two methods that take arguments of the same type.

23:46 auser: well... I'm doing a (gen-class with :implements...

23:46 so... in order to actually use the class I'm generating, it has to have the same signature, right?

23:48 <~ confused

23:48 joshua__: Don't know, I'm new to clojure too. I just know that when I took C++ a while back signature referred to the method name and the arguments types that method took. So I was sort of guessing.

23:48 auser: well, that's exactly right, that's the problem... I just am trying to fix ti

23:48 it*

23:49 joshua__: http://stackoverflow.com/questions/1627747/problem-extending-a-class-in-clojure-classformaterror-duplicate-field-namesign

23:49 auser: not entirely certain how to fix it though, 'cause it "needs" the methods named that way, otherwise...

23:49 op

23:49 joshua__: Hope that helps =).

23:49 auser: yeah, that's doesn't quite fix it though

23:49 I saw it

23:49 thanks for the link though

23:54 amalloy: auser: i'd guess you're not type-hinting the arguments

23:54 _ato: auser: this might be relevant: http://dishevelled.net/Tricky-uses-of-Clojure-gen-class-and-AOT-compilation.html

23:56 amalloy: joshua__: looking for anything in particular? sexpbot has several uses of mongo, of varying complexity you could steal from

23:58 joshua__: A taggable post with threaded comments. The body of the comments should be a wiki. I should be able to link to one comment in particular within the the threaded comments.

23:59 I'm brand new to mongodb so I'm not sure how to accomplish all of that just yet.

Logging service provided by n01se.net