#clojure logs

2012-02-28

00:00technomancyyou could always ask danlarkin
00:00callendanlarkin: remember subrosa?
00:01callentechnomancy: I found an example here: https://github.com/danlarkin/subrosa/blob/master/src/subrosa/plugins/catchup.clj
00:01callentechnomancy: 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.
00:03technomancyyeah... hard to say.
00:04technomancyyou'd get something workable faster if you used it
00:04technomancyand you'd learn about how a real-world project is put together
00:04callenI would understand virtually none of it in the process and end up banging my head against walls and not necessarily learn much Clojure.
00:04technomancybut you run the risk of staring at inscrutable code
00:05technomancytoo bad subrosa isn't a literate program
00:05callenI'll try it your way
00:05callenI'm dreading this though.
00:06muhoowow, this guy doing this talk is a genius.
00:06callenmuhoo: ?
00:06callentechnomancy: how do I add a github repo to leiningen?
00:07Scriptorcallen: can you find it on clojars?
00:07muhoocallen: the vimeo one, with the live javascript editor
00:07technomancycallen: just declare a regular dependency in project.clj, create a "checkouts" directory, and clone it into there
00:07callenScriptor: no
00:08lynaghkIs 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.
00:09mabeslynaghk: no.. that is one reason why I often wrap my protocol API will regular functions (so I can use pre/post checks)
00:09muhooactually, it's a live EDA tool too
00:09muhoogenius
00:10callentechnomancy: 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
00:10mabesaccel: dunno if you got your question answered but I always use VisualVM to spot the hot spots in my code
00:10lynaghkmabes, I'm not sure what you mean. You wrap where you actually call the protocol methods on an instance?
00:12accelmabes: will look into it; thanks
00:12callentechnomancy: "checkouts" isn't in the Tutorial.md nor the wiki...
00:13callenanyone here know how to use github repos with leiningen?
00:13mabeslynaghk: 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
00:13lynaghkmabes, ahh but I want other people to be able to write implementations of the protocol too
00:13technomancyit's in the readme
00:15callentechnomancy: that's what I did...
00:15technomancycallen: does it show up in `lein classpath`?
00:15mabeslynaghk: 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
00:15lynaghkmabes: ahhh, I see.
00:16mabeslynaghk: more of a convention than a pure technical solution..
00:16lynaghkmabes: that makes sense, thanks. I'll have to think about whether the added verbosity
00:16callenCaused by: org.apache.maven.artifact.resolver.MultipleArtifactsNotFoundException: Missing:
00:16callen1) subrosa:subrosa:jar:1.0.0
00:16lynaghkis worth the extra safety.
00:16callenthat occurs when I run lein classpath
00:17callenit breaks.
00:17lynaghkmabes: 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])
00:17callenI found it, it's some BS code in subrosa.
00:17callengod dammit.
00:18lynaghkmu
00:19callenit was one of those lazy trim/slurp etc/version things
00:19callenffs
00:19technomancycallen: "checkouts" is meant to be complementary of regular dependencies
00:19callen/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
00:19technomancyso if it's not on clojars you'll need to manually install it
00:19callentechnomancy: ^^ lein classpath
00:20muhooi predict this guy will be keynoting at TED this year
00:20technomancymuhoo: he's already been invited to strange loop
00:21mabesTED > StrangeLoop ?
00:21mabeshalf joking.. Strangeloop is basically a TED conf for devs :)
00:22callentechnomancy: still claims "unable to resolve artifact: missing"
00:23callentechnomancy: I saw the entry in the README, doesn't really explain much to me.
00:23technomancycallen: subrosa is weird because for some reason it's not on clojars
00:24technomancydid you do "lein install" in the subrosa dir?
00:24G0SUBtechnomancy, ping
00:24technomancyG0SUB: pong
00:24callendoing so now.
00:24callentechnomancy: that fixed it.
00:24G0SUBtechnomancy, can you kindly review my reflection removal patch for clj-stacktrace?
00:25G0SUBtechnomancy, I have sent a pull request.
00:25callentechnomancy: thank you.
00:25choffsteinanyone know of a clojure zlib library?
00:25technomancyG0SUB: sure; sorry about the delay, I'll see if I can run that by mark tomorrow
00:25choffsteinbesides java.util.zip ... which is a horrendous pile of shit to work with
00:25G0SUBtechnomancy, I understand. that's not a problem. thanks in advance.
00:26dnolenibdknox: well you did well on Reddit at least.
00:26dnolenso rhickey's got a new kind database - this will be interesting.
00:26G0SUBdnolen, I am excited :-)
00:27G0SUBdnolen, something like allegro-cache?
00:27callenI'm hoping it's not language-specific actually.
00:28technomancya database that supports UUIDs as first-class data types
00:28technomancynow we know why that feature made it into 1.4
00:28G0SUBtechnomancy, how does first-class UUID help?
00:28dnolenG0SUB: that would be cool.
00:28technomancyG0SUB: I don't think it actually does
00:28callenI'm not sure what that would solve.
00:28technomancybut relevance seems to think differently
00:29technomancyand they call the shots
00:29G0SUBdnolen, indeed.
00:29callenusing and indexing UUIDs is a common pattern.
00:29dnolencallen: given that it has its own website I wouldn't be surprised, curious about the strategy. opensource? license? etc
00:29dnolenfree / not-free
00:29ibdknoxdnolen: yeah :)
00:29G0SUBtechnomancy, yeah, but I don't see how that could be a significant advantage.
00:30ibdknoxthey've been tossing around the word "product" which indicates money will be involved
00:30dnolenibdknox: yes, that was my impression as well.
00:32G0SUBif datomic turns out to be a completely proprietary database then it'd be a non-starter for many.
00:32callenmyself included.
00:32callenI cannot build anything of value on a persistence backend I don't have control over.
00:32technomancysrsly.com
00:32dnolenibdknox: or not, perhaps the model is consulting
00:33G0SUBdnolen, the same as Clojure's.
00:33ibdknoxdnolen: maybe, but I'd be a little surprised
00:33ibdknoxthat's not really a "product" and consulting doesn't scale
00:33dnolenthat said - I respect Alex Miller's opinion, if he thinks it's big, it must have features worth getting excited about.
00:34ibdknoxdnolen: that's true.
00:34callentechnomancy: there is no way in hell, I'd have to port everything and fix all the breakage.
00:35ibdknoxusually something has to be in place a while for consulting to work out. I think it's likely a PaaS of some kind
00:35callentechnomancy: I can't even (use ...) his code without it raising an exception.
00:35technomancycallen: maybe fall back to clojure 1.2?
00:36dnolenibdknox: database ecosystem is pretty saturated w/ options these days - I imagine it must do something quite different.
00:36callentechnomancy: 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?
00:36ibdknoxdnolen: I agree
00:36technomancycallen: I think it's stuck because it uses aleph, which hasn't been updated?
00:37callenno, uses netty.
00:37ibdknoxdnolen: I've worked with some guys here on something that is taking a different angle on the DB market
00:37ibdknoxdnolen: there are still places to go :)
00:37callentechnomancy: 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.
00:38technomancycallen: yeah, I agree it sucks. I'm not sure that starting from scratch would be any easier, but it would certainly have fewer frustrations.
00:38callenif this is were Python, Ruby, JS, it'd be another story, but I'm swimming through mud when it comes to clj.
00:39technomancyor at least, most of the frustrations would be your own fault. =)
00:39technomancyand those kind of frustrations are usually easier to deal with
00:39callentechnomancy: I'm totally inept at Clojure and Java. I don't even know where to start with integrating his code and fixing it.
00:40ibdknoxwhat are we talking about?
00:40bbloomwho should i follow on 4clojure for idiomatic *implementations* instead of idiomatic *shelling out to some library function* ;-)
00:40technomancyibdknox: building an IRC bouncer on top of subrosa vs starting from scratch
00:40callenibdknox: subrosa, IRC framework => bouncer, abandoned code.
00:40ibdknoxI see
00:40bbloomfor example, I implemented parsing a binary number string… then I saw people use Integer/parseInt and was like *sigh*
00:41callenibdknox: 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.
00:41bbloomi realize that's the code you'd ACTUALLY write in a program, but it seems against the spirit :-P
00:41dnolenbbloom: Integer/parseInt is idiomatic, use the host unless there's some reason not to.
00:41callenbbloom: I implement foolish decisions all the time. I'm bitemyapp on 4clojure.
00:42callenbbloom: use the library functions whenever possible IRL though.
00:42bbloomwell of course :-P
00:42bbloomi'm trying to learn clojure tho.. i already know the java std lib (a bit anyway)
00:42bbloom#(reduce (fn [acc c] (+ (bit-shift-left acc 1) (if (= \1 c) 1 0))) 0 %)
00:42bbloomi mean that's just so pretty :-)
00:44muhoois aleph abandoned?
00:44ibdknoxlol
00:45ibdknoxmuhoo: aleph is not abandoned
00:45muhoo"subrosa, IRC framework => bouncer, abandoned code". i'm wondering what was abandoned?
00:46callenmuhoo: subrosa was, it's still using 1.2 and contrib.
00:46lynaghkibdknox, you have a second? I'm porting some D3 JS to CLJ and am wondering how best to emulate its behavior using records/protocols
00:46muhoozh ok
00:46callenibdknox: aleph is using 1.2 too...
00:46ibdknoxcallen: there's a 1.3 branch
00:46muhoowell i have aleph running in 1.3, it seems to work
00:47callenI missed it.
00:47ibdknoxand using 1.2 isn't a problem. Using old contrib is the problem
00:47muhooi think i just grabbed a snapshot
00:47callenibdknox: I know, just saying.
00:47ibdknoxlynaghk: I can try, though admittedly I try not to use either of those if possible :)
00:47lynaghkheh
00:47lynaghkhttps://github.com/mbostock/d3/blob/master/src/geo/albers.js
00:48lstollI've been using aleph in 1.3, and it's fine.
00:48ibdknoxoh no's.. it's math!
00:48lynaghkdon't worry, none of that is the issue = )
00:49ibdknoxhaha good. Cuz I's dumb with teh numb3rs
00:49dnolenlynaghk: where do defrecords/protocols come in? and is this CLJ or CLJS?
00:49lynaghkso 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]
00:49muhoodid bret victor use clojure to do those demos?
00:49dnolenmuhoo: JS
00:49lynaghkdnolen: I want a solution that will work fine on both
00:49ibdknoxmuhoo: no, JS
00:49muhooah
00:50ibdknoxlynaghk: can't they just be functions? Why do you need records and protocols?
00:50callenhttp://richhickey.github.com/clojure-contrib/condition-api.html <--- alright, where'd it go?
00:50lazybotNooooo, 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.
00:50lynaghkyou can also say (:parallels a) and get whatever parallels you're using in the albers projection, yeah
00:50lynaghkibdknox ^
00:50choffsteinanyone know any compression libraries in clojure?
00:51callenalright, where'd *this* http://clojure.github.com/clojure-contrib/condition-api.html go if not in contrib?
00:51lynaghkThis 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.
00:51ibdknoxlynaghk: ok, so you need something you can treat as either a vector or a map?
00:51dnolenlynaghk: huh, that's some weird JS code IMO
00:52lynaghkSo my question is: how can I encorporate custom setter logic in defrecords
00:52technomancycallen: slingshot is the successor to contrib.condition
00:52dnolenlynaghk: not possible, defrecords define IAssociative
00:53lynaghkor come up with some other abstraction that has the niceites of records (e.g. field access)
00:53ibdknoxjust define an interface through functions
00:53callentechnomancy: (ノಠ益ಠ)ノ彡┻━┻
00:53lynaghkdnolen: 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?
00:54dnolenlynaghk: just implement the features of maps (via deftype) that you need for it to work.
00:54ibdknoxlynaghk: or just do them as deftypes :(
00:54technomancycallen: if you start out working on the subrosa codebase itself instead of your own project, you won't have any mismatch issues
00:54dnolenlynaghk: that said, there's little benefit unless you want to define a common set of abstractions here. maybe that's what D3 is doing.
00:54lynaghkdnolen, ibdknox: okay, thanks guys.
00:55technomancybut maybe that's a sign that it's time to make a clean break from subrosa before you suffer internal bleeding
00:55lynaghkdnolen: what do you mean?
00:55callentechnomancy: the code literally relies on the class hierarchy of the original condition
00:55callenslingshot is totally different, i'd have to restructure everything
00:55technomancyyou have my permission to yell at danlarkin
00:55callenthis is fucking stupid
00:55callenI'm not using subrosa.
00:56callenI just want a while loop and a socket, ffs.
00:56dnolenlynaghk: is there some cross cutting concern that's being expressed in albers that appears elwehre in d3, like invert, origin, parallels, scale, translate, etc
00:56dnolenelshwere
00:56dnolenoof, elsewhere
00:56lynaghkdnolen: Really, the only things I want are field access and the ability to derive easily from existing objects.
00:56technomancybut how will you scale without being asyyyyyyyyyyync?
00:56callentechnomancy: I'll do it live.
00:56technomancyhttp://p.hagelb.org/async.jpg
00:56ibdknoxhahaha
00:56bbloomlol.
00:57dnolenlynaghk: where is there derivation in that d3 code?
00:57lynaghkdnolen: through the setters.
00:57dnolenlynaghk: line num?
00:58lynaghkdnolen: 104
00:58dnolenI like Node.js, but this is funny http://www.youtube.com/watch?v=bzkRVzciAZg
00:59lynaghkfor 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
00:59callendnolen: it's true though :(
01:00lynaghkso when the scale is changed in the setter, there is custom code to update the internal albers projection scales
01:01lynaghkSo, I could follow that in Clojure by using deftype and writing custom logic in assoc to catch the :scale keyword and do the same
01:01dnolenlynaghk: ah yeah, delegation - I gotta run, I can send my thoughts on this later
01:02dnolenlynaghk: adding custom logic doesn't make sense, Clojure/Script allows for real delegation
01:02dnolenlynaghk: you can hook in via protocol fn defaults
01:05callenoh ffs, aleph is using contrib too
01:05callenalright, how do I fix the fact that code I'm calling is using contrib? do I add it to my dependencies?
01:07kwertiiAnyone 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.
01:10yesudeepwabbitmq? heh.
02:05muhooi tried that cljs-live demo, and got this: https://refheap.com/paste/876
02:10ibdknoxuse lein run
02:10ibdknoxalso delete classes/cljs/
02:11muhooah cool thanks. so there's no way to run it from inside lein repl?
02:12ibdknoxI'm sure there is
02:12ibdknoxbut the cljs compiler seems to be finnicky
02:14bbloomibdknox: Can you describe the finnickiness? Are you able to deduce a pattern that would lead to an improvement?
02:14ibdknoxdon't AOT compile it
02:15ibdknoxthat's all I know
02:15bbloomheh ok
02:15ibdknoxI wasted two hours figuring that out
02:15bbloomi havent used AOT at all
02:15muhooworked, thanks. tho i did get this warning: https://refheap.com/paste/877
02:16ibdknoxthose are just normal cljs warnings
02:16ibdknoxthey happen when core is compiled heh
02:17bbloomyeah, seems like easy fixes tho… you know, broken windows and all :-P
02:18ibdknoxthe 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
02:18ibdknoxcan't be deterministic about it until runtime, unfortunately
02:19bbloomit has to do with differentiating property access and function calls, right? wouldn't just adding the hyphen fix the issue?
02:19muhoowhy is the mouse broken in firefox? is that something that could be hacked around?
02:20ibdknoxbbloom: 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 :)
02:20ibdknoxmuhoo: I dunno?
02:20ibdknoxI'm sure there's some fix
02:20ibdknoxit wasn't meant to be something that was just fun, fixing browser bugs doesn't fall into that category :)
02:21ibdknoxerr was*
02:21muhoogood point
02:21bbloomibdknox: but you can add an extra ()
02:21bbloomso from: (. foo bar) to: ((. foo -bar))
02:21ibdknoxsure
02:21bbloom& shut up the warnings :-)
02:21lazybotjava.lang.RuntimeException: Unable to resolve symbol: shut in this context
02:22ibdknoxdoesn't make much sense when those warnings will get removed
02:22muhoomaybe i'll poke around and see if i can figure out the mouse thing
02:22bbloomfair enough
02:22ibdknoxmuhoo: I'm sure it's something simple
02:23ibdknoxalright, g'nite guys
02:23muhoothis really is amazingly good, what you've done here.
02:24muhoothanks
02:24ibdknoxglad you're having fun :)
02:26muhooi'm still too bewildered to be having fun. but i'm amazed and impressed, that's for sure. this is fantastic.
02:37devnCan anyone take a peek at my gigantic post on the GSoC thread and give me some feedback?
02:39muhoooh 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
02:56muhooi really have to thank people for using :use :only. otherwise, i'd be totally lost trying to figure out other people's code
02:57muhooif 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
03:00_ulisesmorning
03:03damagednoobas 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
03:04damagednoobi'm having trouble with the get-lines functions
03:07tomojhmm
03:08_ulisesdamagednoob: there's a line-seq fn already I think (it takes a reader)
03:08tomojdamagednoob: first, formatting "fixes": https://gist.github.com/0f01eed063bdfacb9c9d :)
03:08_ulises,(doc line-seq)
03:08clojurebot"([rdr]); Returns the lines of text from rdr as a lazy sequence of strings. rdr must implement java.io.BufferedReader."
03:10tomojdamagednoob: second, don't use def to define local variables
03:10tomoj(def debugger-line #"...") would be OK, but it can also be just a local here
03:11damagednoobtomoj, okay, so just do it inline?
03:11tomojhttps://gist.github.com/8e9cb8a83e11986a6682
03:12tomojcertainly lower-line should be a let not def
03:12tomojbut debugger-line etc and added-line could be let or def (or inline..) idiomatically perhaps
03:12tomojcan't tell what you're trying to do
03:13tomojin the body of the when-let inside your get-lines, you have two forms
03:13tomojbut only the second will be returned
03:14tomojthat is, in (when-let [foo bar] baz bing), 'baz' is evaluated but the return value is lost
03:14damagednoobi 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
03:15tomojthat could work.. but I think it will probably be easier
03:16tomojwould 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
03:17damagednoobokay, one sec
03:21damagednoobtomoj, 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>'
03:21damagednoobhttp://pastebin.com/5EsF3xy5
03:22damagednoobso for instance, line 28 in the diff is an example of an offending line
03:22tomojah, I see
03:28yesudeepmuhoo: which cljs-live demo?
03:35tomojdamagednoob: well
03:37tomojso you had this https://gist.github.com/5740242e24fc83f1ca38
03:37tomojif you change it to this https://gist.github.com/c45ee235367c5a160eb2 , it works
03:37tomojthe (if (is-jsfile-line line) (lazy-seq (get-lines reader "js"))) is just ignored in your version
03:37tomojbecause when-let just returns the last thing in its body
03:40tomoj(the change to (clojure.java.io/reader "/tmp/file") was just so I could test it..)
03:45damagednoobawesome, thanks tomoj
03:46damagednoobi 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
03:51devndamagednoob: in some cases that would be true
03:53devndamagednoob: the body of defn is an implicit (do ...), but only the last expression in the body wins
03:53devn(in returns of what it returns)
03:53devnin terms*
03:55Fossi1which weans if the part inbetween is lazy it wouldn't get executed either
03:55Fossi1oh, which seems to be what you did :)
03:57tomojthis may be helpful https://gist.github.com/99665f77b73f1fb5cad4
03:57tomojbut there should be a prettier way to write it?
04:00tomojoh, useful has something for this
04:01amalloydoes it?
04:01tomojwell, partition-between could implement the partition-starting I was going to write, I think
04:02tomoj(partition-between (comp is-file-line second) lines)
04:02devnwhen you say "useful" are you referring to http://clojars.org/repo/clojure-useful/clojure-useful/0.3.8/ ??
04:02lazybotdevn: What are you, crazy? Of course not!
04:02tomoj:D
04:02tomojlazybot: botsnack
04:02lazybottomoj: Thanks! Om nom nom!!
04:02tomojhttps://github.com/flatland/useful/
04:03devnlazybot: botsnack
04:03lazybotdevn: Thanks! Om nom nom!!
04:03devnsee, you can abuse it and it still loves you
04:06damagednoobblegh, now i have to go to work. thanks for the help and the code
04:06damagednoobi'm sure i'll be back :)
04:07devnuseful reminds me, i need to spend some time this friday organizing all of the user.clj/personal fns repos I've cloned
04:08devnI'd like to make a gigantic repo of them with nice docstrings, etc.
04:08devnuseful is along those lines
04:13muhoohow does one regenerate bootstrap.js?
04:13muhooit seems like it has all the old code compiled into it, and, if i change the source, the bootstrap.js does not change.
04:14amalloymuhoo: huh? just check it out from git if you accidentally deleted it
04:14muhoono, it seems like it's generated from the cljs files
04:14muhoobut, when i change the code in the cljs files, the bootstrap.js is then out of date
04:30ejacksontune out of #clojure for one day, and its like the world goes by: datomic, cljs live-coding...
04:30muhooah, i see, i have to use cljsbuild, somehow
04:31muhooejackson: man, try drinking from this firehose starting from nothing. i feel like i keep getting stupider every day.
04:31ejacksonwelcome, brother.
04:33muhooyesudeep: the one at chris-granger.com
04:34muhooi just read all of its code, and i understand about 50% of it
04:35muhooi poked around trying to fix the firefox mouseclick bug and failed really
04:36muhoomousedowns work if i bind them manually with jquery.
04:36muhooi think it's either a jayq problem, or the (when (.-focused me) needs to be removed
04:36muhooit's not going to get a mouseclick if it's not focussed anyway
04:37muhoobut, the problem is that i don't understand cljsbuild and it won't run from inside lein repl
04:37muhooso i've no way to actually get the bootstrap.js to recompile with my attempts at testing the mouseclick thing
04:38muhooi 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
04:39muhootoo tired; must sleep
05:05Scriptorman, debugging macros is a pain
05:06lucianScriptor: that's by far the most common argument against them
05:07lucianit's easier in scheme, especially with editor/ide support
05:07Scriptorlucian: hmm, at the least it'd be nice to know which line number is, say, throwing a null pointer exception
05:07Scriptorput it's all just thrown into evalSomeNumberHere
05:08lucianah, that's just regular clojure sucking at tracebacks
05:08Scriptorhah, figured :)
05:09lucianit *really* needs to get better tracebacks, python and racket are way ahead
05:10Scriptoragreed, getting errors where it can't find the line number is really annoying
05:10Scriptorespecially when it's just a stray letter typo'd after a parenthesis or something
05:14Scriptorhmm, so I have a macro that returns the result of a map
05:15Scriptorwhen I try to do that, it thrown a nullpointer exception, when I return the (first ...) of the result, it's fine
05:16lucianmaybe because map is lazy
05:16luciantry (do ...) to force the map, see if you still get the nullpointer
05:17Scriptorjust do?
05:18raeklucian: 'do' has nothing to do with laziness
05:19Scriptorhmm, tyring do, dorun, and doall don't seem to have an effect
05:19raekdid you mean 'doall'?
05:19Scriptorhttp://clojuredocs.org/clojure_core/clojure.core/doall
05:19lucianoh, right
05:20ts__hi
05:20ts__i have trouble understanding this loop (doseq [[anchor id] (.. input-tuple getMessageId getAnchorsToIds)] anybody care to explain ?
05:21raekScriptor: what happens if you do something like (defmacro foo [] (map identity '(println "hello"))) (foo)
05:22raekts__: it is a combination of java interop, the doseq macro, and destructuring. which parts do you know about?
05:22Scriptorraek: that works fine, hello is printed and nil is returned
05:23raekok, that seems to indicate that laziness is not the problem, at least
05:23raekScriptor: have you tried looking at the output of macroexpand-1 ?
05:23raek(macroexpand-1 '(your-macro ...))
05:24raekif it blows up with that call, then the problem is in the macro body. otherwise, it's in the generated code
05:25Scriptorhere's the code if it helps https://gist.github.com/1931758
05:25Scriptorraek: yep, tried it, it still blows up
05:25ts__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 ?
05:25raekScriptor: what type is 'line'?
05:26Scriptorraek: it takes a body of clojure code so whatever each expression is, so far I'm testing it with (debug-block (prn "hi"))
05:27tscheiblts__: (.. input-tuple getMessageId) would in Java be written like: input-tuple.getMessageId().getAnchorsToIds();
05:27raekts__: 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"
05:28raekthe loop body is executed once for each "thing" in an environment where "anchor" and "id" are bound to the "subthings"
05:28ts__yeah and the getAnchorsToIds() return a map of <long,long>
05:28Scriptorhmm, I'm trying it now with a function other than prn
05:29raekts__: ok, if it is a map then you will iterate over the entries
05:29Scriptordifferent errors this time, so this might be a good sign
05:29tscheiblts__: yep.. and [anchor id] destructures this arry into anchor and id
05:30raekScriptor: so you want to turn (prn "hi") into (debug prn "hi")?
05:30tscheiblts__: actually it destructures EACH array in a loop
05:30Scriptorraek: yep
05:30ts__so it will loop over each entries of the map or it will loop like anchor1 -> id1 , anchor1 -> id2, anchor2 -> id1 ?
05:30raekif you take multiple expression you need to wrap the result expressions in a 'do'
05:31raekI 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"))
05:31tscheiblts__: in each iteration you will get the next anchor, id pair
05:32tscheiblts__: referenced using the symbols anchor and id
05:32ts__tscheibl: alright so there's no mixing between different keys and values
05:32tscheiblts__: correct
05:32raekScriptor: I would write it like this: (defmacro debug-block [& lines] (cons `do (for [line lines] (if (seq? line) (cons `debug line) line))))
05:33ts__okay thanks !
05:34tscheiblts__: you are welcome :)
05:34raekor like: (defmacro debug-block [& lines] `(do ~@(for [line lines] (if (seq? line) `(debug ~@line) line))))
05:35raekScriptor: 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
05:35Scriptorraek: thanks, using do fixed it! Still used map though :)
05:36Scriptorah, I changed debug to the fully namespaced version (clj-here.core/debug), does syntax-quote do the same?
05:37raekScriptor: the error in your original code came from (debug-block (prn "hi")) expanding into ((prn "hi")), which evaluated to (nil), which casued the NPE
05:37raekScriptor: yes, that's exactly what it does for symbols
05:38raekif you did (ns ... (:use [foo.bar :rename {x y}])) then `y will expand into 'foo.bar/x
05:38Scriptorright, I was thinking that by just returning the result of the map it would prevent it from getting embedded in the extra list
05:38clojurebotHuh?
05:38raekScriptor: map always create a sequence
05:39Scriptoryea, 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
05:39raeksince it applies the function _to each_ element in the input sequence
05:41Scriptorthanks again, raek!
05:41Scriptormy little debugging tool is starting to take shape
05:57devnmap a function over a function and get function composition
05:57devngah, can't sleep, time to try again, cheers
06:23broquaintI'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
06:23broquaintDoes that look familiar to anyone?
06:27ejackson,(map Math/abs [-1 -2 3])
06:27clojurebot#<CompilerException java.lang.RuntimeException: Unable to find static field: abs in class java.lang.Math, compiling:(NO_SOURCE_PATH:0)>
06:27ejacksonwhy's that ?
06:28ejackson,(map #(Math/abs %) [-1 -2 3])
06:28clojurebot(1 2 3)
06:28ejacksonworks
06:34broquaintBecause it's trying to access it as a static property rather than a method (I think).
06:35ejacksonyeah I'm not sure how to be explicit with it though
06:36ejacksoni would have guessed
06:36ejackson,(map (. Math abs) [1 2 -3])
06:36clojurebot#<CompilerException java.lang.NoSuchFieldException: abs, compiling:(NO_SOURCE_PATH:0)>
06:37ejacksonbut no dice there either
06:37tscheibl,(map (. Math (abs)) [1 2 -3])
06:37clojurebot#<CompilerException java.lang.IllegalArgumentException: No matching method: abs, compiling:(NO_SOURCE_PATH:0)>
06:37tscheiblseems to be a static method
06:39gjuyes, there are only static methods in java.math
06:39ejacksonis this general, that you can't map static methods ?
06:39ejacksonor otherwise do more than just apply them, I guess that makes some sense
06:41gjui think you need an object as the first parameter of . and since math is a class that makes sense, i guess.
06:41broquaintIt seems like the interop expects args to invoke a method - http://clojure.org/java_interop
06:41broquainti.e Classname/staticField vs. (Classname/staticMethod args*)
06:54broquaintSorted my cljs-build problem by upgrading lein by the by (should've read the github issues before making noise).
07:04cemerick,(map #(Math/abs %) [1 2 -3])
07:04clojurebot(1 2 3)
07:05cemerickoh, ejackson already got that
07:05ejacksonchicken feet, dude.
07:05ejackson:)
07:05cemerickheh, yeah
07:05clgvcemerick: I like the Math/abs style better so yours is worth to mention
07:06cemerickActually, a good-looking rooster on the cover would have been pretty neat.
07:06cemerickclgv: yeah, any static method/field interop that uses . looks warty to me.
07:06ejacksonYES !
07:06cemerickWe had no control over the animal chosen.
07:07ejacksonyeah, cgrand told me
07:07cemerickI was trying to pitch for leaf-cutter ants, but alas
07:07ejacksonI would have claimed to have been viciously scarred by a painted snipe in my youth...
07:07clgvcemerick: ah your book will be released in april?
07:07cemerickclgv: whenever it plops out of the O'Reilly machine, honestly
07:08clgvcemerick: amazon says april ;)
07:08cemerickTheir own catalog says March, Amazon says April, and the people we have contact with have no further information :-P
07:08Apage43oh
07:09Apage43just read the draft today
07:09Apage43won't the reduce functions on the couchdb break since they don't account for rereduce?
07:09Apage43*couchdb chapter
07:10gjuwhat book are you talking about?
07:10Apage43http://clojurebook.com/ I'm assuming
07:10ejacksonyup,
07:10BahmanHi all!
07:11BahmanIs there any Clojure'ish way to this problem? http://stackoverflow.com/questions/991489/i-cant-delete-a-file-in-java
07:12ejacksonso datomic, huh.
07:12BahmanI'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.
07:13clgvBahman: just have a look in the java apis. I think deleting files is available as function nio2
07:13clgv*function in nio2
07:14ejacksondataomics: the field of study of all data !
07:14ejacksonbut, given the provenance, I'm guessing it means something else.
07:14clgvBahman: honestly I dont understand why you write to a file that you want to delete instantly thereafter
07:15Bahmanclgv, it's a temp/buffer file. I need to copy the contents to a final file and delete the temp one.
07:15cemerickApage43: you're quite right
07:15BahmanChecking javadocs.
07:15cemerickgood catch
07:17Bahmanclgv: By nio2 you mean java.nio ?
07:17clgvBahman: no. nio2 was added in java 7 and had some more file centered classes
07:18BahmanAaah. Using 1.6 here :-S
07:18clgvBahman: 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
07:19Apage43cemerick: 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.
07:19Bahmanclgv: 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.
07:19clgvBahman: you have a sample of your code?
07:20BahmanYes....let me put it on pastebin.
07:20cemerickApage43: sure; though technically, rereduce can happen with any data size, especially in a distributed implementation like bigcouch
07:21Bahmanclgv: http://pastebin.com/KDG2zTBv
07:23Apage43ah right. I wasn't even considering what happens at query time, only generation time.
07:23cemerickApage43: I'll try to think of a reasonable bug bounty. :-)
07:25G0SUBejackson
07:25ejacksonG0SUB: BG !
07:25G0SUBejackson, howdy!
07:25G0SUBejackson, will I be meeting you at Clojure/West?
07:25ejacksonsadly not man,
07:25clgvBahman: 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
07:26G0SUBejackson, Ok, need to think about submitting a talk at EuroClojure then :-)
07:26ejacksonYES!!
07:26G0SUBejackson, how's work going on?
07:26ejacksonI'll definitely be there
07:27ejacksonG0SUB: Check your pms, I don't wanna incur the Wrath of Chas by spamming up #clojure :)
07:27G0SUBlol
07:27Bahmanclgv: 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 :-)
07:28BahmanMaybe I just need to do something like ` index-is=null ` in Java.
07:28BahmanBut what is the equivalent of that in Clojure (if any)?
07:28clgvBahman:hm well, I cant dig into that api right now. but I hope the explanation of with-open above helps you on your way
07:29Bahmanclgv: thanks for your time :-)
07:30clgvBahman: so your stream will be closed but maybe that isnt sufficent for deleteOnExit to work...
07:31Bahmanclgv: 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.
07:32clgvBahman: 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.
07:32cemerickejackson: meh, I've no wrath, and certainly no Wrath ;-)
07:32ejacksoncHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAS
07:33Bahmanclgv: 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
07:33clgvO_O
07:34cemerickhrm, I *do* have a fondness for Shakespeare...
07:34ejacksonhehehehe
07:51_uliseshey 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
07:54jimdueyejackson: good morning or whatever time of day is appropriate
07:55ejacksonhey jimduey :)
07:57tomoj_ulises: (setq slime-net-coding-system 'utf-8-unix)
07:57_ulisestomoj: thanks, let me try
07:57tomojthen reconnect
07:58_ulisesthat did it, yay!
07:58r4vir4
08:00xumingmingvhello
08:00xumingmingvanyone tell me how to debug clojure in eclipse?
08:00xumingmingvany plugin?
08:06dan_banyone here in London?
08:06ejacksoncambridge
08:06ejacksonhave fun
08:07dan_bmaybe learn to type, too. who knows?
08:13G0SUBdan_b, unfortunately that's a prerequisite.
08:17clgva 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?
08:19morphlingclgv: no
08:21ejacksonthat's a bummer, I destructure everywhere
08:25clgvejackson: well as with anything else this will only matter in hotspots
08:25clgvor bottlenecks^^
08:25ejacksonyup
08:27clgvI didnt really understand why it's slower.
08:27morphlingi wonder if there's any documentation why it's done the way it is
08:27morphling,(macroexpand-1 '(let [{a :a} {:a 5}] a))
08:27clojurebot(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)
08:29morphlingthe ... is (clojure.core/get map__30 :a)
08:32clgvmorphling: ah the (if seq? ..) is for option destructuring in defns
08:37morphlingclgv: ah, thx, that makes sense
08:49gtrak`god, can we do something about http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html ?
08:49lazybotThe 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.?
08:51gtrak`I intercepted a guy on twitter that was about to give up clojure because that didn't work.
08:52mdeboardYeah that almost screwed me up too
08:53gtrak`does amazon tell you when people reply to your comments?
08:53fliebelgtrak`: 1) Ask them to take it down 2) apply negative SEO? ( bad idea)
08:53gtrak`he has a book review :-)
08:53r4viI have cloju.re - maybe i'll stick uptodate tutorials on there
08:53r4viim sure they'll rank pretty good on goole
08:54gtrak`I'll shoot him an email
09:00gtrak`maybe I should just make one that's more up to date
09:00mdeboardYeah
09:01mdeboardgtrak`: Get people to link to it: submit to HN, reddit & twitter
09:01gtrak`yea
09:01mdeboardgtrak`: That's a better solution
09:06clgvgtrak`: dont forget the shortcut for non-emacs people - install Eclipse + CCW plugin and you are done for first experiments ;)
09:10the-kennyThis isn't a shortcut. Starting eclipse takes hours.
09:15ungamedplayeris the programming clojure book (pragprog) too outdated to be useful as a learning tool ?
09:16gtrak`clgv, I use eclipse for java 40-hours a week, emacs is a breath of fresh air, especially with clojure
09:17gtrak`ungamedplayer, why not just get a newer one?
09:17ungamedplayergtrak, house repayments.
09:17tsdhIs 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?
09:18ejacksonungamedplayer: i still refer to it
09:18gtrak`joy of clojure is pretty serious, but still a little out of date now
09:19ungamedplayeri googled the question before i asked, its just given me a very mixed bag of responses.
09:19ungamedplayeri'll start with the web based stuff, see how far i get.
09:20gtrak`I think I got much more out of joy of clojure than I got out of 5 wendy's combo meals
09:21clgvthe-kenny: really? not here and this pc is about 4 years old now
09:21tomojtsdh: no. why do you want to capture the output?
09:22tomoj(at least, I can't think of a better way..)
09:22tsdhtomoj: I'd like to have a variant of `time' with custom format string.
09:22tomojah :)
09:23tomojI'd just write it from scratch
09:25tomojtime's behavior has always seen.. broken to me. but is there a better alternative?
09:25tomojer, s/seen/seemed/
09:30harrisondo you object to the irreversible asymmetry of time?
09:30harrisonits ineluctable flow?
09:31harrisonthe inevitable withering of mortal flesh?
09:32ungamedplayerthe rate of one second, per second always bugs me.
09:32harrisonyou might as well ask for another dimension of space
09:32harrisonor one fewer
09:32ungamedplayeri have was closed NOTABUG.
09:33ungamedplayeri have, was closed NOTABUG.
09:47gtuckerkelloggI'm just getting familiar with leiningen, but not familiar enough.
09:47gtuckerkelloggi keep having the same stupid problem
09:48tsdhtomoj: If you're interested: https://gist.github.com/1932917
09:54clgvtsdh: why do you use promise+deliver there?
09:55babilengtuckerkellogg: You might want to provide more details if you want us to be able to help you.
09:55gtuckerkelloggOK :-)
09:55gtuckerkelloggit was so low traffic I wasn't sure anyone was paying attention.
09:55tsdhclgv: I didn't know a better way to get the value of evaluating form inside with-out-str.
09:56clgvtsdh: ah you mean since it might be lazy?
09:56gtuckerkelloggbasically, i'm trying to replicate the tutorial at the leiningen github site
09:56clgvtsdh: no it can be lazy as well.
09:56gtuckerkelloggit's as simple as it gets, and it all works when it's in the source area
09:56gtuckerkelloggso i can "lein run" just fine
09:57gtuckerkelloggand "lein uberjar; java -jar <uberjar-file> args"
09:57ungamedplayergtuckerkellogg, i have just finished, whats the problem ?
09:57gtuckerkelloggthat all works
09:57ungamedplayerok
09:57tsdhclgv: no, because with-out-str returns just the output string but not the value of its body.
09:57gtuckerkelloggbut when I "lein install" and try to run it from ~/.lein/bin, it complains "Exception in thread "main" java.lang.NoClassDefFoundError: clojure/main"
09:58clgvtsdh: when you are writing your own macro, you can just implement time measurement yourself via (System/nanoTime)
09:58gtuckerkelloggI'm not at all familiar with maven; I come from an R/Perl/Ruby background, not java
09:58gtuckerkelloggso i'm sure my ignorance is manifest
09:58clgvclgv: it's even less code than the current approach ;)
09:58clgvlol tsdh ^^
09:59tsdhclgv: Hm, right. That would possibly be much better than misusing `time'. :-)
09:59ungamedplayergtuckerkellogg, python/erlang guy here.
09:59gtuckerkelloggungamedplayer, i put a gist about it https://gist.github.com/1932895
10:00ungamedplayerreading.
10:01clgvgtuckerkellogg: you seem to not be using keywords in your project.clj, e.g. :dependencies instead of dependencies
10:03clgvtuckerkellogg: 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:03gtuckerkelloggcljv, that's just a mistake in the way the org-file is formatting on github. They are keywords in the file
10:04gtuckerkelloggclgv, 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:15clgvgtuckerkellogg: I never used install on a jar with a main-Method yet. I only used it for libraries...
10:15gtuckerkelloggoh, ok
10:16clgvgtuckerkellogg: when I want to run the program standalone, I build an uberjar. otherwise I use lein run or lein repl
10:17clgvor my IDEs repl...
10:20gtuckerkelloggto 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:21gtuckerkelloggwhat'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:22gtuckerkelloggclgv, thanks for the insight, btw.
10:23harrisonYou have done wrong but we will be "leinient" thsi time.
10:23harrisonthis time
10:26raekgtuckerkellogg: the shell wrapper should include clojure on the classpath
10:27gtuckerkelloggraek, thanks.
10:27gtuckerkelloggmaybe it doesn't
10:27raekgtuckerkellogg: what does the generated shell wrapper file contain?
10:28raekfor 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:29raekso clearly my project and clojure itself is on the classpath for me
10:30technomancygtuckerkellogg: 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:30gtuckerkelloggthe shell wrapper is exactly the same as the default wrapper except for the subs
10:31raektechnomancy: FYI, shell wrappers have been useful for me (so someone is actually using them)
10:31gtuckerkelloggdamn that works.
10:31gtuckerkelloggthe default shell-wrapper does not include the clojure.jar CLASSPATh
10:31gtuckerkelloggif i add it to the wrapper explicitly, it works
10:32gtuckerkelloggraek, thank you
10:32technomancyraek: I think shell wrappers would be a lot more useful if they didn't require Leiningen to get installed in the first place
10:33raekgtuckerkellogg: do you have anything in your project.clj file that could cause the clojure dependency to be excluded somehow?
10:33technomancyI wonder if most of their use cases could be covered by one of those crazy shell/jar hybrid files
10:33gtuckerkelloggno, i don't think so
10:34gtuckerkelloggmy project.clj started as a direct copy of the one at https://github.com/technomancy/leiningen/blob/master/doc/TUTORIAL.md
10:34gtuckerkelloggthe only changes I have made were attempts to get the shell script to work after what I copied didn't
10:37gtuckerkelloggthank you all, and good night
11:38horatio_cromwellout of the current crop of books/online material, what would you recommend as the best way to get started with clojure
11:42tmciverhoratio_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:48horatio_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:50ejacksontmciver: you can't go wrong, just get a book and start coding
11:50tmciverhoratio_cromwell: I would stay away from the first edition. Enough has changed that the first edition is outdated.
11:50horatio_cromwelltmciver: cheers
11:51dan_bok, 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:51horatio_cromwelldoes clojure have good libraries for bit twiddling and handling of binary data
11:51dan_bonly 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:52dan_bis that important or just annoying?
11:52stuartsierradan_b: just annoying
11:52dan_bVersions differ: 2009-07-27 (slime) vs. 20100404 (swank). Continue? (y or n)
11:52stuartsierrahoratio_cromwell: no
11:53stuartsierradan_b: Put this in your .emacs:
11:53stuartsierra(eval-after-load 'slime
11:53stuartsierra '(setq slime-protocol-version 'ignore))
11:53dan_bConnected. Lemonodor-fame is but a hack away!
11:53clgvhoratio_cromwell: as much as java has
11:53dan_bhaha. i remember lemonodor ...
11:54stuartsierrahoratio_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:55dan_bstuartsierra: thanks. unsightly but not deletorious then
11:55stuartsierrayeah
11:56dan_bs/deletorious/debilitating/ maybe
11:56stuartsierraIt's because the upstream SLIME distribution doesn't ever do versioned releases, just timestamps from CVS.
11:56tmciverhoratio_cromwell: also, check out gloss.
13:05ssedanoin data.xml how can I retrieve the value of a tag's attribute?
13:06ssedanoI 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:11dan_bok, london clojure dojo here I come
13:20ssedanonevermind, done
13:25technomancyreplaca: hey; how hard would it be to get a pprint dispatch that works nicely on defproject?
13:44ibdknox|awayquiet morning
13:45technomancyeveryone's taking a breather after the rush of news yesterday?
13:45Bronsawhich news?
13:46drewrBronsa: datonical clubuntu: linux on clojure
13:46drewrthe lisp machine is back
13:47Bronsai am quite sure you are not being serious about this
13:47drewrBronsa: just a guess
13:48technomancydidn't you see the news about clojure compiling to arc?
13:48gtrak``does canonical care about clojure at all?
13:48technomancyMenTaLguY might know
13:48technomancyI would guess no?
13:49ibdknoxBronsa: clojure book is finished, datomic (a new database?), and my little live game thing
13:50ibdknoxmade a lot of noise yesterday
13:50Bronsaoh, ok
13:51Bronsayour 'little live game thing' is pretty cool though
13:52ibdknoxit's fun :)
13:53dnolenibdknox: a success on reddit, even got people think how it would be to accomplish in C# ;)
13:53dnolenhow hard it would be
13:53ibdknoxdnolen: that made me laugh
13:54ibdknoxRyan Singer got ahold of it and retweeted it too
13:54ibdknoxapparently it got retweeted 45 times
13:54ibdknoxtwitter is a weird little microcosm
13:55ibdknoxfor those interested, my site got about 14,000 pageviews between today and yesterday
13:55ibdknox11,500 were unique
13:56dnolenibdknox: nice!
13:59ibdknoxdnolen: everything else will be boring now though ;) Hard to beat that demo lol
14:00ibdknoxin terms of what to write about next that is
14:03gtrak``you could live-stream a game built in 48 hours of clojurescript
14:04ibdknoxhaha
14:04devnibdknox: gtrak``: YES!
14:04ibdknoxthe nodeknockout... but live in CLJS
14:05gtrak``it would be more fun to watch than notch, and I watched a few hours of that
14:05devnNo I'm serious, you really should do it
14:05devnI think it would be really awesome.
14:05devnHave you watched any of notch's livecoding?
14:05devnIt's really interesting to watch.
14:06gtrak``mostly because it works at all :-)
14:06ibdknoxI would think it would be extremely boring
14:07technomancyibdknox: have you seen peepcode's play-by-plays?
14:07ibdknoxtechnomancy: nope
14:07technomancythey do the whole "put together a whole app in a couple hours" thing
14:08technomancybut they have a back-and-forth conversation between 2 people, and are somewhat heavily edited (though not as heavily edited as regular peepcodes)
14:08ibdknoxI see
14:09technomancyTBH I was a bit bored by the one I watched, but that was mostly because I wasn't too interested in the tech
14:09ibdknoxbasically do it in the style of a football replay
14:10ibdknoxstill think it would be really boring for people to watch lol. I'm not a very interesting coder
14:14ibdknoxmy 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:14mdeboardMan what a fantastic idea
14:15ibdknoxthe only problem is how to control for cheating lol
14:15ibdknoxthe game couldn't be as simple as get to here
14:15Scriptor|wrkwrite your own language for it ;)
14:15ibdknoxbecause you could just modify the guy's position to be there
14:16Scriptor|wrkwell, you could require him to pick stuff up from different waypoints along the way
14:16ibdknoxif I did collision detection the right way, I guess I could ensure that
14:17ibdknoxotherwise I could still just warp myself to the things I need
14:18ibdknoxreally, the only thing I'd have to protect are the player's coordinates and the objectives, I guess
14:21tmciveryou could limit the player's acceleration; warping == infinite acceleration.
14:21ibdknoxtmciver: not a bad idea
14:22tmciveractually, I think I mean velocity.
14:22ibdknoxyou do
14:22ibdknoxbut that's ok :D
14:22ibdknoxboth work in that case really
14:22emezeskeI think warping would imply both infinite acceleration and velocity
14:23tmcivers/admint/admit
14:23ibdknoxemezeske: 1 tick is a unit of time so not really infinite
14:24emezeskeAh, that's sensible
14:24ibdknoxin any case, as long as I don't let you directly set the position, it seems that problem is solved
14:25ibdknoxI guess you could still modify your speed to get you there "instantly" but I actually think that would be really boring for you
14:25ibdknoxlol
14:26emezeskeMaybe you can accelerate as fast as you want, but it's potentially dangerous for your character
14:26emezeske"Oops, your internal organs just turned to applesauce"
14:26technomancy"No no, light speed is too slow. We need ludicrous speed."
14:26emezeskeSmoke if ya gottem
14:26ibdknoxhaha
14:26pandeiroibdknox: how long did the game editor take you, out of curiosity?
14:26ibdknoxI haven't seen that in a long time
14:26ibdknoxpandeiro: 7ish hours
14:26ibdknoxI lost around 2 to the damn class file thing
14:27ibdknoxspeaking of.. technomancy is there a way to prevent .class files from being created?
14:27technomancydon't compile?
14:27ibdknoxI'm just doing lein run
14:28ibdknoxI assume that implicitly compiles?
14:28technomancynah
14:28technomancyibdknox: you can tag it to do otherwise: :main ^{:skip-aot true} mine.main
14:28technomancyor just use lein run -m whatevs.bro
14:28ibdknoxfantastic
14:29ibdknoxsuch a simple fix
14:29ibdknoxtechnomancy: thank you sir
14:29technomancyin lein2 you'll be able to alias "lein go" to "lein run -m whatevs.dude" with partially-applied aliases
14:30technomancynp
14:31ibdknoxemezeske: that would be a cool mechanic though
14:31ibdknoxhave some constraints actually placed on the guy/world so that you can't do anything too ridiculous
14:34emezeskeYeah, it strikes me as a decent way to limit a lot of stuff, without being too arbitrary
14:49_ulisesevening folk
14:56ibdknoxthinking more about it
14:56ibdknoxthe 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:56ibdknoxnot the whole thing
15:02ibdknoxmanaged to get it working from a jar: https://github.com/ibdknox/live-cljs/downloads
15:03gtrak``no closure compiler, right?
15:05ibdknoxyep
15:05ibdknoxjust java -jar live-cljs.jar
15:06gtrak``err, i mean, how's it compiling cljs without it?
15:06ibdknoxoh
15:06ibdknoxit has it in the uberjar
15:07ibdknoxit just takes a dep on the cljs compiler
15:07ibdknoxwhich includes it
15:22muhoonice it seems to work from inside lein repl now!
15:27clj_newbis there any periodic process like clojure proj?
15:27muhoothough the repl part doesn't seem to. it's locking up the repl completely.
15:30muhoooh, here it is. it was just slow
15:30muhoofirefoxx using 85% of CPU :-)
15:36muhoowell that was fun. https://refheap.com/paste/887 caused ff to flip out
15:44muhooibdknox: is it even possible to have a cljs repl connected to the browser while the live-cljs thing is running?
15:44muhooor would that cross the streams and melt the space-time continuum?
15:45dbushenkohi all!
15:45dbushenkowhich clojure lib do you guys use for logging?
15:45dnolenmuhoo: use is not a function in CLJS
15:47hiredmandbushenko: clojure.tools.logging + logback-classic
15:48muhoowell that's not cljs
15:48muhoothat's clj. cljs starts up at the end of that
15:48muhooand.. locks up.
15:49clj_newbwhat is the best way to iterate indefinetely ? infinite lazy-seq or a plain while true or (loop (recur))?
15:49technomancyclj_newb: depends if you want new locals each time
15:50clj_newbmmm, where can I read about it?
15:50clj_newbno I don't want new local vars every time
15:53clj_newbthere is also the iterate function is it?
15:59clj_newbso with recur being stack constant, no new locals are allocated?
15:59raekyes
16:00clj_newbit is the best option to perform an infinite loop then?
16:00raekI guess so. (loop [] (do-something) (recur)) would be the most minimal way, I think
16:00brehaut,(while true)
16:01clojurebotExecution Timed Out
16:01brehaut;)
16:01raek,(macroexpand '(while true (do-something)))
16:01clojurebot(loop* [] (clojure.core/when true (do-something) (recur)))
16:02clj_newbgot it
16:02brehautit'd probably be nicer to write 'forever' which doesnt include the when
16:03clj_newbthank yo!
16:03clj_newbyou*
16:04brehautor alternatively, keywords are true so (while :forever (do-something)) could work too
16:13pjstadigcan someone explain to me why Rich removed checked exceptions from Clojure's Java code base?
16:14RaynesI'd expect it was because of the way the stars were shining that night.
16:15brehautRich is a mythos cultist‽
16:16infosophyIä! Iä! Clojure Fthagn!
16:17pjstadigcause I can't come up with any valid reason myself
16:17pjstadigbut i suppose i lack imagination
16:18pjstadigit's causing a bloodbath in my code though, when trying to upgrade to 1.3
16:24brehautdevn? huh?
16:25devnI'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:25brehautdevn: oh right. sorry :)
16:25devnor rather, they eventually time out, but some of them like [map inc (range 1e6]]
16:25RaynesHeh
16:26devni 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:27Raynesdevn: Perhaps setting the timeout really low would help?
16:36Scriptor|wrkamalloy: so, I took a crack at that debugging expressions idea: http://github.com/Scriptor/clj-here
16:37m0smithibdknox: I am having a problem creating a noir war file
16:37Raynesibdknox: I am having a problem having a problem.
16:38amalloyScriptor|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:40Scriptor|wrkamalloy: actually, it makes sure that the N for each argN matches up correctly
16:41Scriptor|wrkit just makes sure reduce goes through it in the right order
16:42amalloywhat do you mean, matches up?
16:42Scriptor|wrkso, without the reverse ARG0 becomes the key to the last argument, ARG1 the penultimate, and so on
16:43Scriptor|wrkwith reverse ARG0 points to the first argument in the function call
16:43Scriptor|wrkonce the hash is created it doesn't matter what the order for that is, as long as the key names are correct
16:44amalloyi guess i don't see why args is in the wrong order, then, but i guess that's a separate problem
16:45duncanmhey technomancy
16:45Scriptor|wrkbecause I decided to make args a list and conj the last arg to the beginning
16:45Scriptor|wrkbecause it's easier to destructure that way
16:45duncanmtechnomancy: are you maintaining SLIME on elpa/marmalade?
16:46Scriptor|wrkit does mean that I have to reverse when I actually use it, but it seems to be worth it
16:46Scriptor|wrker, and the destructuring is so that I have easy access to the latest arguments that were added, which is usually what is debugged
16:47amalloyjust use a vector and pop from the end?
16:47amalloyor peek at the end, i suppose
16:50Scriptor|wrkwould 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:52amalloyjust...take args, as a vector. instead of argx print (peek args)
16:52amalloydestructuring in arglists is kinda tacky anyway
16:52infosophywhat is the currently recommended version of lazytest?
16:54TimMcamalloy: Bah, nonsense. It's self-documenting code!
16:54TimMcinb4 "just like all code"
17:02devnRaynes: *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:03devnRaynes: there are some computationally intensive things that dont produce giant sequences but are good examples, for instance
17:03devninfosophy: are people using lazytest? I guess all i hear about these days is midje
17:04technomancyduncanm: I wouldn't really say I'm maintaining it
17:04technomancybut I'm the closest thing it has to a maintainer if that's what you mean
17:04technomancyif it were facebook, our relationship would be "It's complicated"
17:04duncanmheh
17:04duncanmtechnomancy: 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:05duncanmhttps://github.com/swank-js/swank-js
17:05duncanmswank-js
17:05duncanm"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:06technomancyyeah... this situation is a mess, and it will continue to be a mess until the slime developers learn how software releases work =\
17:06Scriptor|wrkamalloy: 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:06Scriptor|wrkaaaand I preferred destructuring to that
17:06technomancyduncanm: I recommend using M-x clojure-jack-in to load slime for clojure
17:07Scriptor|wrkso really, almost no reason other than I wanted to destructure
17:07duncanmtechnomancy: i've been out of the clojure scene for a while, if i use clojure-jack-in, which slime does it load?
17:07technomancyduncanm: it uses the same revision of slime that is on marmalade, but it loads it on-demand
17:07amalloybut...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:07infosophydevn: I love midje. But see no reason not to use both.
17:08Scriptor|wrkamalloy: I might in the future, only a few basic things have been added so far
17:08Scriptor|wrkhow would it be as gross?
17:08technomancyduncanm: 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:09amalloyScriptor|wrk: i'm probably just an opinionated old curmudgeon
17:10amalloybut seriously, you can destructure a vector from either end easily
17:10duncanmtechnomancy: does clojure-jack-in leave a version of slime inside $HOME/.emacs.d/site-lisp or something like that?
17:10amalloy&(let [v [1 2 3 4 5], [last butlast] (rseq v)] (+ last butlast))
17:10lazybot⇒ 9
17:10technomancyduncanm: inside ~/.emacs.d/swank but not on the load path
17:10duncanmahh
17:10amalloyand putting your argument list in reverse just so you can destructure easily is disgusting IMO
17:11technomancyduncanm: but the fact that it writes them to disk is only an optimization
17:11Scriptor|wrkwell, it just made sense to me since it's the first few items that would be most accessed anyway
17:11technomancyit used to send it all via stdout
17:12duncanmtechnomancy: without writing it to disk, you'd have to download a fresh copy of SLIME every single time you 'jack-in'?
17:12technomancyduncanm: FSVO "download"
17:12technomancyyou would have to load it from the jar into your emacs instance
17:12tylergilliesoh nice i need to use FSVO
17:12technomancyand that worked fine for a time, it was just slow
17:13tylergilliesi usually say "for certain definitons of" but i like "values" better
17:13ihodes(between homework assignments, some spam; i'm still looking for any cool companies/startups on the west coast interested in a clojure hacker)
17:14ihodes(or not just clojure, but whatever :)
17:20tylergilliesihodes: for free? :)
17:23cemerickihodes: readyforzero just posted an ad
17:24RaynesI'm Ready For -1
17:24Raynesibdknox: Your turn, sir.
17:38ihodestylergillies: haha nooooo, i'm afriad i need to eat
17:38ihodescemerick: thanks--i'll check 'em out :) they look interesting at first glance
17:41jhultenIs the call stack available in Clojure? Does a function know what called it?
17:42technomancyjhulten: you can construct a new Throwable without throwing it and inspect its stack trace
17:42amalloyno
17:42amalloyif you try really really hard and don't mind being a horrible person, you can fake it (see: technomancy)
17:43technomancyhah
17:45TimMcdevn: Luckily, you only have to run each infinite loop form once, since you are deduplicating. (RIGHT?)
17:47m0smithjhulten: (.getStackTrace (Thread/currentThread))
17:58ibdknoxihodes: RFZ is definitely looking for folks :)
17:58ibdknoxm0smith: what's wrong with the .war?
18:00m0smithibdknox: I think I figured it out. I have to require the views AND call server/load-views-ns
18:01ibdknoxhm
18:01ibdknoxthat doesn't make sense
18:01ibdknoxthe former is what the latter attempts to do
18:01m0smith(:require [noir.server :as server][flirtinator.views.welcome])
18:02m0smith(server/load-views-ns 'flirtinator.views)
18:02ibdknoxis welcome your only view?
18:02m0smithyes
18:02ibdknoxshouldn't need to do the load-views-ns call then. Werid
18:02ibdknoxI don't pretend to understand tomcat though
18:02m0smithibdknox: It is deployed here http://m0smith.jelastic.servint.net/
18:03ihodesibdknox: 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:09gtrak``m0smith: I need this app
18:10m0smithgtrak: :)
18:10gtrak``if you can automate this, my life is much improved
18:11ibdknoxhaha
18:11m0smithdefine "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:12gtrak``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:12gtrak``m0smith: maybe borrow some concepts from http://en.wikipedia.org/wiki/Spaced_repetition
18:13m0smithgtrak: 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:14hiredmanactually I started on something to generate events that on average happen every x days for my calendar
18:14hiredmane.g. the closer to 15 days it is since the last time the last event happened the more likely it will happen again
18:15hiredmanfor reminding me to buy flowers
18:15m0smithIt 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:15gtrak``I tried the spring mvc thing, and even with annotations it's twice the code-size for no gain
18:16gtrak``the annotation-based configuration approaches closures asymptotically
18:17m0smithkinda except it strill requires a java support to structure it
18:19gtrak``for example, adding spEl
18:22m0smithI 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:22m0smithI see you rpoint
18:22gtrak``meh, like I said, it's a hack
18:23gtrak``and I think clojure the language is smaller than spring-core?
18:24m0smithI think you are right especially when you consider all the other stuff it takes to make spring MVC run
18:26m0smithMy Spring MVC war file it 62MB while the Clojure/Noir one is 6MB
18:26gtrak``woah
18:32nickmbaileyibdknox: any idea why i can't run 'lein nailgun &' using your lein-nailgun plugin?
18:32ibdknoxnot with that little information ;)
18:32ibdknoxwhat's it do?
18:32nickmbaileynot much
18:32nickmbaileyNicks-MacBook-Pro:agent nick$ lein nailgun &
18:32nickmbailey[5] 42048
18:32nickmbaileyNicks-MacBook-Pro:agent nick$
18:32nickmbailey[5]+ Stopped lein nailgun
18:32nickmbaileyrefuses to background
18:33ibdknoxdoes it work FG?
18:33nickmbaileyyep
18:33ibdknoxno idea
18:33nickmbaileyi can foreground it after running with '&' and it works
18:33ibdknoxit works in the background for me
18:33nickmbaileybollocks
18:33ibdknoxI really hope kotarak releases the new client soon so we can fix this nonsense
18:34nickmbaileyoh is one in the works?
18:34technomancyyou mean switching to nrepl?
18:34ibdknoxtechnomancy: yeah
18:34ibdknoxnickmbailey: he wrote a haskell nrepl client to use for it
18:35nickmbaileyawesome
18:36nickmbaileyibdknox: do you run on osx? linux?
18:36ibdknoxos x lion
18:36nickmbaileywell shoot
18:44nickmbaileywell apparently i can start it the foreground, suspend it, then background it
18:44nickmbaileyso i guess i'll go with that
18:47amalloyif it won't run in the bg it's probably trying to do some console i/o
18:47amalloyand blocking on that because it doesn't have control of the console when it's in the background
19:08KowboyI am looking for a clojure library I found quite some time ago
19:08Kowboyit is a nosql database writting in clojure
19:08Kowboymight even be an in-memory database
19:09Kowboybegan with an f
19:09Kowboyfound it
19:09ibdknoxfleetdb
19:09KowboyFleetDB
19:09Kowboyadding "in-memory" pulled it up in the search results
19:16tylergilliesisn't clojure an in-memory database in itself?
19:17tylergillies;)
19:17nickmbaileyits a codebase
19:17nickmbaileycode=data
19:17nickmbaileyso yes
19:18tylergilliescode != data
19:18tylergilliesbecause not all data is code
19:19tylergilliesbut thats more semantics than anything ;)
19:19nickmbaileys/semantics/pedantics/ :)
19:26Kowboywhat is the simplest Java SQL database for a prototype project?
19:27Kowboyhsql or derby?
19:28Kowboythis is a nice summary of options http://java-source.net/open-source/database-engines
19:29scottjdoes cljs still only work with sun jdk?
19:36technomancyscottj: I don't think so
19:41ibdknoxscottj: it plays well with everyone now
19:48scottjibdknox: 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:49ibdknoxscottj: readme
19:49ibdknoxno one reads the readmes :p
19:49ibdknoxscottj: the latest pull should have that fixed now though :)
19:50scottjibdknox: they don't read the readme when you say in your post "all you have to do is..." :)
19:52seancorfieldall you have to do is read the readme? :)
19:52ibdknoxhaha
19:52ibdknoxthat should actually be true now :)
19:53scottjibdknox: btw the two panels aren't side by side on my 1400px screen.
19:53ibdknoxI fixed the sizes for my screen
19:53ibdknox1440x800
19:54ivanso, has anyone written a reStructuredText that works in Clojure yet?
19:54ivanpreferably without all the problems
19:56Kowboywhy doesn't this work? (apply new [FileRecord 1 2 3 4 5 6])
19:56Kowboyor even (apply FileRecord. [1 2 3 4 5 6])
19:57technomancyKowboy: apply only works on functions
19:58Kowboyso I have to wrap it then
19:58Kowboyor do it manually
19:59technomancyI think you have to know the arities up front
19:59technomancybut I don't use records, so don't listen to me
20:01technomancyniiice: https://mobile.twitter.com/plt_borat/status/174585616502231040
20:03gf3hola, for some reason I'm having an issue catching exceptions in clojail, has anyone experienced this?
20:06scottjibdknox: 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:07ibdknoxscottj: 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:08ibdknoxwith some constraints, like moving too fast will cause your guy to disintegrate due to friction or whatever
20:10technomancycumulative speed: to fast to live http://images.wikia.com/scottpilgrim/images/a/af/Disin.png
20:10alexbaranoskyif I have a macro inside of a (binding ...) can the expandion of the macro depend on the var being rebound?
20:10alexbaranoskyor will it ignore the new value of the bound var, because the rebinding is happening after the expansion?
20:11ibdknoxtechnomancy: lol
20:11hiredmanalexbaranosky: binding happens at runtime
20:12ibdknoxis 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:13alexbaranoskyhiredman, yeah, makes sense. Thx.
20:13technomancyibdknox: you mean like (read-string (apply str (take offset my-str)))?
20:13ungamedplayerif i wanted to wrap a processes stdin and stdout in clojure, (interactive, not a once off fire and forget) what should I use ?
20:13ibdknoxscottj: btw I pushed a little css change to force the wrapper size so they won't flow underneath eachother
20:14scottjibdknox: don't see it pushed
20:14ibdknoxgr
20:15ibdknoxis now
20:16ibdknoxtechnomancy: that would just give me EOF's
20:17ibdknoxbasically what I want to do is char 80 was inserted find the the outer-most form and re-eval it
20:17scottjibdknox: doesn't support firefox? add to readme?
20:17ibdknoxscottj: hm? "Works best in Chrome. It runs in FF, but the mouse events don't work"
20:18ungamedplayerfor example, i was thinking something like expect wrapping stdin/stdout
20:18scottjibdknox: my bad, I searched for firefox
20:55hiredmanls
20:55hiredmanpardon me
20:56chewbrancasrc clojure pizza
21:52qbgAny one have experience getting Overtone setup?
21:54tomojI got it set up once, though not in a while, and couldn't help until later tonight
21:55tomojbut note there are a few lurkers in #overtone, someone may be paying attention there
21:58qbgLooks like I might need the jack_lsp installed (I'm on linux)
21:58qbgLets see if that works
22:34simardhow can I update counterclockwise's clojure.jar/clojure-src.jar ? it seems it's still using 1.2.0 and clojure contrib
22:37ungamedplayerhttp://www.4clojure.com/problem/3 <-- can someone tell me if that test is broken, I really expected it to be "HELLO WORLD"
22:38emezeskeungamedplayer: I think it might be giving you a hint ^_^
22:39emezeskeungamedplayer: To answer your question, though, it doesn't seem broken to me.
22:39ungamedplayerok.
22:40ungamedplayeremezeske, test something for me.. does (= (.toUpperCase "hello world") (.toUpperCase "hello world")) work for you ?
22:41ungamedplayeri tried the obvious, (= "HELLO WORLD" (.toUpperCase "hello world"))
22:41ungamedplayerand it doesn't work.
22:41ungamedplayerYou failed the unit tests
22:42emezeskeWell that seems a bit odd. Both of those work for me.
22:42ungamedplayerok, so i'm not an idiot.
22:42emezeskeAre you maybe using a non-english language browser?
22:43ungamedplayernot that i know of.
22:43emezeskeSeems like a bug! Maybe tell team@4clojure.com ?
22:44ungamedplayerFirefox 10.0.1 , character encoding ISO-8859-1
22:44ungamedplayeryeah, i might.
22:45emezeskeFor someone that doesn't know to login to IRC and ask questions, that could be pretty bogus :)
22:46ungamedplayera little frustrating for those that do know too.
22:47emezeskeAye!
22:49ungamedplayerfailing on both chrome and firefox.
22:50gtrak`ungamedplayer, I think 4clojure uses a similar backend to tryclojure, why not try it there?
22:50ungamedplayerok
22:50ungamedplayerworks, returns true
22:55amalloyungamedplayer: you're supposed to fill in the blank, not rewrite the entire expression
23:06tmciveramalloy: 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:07amalloyi was never the lead. chouser started the project, and ryan senior seems to be the one keeping it moving at the moment
23:08tmciverHmm, 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:09amalloyno, 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:40gf3hello all, (still) having an issue catching exceptions from clojail
23:40gf3check this out → http://cloud.gf3.ca/EcqD
23:40gf3any idea?
23:41gf3whoops, typ
23:41gf3+o
23:46jodarohuh
23:46jodaroi guess i haven't been paying attention to scala land lately
23:46jodarosbt is out
23:46jodarobuildr is in
23:46jodarohttp://buildr.apache.org/
23:50devnemezeske: thanks for paredit.vim -- im giving vim a try as a clojure editor for a bit
23:51devni think i killed the GSoC thread
23:51emezeskedevn: Ah, yeah, you should thank Tamas Kovacs though :)
23:52devnemezeske: i would if he were here!
23:52emezeske^_^
23:52devnemezeske: anyway, i once did half the job of extracting paredit.vim from slimv
23:52devnbut you did it, packaged it up all nicely
23:53emezesketrue.
23:54devnman, im going a little crazy though, so used to emacs for clojure development
23:54devnM-) automatic
23:54devnmust learn to ,>
23:54jodarowait, you are leaving emacs for vim?
23:54devnOmmmmm
23:55devnjodaro: i use both at work
23:55Raynesemezeske: I talked to the author of slimv. He wants to separate paredit.vim out soon.
23:55devnjodaro: 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:55emezeskeRaynes: Awesome. I won't have to live in perpetual fear of my branch being behind :)
23:55jodarodevn: sounds reasonable
23:56Raynes...
23:56devnGodspeed emezeske
23:56RaynesDoes everybody I know how to play Starcraft? Seriously, guys.
23:56Rayneshave*
23:56jodaroRaynes: parse error
23:56devnI did for a bit, but no longer
23:56Raynesjodaro: Shhh.
23:56ibdknoxI got bored with it
23:56jodaroive never played it
23:57jodarofor what its worth
23:57Raynesibdknox: Apparently the biggest perk of me going to California is that I get to play it with amalloy and lancepantz. Bah humbug.
23:57jodaroRaynes: are you coming out for clojure west
23:58Raynesjodaro: No. I'm coming out in April to visit Geni.
23:58RaynesAnd LA.
23:58amalloyemezeske: what league/server? might be fun to play with some clojure users
23:59devnhow do i eval a line in vimclojure?
23:59amalloyso never, then, arohner1?