#clojure logs

2010-12-16

00:00joshua__Is there really not a macro? function in clojure?
00:00joshua__omg... omg.. I could use find-fn quite possibly to answer that..
00:00amalloyjoshua__: i was about to say...
00:01joshua__what are some good input outputs to try?
00:01joshua__#'when true?
00:01Lajlachousuke, clojure on minun silmäkuopissani, ota sen niistä.
00:01amalloythe problem is so many things will return true for that
00:02amalloyyou need a way to specify multiple constraints, like {[#'when] true, [#'inc] nil}
00:04joshua__I think there might be a but (find-fn #'when true) returned nil
00:04joshua__actually.
00:05joshua__nvm
00:05dnolen,(lazy-seq (lazy-seq (lazy-seq nil)))
00:05clojurebot()
00:05dnolenthe bane of my existence.
00:05technomancysounds like a nursery rhyme
00:14joshua__What is the clojurey way to print the the first item of a vector in a list of vectors?
00:15joshua__(map (fn [x] (println (first x)) vector-lists) ?
00:15Raynes(doseq [[x] vectors] (println x))
00:17joshua__amalloy: I reimplemented it in terms of filter.
00:17amalloysweet
00:18amalloyRaynes's way is best, but for entertainment value: (dorun (map (comp println first) vectors))
00:18joshua__https://gist.github.com/743070
00:19joshua__is there a way I can load the function into sexpbot so you guys can see it in action?
00:19joshua__hnparser.main> (find-fn [1 2] 3)
00:19joshua__bit-or
00:19joshua__bit-xor
00:19joshua__+
00:19joshua__unchecked-add
00:20amalloyjoshua__: no, sexpbot is theoretically stateless
00:20joshua__hnparser.main> (find-fn [[1 2]] 1)
00:20joshua__first
00:20joshua__rand-nth
00:20joshua__omg omg hilarious
00:20joshua__rand-nth
00:20amalloyhah
00:20joshua__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.
00:22joshua__I want to try to work find-fn into a genetic algorithm at some point.
00:22joshua__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.
00:23amalloyjoshua__: 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)
00:24joshua__it will return [something #something-function] for each item
00:24joshua__but I figure something-name is what people really want.
00:25amalloy(map (comp str first) (filter ... ))?
06:03jk_i'm just starting to use agents and find the documentation confusing. it says that send will (apply your-func agent-state &args)
06:03jk_but it looks like what actually happens is just (apply your-func &args)
06:04jk_is that right? if i want to use the existing state i have to explicitly reference it ?
06:04jk_or dereference it, rather?
06:05jk_&(doc send)
06:05sexpbot⟹ "([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)"
06:07jk_oh nm, i see what i'm doing wrong. my function i'm passing is not solely a function of the existing state
06:07jk_it's too late
06:16auserhola
07:52mrBlisstechnomancy: check your .gitconfig in your dotfiles repo on github
08:26dsopis there a way to reload jetty (compojure) instead of going through lein run all the time?
08:28GOSUBwow, Ken Wesson is apparently quite taken aback by the enhanced primitive support in 1.3.x
08:30cemerickI'm hoping Stuart's will be the last word on that one.
08:40GOSUBcemerick: 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."
08:40GOSUBI wonder what Ken would say now...
09:17dsopis 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' ?
09:17chouserthe feature is called "destructuring"
09:17dsopthx
09:17AWizzArd,(let [[_ a b _ c] '(1 2 3 4 5)] (println a b c))
09:17clojurebot2 3 5
09:32SergeyDHi, is there a way I can do constructor dispatch in Clojure for deftypes? For example:
09:32SergeyD(deftype Type1 [^double x ^double y])
09:32SergeyD(deftype Type2 [^double x ^double y])
09:32SergeyD(def constructor-dispatch Type1)
09:32SergeyD(new constructor-dispatch 1 2)
09:32SergeyD(def constructor-dispatch Type2)
09:32SergeyD(new constructor-dispatch 1 2)
09:32SergeyDIs using java reflection on deftype's host class is the simplest option?
09:33Chousukeyou can't use new like that.
09:33Chousukebut you can make constructor-dispatch a function that creates either Type1 or Type2 depending on whatever.
09:35SergeyDChousuke, then I have to repeat parameter list for every construction, right? "(if (cond1) (Type1. x y) (Type2. x y)"
09:35Chousukeyou can make a macro for that.
09:36Chousukecould look something like (conditional-new [x y] cond1 type1 cond2 type2 cond3 type3)
09:37Chousukewhere it expands to (cond cond1 (new type1 x y) cond2 (new type2 x y) ...)
09:38SergeyDChousuke, thanks. I have the feeling there is a better way. I will think more
10:11schittiCan some help me install clojure
10:11schittiI'm using lein
10:11schittiI've checked out the git repo, and when I do lein self-install
10:11schittiI get this error:
10:11schittiWARNING: certificate common name `*.github.com' doesn't match requested host name `github.com'.
10:11schittiFailed to download https://github.com/downloads/technomancy/leiningen/leiningen-1.4.1-SNAPSHOT-standalone.jar
10:30Raynestechnomancy: Ping
10:36pjstadigRaynes: probably not for a couple more hours
10:36Raynespjstadig: I've got all day. :>
11:33jcromartieWould it make sense to build stateful UI components as compojure middleware?
11:45Derander_is clojure-refactoring-mode broken? I can't seem to get it working on clojure 1.2
11:47jweissis 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:53alpheus`(= map1 map2)
11:56mduerksenjweiss, alpheus: (= map1 (select-keys map2 (keys map1))
11:56jweissmduerksen: ah thanks
11:57alpheus`I missed that you meant to ignore extra keys in map2
12:05ohpauleezRaynes: ping
12:05ohpauleezdoes that kid even go to school?
12:05ohpauleezhaha
12:23GOSUBohpauleez: he is home-schooled.
12:23ohpauleezI was just pinged and reminded of that
12:23ohpauleezI totally knew that too
12:24GOSUBohpauleez: Ok.
12:24GOSUBis headius Mr. Nutter?
12:25headiusyes
12:25GOSUBheadius: oh, it's great to see you on this channel :)
12:26headiusI hover :)
12:27GOSUBheadius: good, good!
12:33GOSUBthat thread on the mailing list is a phenomenal waste of time.
12:35technomancyGOSUB: or erik naggum back from the graaaaaave?
12:36GOSUBtechnomancy: oh, please, Erik Naggum was not that bad :)
12:37cemerickJon Harrop has actually turned into a pretty decent presence on the list, last I knew anyway.
12:37GOSUBtechnomancy: I believe Erik was the embodiment of XKCD #386 - http://xkcd.com/386/
12:37GOSUBcemerick: I asked that John. he told me that he is not the same John. go figure!
12:38GOSUBI was quite surprised by that statement. (the flying frog signature is missing, so I kind of believed him)
12:40cemerickHoly crap that thread is a disaster. :-( :-(
12:41GOSUBcompletely
12:41GOSUBeven Stu is pissed now.
12:41cemerickI'm surprised he hasn't gotten the banstick at this point.
12:42cemerickor, moderation bar, perhaps :-P
12:43technomancyit made me switch to reading by digest
12:44GOSUBcemerick: that will make it worse. let's try to persuade him into R-ing the FM :)
12:44cemerick"R-ing"?
12:44GOSUBcemerick: reading the fine manual.
12:44cemericknever gonna happen.
12:44cemerickThere's no manual anyway.
12:45GOSUBcemerick: STFA (search the fine archives)
12:45GOSUBSTFA or STFU.
12:46cemerickWell, he disagrees with the design decision that's been made, settled, and already bikeshedded to death. Reading isn't going to stop anything.
12:46GOSUBcemerick: I doubt if he understands the decision or its implications completely.
12:49GOSUBClojure/core guys should release the video of Rich's talk about new features ASAP.
12:55GOSUBand the thread is alive again...
12:56jcromartiecan I make a type callable?
12:57chouserjcromartie: implement IFn
12:57jcromartiewhat if it's a built-in type?
12:57jcromartielike regexes created with #""
12:57chouserah. nope, can't do that yet
12:57jcromartieit's probably not a good idea to enable that
12:58technomancyit's a great idea
12:58jcromartiemaybe I should just suggest regexes implement IFn
12:58technomancyit just won't work =(
12:58jcromartieit's a terrible idea
12:58jcromartiebecause it enables monkey patching
12:58chouserno
12:58jcromartieprotocols and namespaces are explicit in what they define
12:58chouserif IFn were a protocol instead of a Java interface, you could do it
12:58chouserwithout monkey patching
12:58jcromartieright
13:00GOSUBchouser: since IFn is a Java interface, what happens when a deftype implements it? where does the implementation live?
13:02jcromartieIn the namespace where deftype was used?
13:03GOSUBjcromartie: how's that monkey patching then?
13:03GOSUBmay be I misunderstood something...
13:04jcromartieI'm talking about extending existing types to implement IFn, but there's no clean way to do that.
13:04jcromartielike regexes
13:04GOSUBjcromartie: ah, right.
13:06chouserIt think there's actually no way, without having #"" produce something that's not a regex.Pattern
13:06technomancythe problem is making IFn a protocol would slow things way down
13:06chousertechnomancy: would it?
13:06technomancychouser: I asked rich about it at emerging langs, that's what he said
13:06chouseroh. :-(
13:07technomancyit gets in the way of hotspot
13:07technomancywhich made me very sad
13:07chouseryeh
13:07chouseryeah, me too
13:07technomancyI 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:07technomancysince I've never used regexes for interop
13:07technomancybut I don't think that would fly
13:07pjstadigyou mean a ....*gasp* wrapper
13:08technomancyI've never liked #"" syntax anyway; we should make /foo.*bar/ be a clojure.lang.Regex
13:08danlarkinyou use regexes for interop all the time, you just don't know it!
13:08pjstadigclass ClojureRegex extends Regex implement IFn
13:10danlarkinpjstadig: Pattern is Final :(
13:10pjstadignooooooooooo
13:12jcromartieawesome by the way: http://www.ibm.com/developerworks/java/library/j-clojure-protocols/index.html?ca=drs-
13:12jcromartiethis really helped me understand why protocols are a big deal
13:12jcromartieand then I went to design something using them, and realized why it was a better way than classes right away
13:13jcromartiethey seem like a more principled version of mixins
13:17jcromartiebut what about inheritence?
13:17jcromartieif you had behavior that could truly be inherited, what would you do there?
13:18chouserjcromartie: mix it in
13:18GOSUBjcromartie: have the behavior tucked away in a map and the merge in your implementations inside the extend call.
13:20LOPPhm
13:21LOPPif 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:22GOSUBLOPP: you are on the wrong channel. Please try #mongodb
13:23jcromartieGOSUB: yeah, probably
13:23bobo_LOPP: from that info only, any db
13:23jcromartieGOSUB: hah
13:23jcromartieGOSUB: what's wrong with Couch? :)
13:23jcromartieor how about FoxPro
13:23GOSUBjcromartie: dog slow :-P
13:24chouserMultinode Oracle cluster
13:24GOSUBjcromartie: plus, no ad-hoc queries, etc.
13:24GOSUBjcromartie: they should call it OuchDB.
13:25GOSUBjcromartie: I don't know why Damien Katz is now working on porting OuchDB to mobiles. doesn't make sense.
13:26jcromartieOuchDB eh?
13:26jcromartieI thought "dog slow" was relative
13:26GOSUBjcromartie: indeed. dog slow compared to MongoDB.
13:26jcromartieI'm looking at it for an accounting, where the data is highly denormalized
13:26jcromartieMongo is fast but it comes at a cost
13:27GOSUBjcromartie: what's the cost?
13:27jcromartienice
13:27jcromartiewell maybe I shouldn't speak too soon
13:27jcromartieit's not as mature as CouchDB, and there have been data loss situations
13:28jcromartiegoogle couchdb data loss vs. mongodb data loss
13:28jcromartiemongodb wins
13:28GOSUBjcromartie: I agree, but those happened with people who were not well informed.
13:28jcromartie2x hits
13:28jcromartiehm
13:28GOSUBjcromartie: don't care about that because those blogs were written by clueless tinkerers.
13:28GOSUBjcromartie: they never cared to read the manual.
13:29GOSUBjcromartie: even at Foursquare, a huge mess.
13:29jcromartieI mean "First, there are many scenarios in which that server loses all its data no matter what."
13:29GOSUBjcromartie: the mongodb people have always cared to explain where the problem was.
13:29jcromartieyeah
13:30GOSUBjcromartie: we, for example, never lost any data because we cared to read.
13:30dnolenGOSUB: CouchDB gives you P2P replication. That's not even remotely in the scope of Mongo.
13:30jcromartieMongo basically requires a cluster
13:30GOSUBjcromartie: granted that CouchDB has a lot of great features, especially replication.
13:30GOSUBdnolen: +1
13:30jcromartieI'm not trying to rag on Mongo
13:30jcromartieI played with it and I liked it
13:30dnolenso CouchDB on mobile makes plenty of sense.
13:30jcromartiethat was before Couch had the JavaScript interface
13:30GOSUBjcromartie: I am not trying to diss couchdb either.
13:31GOSUBdnolen: what about erlang? is it possible to run couchdb without erlang?
13:31jcromartiemy big problem with both is the question of paging results
13:31cemerickCouchDB makes sense in a *lot* of scenarios.
13:31jcromartieErlang can be tiny.
13:31dnolendata sync across heterogenous devices is painful task. CouchDB makes that much simpler.
13:31GOSUBjcromartie: how tiny can erlang be?
13:32dnolenGOSUB: erlang VM runs in about 40mb-50mb of RAM, that's not mobile unfriendly.
13:32jcromartieit would kill an iPhone app
13:33jcromartieGOSUB: I am wrong there
13:33jcromartieI guess mobile Couch is not Erlang
13:33GOSUBdnolen: what kind of devices are you talking about? iPhone has 256MB RAM
13:33GOSUBjcromartie: in that case, they will lose a lot of things that come free with erlang.
13:34jcromartieyeah
13:34GOSUBanyway, I really hope CouchDB shines. after all, CouchDB is the one which started this non-relational database revolution.
13:35jcromartieI am seriously considering it, though. The only issue is that lack of ad-hoc queries.
13:37GOSUBjcromartie: take a look at mongodb for that. it's been amazing.
13:38jcromartiebut I do like the Couch HTTP interface, which seems like a real bonus too
13:38jcromartieand basically means there is no driver to speak of
13:39dnolenGOSUB: 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:39jcromartieI've just got to try it.
13:39jcromartieI guess...
13:39GOSUBdnolen: you are right.
13:40jcromartieI need to come up with a solution for serializing and deserializing defrecords
13:40GOSUBjcromartie: jsonify?
13:41jcromartiemaybe
13:41jcromartiehaven't looked into it
13:48LOPPyep mongo DB looks promising
14:05dnolennice! thinking Clojure for Java programmers, http://blog.factual.com/devblog/aaron/thinking-in-clojure-for-java-programmers-part-1-—-a-gentle-intro/
14:08chewbran1aanyone have any experience using cascading (or cascalog) with amazon's elastic map-reduce?
14:10technomancychewbran1a: ohai
14:10chewbran1atechnomancy: hey how's it going?
14:11chewbran1aI just saw this: http://www.cascading.org/2009/04/amazon-elastic-mapreduce.html
14:11chewbran1avery intriguing
14:14chewbran1aright now I'm looking into what's involved in saving data into simpledb, then spinning up elastic map-reduce with cascalog/cascading
14:15chewbran1aI 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:16technomancyIME things involving hadoop are rarely simpler than the alternative
14:16technomancybut I haven't used cascalog
14:17chewbran1awell 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:20technomancyah, I see
14:21chewbran1agoing to be generating a lot of small data I need to process
14:22fliebelchewbran1a: If you use couch, be sure to do mass updates in that case, otherwise the HTTP overheat will be prohibitive.
14:26chewbran1afliebel: 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:45jcromartieis there any way to have interactive prompts from Clojure when using Slime?
14:45jcromartielike, (read-line)
14:45jcromartie(which doesn't work in a Slime REPL)
14:46jcromartieor at least not a swank repl
15:01jcromartieoh http://stackoverflow.com/questions/1113705/java-input-in-clojure-with-read-line-not-reading-properly-in-emacs
15:13jweisswhat'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:15fliebeljweiss: I think -?> does that.
15:15fliebelkind of...
15:15jweissfliebel: yeah but that's a macro
15:16jweissand the pred is just null? :)
15:16jweissi want my own :)
15:23cemerick,(last (filter #(< % 10) (reductions #(%2 %1) 0 [inc (partial * 5) (constantly 50)])))
15:23clojurebot5
15:23cemerickjweiss: ^^
15:24cemerickhrm, that won't work if any of your fns return nil; it's a start, anyway
15:24fliebelcemerick: Why filter?
15:25fliebelcemerick: I'm thinking take-while suits better.
15:25cemerickthat's ensuring that your predicate holds (in this case, (< % 10)
15:25jweisscemerick: seems like take-while could work
15:25cemericksure, either-or
15:26fliebelcemerick: But with filter, if it returns false, and then true again, it will still take the true value. or am I sleepy?
15:26chouseroh, I *really* want to be able to load/reload an arbitrary .class file at the repl
15:26cemerickfliebel: no, you're right.
15:28chouserI can use .defineClass of clojure.RT/baseLoader to load a class file
15:29chouserand 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:29chouseralas, it is not so.
15:29chouserdoes anyone have any hints for me?
15:31jk_chouser: what about using classloader tricks directly like: http://tutorials.jenkov.com/java-reflection/dynamic-class-loading-reloading.html
15:31jk_that might break clojure itself though...
15:37bobo_any *MQ or other library that has pub sub implemented?
15:38chouserjk_: hmm, thanks.
15:50ohpauleezI love the Clojure community, I just want everyone to know that
15:50ohpauleezI really appreciate all of you
15:51ohpauleezI don't think I've ever seen a thread on the mailing list like the one that's happening now, before this point
15:51ohpauleezand the best part is NO ONE is attacking that dude, everyone is TRYING to help
15:51ohpauleezand no one has done a one line response
15:52bobo_you got me curious, what thread? im to bad at reading the mailing list
15:53ohpauleezbobo_: Only read this if you have an hour to spare: http://groups.google.com/group/clojure/browse_thread/thread/59a22dcbc6be628f/72e2141ab404e7e2
15:53chouserand please resist any urge to add to it
15:53ohpauleezYou'll notice I haven't already :)
15:54bobo_is it worth an hour? =)
15:54ohpauleezThe sooner that dies, the better off we'll all be
15:54chouserbobo_: no
15:54ohpauleezbobo_: no
15:54ohpauleezit isn't
15:54bobo_ok, il pass then!
15:54chouserwise choice
16:46dsophmm sometimes I wish when-let doesnt bind if the binded val is ()
16:53amalloycemerick: josh and i got that findfn thing from last night working, and integrated into sexpbot as a plugin:
16:53amalloy$findfn [#{3 1} #{6}] #{1 3 6}
16:53sexpbot[clojure.set/union clojure.core/into]
16:5636DAAVIGZ$findfn [{:foo "abc" :bar 123} :bar] {:foo "abc"}
16:5736DAAVIGZWhat just happened there?
16:57amalloy36DAAVIGZ: i don't know; i think there's some kind of network thing going on atm
16:58amalloy$kill
16:58sexpbotKILL IT WITH FIRE!
16:58RaynesI'm sshing in to find out.
16:59amalloyRaynes: no, it's working. but it isn't finding an answer to his question for some reason
16:59Raynesamalloy: Get out of my screen session, you stalker.
16:59amalloyRaynes: dude, i told you, i barely know how to use screen
16:59ohpauleezhaha
16:59joshua__$findfn [:bar {:foo "abc" :bar 123}] {:foo "abc"}
16:59sexpbot[]
17:00Raynesamalloy: I have *got* to find a way to shut this apache logging off. /me tries mattrepl's trick.
17:01joshua__&(dissoc {:foo "abc" :bar 123} :bar)
17:01sexpbot⟹ {:foo "abc"}
17:02amalloyjoshua__, Raynes: we can debug this in #() without bugging #clojure
17:02RaynesOr #sexpbot
17:15ohpauleezRaynes: do you want a pull request for the clj-github stuff or do you just want to peek at the commit log first?
17:15Raynesohpauleez: A pull request would be nice and tidy, if you have a moment.
17:16ohpauleezTotally
17:17scottjWhat's the official site of the chrono date library? Is there a better joda wrapper?
17:18brehautscottj: clj-time is a decent joda wrapper
17:18technomancychrono got renamed to clj-time. =(
17:18brehautoh
17:20scottjtechnomancy: and abandoned?
17:20scottjbrehaut: I don't think chrono/clj-time is the same as clj-sys/clj-time
17:20technomancydunno
17:21Raynesclj-sys is the canonical page.
17:21Rayneshttp://github.com/clj-sys/clj-time
17:21RaynesDefinitely not abandoned.
17:21scottjRaynes: I think that's another project that happens to have the same name
17:22RaynesIf you're looking for a Joda wrapper, either way, that's the project you're looking for.
17:24Raynesohpauleez: Ooh, tests! I like you already.
17:25ohpauleez:)
17:26Raynesohpauleez: Going through the commits as we speak.
17:26ohpauleezawesome, thanks
17:29Raynesohpauleez: 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:29ohpauleezRaynes: Thanks man! I appreciate it
17:52joshua__Where can I find a summary of changes in clojure from 1.1 to 1.2?
17:53joshua__(especially with focus on changes to how namespaces work)
17:53joshua__https://github.com/clojure/clojure/blob/1.2.x/changes.txt
17:54joshua__I have a function that runs in 1.1 but doesn't run in 1.2
17:55amalloyjoshua__: see my comment in #sexpbot
17:55amalloyit looks like derive throws an assertion error if you call it with bad args, instead of something more polite
17:56joshua__How do you catch an assert?
17:56joshua__nvm
17:56Raynes(catch AssertionError e ...)
17:56joshua__$source derive
17:56sexpbotderive is http://is.gd/iRPrX
17:56amalloyjoshua__: fixed
17:57amalloyi'll push in a sec
18:00clizzindoes 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:07dakroneclizzin: a very non-scientific comparison: http://p.writequit.org/json-perf.html
18:10clizzindakrone: excellent, thank you. this jives with my own even less scientific comparisons.
18:12dakroneclizzin: you're welcome
18:13rata_hi
18:18rata_has anybody found this error before? Var incanter.core/$data is unbound
18:22clizzindakrone: btw, would you be able to point me to the source for those json tests? it'd be useful to read them.
18:23dakroneclizzin: lemme throw up a github project with it
18:25dakroneclizzin: https://github.com/dakrone/jsontest based off of https://gist.github.com/316675
18:25clizzindakrone: cool, thanks! maybe it can even become scientific over time. ;)
18:26dakroneit's very hacked up, so take it with a block of salt
19:21krumholtHi. is there a page about the clojure in clojure compiler?
19:23ohpauleezkrumholt: For the design and benefits, or do you want to see the project on github?
19:24krumholta page about the plans and who is working or planning on working on it would be nice :)
19:25ohpauleezkrumholt: All design docs and proposals are on here: http://dev.clojure.org/display/design/Home
19:25ohpauleezawesome reads, all of them
19:25krumholtvery nice. thanks
19:26ohpauleezyou're totally welcome
19:40joshua__http://blog.factual.com/devblog/aaron/thinking-in-clojure-for-java-programmers-part-1-%E2%80%94-a-gentle-intro/ (enjoying this article)
19:40joshua__(very basic though)
20:14zemariammHello veryone
20:14zemariammI'm trying to write a simple webapp using ring and appengine-magic
20:15zemariammhowever I can't find out how to use more than one ring handler in appengine-magic
20:18joshua__brehaut, so you think defn should have been deffn?
20:19brehautno i dont :)
20:19brehautthat would be ugly and annoying to type
20:19joshua__Oh! I thought you were agreeing with him that it was a bad name for some reason.
20:19joshua__My bad.
20:19brehautah true
20:20brehauti should edit that, its ambiguous
20:20amalloywhere is this ambiguous statement?
20:20brehauthacker news
20:20brehautamalloy: http://news.ycombinator.com/item?id=2014565
20:21brehautjoshua__: clearer now?
20:22joshua__yea
20:22brehautcool
20:22joshua__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:22brehauthaha that was my blind spot too :P
20:55zemariammjust posted a question on st regarding handlers and ring
21:13joshua__Considering trying to scrape all of delciious..
21:22joshua__Decided against it.
21:36joshua__How do you delete all tagged text in emacs?
21:36joshua__Like the stuff you've highlighted.
21:39joshua__C-w for those that were wondering.
21:44amalloyjoshua__: text between mark and point is called the region, btw
21:44joshua__amalloy, thanks. I'll try to use the proper term in the future.
21:44amalloythere's an option to delete the region when you type something, emulating the behavior of more modern apps
21:46amalloyah, there it is. it's called delete-selection-mode; you can customize it as usual with M-x customize-variable
22:02joshua__ls
22:02joshua__oops, this isn't my terminal
22:03amalloysrc/ bin/ awesome.clj
22:23duck1123If 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:24joshua__Coolest application I've ever seen: (update :posts a-post (merge a-post {:id (second (re-matches #"item\?id=(\d+)" (:link a-post)))}))
22:24joshua__oops
22:25joshua__http://questvisual.com/
22:26_atowow
22:30amalloyjoshua__: i have never been so sad to own an android
22:31Raynesjoshua__, amalloy: I've never been so sad to not own... well.. anything.
22:35m7d i have a weird question for this forum, but someone might know the answer if they had to build tokyocabinet-java for OSX
22:35m7di am trying to tell configure where to find jni.h and am having trouble with it
22:36m7don os x, jni.h is located here: /System/Library/Frameworks/JavaVM.framework/Headers
22:36m7dand if i do export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework
22:36m7dand then ./configure it should pick it up, but alas it isn't
22:37m7dinterestingly, sudo port install tokyocabinet-java fails for the same reason
22:37m7di need it for jiraph, the clojure graph database
22:37m7dany ideas?
22:37m7dtokyocabinet is installed just fine
22:38m7djust need the java bindings
22:59lancepantzm7d: you're in luck
23:00lancepantzit's really easy if you're using cake master
23:00lancepantzfrom jiraph route, use cake install-native
23:00lancepantz*root
23:44auserum... so what does this error mean: Duplicate method name&signature in class file?
23:44auserrather, anyone know?
23:45joshua__Where would you go for the best intro to using mongo db in clojure?
23:45joshua__I don't know what it means, but it sounds like you have two methods that take arguments of the same type.
23:46auserwell... I'm doing a (gen-class with :implements...
23:46auserso... in order to actually use the class I'm generating, it has to have the same signature, right?
23:48auser<~ confused
23:48joshua__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:48auserwell, that's exactly right, that's the problem... I just am trying to fix ti
23:48auserit*
23:49joshua__http://stackoverflow.com/questions/1627747/problem-extending-a-class-in-clojure-classformaterror-duplicate-field-namesign
23:49ausernot entirely certain how to fix it though, 'cause it "needs" the methods named that way, otherwise...
23:49auserop
23:49joshua__Hope that helps =).
23:49auseryeah, that's doesn't quite fix it though
23:49auserI saw it
23:49auserthanks for the link though
23:54amalloyauser: i'd guess you're not type-hinting the arguments
23:54_atoauser: this might be relevant: http://dishevelled.net/Tricky-uses-of-Clojure-gen-class-and-AOT-compilation.html
23:56amalloyjoshua__: looking for anything in particular? sexpbot has several uses of mongo, of varying complexity you could steal from
23:58joshua__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:59joshua__I'm brand new to mongodb so I'm not sure how to accomplish all of that just yet.