#clojure log - Feb 28 2012

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

0:00 technomancy: you could always ask danlarkin

0:00 callen: danlarkin: remember subrosa?

0:01 technomancy: I found an example here: https://github.com/danlarkin/subrosa/blob/master/src/subrosa/plugins/catchup.clj

0:01 technomancy: it seems like it's pretty close to where you want it, it may be best not to wait for me to get something rolling, he's kinda already solved the problem.

0:03 technomancy: yeah... hard to say.

0:04 you'd get something workable faster if you used it

0:04 and you'd learn about how a real-world project is put together

0:04 callen: I would understand virtually none of it in the process and end up banging my head against walls and not necessarily learn much Clojure.

0:04 technomancy: but you run the risk of staring at inscrutable code

0:05 too bad subrosa isn't a literate program

0:05 callen: I'll try it your way

0:05 I'm dreading this though.

0:06 muhoo: wow, this guy doing this talk is a genius.

0:06 callen: muhoo: ?

0:06 technomancy: how do I add a github repo to leiningen?

0:07 Scriptor: callen: can you find it on clojars?

0:07 muhoo: callen: the vimeo one, with the live javascript editor

0:07 technomancy: callen: just declare a regular dependency in project.clj, create a "checkouts" directory, and clone it into there

0:07 callen: Scriptor: no

0:08 lynaghk: Is it possible to enforce input/output types for a protocol? I'm wondering if it makes sense to implement an IProjection protocol for map projections that should implement IFn but only take a 2-vector and return a 2-vector.

0:09 mabes: lynaghk: no.. that is one reason why I often wrap my protocol API will regular functions (so I can use pre/post checks)

0:09 muhoo: actually, it's a live EDA tool too

0:09 genius

0:10 callen: technomancy: I have subrosa cloned inside of checkouts at the same level as my project.clj, src, test. It's referred to as [subrosa "1.0.0"], why can't it find/use it

0:10 mabes: accel: dunno if you got your question answered but I always use VisualVM to spot the hot spots in my code

0:10 lynaghk: mabes, I'm not sure what you mean. You wrap where you actually call the protocol methods on an instance?

0:12 accel: mabes: will look into it; thanks

0:12 callen: technomancy: "checkouts" isn't in the Tutorial.md nor the wiki...

0:13 anyone here know how to use github repos with leiningen?

0:13 mabes: lynaghk: so I have a protocol that every one implements, but I then have the "public" facing function that delegates to the protocol function.. the other advantage is that while protocol functions can't be variadic normal fns can and then just send the args as a vector

0:13 lynaghk: mabes, ahh but I want other people to be able to write implementations of the protocol too

0:13 technomancy: it's in the readme

0:15 callen: technomancy: that's what I did...

0:15 technomancy: callen: does it show up in `lein classpath`?

0:15 mabes: lynaghk: right, and so they can implement the protocols but they should still use the other fn when calling it.. much like how #'reduce in clojure is a regular clojure function but relies on underlying protocol implementations.. I agree, this isn't ideal and not what you are exactly looking for, but it is the best option ATM AFAIK

0:15 lynaghk: mabes: ahhh, I see.

0:16 mabes: lynaghk: more of a convention than a pure technical solution..

0:16 lynaghk: mabes: that makes sense, thanks. I'll have to think about whether the added verbosity

0:16 callen: Caused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:

0:16 1) subrosa:subrosa:jar:1.0.0

0:16 lynaghk: is worth the extra safety.

0:16 callen: that occurs when I run lein classpath

0:17 it breaks.

0:17 lynaghk: mabes: verbosity in this case because a projection is just a specific kind of function, and I think should be called as a function (albers [x y]) instead of (project albers [x y])

0:17 callen: I found it, it's some BS code in subrosa.

0:17 god dammit.

0:18 lynaghk: mu

0:19 callen: it was one of those lazy trim/slurp etc/version things

0:19 ffs

0:19 technomancy: callen: "checkouts" is meant to be complementary of regular dependencies

0:19 callen: /home/callen/mastodon/test:/home/callen/mastodon/test-resources:/home/callen/mastodon/src:/home/callen/mastodon/classes:/home/callen/mastodon/resources:/home/callen/subrosa/src:/home/callen/subrosa/classes:/home/callen/subrosa/etc:/home/callen/.lein/plugins/swank-clojure-1.4.0.jar

0:19 technomancy: so if it's not on clojars you'll need to manually install it

0:19 callen: technomancy: ^^ lein classpath

0:20 muhoo: i predict this guy will be keynoting at TED this year

0:20 technomancy: muhoo: he's already been invited to strange loop

0:21 mabes: TED > StrangeLoop ?

0:21 half joking.. Strangeloop is basically a TED conf for devs :)

0:22 callen: technomancy: still claims "unable to resolve artifact: missing"

0:23 technomancy: I saw the entry in the README, doesn't really explain much to me.

0:23 technomancy: callen: subrosa is weird because for some reason it's not on clojars

0:24 did you do "lein install" in the subrosa dir?

0:24 G0SUB: technomancy, ping

0:24 technomancy: G0SUB: pong

0:24 callen: doing so now.

0:24 technomancy: that fixed it.

0:24 G0SUB: technomancy, can you kindly review my reflection removal patch for clj-stacktrace?

0:25 technomancy, I have sent a pull request.

0:25 callen: technomancy: thank you.

0:25 choffstein: anyone know of a clojure zlib library?

0:25 technomancy: G0SUB: sure; sorry about the delay, I'll see if I can run that by mark tomorrow

0:25 choffstein: besides java.util.zip ... which is a horrendous pile of shit to work with

0:25 G0SUB: technomancy, I understand. that's not a problem. thanks in advance.

0:26 dnolen: ibdknox: well you did well on Reddit at least.

0:26 so rhickey's got a new kind database - this will be interesting.

0:26 G0SUB: dnolen, I am excited :-)

0:27 dnolen, something like allegro-cache?

0:27 callen: I'm hoping it's not language-specific actually.

0:28 technomancy: a database that supports UUIDs as first-class data types

0:28 now we know why that feature made it into 1.4

0:28 G0SUB: technomancy, how does first-class UUID help?

0:28 dnolen: G0SUB: that would be cool.

0:28 technomancy: G0SUB: I don't think it actually does

0:28 callen: I'm not sure what that would solve.

0:28 technomancy: but relevance seems to think differently

0:29 and they call the shots

0:29 G0SUB: dnolen, indeed.

0:29 callen: using and indexing UUIDs is a common pattern.

0:29 dnolen: callen: given that it has its own website I wouldn't be surprised, curious about the strategy. opensource? license? etc

0:29 free / not-free

0:29 ibdknox: dnolen: yeah :)

0:29 G0SUB: technomancy, yeah, but I don't see how that could be a significant advantage.

0:30 ibdknox: they've been tossing around the word "product" which indicates money will be involved

0:30 dnolen: ibdknox: yes, that was my impression as well.

0:32 G0SUB: if datomic turns out to be a completely proprietary database then it'd be a non-starter for many.

0:32 callen: myself included.

0:32 I cannot build anything of value on a persistence backend I don't have control over.

0:32 technomancy: srsly.com

0:32 dnolen: ibdknox: or not, perhaps the model is consulting

0:33 G0SUB: dnolen, the same as Clojure's.

0:33 ibdknox: dnolen: maybe, but I'd be a little surprised

0:33 that's not really a "product" and consulting doesn't scale

0:33 dnolen: that said - I respect Alex Miller's opinion, if he thinks it's big, it must have features worth getting excited about.

0:34 ibdknox: dnolen: that's true.

0:34 callen: technomancy: there is no way in hell, I'd have to port everything and fix all the breakage.

0:35 ibdknox: usually something has to be in place a while for consulting to work out. I think it's likely a PaaS of some kind

0:35 callen: technomancy: I can't even (use ...) his code without it raising an exception.

0:35 technomancy: callen: maybe fall back to clojure 1.2?

0:35 * callen blinks

0:36 dnolen: ibdknox: database ecosystem is pretty saturated w/ options these days - I imagine it must do something quite different.

0:36 callen: technomancy: that only exacerbates and extends the problem. Contemplating this is making my spleen rupture, it's abandoned code, why am I trying to drag it along?

0:36 ibdknox: dnolen: I agree

0:36 technomancy: callen: I think it's stuck because it uses aleph, which hasn't been updated?

0:37 callen: no, uses netty.

0:37 ibdknox: dnolen: I've worked with some guys here on something that is taking a different angle on the DB market

0:37 dnolen: there are still places to go :)

0:37 callen: technomancy: for someone who's adept at clojure, it's really close. You fit under that definition, I don't. It would take you 1/100,000th the time to get this doing what you want. I cannot work with this, I don't know enough and I don't have any experience fixing broken deps and code. I can scarcely muddle through the 50-some puzzles I've done on 4clojure.

0:38 technomancy: callen: yeah, I agree it sucks. I'm not sure that starting from scratch would be any easier, but it would certainly have fewer frustrations.

0:38 callen: if this is were Python, Ruby, JS, it'd be another story, but I'm swimming through mud when it comes to clj.

0:39 technomancy: or at least, most of the frustrations would be your own fault. =)

0:39 and those kind of frustrations are usually easier to deal with

0:39 callen: technomancy: I'm totally inept at Clojure and Java. I don't even know where to start with integrating his code and fixing it.

0:40 ibdknox: what are we talking about?

0:40 bbloom: who should i follow on 4clojure for idiomatic *implementations* instead of idiomatic *shelling out to some library function* ;-)

0:40 technomancy: ibdknox: building an IRC bouncer on top of subrosa vs starting from scratch

0:40 callen: ibdknox: subrosa, IRC framework => bouncer, abandoned code.

0:40 ibdknox: I see

0:40 bbloom: for example, I implemented parsing a binary number string… then I saw people use Integer/parseInt and was like *sigh*

0:41 callen: ibdknox: I'm inept at clj, way more comfortable with Python, Ruby, JS, can't really even get started at using some abandoned code that's on 1.2 because I can't even (use ...) the code.

0:41 bbloom: i realize that's the code you'd ACTUALLY write in a program, but it seems against the spirit :-P

0:41 dnolen: bbloom: Integer/parseInt is idiomatic, use the host unless there's some reason not to.

0:41 callen: bbloom: I implement foolish decisions all the time. I'm bitemyapp on 4clojure.

0:42 bbloom: use the library functions whenever possible IRL though.

0:42 bbloom: well of course :-P

0:42 i'm trying to learn clojure tho.. i already know the java std lib (a bit anyway)

0:42 #(reduce (fn [acc c] (+ (bit-shift-left acc 1) (if (= \1 c) 1 0))) 0 %)

0:42 i mean that's just so pretty :-)

0:44 muhoo: is aleph abandoned?

0:44 ibdknox: lol

0:45 muhoo: aleph is not abandoned

0:45 muhoo: "subrosa, IRC framework => bouncer, abandoned code". i'm wondering what was abandoned?

0:46 callen: muhoo: subrosa was, it's still using 1.2 and contrib.

0:46 lynaghk: ibdknox, you have a second? I'm porting some D3 JS to CLJ and am wondering how best to emulate its behavior using records/protocols

0:46 muhoo: zh ok

0:46 callen: ibdknox: aleph is using 1.2 too...

0:46 ibdknox: callen: there's a 1.3 branch

0:46 muhoo: well i have aleph running in 1.3, it seems to work

0:47 callen: I missed it.

0:47 ibdknox: and using 1.2 isn't a problem. Using old contrib is the problem

0:47 muhoo: i think i just grabbed a snapshot

0:47 callen: ibdknox: I know, just saying.

0:47 ibdknox: lynaghk: I can try, though admittedly I try not to use either of those if possible :)

0:47 lynaghk: heh

0:47 https://github.com/mbostock/d3/blob/master/src/geo/albers.js

0:48 lstoll: I've been using aleph in 1.3, and it's fine.

0:48 ibdknox: oh no's.. it's math!

0:48 lynaghk: don't worry, none of that is the issue = )

0:49 ibdknox: haha good. Cuz I's dumb with teh numb3rs

0:49 dnolen: lynaghk: where do defrecords/protocols come in? and is this CLJ or CLJS?

0:49 lynaghk: so I can implement the albers projection using a record just fine. I implement IFn, you can say (a [lat lon]) and you'll get the projected [x, y]

0:49 muhoo: did bret victor use clojure to do those demos?

0:49 dnolen: muhoo: JS

0:49 lynaghk: dnolen: I want a solution that will work fine on both

0:49 ibdknox: muhoo: no, JS

0:49 muhoo: ah

0:50 ibdknox: lynaghk: can't they just be functions? Why do you need records and protocols?

0:50 callen: http://richhickey.github.com/clojure-contrib/condition-api.html <--- alright, where'd it go?

0:50 lazybot: Nooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/condition-api.html and try to stop linking to rich's repo.

0:50 lynaghk: you can also say (:parallels a) and get whatever parallels you're using in the albers projection, yeah

0:50 ibdknox ^

0:50 choffstein: anyone know any compression libraries in clojure?

0:51 callen: alright, where'd *this* http://clojure.github.com/clojure-contrib/condition-api.html go if not in contrib?

0:51 lynaghk: This comes more into play with implementing scales, so I'm trying to figure out the best way to structure all of these things. D3 uses closures with getter/setters for everything.

0:51 ibdknox: lynaghk: ok, so you need something you can treat as either a vector or a map?

0:51 dnolen: lynaghk: huh, that's some weird JS code IMO

0:52 lynaghk: So my question is: how can I encorporate custom setter logic in defrecords

0:52 technomancy: callen: slingshot is the successor to contrib.condition

0:52 dnolen: lynaghk: not possible, defrecords define IAssociative

0:53 lynaghk: or come up with some other abstraction that has the niceites of records (e.g. field access)

0:53 ibdknox: just define an interface through functions

0:53 callen: technomancy: (ノಠ益ಠ)ノ彡┻━┻

0:53 lynaghk: dnolen: yeah, that's what I was thinking. So maybe get away with records for simple cases, and in more complex cases just write the IAssociative special setter logic myself?

0:54 dnolen: lynaghk: just implement the features of maps (via deftype) that you need for it to work.

0:54 ibdknox: lynaghk: or just do them as deftypes :(

0:54 technomancy: callen: if you start out working on the subrosa codebase itself instead of your own project, you won't have any mismatch issues

0:54 dnolen: lynaghk: that said, there's little benefit unless you want to define a common set of abstractions here. maybe that's what D3 is doing.

0:54 lynaghk: dnolen, ibdknox: okay, thanks guys.

0:55 technomancy: but maybe that's a sign that it's time to make a clean break from subrosa before you suffer internal bleeding

0:55 lynaghk: dnolen: what do you mean?

0:55 callen: technomancy: the code literally relies on the class hierarchy of the original condition

0:55 slingshot is totally different, i'd have to restructure everything

0:55 technomancy: you have my permission to yell at danlarkin

0:55 callen: this is fucking stupid

0:55 I'm not using subrosa.

0:56 I just want a while loop and a socket, ffs.

0:56 dnolen: lynaghk: is there some cross cutting concern that's being expressed in albers that appears elwehre in d3, like invert, origin, parallels, scale, translate, etc

0:56 elshwere

0:56 oof, elsewhere

0:56 lynaghk: dnolen: Really, the only things I want are field access and the ability to derive easily from existing objects.

0:56 technomancy: but how will you scale without being asyyyyyyyyyyync?

0:56 callen: technomancy: I'll do it live.

0:56 technomancy: http://p.hagelb.org/async.jpg

0:56 ibdknox: hahaha

0:56 bbloom: lol.

0:57 dnolen: lynaghk: where is there derivation in that d3 code?

0:57 lynaghk: dnolen: through the setters.

0:57 dnolen: lynaghk: line num?

0:58 lynaghk: dnolen: 104

0:58 dnolen: I like Node.js, but this is funny http://www.youtube.com/watch?v=bzkRVzciAZg

0:59 lynaghk: for instance. The albersUSA is a composite of a few different albers projections with translations mucked around with so Hawaii and Alaska get positioned just off California

0:59 callen: dnolen: it's true though :(

1:00 lynaghk: so when the scale is changed in the setter, there is custom code to update the internal albers projection scales

1:01 So, I could follow that in Clojure by using deftype and writing custom logic in assoc to catch the :scale keyword and do the same

1:01 dnolen: lynaghk: ah yeah, delegation - I gotta run, I can send my thoughts on this later

1:02 lynaghk: adding custom logic doesn't make sense, Clojure/Script allows for real delegation

1:02 lynaghk: you can hook in via protocol fn defaults

1:05 callen: oh ffs, aleph is using contrib too

1:05 alright, how do I fix the fact that code I'm calling is using contrib? do I add it to my dependencies?

1:07 kwertii: Anyone know the correct way to recycle a channel that has closed for some reason in WabbitMQ? As far as I can tell, it keeps trying to reuse the closed channel.

1:10 yesudeep: wabbitmq? heh.

2:05 muhoo: i tried that cljs-live demo, and got this: https://refheap.com/paste/876

2:10 ibdknox: use lein run

2:10 also delete classes/cljs/

2:11 muhoo: ah cool thanks. so there's no way to run it from inside lein repl?

2:12 ibdknox: I'm sure there is

2:12 but the cljs compiler seems to be finnicky

2:14 bbloom: ibdknox: Can you describe the finnickiness? Are you able to deduce a pattern that would lead to an improvement?

2:14 ibdknox: don't AOT compile it

2:15 that's all I know

2:15 bbloom: heh ok

2:15 ibdknox: I wasted two hours figuring that out

2:15 bbloom: i havent used AOT at all

2:15 muhoo: worked, thanks. tho i did get this warning: https://refheap.com/paste/877

2:16 ibdknox: those are just normal cljs warnings

2:16 they happen when core is compiled heh

2:17 bbloom: yeah, seems like easy fixes tho… you know, broken windows and all :-P

2:18 ibdknox: the compiler blindly warns any place where you might've had the old style of property access, so it warns when you've done the exact right thing heh

2:18 can't be deterministic about it until runtime, unfortunately

2:19 bbloom: it has to do with differentiating property access and function calls, right? wouldn't just adding the hyphen fix the issue?

2:19 muhoo: why is the mouse broken in firefox? is that something that could be hacked around?

2:20 ibdknox: bbloom: it's warning on things that don't have a hyphen. You can't add a hyphen for the function call or it won't be a function call anymore :)

2:20 muhoo: I dunno?

2:20 I'm sure there's some fix

2:20 it wasn't meant to be something that was just fun, fixing browser bugs doesn't fall into that category :)

2:21 err was*

2:21 muhoo: good point

2:21 bbloom: ibdknox: but you can add an extra ()

2:21 so from: (. foo bar) to: ((. foo -bar))

2:21 ibdknox: sure

2:21 bbloom: & shut up the warnings :-)

2:21 lazybot: java.lang.RuntimeException: Unable to resolve symbol: shut in this context

2:22 ibdknox: doesn't make much sense when those warnings will get removed

2:22 muhoo: maybe i'll poke around and see if i can figure out the mouse thing

2:22 bbloom: fair enough

2:22 ibdknox: muhoo: I'm sure it's something simple

2:23 alright, g'nite guys

2:23 muhoo: this really is amazingly good, what you've done here.

2:24 thanks

2:24 ibdknox: glad you're having fun :)

2:26 muhoo: i'm still too bewildered to be having fun. but i'm amazed and impressed, that's for sure. this is fantastic.

2:37 devn: Can anyone take a peek at my gigantic post on the GSoC thread and give me some feedback?

2:39 muhoo: oh i see what's going on. when you change any of the code, it XHR's it to the jetty server, where i guess lein recompiles the whole code, and spews the emitted js back to the browser. from there i guess it gets eval'ed

2:56 i really have to thank people for using :use :only. otherwise, i'd be totally lost trying to figure out other people's code

2:57 if i see a function i have nfi where it came from, a quick look at the top of the file will tell me exactly where, i.e. (:use blah :only [foo bar baz]) , ok, foo comes from blah, great

3:00 _ulises: morning

3:03 damagednoob: as an exercise to learn clojure, i'm trying to create an svn pre-commit hook in clojure that will parse an svn diff and look for disallowed addition to js files. I'm having trouble recursing through the lines and returning only the offending ones. here is my code: http://pastebin.com/EkUwjzsu

3:04 i'm having trouble with the get-lines functions

3:07 tomoj: hmm

3:08 _ulises: damagednoob: there's a line-seq fn already I think (it takes a reader)

3:08 tomoj: damagednoob: first, formatting "fixes": https://gist.github.com/0f01eed063bdfacb9c9d :)

3:08 _ulises: ,(doc line-seq)

3:08 clojurebot: "([rdr]); Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader."

3:10 tomoj: damagednoob: second, don't use def to define local variables

3:10 (def debugger-line #"...") would be OK, but it can also be just a local here

3:11 damagednoob: tomoj, okay, so just do it inline?

3:11 tomoj: https://gist.github.com/8e9cb8a83e11986a6682

3:12 certainly lower-line should be a let not def

3:12 but debugger-line etc and added-line could be let or def (or inline..) idiomatically perhaps

3:12 can't tell what you're trying to do

3:13 in the body of the when-let inside your get-lines, you have two forms

3:13 but only the second will be returned

3:14 that is, in (when-let [foo bar] baz bing), 'baz' is evaluated but the return value is lost

3:14 damagednoob: i thought that in order to 'loop' over the input stream, i'd have to break it up into head and tail and recurse over the tail

3:15 tomoj: that could work.. but I think it will probably be easier

3:16 would maybe be helpful if you could show an example input and desired output for your function, e.g. (= (get-lines ["foo" "bar"]) ["foo"]) or whatever

3:17 damagednoob: okay, one sec

3:21 tomoj, given an svn diff like this: http://pastebin.com/5EsF3xy5, I want to output something like 'found errors in javascript files. file one: <line> <line> file two: <line> <line>'

3:21 http://pastebin.com/5EsF3xy5

3:22 so for instance, line 28 in the diff is an example of an offending line

3:22 tomoj: ah, I see

3:28 yesudeep: muhoo: which cljs-live demo?

3:35 tomoj: damagednoob: well

3:37 so you had this https://gist.github.com/5740242e24fc83f1ca38

3:37 if you change it to this https://gist.github.com/c45ee235367c5a160eb2 , it works

3:37 the (if (is-jsfile-line line) (lazy-seq (get-lines reader "js"))) is just ignored in your version

3:37 because when-let just returns the last thing in its body

3:40 (the change to (clojure.java.io/reader "/tmp/file") was just so I could test it..)

3:45 damagednoob: awesome, thanks tomoj

3:46 i think i see where i went wrong, i kind of expected it to just drop down to the next 'if' if the first one didn't match

3:51 devn: damagednoob: in some cases that would be true

3:53 damagednoob: the body of defn is an implicit (do ...), but only the last expression in the body wins

3:53 (in returns of what it returns)

3:53 in terms*

3:55 Fossi1: which weans if the part inbetween is lazy it wouldn't get executed either

3:55 oh, which seems to be what you did :)

3:57 tomoj: this may be helpful https://gist.github.com/99665f77b73f1fb5cad4

3:57 but there should be a prettier way to write it?

4:00 oh, useful has something for this

4:01 amalloy: does it?

4:01 tomoj: well, partition-between could implement the partition-starting I was going to write, I think

4:02 (partition-between (comp is-file-line second) lines)

4:02 devn: when you say "useful" are you referring to http://clojars.org/repo/clojure-useful/clojure-useful/0.3.8/ ??

4:02 lazybot: devn: What are you, crazy? Of course not!

4:02 tomoj: :D

4:02 lazybot: botsnack

4:02 lazybot: tomoj: Thanks! Om nom nom!!

4:02 tomoj: https://github.com/flatland/useful/

4:02 * devn kicks lazybot in the shin

4:03 devn: lazybot: botsnack

4:03 lazybot: devn: Thanks! Om nom nom!!

4:03 devn: see, you can abuse it and it still loves you

4:06 damagednoob: blegh, now i have to go to work. thanks for the help and the code

4:06 i'm sure i'll be back :)

4:07 devn: useful reminds me, i need to spend some time this friday organizing all of the user.clj/personal fns repos I've cloned

4:08 I'd like to make a gigantic repo of them with nice docstrings, etc.

4:08 useful is along those lines

4:13 muhoo: how does one regenerate bootstrap.js?

4:13 it seems like it has all the old code compiled into it, and, if i change the source, the bootstrap.js does not change.

4:14 amalloy: muhoo: huh? just check it out from git if you accidentally deleted it

4:14 muhoo: no, it seems like it's generated from the cljs files

4:14 but, when i change the code in the cljs files, the bootstrap.js is then out of date

4:30 ejackson: tune out of #clojure for one day, and its like the world goes by: datomic, cljs live-coding...

4:30 muhoo: ah, i see, i have to use cljsbuild, somehow

4:31 ejackson: man, try drinking from this firehose starting from nothing. i feel like i keep getting stupider every day.

4:31 ejackson: welcome, brother.

4:33 muhoo: yesudeep: the one at chris-granger.com

4:34 i just read all of its code, and i understand about 50% of it

4:35 i poked around trying to fix the firefox mouseclick bug and failed really

4:36 mousedowns work if i bind them manually with jquery.

4:36 i think it's either a jayq problem, or the (when (.-focused me) needs to be removed

4:36 it's not going to get a mouseclick if it's not focussed anyway

4:37 but, the problem is that i don't understand cljsbuild and it won't run from inside lein repl

4:37 so i've no way to actually get the bootstrap.js to recompile with my attempts at testing the mouseclick thing

4:38 i guess the right thing to do would be to try to duplicate the mousedown bug in a very simple clojurescript-one or something, and then keep adding in bits of the livecoding demo until it breaks

4:39 too tired; must sleep

5:05 Scriptor: man, debugging macros is a pain

5:06 lucian: Scriptor: that's by far the most common argument against them

5:07 it's easier in scheme, especially with editor/ide support

5:07 Scriptor: lucian: hmm, at the least it'd be nice to know which line number is, say, throwing a null pointer exception

5:07 put it's all just thrown into evalSomeNumberHere

5:08 lucian: ah, that's just regular clojure sucking at tracebacks

5:08 Scriptor: hah, figured :)

5:09 lucian: it *really* needs to get better tracebacks, python and racket are way ahead

5:10 Scriptor: agreed, getting errors where it can't find the line number is really annoying

5:10 especially when it's just a stray letter typo'd after a parenthesis or something

5:12 * lucian nods

5:14 Scriptor: hmm, so I have a macro that returns the result of a map

5:15 when I try to do that, it thrown a nullpointer exception, when I return the (first ...) of the result, it's fine

5:16 lucian: maybe because map is lazy

5:16 try (do ...) to force the map, see if you still get the nullpointer

5:17 Scriptor: just do?

5:18 raek: lucian: 'do' has nothing to do with laziness

5:19 Scriptor: hmm, tyring do, dorun, and doall don't seem to have an effect

5:19 raek: did you mean 'doall'?

5:19 Scriptor: http://clojuredocs.org/clojure_core/clojure.core/doall

5:19 lucian: oh, right

5:20 ts__: hi

5:20 i have trouble understanding this loop (doseq [[anchor id] (.. input-tuple getMessageId getAnchorsToIds)] anybody care to explain ?

5:21 raek: Scriptor: what happens if you do something like (defmacro foo [] (map identity '(println "hello"))) (foo)

5:22 ts__: it is a combination of java interop, the doseq macro, and destructuring. which parts do you know about?

5:22 Scriptor: raek: that works fine, hello is printed and nil is returned

5:23 raek: ok, that seems to indicate that laziness is not the problem, at least

5:23 Scriptor: have you tried looking at the output of macroexpand-1 ?

5:23 (macroexpand-1 '(your-macro ...))

5:24 if it blows up with that call, then the problem is in the macro body. otherwise, it's in the generated code

5:25 Scriptor: here's the code if it helps https://gist.github.com/1931758

5:25 raek: yep, tried it, it still blows up

5:25 ts__: raek: what i want to know is what kind of variable i will have in the loop ? anchor and id ? is it like a for loop iterating over each anchor->id in this case ?

5:25 raek: Scriptor: what type is 'line'?

5:26 Scriptor: raek: it takes a body of clojure code so whatever each expression is, so far I'm testing it with (debug-block (prn "hi"))

5:27 tscheibl: ts__: (.. input-tuple getMessageId) would in Java be written like: input-tuple.getMessageId().getAnchorsToIds();

5:27 raek: ts__: well, the loop first calls (.getAnchorsToIds (.getMessageId input-tuple)) to get a sequence of things. each "thing" is then treated as a sequence and the first "subthing" is named "anchor" and the second "id"

5:28 the loop body is executed once for each "thing" in an environment where "anchor" and "id" are bound to the "subthings"

5:28 ts__: yeah and the getAnchorsToIds() return a map of <long,long>

5:28 Scriptor: hmm, I'm trying it now with a function other than prn

5:29 raek: ts__: ok, if it is a map then you will iterate over the entries

5:29 Scriptor: different errors this time, so this might be a good sign

5:29 tscheibl: ts__: yep.. and [anchor id] destructures this arry into anchor and id

5:30 raek: Scriptor: so you want to turn (prn "hi") into (debug prn "hi")?

5:30 tscheibl: ts__: actually it destructures EACH array in a loop

5:30 Scriptor: raek: yep

5:30 ts__: so it will loop over each entries of the map or it will loop like anchor1 -> id1 , anchor1 -> id2, anchor2 -> id1 ?

5:30 raek: if you take multiple expression you need to wrap the result expressions in a 'do'

5:31 I guess you want (debug-block (prn "foo") (prn "bar")) to expand into (do (debug prn "foo") (debug prn "bar")) and not ((debug prn "foo") (debug prn "bar"))

5:31 tscheibl: ts__: in each iteration you will get the next anchor, id pair

5:32 ts__: referenced using the symbols anchor and id

5:32 ts__: tscheibl: alright so there's no mixing between different keys and values

5:32 tscheibl: ts__: correct

5:32 raek: Scriptor: I would write it like this: (defmacro debug-block [& lines] (cons `do (for [line lines] (if (seq? line) (cons `debug line) line))))

5:33 ts__: okay thanks !

5:34 tscheibl: ts__: you are welcome :)

5:34 raek: or like: (defmacro debug-block [& lines] `(do ~@(for [line lines] (if (seq? line) `(debug ~@line) line))))

5:35 Scriptor: two small remarks: 1) it's safer to use 'seq?' to detect a list-like thing. 2) it's safer to use syntax-quote instead of ordinary quote since you don't know what "debug" will mean where the macro is expanded

5:35 Scriptor: raek: thanks, using do fixed it! Still used map though :)

5:36 ah, I changed debug to the fully namespaced version (clj-here.core/debug), does syntax-quote do the same?

5:37 raek: Scriptor: the error in your original code came from (debug-block (prn "hi")) expanding into ((prn "hi")), which evaluated to (nil), which casued the NPE

5:37 Scriptor: yes, that's exactly what it does for symbols

5:38 if you did (ns ... (:use [foo.bar :rename {x y}])) then `y will expand into 'foo.bar/x

5:38 Scriptor: right, I was thinking that by just returning the result of the map it would prevent it from getting embedded in the extra list

5:38 clojurebot: Huh?

5:38 raek: Scriptor: map always create a sequence

5:39 Scriptor: yea, must be the late time, it wouldn't make sense for clojure to automatically unpack that sequence just because it's returned by a macro

5:39 raek: since it applies the function _to each_ element in the input sequence

5:41 Scriptor: thanks again, raek!

5:41 my little debugging tool is starting to take shape

5:57 devn: map a function over a function and get function composition

5:57 gah, can't sleep, time to try again, cheers

6:23 broquaint: I'm trying to follow the instructions in this repo https://github.com/djhworld/testproject but when I try to build the cljs I get this - https://refheap.com/paste/880

6:23 Does that look familiar to anyone?

6:27 ejackson: ,(map Math/abs [-1 -2 3])

6:27 clojurebot: #<CompilerException java.lang.RuntimeException: Unable to find static field: abs in class java.lang.Math, compiling:(NO_SOURCE_PATH:0)>

6:27 ejackson: why's that ?

6:28 ,(map #(Math/abs %) [-1 -2 3])

6:28 clojurebot: (1 2 3)

6:28 ejackson: works

6:34 broquaint: Because it's trying to access it as a static property rather than a method (I think).

6:35 ejackson: yeah I'm not sure how to be explicit with it though

6:36 i would have guessed

6:36 ,(map (. Math abs) [1 2 -3])

6:36 clojurebot: #<CompilerException java.lang.NoSuchFieldException: abs, compiling:(NO_SOURCE_PATH:0)>

6:37 ejackson: but no dice there either

6:37 tscheibl: ,(map (. Math (abs)) [1 2 -3])

6:37 clojurebot: #<CompilerException java.lang.IllegalArgumentException: No matching method: abs, compiling:(NO_SOURCE_PATH:0)>

6:37 tscheibl: seems to be a static method

6:39 gju: yes, there are only static methods in java.math

6:39 * ejackson notices in all this that he's rusty on interop. Good sign for clojure.

6:39 ejackson: is this general, that you can't map static methods ?

6:39 or otherwise do more than just apply them, I guess that makes some sense

6:41 gju: i think you need an object as the first parameter of . and since math is a class that makes sense, i guess.

6:41 broquaint: It seems like the interop expects args to invoke a method - http://clojure.org/java_interop

6:41 i.e Classname/staticField vs. (Classname/staticMethod args*)

6:54 Sorted my cljs-build problem by upgrading lein by the by (should've read the github issues before making noise).

7:04 cemerick: ,(map #(Math/abs %) [1 2 -3])

7:04 clojurebot: (1 2 3)

7:05 cemerick: oh, ejackson already got that

7:05 * cemerick hadn't read back

7:05 ejackson: chicken feet, dude.

7:05 :)

7:05 cemerick: heh, yeah

7:05 clgv: cemerick: I like the Math/abs style better so yours is worth to mention

7:06 cemerick: Actually, a good-looking rooster on the cover would have been pretty neat.

7:06 clgv: yeah, any static method/field interop that uses . looks warty to me.

7:06 ejackson: YES !

7:06 cemerick: We had no control over the animal chosen.

7:07 ejackson: yeah, cgrand told me

7:07 cemerick: I was trying to pitch for leaf-cutter ants, but alas

7:07 ejackson: I would have claimed to have been viciously scarred by a painted snipe in my youth...

7:07 clgv: cemerick: ah your book will be released in april?

7:07 cemerick: clgv: whenever it plops out of the O'Reilly machine, honestly

7:08 clgv: cemerick: amazon says april ;)

7:08 cemerick: Their own catalog says March, Amazon says April, and the people we have contact with have no further information :-P

7:08 Apage43: oh

7:09 just read the draft today

7:09 won't the reduce functions on the couchdb break since they don't account for rereduce?

7:09 *couchdb chapter

7:10 gju: what book are you talking about?

7:10 Apage43: http://clojurebook.com/ I'm assuming

7:10 ejackson: yup,

7:10 Bahman: Hi all!

7:11 Is there any Clojure'ish way to this problem? http://stackoverflow.com/questions/991489/i-cant-delete-a-file-in-java

7:12 ejackson: so datomic, huh.

7:12 Bahman: I'm using (with-open) macro for all I/O stuff. It handles closing open streams but I'm not sure how to set them as NULL so that I can delete the file just done I/O with.

7:13 clgv: Bahman: just have a look in the java apis. I think deleting files is available as function nio2

7:13 *function in nio2

7:14 ejackson: dataomics: the field of study of all data !

7:14 but, given the provenance, I'm guessing it means something else.

7:14 clgv: Bahman: honestly I dont understand why you write to a file that you want to delete instantly thereafter

7:15 Bahman: clgv, it's a temp/buffer file. I need to copy the contents to a final file and delete the temp one.

7:15 cemerick: Apage43: you're quite right

7:15 Bahman: Checking javadocs.

7:15 cemerick: good catch

7:17 Bahman: clgv: By nio2 you mean java.nio ?

7:17 clgv: Bahman: no. nio2 was added in java 7 and had some more file centered classes

7:18 Bahman: Aaah. Using 1.6 here :-S

7:18 clgv: Bahman: but maybe a delete function was present before already. the stackoverflow entry says that he forgot closing the streams which caused the deletion to fail

7:19 Apage43: cemerick: mhm. It's fine until there's enough stuff in the view that there's more than one node in the B-tree. I work on CouchDB and have been bitten a few times when my tests weren't failing simply because the amount of docs I was using wasn't big enough to cause that to happen.

7:19 Bahman: clgv: there is a delete() available. And I assumed that (with-open) closes all streams. But still the GC doesn't understand right away that the streams/files are ready to be disposed of.

7:19 clgv: Bahman: you have a sample of your code?

7:20 Bahman: Yes....let me put it on pastebin.

7:20 cemerick: Apage43: sure; though technically, rereduce can happen with any data size, especially in a distributed implementation like bigcouch

7:21 Bahman: clgv: http://pastebin.com/KDG2zTBv

7:23 Apage43: ah right. I wasn't even considering what happens at query time, only generation time.

7:23 cemerick: Apage43: I'll try to think of a reasonable bug bounty. :-)

7:25 G0SUB: ejackson

7:25 ejackson: G0SUB: BG !

7:25 G0SUB: ejackson, howdy!

7:25 ejackson, will I be meeting you at Clojure/West?

7:25 ejackson: sadly not man,

7:25 clgv: Bahman: humm. that seems to depend on the semantics of deleteOnExit. I never used it. with-open just calls (.close index-is) in a finally statement

7:26 G0SUB: ejackson, Ok, need to think about submitting a talk at EuroClojure then :-)

7:26 ejackson: YES!!

7:26 G0SUB: ejackson, how's work going on?

7:26 ejackson: I'll definitely be there

7:27 G0SUB: Check your pms, I don't wanna incur the Wrath of Chas by spamming up #clojure :)

7:27 G0SUB: lol

7:27 Bahman: clgv: deleteOnExit() is just an attempt. At first I just renamed temp to final. But that didn't work. So I thought maybe I should give deleteOnExit() a try. But don't count on it as a final solution :-)

7:28 Maybe I just need to do something like ` index-is=null ` in Java.

7:28 But what is the equivalent of that in Clojure (if any)?

7:28 clgv: Bahman:hm well, I cant dig into that api right now. but I hope the explanation of with-open above helps you on your way

7:29 Bahman: clgv: thanks for your time :-)

7:30 clgv: Bahman: so your stream will be closed but maybe that isnt sufficent for deleteOnExit to work...

7:31 Bahman: clgv: Yes. The problem is that GC doesn't free the file resource back to OS right away. Unless I set the instream as NULL and call gc() manually.

7:32 clgv: Bahman: you should definitely not depend on the gc for deleting the file when he pleases. there is probably some other way to do that explicitly.

7:32 cemerick: ejackson: meh, I've no wrath, and certainly no Wrath ;-)

7:32 ejackson: cHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAS

7:33 Bahman: clgv: Absolutely right. But I can't think of any other way. Maybe calling a Perl script which delete a file in a blocking way? :-P

7:33 clgv: O_O

7:34 cemerick: hrm, I *do* have a fondness for Shakespeare...

7:34 ejackson: hehehehe

7:51 _ulises: hey all, I'm having unicode issues with slime+emacs and this is the message I get: http://pastebin.com/BUsaB1sL anybody got any thoughts? I came across this SO question which although related does not provide a solution: http://stackoverflow.com/questions/4843976/unicode-clojure-unit-test-output

7:54 jimduey: ejackson: good morning or whatever time of day is appropriate

7:55 ejackson: hey jimduey :)

7:57 tomoj: _ulises: (setq slime-net-coding-system 'utf-8-unix)

7:57 _ulises: tomoj: thanks, let me try

7:57 tomoj: then reconnect

7:58 _ulises: that did it, yay!

7:58 r4vi: r4

8:00 xumingmingv: hello

8:00 anyone tell me how to debug clojure in eclipse?

8:00 any plugin?

8:06 dan_b: anyone here in London?

8:06 ejackson: cambridge

8:06 * dan_b is going to the clojure dojo tonight, hopefully learn something to get beyond his presetn "hello world" knwoledge

8:06 ejackson: have fun

8:07 dan_b: maybe learn to type, too. who knows?

8:13 G0SUB: dan_b, unfortunately that's a prerequisite.

8:17 clgv: a question out of curiosity: in clojure 1.2 it was said that destructuring values of a map was slower than manually extracting thos values from the map. did this change with clojure 1.3?

8:19 morphling: clgv: no

8:21 ejackson: that's a bummer, I destructure everywhere

8:25 clgv: ejackson: well as with anything else this will only matter in hotspots

8:25 or bottlenecks^^

8:25 ejackson: yup

8:27 clgv: I didnt really understand why it's slower.

8:27 morphling: i wonder if there's any documentation why it's done the way it is

8:27 ,(macroexpand-1 '(let [{a :a} {:a 5}] a))

8:27 clojurebot: (let* [map__30 {:a 5} map__30 (if (clojure.core/seq? map__30) (clojure.core/apply clojure.core/hash-map map__30) map__30) a ...] a)

8:29 morphling: the ... is (clojure.core/get map__30 :a)

8:32 clgv: morphling: ah the (if seq? ..) is for option destructuring in defns

8:37 morphling: clgv: ah, thx, that makes sense

8:49 gtrak`: god, can we do something about http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html ?

8:49 lazybot: The riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you.?

8:51 gtrak`: I intercepted a guy on twitter that was about to give up clojure because that didn't work.

8:52 mdeboard: Yeah that almost screwed me up too

8:53 gtrak`: does amazon tell you when people reply to your comments?

8:53 fliebel: gtrak`: 1) Ask them to take it down 2) apply negative SEO? ( bad idea)

8:53 gtrak`: he has a book review :-)

8:53 r4vi: I have cloju.re - maybe i'll stick uptodate tutorials on there

8:53 im sure they'll rank pretty good on goole

8:54 gtrak`: I'll shoot him an email

9:00 maybe I should just make one that's more up to date

9:00 mdeboard: Yeah

9:01 gtrak`: Get people to link to it: submit to HN, reddit & twitter

9:01 gtrak`: yea

9:01 mdeboard: gtrak`: That's a better solution

9:06 clgv: gtrak`: dont forget the shortcut for non-emacs people - install Eclipse + CCW plugin and you are done for first experiments ;)

9:10 the-kenny: This isn't a shortcut. Starting eclipse takes hours.

9:15 ungamedplayer: is the programming clojure book (pragprog) too outdated to be useful as a learning tool ?

9:16 gtrak`: clgv, I use eclipse for java 40-hours a week, emacs is a breath of fresh air, especially with clojure

9:17 ungamedplayer, why not just get a newer one?

9:17 ungamedplayer: gtrak, house repayments.

9:17 tsdh: Is there a better way to capture the output and the result of evaluating an expression than let with a promise over an with-out-str + deliver?

9:18 ejackson: ungamedplayer: i still refer to it

9:18 gtrak`: joy of clojure is pretty serious, but still a little out of date now

9:19 ungamedplayer: i googled the question before i asked, its just given me a very mixed bag of responses.

9:19 i'll start with the web based stuff, see how far i get.

9:20 gtrak`: I think I got much more out of joy of clojure than I got out of 5 wendy's combo meals

9:21 clgv: the-kenny: really? not here and this pc is about 4 years old now

9:21 tomoj: tsdh: no. why do you want to capture the output?

9:22 (at least, I can't think of a better way..)

9:22 tsdh: tomoj: I'd like to have a variant of `time' with custom format string.

9:22 tomoj: ah :)

9:23 I'd just write it from scratch

9:25 time's behavior has always seen.. broken to me. but is there a better alternative?

9:25 er, s/seen/seemed/

9:30 harrison: do you object to the irreversible asymmetry of time?

9:30 its ineluctable flow?

9:31 the inevitable withering of mortal flesh?

9:32 ungamedplayer: the rate of one second, per second always bugs me.

9:32 harrison: you might as well ask for another dimension of space

9:32 or one fewer

9:32 ungamedplayer: i have was closed NOTABUG.

9:33 i have, was closed NOTABUG.

9:47 gtuckerkellogg: I'm just getting familiar with leiningen, but not familiar enough.

9:47 i keep having the same stupid problem

9:48 tsdh: tomoj: If you're interested: https://gist.github.com/1932917

9:54 clgv: tsdh: why do you use promise+deliver there?

9:55 babilen: gtuckerkellogg: You might want to provide more details if you want us to be able to help you.

9:55 gtuckerkellogg: OK :-)

9:55 it was so low traffic I wasn't sure anyone was paying attention.

9:55 tsdh: clgv: I didn't know a better way to get the value of evaluating form inside with-out-str.

9:56 clgv: tsdh: ah you mean since it might be lazy?

9:56 gtuckerkellogg: basically, i'm trying to replicate the tutorial at the leiningen github site

9:56 clgv: tsdh: no it can be lazy as well.

9:56 gtuckerkellogg: it's as simple as it gets, and it all works when it's in the source area

9:56 so i can "lein run" just fine

9:57 and "lein uberjar; java -jar <uberjar-file> args"

9:57 ungamedplayer: gtuckerkellogg, i have just finished, whats the problem ?

9:57 gtuckerkellogg: that all works

9:57 ungamedplayer: ok

9:57 tsdh: clgv: no, because with-out-str returns just the output string but not the value of its body.

9:57 gtuckerkellogg: but when I "lein install" and try to run it from ~/.lein/bin, it complains "Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main"

9:58 clgv: tsdh: when you are writing your own macro, you can just implement time measurement yourself via (System/nanoTime)

9:58 gtuckerkellogg: I'm not at all familiar with maven; I come from an R/Perl/Ruby background, not java

9:58 so i'm sure my ignorance is manifest

9:58 clgv: clgv: it's even less code than the current approach ;)

9:58 lol tsdh ^^

9:59 tsdh: clgv: Hm, right. That would possibly be much better than misusing `time'. :-)

9:59 ungamedplayer: gtuckerkellogg, python/erlang guy here.

9:59 gtuckerkellogg: ungamedplayer, i put a gist about it https://gist.github.com/1932895

10:00 ungamedplayer: reading.

10:01 clgv: gtuckerkellogg: you seem to not be using keywords in your project.clj, e.g. :dependencies instead of dependencies

10:03 tuckerkellogg: ah. the jar has only your project and needs to be started with a clojure.jar - you can build a uberjar that is runnable without any other dependency

10:03 gtuckerkellogg: cljv, that's just a mistake in the way the org-file is formatting on github. They are keywords in the file

10:04 clgv, ok, that makes sense. but (again, my java ignorance), shouldn't the shell-wrapper haul in the clojure.jar? How do I specify that?

10:15 clgv: gtuckerkellogg: I never used install on a jar with a main-Method yet. I only used it for libraries...

10:15 gtuckerkellogg: oh, ok

10:16 clgv: gtuckerkellogg: when I want to run the program standalone, I build an uberjar. otherwise I use lein run or lein repl

10:17 or my IDEs repl...

10:20 gtuckerkellogg: to run an uberjar standalone, you run java -jar every time, right? It seems weird to me that the "lein install" would install a shell wrapper for the jar (not the uberjar) but not in a way that that shell wrapper actually functions if its in my path. That's why I think I must be doing something wrong in my configuration

10:21 what's the point of "lein install" putting an executable shell wrapper in ~/.lein/bin if I can't run it? I must be doing something wrong for that to happen

10:22 clgv, thanks for the insight, btw.

10:23 harrison: You have done wrong but we will be "leinient" thsi time.

10:23 this time

10:26 raek: gtuckerkellogg: the shell wrapper should include clojure on the classpath

10:27 gtuckerkellogg: raek, thanks.

10:27 maybe it doesn't

10:27 raek: gtuckerkellogg: what does the generated shell wrapper file contain?

10:28 for one of my projects it generated a line like CLASSPATH="$HOME/.m2/(...)/adt4j-1.0.0-SNAPSHOT.jar:$HOME/.m2/(...)/clojure-1.2.1.jar"

10:29 so clearly my project and clojure itself is on the classpath for me

10:30 technomancy: gtuckerkellogg: it could be a bug in shell wrappers; they are an obscure feature that's not used very often. feel free to open an issue

10:30 gtuckerkellogg: the shell wrapper is exactly the same as the default wrapper except for the subs

10:31 raek: technomancy: FYI, shell wrappers have been useful for me (so someone is actually using them)

10:31 gtuckerkellogg: damn that works.

10:31 the default shell-wrapper does not include the clojure.jar CLASSPATh

10:31 if i add it to the wrapper explicitly, it works

10:32 raek, thank you

10:32 technomancy: raek: I think shell wrappers would be a lot more useful if they didn't require Leiningen to get installed in the first place

10:33 raek: gtuckerkellogg: do you have anything in your project.clj file that could cause the clojure dependency to be excluded somehow?

10:33 technomancy: I wonder if most of their use cases could be covered by one of those crazy shell/jar hybrid files

10:33 gtuckerkellogg: no, i don't think so

10:34 my project.clj started as a direct copy of the one at https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md

10:34 the only changes I have made were attempts to get the shell script to work after what I copied didn't

10:37 thank you all, and good night

11:38 horatio_cromwell: out of the current crop of books/online material, what would you recommend as the best way to get started with clojure

11:42 tmciver: horatio_cromwell: The 2nd edition of Stuart Halloway's book "Programming Clojure" has recently come out and though I haven't read it, I thought that the first edition was a very good beginners book on Clojure.

11:48 horatio_cromwell: tmciver: has a lot changed in clojure since the first edition of the book, I can get teh first edition cheap, although obv. if it is out of date the lnew version isn;t gonna break the bank

11:50 ejackson: tmciver: you can't go wrong, just get a book and start coding

11:50 tmciver: horatio_cromwell: I would stay away from the first edition. Enough has changed that the first edition is outdated.

11:50 horatio_cromwell: tmciver: cheers

11:51 dan_b: ok, I didn't know yesterday that the riddel.us page was so out of date, but I now have a believed-to-be-mostly-working clojure set up anyway

11:51 horatio_cromwell: does clojure have good libraries for bit twiddling and handling of binary data

11:51 dan_b: only thing bothering me so far is that emacs reports a version mismatch between swank and slime every time I M-x clojure-jack-in

11:52 is that important or just annoying?

11:52 stuartsierra: dan_b: just annoying

11:52 dan_b: Versions differ: 2009-07-27 (slime) vs. 20100404 (swank). Continue? (y or n)

11:52 stuartsierra: horatio_cromwell: no

11:53 dan_b: Put this in your .emacs:

11:53 (eval-after-load 'slime

11:53 '(setq slime-protocol-version 'ignore))

11:53 dan_b: Connected. Lemonodor-fame is but a hack away!

11:53 clgv: horatio_cromwell: as much as java has

11:53 dan_b: haha. i remember lemonodor ...

11:54 stuartsierra: horatio_cromwell: I lied, you can do bit-twiddling in Clojure. Somebody did a base64 encoder that was faster than the Apache Commons Java version.

11:55 dan_b: stuartsierra: thanks. unsightly but not deletorious then

11:55 stuartsierra: yeah

11:56 dan_b: s/deletorious/debilitating/ maybe

11:56 stuartsierra: It's because the upstream SLIME distribution doesn't ever do versioned releases, just timestamps from CVS.

11:56 tmciver: horatio_cromwell: also, check out gloss.

13:05 ssedano: in data.xml how can I retrieve the value of a tag's attribute?

13:06 I can get the content with (first (:content x)) where x is the tag, but (first (:attrName x)) nor (first (:attrs (:attrName x))) does not

13:11 dan_b: ok, london clojure dojo here I come

13:20 ssedano: nevermind, done

13:25 technomancy: replaca: hey; how hard would it be to get a pprint dispatch that works nicely on defproject?

13:44 ibdknox|away: quiet morning

13:45 technomancy: everyone's taking a breather after the rush of news yesterday?

13:45 Bronsa: which news?

13:46 drewr: Bronsa: datonical clubuntu: linux on clojure

13:46 the lisp machine is back

13:47 Bronsa: i am quite sure you are not being serious about this

13:47 drewr: Bronsa: just a guess

13:48 technomancy: didn't you see the news about clojure compiling to arc?

13:48 gtrak``: does canonical care about clojure at all?

13:48 technomancy: MenTaLguY might know

13:48 I would guess no?

13:49 ibdknox: Bronsa: clojure book is finished, datomic (a new database?), and my little live game thing

13:50 made a lot of noise yesterday

13:50 Bronsa: oh, ok

13:51 your 'little live game thing' is pretty cool though

13:52 ibdknox: it's fun :)

13:53 dnolen: ibdknox: a success on reddit, even got people think how it would be to accomplish in C# ;)

13:53 how hard it would be

13:53 ibdknox: dnolen: that made me laugh

13:54 Ryan Singer got ahold of it and retweeted it too

13:54 apparently it got retweeted 45 times

13:54 twitter is a weird little microcosm

13:55 for those interested, my site got about 14,000 pageviews between today and yesterday

13:55 11,500 were unique

13:56 dnolen: ibdknox: nice!

13:59 ibdknox: dnolen: everything else will be boring now though ;) Hard to beat that demo lol

14:00 in terms of what to write about next that is

14:03 gtrak``: you could live-stream a game built in 48 hours of clojurescript

14:04 ibdknox: haha

14:04 devn: ibdknox: gtrak``: YES!

14:04 ibdknox: the nodeknockout... but live in CLJS

14:05 gtrak``: it would be more fun to watch than notch, and I watched a few hours of that

14:05 devn: No I'm serious, you really should do it

14:05 I think it would be really awesome.

14:05 Have you watched any of notch's livecoding?

14:05 It's really interesting to watch.

14:06 gtrak``: mostly because it works at all :-)

14:06 ibdknox: I would think it would be extremely boring

14:07 technomancy: ibdknox: have you seen peepcode's play-by-plays?

14:07 ibdknox: technomancy: nope

14:07 technomancy: they do the whole "put together a whole app in a couple hours" thing

14:08 but they have a back-and-forth conversation between 2 people, and are somewhat heavily edited (though not as heavily edited as regular peepcodes)

14:08 ibdknox: I see

14:09 technomancy: TBH I was a bit bored by the one I watched, but that was mostly because I wasn't too interested in the tech

14:09 ibdknox: basically do it in the style of a football replay

14:10 still think it would be really boring for people to watch lol. I'm not a very interesting coder

14:14 my friend and I were talking about a game idea the other day where you're given a goal and you have to write the code to create the environment that allows you to achieve that goal

14:14 mdeboard: Man what a fantastic idea

14:15 ibdknox: the only problem is how to control for cheating lol

14:15 the game couldn't be as simple as get to here

14:15 Scriptor|wrk: write your own language for it ;)

14:15 ibdknox: because you could just modify the guy's position to be there

14:16 Scriptor|wrk: well, you could require him to pick stuff up from different waypoints along the way

14:16 ibdknox: if I did collision detection the right way, I guess I could ensure that

14:17 otherwise I could still just warp myself to the things I need

14:18 really, the only thing I'd have to protect are the player's coordinates and the objectives, I guess

14:21 tmciver: you could limit the player's acceleration; warping == infinite acceleration.

14:21 ibdknox: tmciver: not a bad idea

14:22 tmciver: actually, I think I mean velocity.

14:22 ibdknox: you do

14:22 but that's ok :D

14:22 both work in that case really

14:22 * tmciver is embarrassed to admint he was a physics major.

14:22 emezeske: I think warping would imply both infinite acceleration and velocity

14:23 tmciver: s/admint/admit

14:23 ibdknox: emezeske: 1 tick is a unit of time so not really infinite

14:24 emezeske: Ah, that's sensible

14:24 ibdknox: in any case, as long as I don't let you directly set the position, it seems that problem is solved

14:25 I guess you could still modify your speed to get you there "instantly" but I actually think that would be really boring for you

14:25 lol

14:26 emezeske: Maybe you can accelerate as fast as you want, but it's potentially dangerous for your character

14:26 "Oops, your internal organs just turned to applesauce"

14:26 technomancy: "No no, light speed is too slow. We need ludicrous speed."

14:26 emezeske: Smoke if ya gottem

14:26 ibdknox: haha

14:26 pandeiro: ibdknox: how long did the game editor take you, out of curiosity?

14:26 ibdknox: I haven't seen that in a long time

14:26 pandeiro: 7ish hours

14:26 I lost around 2 to the damn class file thing

14:27 speaking of.. technomancy is there a way to prevent .class files from being created?

14:27 technomancy: don't compile?

14:27 ibdknox: I'm just doing lein run

14:28 I assume that implicitly compiles?

14:28 technomancy: nah

14:28 ibdknox: you can tag it to do otherwise: :main ^{:skip-aot true} mine.main

14:28 or just use lein run -m whatevs.bro

14:28 ibdknox: fantastic

14:29 such a simple fix

14:29 technomancy: thank you sir

14:29 technomancy: in lein2 you'll be able to alias "lein go" to "lein run -m whatevs.dude" with partially-applied aliases

14:30 np

14:31 ibdknox: emezeske: that would be a cool mechanic though

14:31 have some constraints actually placed on the guy/world so that you can't do anything too ridiculous

14:34 emezeske: Yeah, it strikes me as a decent way to limit a lot of stuff, without being too arbitrary

14:49 _ulises: evening folk

14:56 ibdknox: thinking more about it

14:56 the only thing you'd really need to do to make that demo I did general is that editing something only recompiles the outter-most form

14:56 not the whole thing

15:02 managed to get it working from a jar: https://github.com/ibdknox/live-cljs/downloads

15:03 gtrak``: no closure compiler, right?

15:05 ibdknox: yep

15:05 just java -jar live-cljs.jar

15:06 gtrak``: err, i mean, how's it compiling cljs without it?

15:06 ibdknox: oh

15:06 it has it in the uberjar

15:07 it just takes a dep on the cljs compiler

15:07 which includes it

15:22 muhoo: nice it seems to work from inside lein repl now!

15:27 clj_newb: is there any periodic process like clojure proj?

15:27 muhoo: though the repl part doesn't seem to. it's locking up the repl completely.

15:30 oh, here it is. it was just slow

15:30 firefoxx using 85% of CPU :-)

15:36 well that was fun. https://refheap.com/paste/887 caused ff to flip out

15:44 ibdknox: is it even possible to have a cljs repl connected to the browser while the live-cljs thing is running?

15:44 or would that cross the streams and melt the space-time continuum?

15:45 dbushenko: hi all!

15:45 which clojure lib do you guys use for logging?

15:45 dnolen: muhoo: use is not a function in CLJS

15:47 hiredman: dbushenko: clojure.tools.logging + logback-classic

15:48 muhoo: well that's not cljs

15:48 that's clj. cljs starts up at the end of that

15:48 and.. locks up.

15:49 clj_newb: what is the best way to iterate indefinetely ? infinite lazy-seq or a plain while true or (loop (recur))?

15:49 technomancy: clj_newb: depends if you want new locals each time

15:50 clj_newb: mmm, where can I read about it?

15:50 no I don't want new local vars every time

15:53 there is also the iterate function is it?

15:59 so with recur being stack constant, no new locals are allocated?

15:59 raek: yes

16:00 clj_newb: it is the best option to perform an infinite loop then?

16:00 raek: I guess so. (loop [] (do-something) (recur)) would be the most minimal way, I think

16:00 brehaut: ,(while true)

16:01 clojurebot: Execution Timed Out

16:01 brehaut: ;)

16:01 raek: ,(macroexpand '(while true (do-something)))

16:01 clojurebot: (loop* [] (clojure.core/when true (do-something) (recur)))

16:02 clj_newb: got it

16:02 brehaut: it'd probably be nicer to write 'forever' which doesnt include the when

16:03 clj_newb: thank yo!

16:03 you*

16:04 brehaut: or alternatively, keywords are true so (while :forever (do-something)) could work too

16:13 pjstadig: can someone explain to me why Rich removed checked exceptions from Clojure's Java code base?

16:14 Raynes: I'd expect it was because of the way the stars were shining that night.

16:15 brehaut: Rich is a mythos cultist‽

16:16 infosophy: Iä! Iä! Clojure Fthagn!

16:17 pjstadig: cause I can't come up with any valid reason myself

16:17 but i suppose i lack imagination

16:18 it's causing a bloodbath in my code though, when trying to upgrade to 1.3

16:24 * devn kicks brehaut

16:24 brehaut: devn? huh?

16:25 devn: I'm running all of the valid sexps in this channel for the last 5 years in clojail, those (while true] <-on purpose, expressions keep biting me

16:25 brehaut: devn: oh right. sorry :)

16:25 devn: or rather, they eventually time out, but some of them like [map inc (range 1e6]]

16:25 Raynes: Heh

16:26 devn: i had to remove a bunch of them by hand because it broke all of the redis libraries ive tried when running hgetall on "passing-expressions"

16:27 Raynes: devn: Perhaps setting the timeout really low would help?

16:36 Scriptor|wrk: amalloy: so, I took a crack at that debugging expressions idea: http://github.com/Scriptor/clj-here

16:37 m0smith: ibdknox: I am having a problem creating a noir war file

16:37 Raynes: ibdknox: I am having a problem having a problem.

16:38 amalloy: Scriptor|wrk: the reverse in https://github.com/Scriptor/clj-here/blob/master/src/clj_here/core.clj#L9 is a huge warning sign. you're trying to create ordering in a map, a thing which is explicitly unordered

16:40 Scriptor|wrk: amalloy: actually, it makes sure that the N for each argN matches up correctly

16:41 it just makes sure reduce goes through it in the right order

16:42 amalloy: what do you mean, matches up?

16:42 Scriptor|wrk: so, without the reverse ARG0 becomes the key to the last argument, ARG1 the penultimate, and so on

16:43 with reverse ARG0 points to the first argument in the function call

16:43 once the hash is created it doesn't matter what the order for that is, as long as the key names are correct

16:44 amalloy: i guess i don't see why args is in the wrong order, then, but i guess that's a separate problem

16:45 duncanm: hey technomancy

16:45 Scriptor|wrk: because I decided to make args a list and conj the last arg to the beginning

16:45 because it's easier to destructure that way

16:45 duncanm: technomancy: are you maintaining SLIME on elpa/marmalade?

16:46 Scriptor|wrk: it does mean that I have to reverse when I actually use it, but it seems to be worth it

16:46 er, and the destructuring is so that I have easy access to the latest arguments that were added, which is usually what is debugged

16:47 amalloy: just use a vector and pop from the end?

16:47 or peek at the end, i suppose

16:50 Scriptor|wrk: would that be more idiomatic? I was considering that but opted for destructuring as opposed to the extra code to bind to last and such

16:52 amalloy: just...take args, as a vector. instead of argx print (peek args)

16:52 destructuring in arglists is kinda tacky anyway

16:52 infosophy: what is the currently recommended version of lazytest?

16:54 TimMc: amalloy: Bah, nonsense. It's self-documenting code!

16:54 inb4 "just like all code"

17:02 devn: Raynes: *nod* it might -- I think I just need to get clever about some specific combinations of functions and set the timeout low only for those combiantions

17:03 Raynes: there are some computationally intensive things that dont produce giant sequences but are good examples, for instance

17:03 infosophy: are people using lazytest? I guess all i hear about these days is midje

17:04 technomancy: duncanm: I wouldn't really say I'm maintaining it

17:04 but I'm the closest thing it has to a maintainer if that's what you mean

17:04 if it were facebook, our relationship would be "It's complicated"

17:04 duncanm: heh

17:04 technomancy: you're not about to make a new release, are you? i wanted to play with slime-js, and they require a build from 2012-02

17:05 https://github.com/swank-js/swank-js

17:05 swank-js

17:05 "The backend was verified to work with SLIME 2012-02-12, it may or may not work with other versions, but note that breaking change in the protocol was introduced in SLIME 2011-11-27."

17:06 technomancy: yeah... this situation is a mess, and it will continue to be a mess until the slime developers learn how software releases work =\

17:06 Scriptor|wrk: amalloy: eh...the reason why I didn't use peek was that if I needed to use (peek args) more than once I'd have to bind it to something else for clarity's sake

17:06 aaaand I preferred destructuring to that

17:06 technomancy: duncanm: I recommend using M-x clojure-jack-in to load slime for clojure

17:07 Scriptor|wrk: so really, almost no reason other than I wanted to destructure

17:07 duncanm: technomancy: i've been out of the clojure scene for a while, if i use clojure-jack-in, which slime does it load?

17:07 technomancy: duncanm: it uses the same revision of slime that is on marmalade, but it loads it on-demand

17:07 amalloy: but...you don't do that. and you don't destructure more than one thing. and if you did, it would be nearly as gross? and you could easily destructure a vector from the other end by calling rseq on it first?

17:07 infosophy: devn: I love midje. But see no reason not to use both.

17:08 Scriptor|wrk: amalloy: I might in the future, only a few basic things have been added so far

17:08 how would it be as gross?

17:08 technomancy: duncanm: in addition, I'd recommend anyone else writing a swank backend write something like M-x clojure-jack-in that installs the exact version of slime that's known to work with their server

17:09 amalloy: Scriptor|wrk: i'm probably just an opinionated old curmudgeon

17:10 but seriously, you can destructure a vector from either end easily

17:10 duncanm: technomancy: does clojure-jack-in leave a version of slime inside $HOME/.emacs.d/site-lisp or something like that?

17:10 amalloy: &(let [v [1 2 3 4 5], [last butlast] (rseq v)] (+ last butlast))

17:10 lazybot: ⇒ 9

17:10 technomancy: duncanm: inside ~/.emacs.d/swank but not on the load path

17:10 duncanm: ahh

17:10 amalloy: and putting your argument list in reverse just so you can destructure easily is disgusting IMO

17:11 technomancy: duncanm: but the fact that it writes them to disk is only an optimization

17:11 Scriptor|wrk: well, it just made sense to me since it's the first few items that would be most accessed anyway

17:11 technomancy: it used to send it all via stdout

17:12 duncanm: technomancy: without writing it to disk, you'd have to download a fresh copy of SLIME every single time you 'jack-in'?

17:12 technomancy: duncanm: FSVO "download"

17:12 you would have to load it from the jar into your emacs instance

17:12 tylergillies: oh nice i need to use FSVO

17:12 technomancy: and that worked fine for a time, it was just slow

17:13 tylergillies: i usually say "for certain definitons of" but i like "values" better

17:13 ihodes: (between homework assignments, some spam; i'm still looking for any cool companies/startups on the west coast interested in a clojure hacker)

17:14 (or not just clojure, but whatever :)

17:20 tylergillies: ihodes: for free? :)

17:23 cemerick: ihodes: readyforzero just posted an ad

17:24 Raynes: I'm Ready For -1

17:24 ibdknox: Your turn, sir.

17:38 ihodes: tylergillies: haha nooooo, i'm afriad i need to eat

17:38 cemerick: thanks--i'll check 'em out :) they look interesting at first glance

17:41 jhulten: Is the call stack available in Clojure? Does a function know what called it?

17:42 technomancy: jhulten: you can construct a new Throwable without throwing it and inspect its stack trace

17:42 amalloy: no

17:42 if you try really really hard and don't mind being a horrible person, you can fake it (see: technomancy)

17:43 technomancy: hah

17:45 TimMc: devn: Luckily, you only have to run each infinite loop form once, since you are deduplicating. (RIGHT?)

17:47 m0smith: jhulten: (.getStackTrace (Thread/currentThread))

17:58 ibdknox: ihodes: RFZ is definitely looking for folks :)

17:58 m0smith: what's wrong with the .war?

18:00 m0smith: ibdknox: I think I figured it out. I have to require the views AND call server/load-views-ns

18:01 ibdknox: hm

18:01 that doesn't make sense

18:01 the former is what the latter attempts to do

18:01 m0smith: (:require [noir.server :as server][flirtinator.views.welcome])

18:02 (server/load-views-ns 'flirtinator.views)

18:02 ibdknox: is welcome your only view?

18:02 m0smith: yes

18:02 ibdknox: shouldn't need to do the load-views-ns call then. Werid

18:02 I don't pretend to understand tomcat though

18:02 m0smith: ibdknox: It is deployed here http://m0smith.jelastic.servint.net/

18:03 ihodes: ibdknox: i'm looking at you guys now (well...now your website in particular). you guys are at the intersections of cool problems, math (my major), finance (a major interest), and in SF. definitely will be contacting you...

18:09 gtrak``: m0smith: I need this app

18:10 m0smith: gtrak: :)

18:10 gtrak``: if you can automate this, my life is much improved

18:11 ibdknox: haha

18:11 m0smith: define "automate". That is the plan. I was going to have it email, txt and maybe post to twitter and facebook on a random basis

18:12 gtrak``: intermittent randomly spaced reminders and suggestions sound great, I suppose it still has to appear thoughtful to the recipient, so it would be hard to automate the part of actually doing the action ;-)

18:12 m0smith: maybe borrow some concepts from http://en.wikipedia.org/wiki/Spaced_repetition

18:13 m0smith: gtrak: I was thinking of it from the other direction, have it automatically send messages to my wife. But auto reminders to me is a good idea as well

18:14 hiredman: actually I started on something to generate events that on average happen every x days for my calendar

18:14 e.g. the closer to 15 days it is since the last time the last event happened the more likely it will happen again

18:15 for reminding me to buy flowers

18:15 m0smith: It was really nice to get a decent looking webapp up in so little code and configuration. I was going to use Spring MVC with clojure but noir was awesome for this

18:15 gtrak``: I tried the spring mvc thing, and even with annotations it's twice the code-size for no gain

18:16 the annotation-based configuration approaches closures asymptotically

18:17 m0smith: kinda except it strill requires a java support to structure it

18:19 gtrak``: for example, adding spEl

18:22 m0smith: I must admit I have not used SpEL for anything except in an xml. Looks like having it int the annotations is an interesting use

18:22 I see you rpoint

18:22 gtrak``: meh, like I said, it's a hack

18:23 and I think clojure the language is smaller than spring-core?

18:24 m0smith: I think you are right especially when you consider all the other stuff it takes to make spring MVC run

18:26 My Spring MVC war file it 62MB while the Clojure/Noir one is 6MB

18:26 gtrak``: woah

18:32 nickmbailey: ibdknox: any idea why i can't run 'lein nailgun &' using your lein-nailgun plugin?

18:32 ibdknox: not with that little information ;)

18:32 what's it do?

18:32 nickmbailey: not much

18:32 Nicks-MacBook-Pro:agent nick$ lein nailgun &

18:32 [5] 42048

18:32 Nicks-MacBook-Pro:agent nick$

18:32 [5]+ Stopped lein nailgun

18:32 refuses to background

18:33 ibdknox: does it work FG?

18:33 nickmbailey: yep

18:33 ibdknox: no idea

18:33 nickmbailey: i can foreground it after running with '&' and it works

18:33 ibdknox: it works in the background for me

18:33 nickmbailey: bollocks

18:33 ibdknox: I really hope kotarak releases the new client soon so we can fix this nonsense

18:34 nickmbailey: oh is one in the works?

18:34 technomancy: you mean switching to nrepl?

18:34 ibdknox: technomancy: yeah

18:34 nickmbailey: he wrote a haskell nrepl client to use for it

18:35 nickmbailey: awesome

18:36 ibdknox: do you run on osx? linux?

18:36 ibdknox: os x lion

18:36 nickmbailey: well shoot

18:44 well apparently i can start it the foreground, suspend it, then background it

18:44 so i guess i'll go with that

18:47 amalloy: if it won't run in the bg it's probably trying to do some console i/o

18:47 and blocking on that because it doesn't have control of the console when it's in the background

19:08 Kowboy: I am looking for a clojure library I found quite some time ago

19:08 it is a nosql database writting in clojure

19:08 might even be an in-memory database

19:09 began with an f

19:09 found it

19:09 ibdknox: fleetdb

19:09 Kowboy: FleetDB

19:09 adding "in-memory" pulled it up in the search results

19:16 tylergillies: isn't clojure an in-memory database in itself?

19:17 ;)

19:17 nickmbailey: its a codebase

19:17 code=data

19:17 so yes

19:18 tylergillies: code != data

19:18 because not all data is code

19:19 but thats more semantics than anything ;)

19:19 nickmbailey: s/semantics/pedantics/ :)

19:26 Kowboy: what is the simplest Java SQL database for a prototype project?

19:27 hsql or derby?

19:28 this is a nice summary of options http://java-source.net/open-source/database-engines

19:29 scottj: does cljs still only work with sun jdk?

19:36 technomancy: scottj: I don't think so

19:41 ibdknox: scottj: it plays well with everyone now

19:48 scottj: ibdknox: good to hear I can use gcj :) I was actually getting an error running lein run on your live-cljs demo (can't recur here/coding.server$_main) though I don't get an error with the jar

19:49 ibdknox: scottj: readme

19:49 no one reads the readmes :p

19:49 scottj: the latest pull should have that fixed now though :)

19:50 scottj: ibdknox: they don't read the readme when you say in your post "all you have to do is..." :)

19:52 seancorfield: all you have to do is read the readme? :)

19:52 ibdknox: haha

19:52 that should actually be true now :)

19:53 scottj: ibdknox: btw the two panels aren't side by side on my 1400px screen.

19:53 ibdknox: I fixed the sizes for my screen

19:53 1440x800

19:54 ivan: so, has anyone written a reStructuredText that works in Clojure yet?

19:54 preferably without all the problems

19:56 Kowboy: why doesn't this work? (apply new [FileRecord 1 2 3 4 5 6])

19:56 or even (apply FileRecord. [1 2 3 4 5 6])

19:57 technomancy: Kowboy: apply only works on functions

19:58 Kowboy: so I have to wrap it then

19:58 or do it manually

19:59 technomancy: I think you have to know the arities up front

19:59 but I don't use records, so don't listen to me

20:01 niiice: https://mobile.twitter.com/plt_borat/status/174585616502231040

20:03 gf3: hola, for some reason I'm having an issue catching exceptions in clojail, has anyone experienced this?

20:06 scottj: ibdknox: live-cljs could be a cool programmers version of mario bros. each client that connects gets their own colored circle. add some bad guys and let users try to avoid getting killed while making changes to the code. flash code changes from other users in their color on the clients of everyone.

20:07 ibdknox: scottj: yeah, I was talking earlier about game ideas. My favorite so far is to have a goal that you have to write an environment for that allows you to complete it

20:08 with some constraints, like moving too fast will cause your guy to disintegrate due to friction or whatever

20:10 technomancy: cumulative speed: to fast to live http://images.wikia.com/scottpilgrim/images/a/af/Disin.png

20:10 alexbaranosky: if I have a macro inside of a (binding ...) can the expandion of the macro depend on the var being rebound?

20:10 or will it ignore the new value of the bound var, because the rebinding is happening after the expansion?

20:11 ibdknox: technomancy: lol

20:11 hiredman: alexbaranosky: binding happens at runtime

20:12 ibdknox: is there some code floating around somewhere that will take a string of clojure and give me the text or structure that represents the top-most form at a given point?

20:13 alexbaranosky: hiredman, yeah, makes sense. Thx.

20:13 technomancy: ibdknox: you mean like (read-string (apply str (take offset my-str)))?

20:13 ungamedplayer: if i wanted to wrap a processes stdin and stdout in clojure, (interactive, not a once off fire and forget) what should I use ?

20:13 ibdknox: scottj: btw I pushed a little css change to force the wrapper size so they won't flow underneath eachother

20:14 scottj: ibdknox: don't see it pushed

20:14 ibdknox: gr

20:15 is now

20:16 technomancy: that would just give me EOF's

20:17 basically what I want to do is char 80 was inserted find the the outer-most form and re-eval it

20:17 scottj: ibdknox: doesn't support firefox? add to readme?

20:17 ibdknox: scottj: hm? "Works best in Chrome. It runs in FF, but the mouse events don't work"

20:18 ungamedplayer: for example, i was thinking something like expect wrapping stdin/stdout

20:18 scottj: ibdknox: my bad, I searched for firefox

20:55 hiredman: ls

20:55 pardon me

20:56 chewbranca: src clojure pizza

21:52 qbg: Any one have experience getting Overtone setup?

21:54 tomoj: I got it set up once, though not in a while, and couldn't help until later tonight

21:55 but note there are a few lurkers in #overtone, someone may be paying attention there

21:58 qbg: Looks like I might need the jack_lsp installed (I'm on linux)

21:58 Lets see if that works

22:34 simard: how can I update counterclockwise's clojure.jar/clojure-src.jar ? it seems it's still using 1.2.0 and clojure contrib

22:37 ungamedplayer: http://www.4clojure.com/problem/3 <-- can someone tell me if that test is broken, I really expected it to be "HELLO WORLD"

22:38 emezeske: ungamedplayer: I think it might be giving you a hint ^_^

22:39 ungamedplayer: To answer your question, though, it doesn't seem broken to me.

22:39 ungamedplayer: ok.

22:40 emezeske, test something for me.. does (= (.toUpperCase "hello world") (.toUpperCase "hello world")) work for you ?

22:41 i tried the obvious, (= "HELLO WORLD" (.toUpperCase "hello world"))

22:41 and it doesn't work.

22:41 You failed the unit tests

22:42 emezeske: Well that seems a bit odd. Both of those work for me.

22:42 ungamedplayer: ok, so i'm not an idiot.

22:42 emezeske: Are you maybe using a non-english language browser?

22:43 ungamedplayer: not that i know of.

22:43 emezeske: Seems like a bug! Maybe tell team@4clojure.com ?

22:44 ungamedplayer: Firefox 10.0.1 , character encoding ISO-8859-1

22:44 yeah, i might.

22:45 emezeske: For someone that doesn't know to login to IRC and ask questions, that could be pretty bogus :)

22:46 ungamedplayer: a little frustrating for those that do know too.

22:47 emezeske: Aye!

22:49 ungamedplayer: failing on both chrome and firefox.

22:50 gtrak`: ungamedplayer, I think 4clojure uses a similar backend to tryclojure, why not try it there?

22:50 ungamedplayer: ok

22:50 works, returns true

22:55 amalloy: ungamedplayer: you're supposed to fill in the blank, not rewrite the entire expression

23:06 tmciver: amalloy: are you still the lead for clojure.data.xml? I haven't used it yet but I'm wondering if there is any way to do css-style selectors.

23:07 amalloy: i was never the lead. chouser started the project, and ryan senior seems to be the one keeping it moving at the moment

23:08 tmciver: Hmm, http://dev.clojure.org/display/design/Where+Did+Clojure.Contrib+Go seems to indicate that you are, or maybe it means you're the lead on the old contrib lib?

23:09 amalloy: no, i was just the first one to make an effort like ryan is doing now. but who cares what that says, i'm not :P

23:40 gf3: hello all, (still) having an issue catching exceptions from clojail

23:40 check this out → http://cloud.gf3.ca/EcqD

23:40 any idea?

23:41 whoops, typ

23:41 +o

23:46 jodaro: huh

23:46 i guess i haven't been paying attention to scala land lately

23:46 sbt is out

23:46 buildr is in

23:46 http://buildr.apache.org/

23:50 devn: emezeske: thanks for paredit.vim -- im giving vim a try as a clojure editor for a bit

23:51 i think i killed the GSoC thread

23:51 emezeske: devn: Ah, yeah, you should thank Tamas Kovacs though :)

23:52 devn: emezeske: i would if he were here!

23:52 emezeske: ^_^

23:52 devn: emezeske: anyway, i once did half the job of extracting paredit.vim from slimv

23:52 but you did it, packaged it up all nicely

23:53 emezeske: true.

23:54 devn: man, im going a little crazy though, so used to emacs for clojure development

23:54 * devn breathes deeply

23:54 * emezeske calms devn down.

23:54 devn: M-) automatic

23:54 must learn to ,>

23:54 jodaro: wait, you are leaving emacs for vim?

23:54 devn: Ommmmm

23:55 jodaro: i use both at work

23:55 Raynes: emezeske: I talked to the author of slimv. He wants to separate paredit.vim out soon.

23:55 devn: jodaro: i run a meetup group and want to help others with vim, and besides, i like vim for lots of things, i like emacs for lots of things as well, id like to know how to do what i do in both

23:55 emezeske: Raynes: Awesome. I won't have to live in perpetual fear of my branch being behind :)

23:55 jodaro: devn: sounds reasonable

23:56 * emezeske leaves to play starcraft.

23:56 Raynes: ...

23:56 devn: Godspeed emezeske

23:56 Raynes: Does everybody I know how to play Starcraft? Seriously, guys.

23:56 have*

23:56 jodaro: Raynes: parse error

23:56 devn: I did for a bit, but no longer

23:56 Raynes: jodaro: Shhh.

23:56 ibdknox: I got bored with it

23:56 jodaro: ive never played it

23:57 for what its worth

23:57 Raynes: ibdknox: Apparently the biggest perk of me going to California is that I get to play it with amalloy and lancepantz. Bah humbug.

23:57 jodaro: Raynes: are you coming out for clojure west

23:58 Raynes: jodaro: No. I'm coming out in April to visit Geni.

23:58 And LA.

23:58 amalloy: emezeske: what league/server? might be fun to play with some clojure users

23:58 * arohner1 will play SC2 when they allow programs written by me to play for me

23:59 devn: how do i eval a line in vimclojure?

23:59 amalloy: so never, then, arohner1?

Logging service provided by n01se.net