#clojure logs

2012-06-08

00:17johnmn3are there any clj libs that make quick work of compressing and decrompressing zip files?
00:18hiredmanjohnmn3: the jvm comes with the java.util.zip package
00:32johnmn3hiredman: yea, i've been reading the docs on it. Just seems like it could use a wrapper in clojure
00:58muhoowow, a week of work, for 140 lines of code (google apps step2 auth workflow for friend)
00:58muhooheh, of which 40 is just the (:import ...) block
00:59brehautholy crap!
00:59cemerickfor want of an import * ;-(
00:59cemericker, ;-)
01:01muhooshould i make a github project for basically 1 file with 140 loc?
01:01cemerickbeen done for much, much less
01:02muhoook will do. cemerick: had a chance to look at that :session dissoc patch?
01:03muhooi want to deploy an app using friend soon, early next week, and i'd like not to have to cook up my own friend jar
01:04cemerickmuhoo: sorry, not yet. I killed my open source budget earlier in the week. But: why are you so keyed in on getting that slot dissoc'ed?
01:06muhooparanoia, really. i don't like leaving java objects hanging around in session memory, or in couchdb if i use that backend
01:06muhoowhen it comes to security stuff, i get really anal-retentive.
01:06cemerickah
01:06cemerickwell, that particular object is really innocuous
01:07cemerickI'm pretty anal myself in wanting to get that sort of thing cleaned up, but I want to make sure the solution is general enough to be applicable to any other post-workflow cleanup, etc.
01:07muhootrue. i'll have another look at it myself then.
01:08cemerickmuhoo: Thanks for bulling through this step2 workflow; I think yours will be the first third-party friend workflow. :-D
01:09muhoocool, i hope someone may find it useful.
01:09muhooother than me, of course.
01:10muhoois there a wiki for friend i could link it from, so that it could get found?
01:11cemerickI'll add all workflows to the main readme; the openid one will be broken out onto its own shortly, so the table will have at least two rows. ;-)
01:12cemerickmuhoo: I'd like to eventually have something like: https://github.com/bnoguchi/everyauth#readme
01:13cemerickof course, with actual links to the implementing libraries, etc.
01:14muhoobtw, this step2 thing supposedly does oauth2
01:15muhooi like the idea of having an open source budget
01:15cemerickyeah, I saw that claim; I don't know what to make of it at all (i.e. openid + oauth = huh?)
01:16cemerickIt's a new policy experiment on my part. I've been overcommitted w.r.t. open source projects in the past year or so. I'm refocusing business-wise, so certain things need to get trimmed back, at least nominally.
01:17muhoosounds fair. you've done a lot.
01:17muhooright now, when i need money, i go looking for work, then when i have enough, i study or do open source stuff, then when it looks like i might run out of money, or if someone calls me with stuff, i work some more :-)
01:18cemerickheh
01:19cemerickwell, I don't do contract work, so I need to theoretically be unreasonably strict about time expenditures
01:19muhooreally? i thought you were a contract guy
01:19cemerickI've considered seeing what I could put together re: gigs, but it's perpetually uninteresting to me.
01:19cemerickmuhoo: Nah; 100% product since ~2004: http://snowtide.com
01:19muhoofantastic!
01:20muhoothat's where i want to go next: some kind of cloud service thing where i can get people to pay me $20/mo or something each.
01:20cemerickThat's a lie actually; more like ~2006, but everything between 2004 - 2006 was product-related (tweaks, value-add, etc).
01:22muhoothe key to wealth is to make money while you are sleeping :-)
01:23cemerickThe wealthy people aren't hanging in irc while grinding away at the next idea. :-)
01:23cemerickBut, yeah.
01:29muhooah, what to *name* this thing. i refuse to name it clj-step2
01:31cemerickmay I suggest friend-step2? Or perhaps that's too presumptuous. :-)
01:32muhooQQS! if github will let me do that
01:32muhoothat's the texas 2-step: quick-quick-slow
01:32cemerick*never* would have figured that one :-P
01:33muhooi lived a few years in dallas, learned some things.
01:35LoganLKwill a multiple core processor give a benefit (over a single core) to a large amount of futures running?
01:37muhoowell i could have named it bultitude but that's already taken
01:38cemerickLoganLK: yes, as long as each future is doing enough work to warrant the coordination overhead
01:38LoganLKthe future is just a web request.. but i am sending out a lot of them
01:39cemerickyup, perfect
01:39brehautIO counts as work
01:40cemerickLoganLK: you may want to create N * 4 agents, and send-off those requests instead of eagerly creating futures for your entire work queue, etc.
01:45LoganLKcemerick: i'll look into that. thanks. I'm relatively new to Clojure. I watched your screencast then bought your book. Loving it so far :)
01:45cemerickaw, thanks :-)
01:46cemerickLoganLK: There's an example in the concurrency chapter using agents to efficiently saturate CPU and network with web requests.
02:10seancanyone tried to install lein-newnew lately? i just tried lein plugin install lein-newew 0.3.1 and got an exception about the ZIP file being empty...
02:21seancwent back to lein-newnew 0.2.2 and it worked, just fyi
02:33cljnewb01234so I own a copy of "the art of the metaobject protocol:"
02:33cljnewb01234now, I know that this book is important
02:34cljnewb01234what I don't understand is -- what am I going to learn by reading it?
02:34cljnewb01234(it looks litke the type of book that will take time, and I can't just skim)
02:35muhoocemerick: http://github.com/kenrestivo/qqs
02:36cemerickmuhoo: fabulous, will tweet tomorrow
04:30kralnamaste
04:31edoloughlinkral: fáilte
04:55bobryhrm, I have a NullPointerException, resulting from an '(assert ...') in a cljs macro, is this a cljsbuild bug?
04:56clgvbobry: hard to tell without the code ;)
05:10gfredericksI get a maven error when depending on domina :/
05:10gfredericksit says it can't find the clojurescript jar
05:25clgvgfredericks: this are the available versions on clojars: https://clojars.org/domina/versions
05:30gfredericksclgv: yeah, I'm using 1.0.0-beta4
05:30clgvgfredericks: well that's strange then
05:32gfredericksindeed
05:32gfrederickscomputers: they don't work
06:11muhoohmm, doesn't appear to be any way to force lein to grab the latest snapshot version of a jar, if there's no way to get access to the .m2/repository directly, i.e. if on heroku
06:13clgvmuhoo: maybe you can use lein2 as a lib to get the resolve+download-from-clojars part for free
06:13clgvor is that maven already?
06:14muhooi think it's a maven-ism
06:15muhoonote to self: snapshot means DAILY snapshot. no less.
06:15clgvoh. only dates are compared?
06:16muhooonly the day portion, not the time, it appears
06:16clgvah kk
06:25ejacksonhuh, that's interesting
07:18borkdudedid they really expect static typing would -improve- devtime? http://www.cs.washington.edu/education/courses/cse590n/10au/hanenberg-oopsla2010.pdf
07:27ordnungswidrigborkdude: i think that consequent static typing like in haskell or ocaml attracts better programmers that build better software. Which they would do in a dynamicaly typed language as well.
07:32borkdudeRaynes yes, release a new version (does one get notified of closed issues on github)?
07:33disoHi, in a REPL started with clojure-jack-in using (.println System/out "Hello, world!") returns nil but doe'snt print anything, whilst (println "Hello, world!") works as expected. Can somebody reproduce this?
07:33borkdudediso maybe the reply doesn't use System.out but some other stream?
07:34borkduderepl
07:35ordnungswidrigdiso: slime/swank binds *out* to a different stream thatn System/out. This is to send the output to the slime repl.
07:36ordnungswidrigyou can look in the buffer *swank* where System/out should go
07:36disoit uses *out*, yes but in a repl startet with java -cp clojure.jar clojure.main both statements print to the repl
07:36ordnungswidrigdiso: swank rebinds *out*
07:36disoah okay i will look there thank you.
07:37ordnungswidrigdiso: evaluate *out* in the repl and you will see
07:37disoordnungswidrig: sorry was typing and not looking to your answer
07:38borkdude,(identical? System/out *out*)
07:38clojurebotfalse
07:39disothis will help debugging when using java-interop, since calls from the java lib i was using can then say something to me ;-)
07:46disoordnungswidrig: after issuing clojure-jack-in i don't have a buffer called *swank*, did you mean the repl-buffer *slime-repl nil*?
07:48ordnungswidrigno, it is called *swank* but I just notices that stdout doesn't go there any more.
07:49disoso, searching for stdout output
07:50clojurebotGabh mo leithscéal?
08:46disoordnungswidrig: I'have found the following statement: "in swank, System/out is connected to the terminal of the swank server", so when i start the swank manually with lein swank and connect via M-x slime-connect then I can see my System.out.println output there.
08:46ordnungswidrigdiso: hmm, i didn't know that.
08:47ordnungswidrigdiso: jack-in behaves differently
08:48disoordnungswidrig: another statement confirms, that it should go to the *swank* buffer
08:48disoordnungswidrig: so i'll have to dig deeper
09:44borkdude"However, considering the plethora of JVM languages out there, Clojure’s quick capture of even 1% of the JVM developers is somewhat impressive." http://files.zeroturnaround.com/developer-productivity-report/zeroturnaround-developer-productivity-report-2012.pdf
10:01jedmtnman1hey, anyone have a link to that heatmap of keyboard characters in clojure.core? google is failing me.
10:01jedmtnman1or, i am probably failing google
10:03TimMcI'd blame it on Google. Their search stinks these days.
10:03TimMcOr rather, it has gotten very patchy.
10:12sergeydo I get it right that it's better not to write recursive functions in clojure because there's no tail recursion optimisation in JVM?
10:13sergeyand always replace them with either loop/recur or lazy-seq?
10:13S11001001there are other reasons to be recursive than list building :)
10:13S11001001but for those, better yet, the lazy sequence functions
10:14Iceland_JAnd for list building you rarely -need- to use explicit recursion I feel
10:14sergeyfor example I have a function which takes as an argument the number of times of its execution I call it recursively with the decremented argument each time, is that ok?
10:15Iceland_JYou could zip it together with [n-1 n-2 ... 0]
10:16S11001001sergey: perhaps (doseq [_ (range n)] (f ...)) for that; or for functional functions, nth and iterate
10:17borkduderecur
10:17S11001001loop/recur is the worst
10:17borkdudewhy?
10:17clojurebotborkdude: because you can't handle the truth!
10:17clgvwhy???
10:17lazybotclgv: Oh, absolutely.
10:18clgv;)
10:18borkdudeS11001001 what is wrong with loop/recur apart from the fact that you don't often need them because of higher order functions already present?
10:18S11001001it's anaphoric and gets introduced all the time. Imagine writing all your macros using (if-let [~'it ...] ...).
10:20borkdudeS11001001 do you mean it's too "low level"?
10:20S11001001maybe if this problem hadn't been encountered and fixed before in other lisps it would be forgivable
10:21S11001001in short, recur should require a symbolic label which refers to a lexical recur-target
10:23clgvS11001001: you are arguing for a goto? :O
10:23Hodappgoto and functional programming... hmmmm
10:23S11001001clgv: the only difference is that the current recur is a goto (wherever; you pick one, compiler)
10:24borkdudeS11001001 you mean like (recur [a 10, b 11]) ?
10:24borkdudeS11001001 or (recur fn-foo) ?
10:24S11001001(fn blah #_"intros ordinary lexical binding & recur-target binding" [x] do-stuff (recur blah (inc x)))
10:25borkdudeS11001001 hmm, I don't see the problem really
10:25borkdudeS11001001 if you could recur to different targets you could really get a goto-like messy effect
10:25S11001001you *couldn't*
10:26S11001001that's not what the feature is for
10:26S11001001(fn [x] (macro-that-may-intro-recur-target (recur (inc x))) ; where does recur go?
10:26S11001001that's the problem with anaphora
10:26S11001001it's easy to just not use aif et al in your macros, because there's a non-anaphoric variant
10:26S11001001if-let
10:27clgv S11001001: thats specified. it's always the first loop or function that encloses the recur
10:27S11001001but there's no variant of fn that doesn't intro an anaphoric recur-target
10:27Vinzenthow recur-target is anaphoric?
10:27S11001001clgv: yes, and that's what's fixed by requiring a label
10:27gfredericksS11001001: I think any situation like you describe would make it ambiguous to the programmer that he's in the tail position
10:27borkdudeS11001001 what would happen here? (fn foo [x] (loop [a 1] (recur foo 10))) isn't that a bit weird that you could do that
10:27gfredericksnot much consolation though
10:28jolyisn't 'lexical' a better term here than anaphoric since no new identifier is introduced?
10:28S11001001borkdude: compilation failure
10:28S11001001joly: it's an identifier namespace with only one identifier
10:28borkdudeS11001001 so the only thing wrong with loop/recur is being explicit about its target?
10:28borkdudenot being explicit
10:28S11001001borkdude: yes
10:28borkdudeS11001001 ok understood
10:28clgvS11001001: I just compiled a recur form and see that it is transformed into a for loop
10:29S11001001yes
10:29S11001001recurs would still compile into exactly the same thing
10:29borkdudeso the message here is: don't use recur in a macro because you don't know what the target will be?
10:29S11001001no
10:30S11001001the problem is that you can't use fn or loop in your macros without affecting recur calls in bodies given to the macros
10:30borkdudeyes I kind of meant that
10:30clgvS11001001: clojure tells me that 'recur is a special form
10:30S11001001yes
10:31borkdudeS11001001 ah, wait, you are saying don't write a macro that contains recur
10:31S11001001a macro call
10:31borkdudeS11001001 right
10:31S11001001so, try to write some lisp without using any macros
10:31VinzentI don't understand - if a macro expansion contains recur, then it also contains enclosing fn or loop. What's the problem?
10:31clgvrecur is no macro
10:32S11001001Vinzent: (fn [x] (macro-that-may-intro-recur-target (recur (inc x))) ; where does recur go?
10:32borkdudeS11001001 Vinzent yes, I guess a good "bad example" would help here
10:32borkdudeS11001001 what are the macros that could intro recur targets? only look?
10:32borkdudeloop
10:32S11001001fn
10:33borkdudeis fn a macro?
10:33S11001001yes, but even if it wasn't
10:33S11001001any macro using fn to wrap a body would also intro a recur target
10:33S11001001like future
10:33borkdudeok so (fn [x] (fn [x] … (recur …)) -> this will be clear to the writer what the target is
10:34VinzentS11001001, well, if the doc string of the macro says that it introduces recur target, then to macro-that-may-intro-recur-target; otherwise, to fn. Ideally it should be like that :)
10:34tmciverS11001001: I think your example may be a little contrived; why would you write a recur as arg to a macro?
10:34borkdude(fn [x] (loop .. (recur ..)) also clear. have a good example where it really goes wrong?
10:35Vinzenttmciver, well, one could do that and no exception will be throwed, so I think the example is legal
10:35S11001001tmciver: you would write a recur as an arg to if, or cond, wouldn't you?
10:36clgvS11001001: so what's your aim? what would you do with your recur issue?
10:36S11001001clgv: I've said what the solution would be
10:37jolysimilar to Scheme's named let?
10:37clgvS11001001: lost in noise^^
10:37S11001001indeed, but with an assertion of tail position
10:37S11001001clgv: require a label for recur
10:38clgvah ok. dont know if that is an improvement for most of the programs to be written
10:39jolyhas there been discussion of what tail calls will look like to other functions once Java gets TCO?
10:39borkdudeok, so: (defn foo [x] (println "fun" x) (future (println "future" x) (println x) (recur)))
10:39borkdudeone println too many
10:40S11001001lazy-seq intros a recur target
10:40borkdudebut this indeed has the future as the recur target
10:40borkdudeand it doesn't print the arg provided to the function
10:40borkdudebtw
10:40borkdudewhy?
10:40clojurebothttp://clojure.org/rationale
10:40S11001001delay, similarly to future
10:41S11001001additionally, many body-taking macros can be written entirely in macro form
10:41S11001001however, it is often more convenient and flexible to write most of the functionality in a function variant, and implement the macro by wrapping the body in a fn
10:41S11001001that's all future is (it uses future-call)
10:42S11001001at this time, binding is *not* implemented this way
10:42S11001001but the decision is more-or-less arbitrary, and can change from version to version
10:44S11001001interestingly, while binding does not make a recur-target, with-bindings *does* (following the strategy of future)
10:46bordatouewhy is arguments passed as an arrayseq, is there a way to gain indexed access to an element in the arrayseq can i use (args 4) to get the fourth element
10:48borkdude(get args 4)
10:48borkdudebut generally this isn't what you want I think
10:48bordatoueborkdude: can i use (args 4)
10:48borkdudebordatoue no
10:49bordatoueborkdude: why, i thought it was a collection
10:49borkdudebordatoue you can use destructuring though
10:49borkdudewhy only vectors, sets and maps behave as functions
10:49borkdude-why
10:50gtrakcan you specify a particular recur target within a recur?
10:52gtrakhttp://stackoverflow.com/questions/8205209/why-argument-list-as-arrayseq
10:53bordatoueIs there any easier way to find out documentation for ArraySeq without using google
10:53borkdudegtrak yeh, that was me in november 2011… ;-)
10:53gtraklol
10:54gtrakbordatoue: I think lein2 can jump to java sources, but I haven't verified
10:59clgvbordatoue: why? it is an implementation detail
11:00clgvbordatoue: if it's a seq you can use `nth` thats what destructuring do as well
11:01bordatoueclgv: how can i tell from a method signature which one implements ISeq and which one is a part of collections
11:01clgvParsingException
11:02bordatoueis there an equivalent of type as in python
11:02clgv,(type [])
11:02clojurebotclojure.lang.PersistentVector
11:02clgv,(ancestors (type []))
11:02clojurebot#{java.lang.Iterable clojure.lang.IPersistentCollection java.util.Collection java.io.Serializable java.lang.Comparable ...}
11:03bordatouethanks
11:05clgv,(g 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20)
11:05clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: g in this context, compiling:(NO_SOURCE_PATH:0)>
11:05clgvlol. nvm
11:06bordatoue,(print *e)
11:06clojurebot#<Unbound Unbound: #'clojure.core/*e>
11:06bordatoueah ah
11:09nDuffHmm.
11:13amalloy*e, *1, and friends are only bound in a real repl, not in clojurebot's approximation
11:14amalloygtrak: no, you can't specify a recur target
11:15gtrak1.5 needs goto :-)
11:17duck1123I bet you could do some amazing things with the inclusion of goto. And every one of them should be punishable by death.
11:17nDuffHow can I temporarily unbind clojure.lang.Compiler/LOADER?
11:18bordatoueis the ISeq similar to yield in python
11:18nDuff(it's using a DynamicClassLoader bound to a classloader that can't actually access some things I'm trying to reach)
11:18nDuffbordatoue: ...given as yield is a language keyword and ISeq is a protocol, no?
11:19nDuffbordatoue: ...now, if the question is whether ISeq can be used to expose lazily-generated values, the answer is yes
11:19nDuffbordatoue: ...but it's used for much more than _only_ that.
11:19bordatouenDuff: that was what i was alluding to
11:19nDuffbordatoue: ...sequences which aren't lazy at all can and do also implement ISeq
11:20nDuffbordatoue: ...by the way, Python also has an iterator protocol, which would be a closer match
11:20bordatouenDuff: is there a way to reset this behaviour
11:20nDuff...reset which behavior?
11:21nDuff("reset"?)
11:21bordatouegeneration of elements
11:21nDuffIf you mean you want to go back to the head of a sequence, just don't lose the head in the first place.
11:21nDuffSequences aren't stateful.
11:21nDuff...so "resetting" them has no meaning.
11:21nDuff...well...
11:22nDuff...eh. "Don't lose the head in the first place" still holds.
11:22nDuffBasically -- iterating through a sequence doesn't change or invalidate a pointer to any other place in the sequence
11:22nDuff...it just gives you new pointers to later locations
11:22nDuffso there's nothing that ever needs to be reset.
11:23gtrakbordatoue: no, you should really treat the contents as values and not use it for side-effects
11:23bordatouehow is this sequence implemented internally
11:24nDuffbordatoue: ISeq is an interface. Interfaces have no implementations.
11:25nDuffbordatoue: ...so different types implementing ISeq have separate implementations.
11:27bordatouenDuff: I am refering to seq
11:27nDuffbordatoue: ...and (seq foo) does completely different things depending on what foo is
11:27bordatouenDuff: why should seq be lazy,
11:28gtrakfp troll: (defn a [b] (label ::c (d b))) (defn e [f] (let [b f] (goto ::c)))
11:29nDuffbordatoue: ...because the interface is defined in such a way that it's possible for implementations to be lazy? Which is not to say that every one of them _is_, simply that they _can be_.
11:29nDuffbordatoue: If you're genuinely curious about implementation details, I'd suggest downloading the source to Clojure and reading through a bit. It's actually not that hard, and very much enlightening.
11:30clgvbordatoue: it seems to be time for an introductory clojure book, don't you think?
11:30bordatoueif seq is used on java arrays, why should it be lazy what advantage does it offer. If i have recursive method that uses seq then it will not work due to single pass behaviour
11:30nDuffbordatoue: that's not true.
11:31nDuffbordatoue: (that latter part, that is)
11:31nDuffbordatoue: ...you might _think_ it's true, because you expect Clojure sequences to behave like Python iterators, which are stateful
11:31nDuffbordatoue: ...but they aren't stateful, so you can use them recursively just fine.
11:31nDuffbordatoue: ...I'm inclined to agree with clgv here -- some dead-tree reading would be helpful.
11:33nDuffs/stateful/mutable/ (to be more accurate)
11:34gtrakactually I think it's possible to implement this goto thing
11:34gtrakI just have to add some indirection to the lexical bindings within a label
11:35nDuffI know it's possible to unbind a var's root definition using Var.unbindRoot(), but is there a sane way to push Unbound onto the stack (ie. to do so temporarily)?
11:38amalloynDuff: i don't think so. i'm curious why you'd want to?
11:39nDuffamalloy: I want to temporarily unset clojure.lang.Compiler/LOADER, such that a new DynamicClassLoader is generated based on the current thread context classloader
11:40nDuff...actually, thinking about that, it'd be better just to cache one, such that I don't have a bunch of un-GC-able classloaders sitting around in memory...
11:40amalloynDuff: and you can't just bind it to nil because someone is checking whether the var is bound?
11:40Hodappmaaaan, some people really love their static type systems
11:41amalloyHodapp: they're pretty cool! i'd be happy to have one like haskell's available in clojure
11:42nDuffamalloy: ...right, though I _can_ just call (RT/makeClassLoader) and rebind it myself. Going that route.
11:44nDuffHuh. clojure.lang.Compiler/LOADER evals to "#<Var: --unnamed-->", but (binding [clojure.lang.Compiler/LOADER (clojure.lang.RT/makeClassLoader)] true) yields "CompilerException java.lang.RuntimeException: Unable to resolve var: clojure.lang.Compiler/LOADER in this context, compiling:(NO_SOURCE_PATH:1)"
11:46amalloynDuff: try with-bindings*
11:47amalloybindings expects to be given a symbol which ns-resolves to a var; that's an expression which evaluates to a var
11:47amalloyor actually with-bindings is probably good enough
11:48Hodappamalloy: well, it boils down to the assertion that the only code that should be written is code that is sufficiently constrained to be amenable to particular types of automated proofs of certain aspects of its behavior.
11:50amalloyHodapp: that sounds like a strawman. why shouldn't i say the same thing about functions? life was better with GOTOs, when the compiler/assembler could trust me to decide what the instruction pointer should be, instead of proving that i only jump to designated "function begin" points
11:51Hodappamalloy: How is this a strawman? This is precisely what static type systems are.
11:51Hodappamalloy: More or less by definition.
11:51Chiron_Hi, I want to use clojure to code storm transaction topology such as this one: https://github.com/nathanmarz/storm-starter/blob/master/src/jvm/storm/starter/TransactionalGlobalCount.java
11:51amalloyyes, but it's such a general statement that it's also what every other compiler does
11:51Chiron_I thought about reify but not sure what about the instance variables
11:51amalloyanything more complicated than ASM falls under your criticism
11:52Hodappamalloy: Calling that a criticism is a strawman.
11:52amalloyokay, bro
11:52Hodappamalloy: So you're basically telling me that what I said is true, but it's not a valid criticism.
11:53Hodappamalloy: That's fine. It wasn't meant as a criticism, so it not being a valid criticism isn't really relevant.
11:54Hodappamalloy: The point is that it's just one form of constraining the code - in this case, constraining it to that which the type system may prove things about. There are multiple other ways of constraining the code, and multiple other ways of reasoning about the code whether through automated proofs (as in a static type system) or by hand.
11:56HodappThe criticism is not that it's constraining the code, but rather that it's an assertion that that is the de facto correct way of doing it.
11:56HodappWhat if you need a level of dynamism it will not allow?
11:56Chiron_sorry guys, any help?
11:57amalloyHodapp: i don't think i would want clojure to have a required static-type system, agreed
11:57Hodappamalloy: It would be within the realm of possibility to have macros be generated in a way about which similar automated proof is possible, for instance.
11:57amalloyHodapp: what static-typing languages have you used?
11:58Hodappamalloy: Well, C++, Java, C if that counts... and Scala and a little OCaml.
11:58HodappI quite like Scala's. OCaml I have not gotten into much detail with.
11:58hyPiRionChiron_: If you receive no answer, chances are people either don't know or are busy doing other stuff :)
11:58HodappHaskell is on my list.
11:59amalloy*nod* the only one i've liked is haskell, but i haven't tried ocaml and have barely touched scala
11:59Chiron_hyPiRion: sorry yes I know
11:59Hodappin Scala it's like it's hardly there half the time; the type inference is quite good
11:59amalloyIME you don't actually need the "dynamism" you bring up, in a language like scala or haskell where the static typing isn't crap
12:00HodappI'm not sure that said dynamism can be ruled out in all cases.
12:00hyPiRionChiron_: No worries, just sayin'.
12:00gtrakI can't help but think in terms of contracts anyway, I've had a little trouble adjusting to the looseness of it
12:01HodappI believe there are probably usages where you are either going to use something dynamic, or you're going to end up inventing your own with the same consequences but a bit uglier.
12:01amalloycould be
12:02gtraklike... 'function b calls input-stream on its arg' is a lot like 'function b expects this arg to be of the type of things that input-stream can be called on'
12:03gtrakI feel like I'm creating anonymous types in my mind when i read the code
12:03Chiron_so maybe in another way, how to extend a Java class in Clojure and add some instance variables to the extended class?
12:03nDuffHrm; there's something more than I thought going on here -- setting both the thread context classloader _and_ Compiler/LOADER still doesn't work. https://gist.github.com/dd7cfb33fdcf3a1d3e3a
12:05hyPiRionChiron_: My usual way of doing it would be to create a java-file, compile it and refer to it through require or something like that. Leiningen makes it rather simple to do.
12:06hyPiRionOr is the goal to do it in Clojure?
12:06Chiron_hyPiRion: i want to do it in Clojure
12:07Chiron_if it is not possible to extend and add instance vars in clojure, maybe a better option to use another jvm language -scala/jruby- in this case
12:07Chiron_extends sure is doable in clojure but what about adding instance vars?
12:08hyPiRionI haven't worked much with java-interop, but have you read http://clojure.org/java_interop#Java%20Interop-Implementing%20Interfaces%20and%20Extending%20Classes ?
12:09hyPiRionLook at http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/gen-class - it seems like there's some way of doing it there.
12:09lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/gen-class and try to stop linking to rich's repo.
12:09hyPiRionSorry lazybot :(
12:10rvgateusing webnoir sessions, im trying to change a value stored within the session... (+ (session/get :credits) 5), but for some reason this gives me a class cast exception...
12:10S11001001Chiron_: in case this isn't clear, java classes are not the usual tool for modeling problems in clojure; they are avoided except where needed for interfacing with some bit of java
12:11Chiron_Yes I know but I'm trying to code this in pure Clojure https://github.com/nathanmarz/storm-starter/blob/master/src/jvm/storm/starter/TransactionalWords.java
12:11Chiron_as you see, KeyedCountUpdater define a couple of instance variables
12:12S11001001Chiron_: so don't do a one-to-one translation; use clojure-appropriate abstractions instead, like maps to represent data structures
12:12hyPiRionrvgate: use session/swap! instead?
12:12hyPiRion(session/swap! :credits + 5)
12:13Chiron_my problem is how to code KeyedCountUpdater in Clojure? no problem with extending/implementing other classes/interfaces . but what about defining new instance variables?
12:13S11001001{:counts {} :collector (stuff here) :id (stuff here)}
12:14S11001001don't extend any classes, don't implement any interfaces
12:14rvgatehyPiRion, same thing.. classcast exception
12:14hyPiRionWeird. You sure the value is a number?
12:14S11001001if you need to capture data in the implementation of a thing that must be a java interface, the lexical context of a reify will satisfy that need
12:15rvgatehyPiRion, yes
12:16technomancymuhoo: if you need snapshots to update you should probably use frozen timestamped snapshots
12:16technomancymuhoo: unless you're not in production; then you can use lein2's :snapshots :always policy in project.clj
12:16rvgatehyPiRion, (if (nil? (session/get :credits)) (session/put! :credits 10))
12:17hyPiRionAnd that doesn't work?
12:17rvgatehyPiRion, just showing that its a number
12:18hyPiRionAh. Then I have no clue.
12:19bordatoueis anyone using counterclockwise eclipse plugin
12:20bordatoueI have included :gen-class but I can't see any class files generated
12:20bordatoueis there any other commands that needs to be specified
12:24muhootechnomancy: i've got a new problem now. the upstream maintainer of this library (ahem, google) doesn't do version numbering. it's just "1-SNAPSHOT". but lein is unhappy with that when making jars
12:24muhooit's been 1-SNAPSHOT for 4 years now :-(
12:25technomancygood hell
12:25muhooso, should i fork it and publish it with a new groupid?
12:25muhooor should i put it up on clojars with the original groupid, but a proper non-snapshot number?
12:25technomancyfirst closure releases and now this; what is wrong with google?
12:26technomancyif they deploy correctly you should still be able to use frozen timestamped snapshots
12:26technomancybut I don't put a lot of hope into them getting that right
12:26muhoois there a tut somewhere on dealing with frozen timestamped snapshots?
12:26muhooalso, will lein let me build a jar if i depend on one?
12:26technomancydefinitely
12:27technomancyin lein1 you just do `ls lib` and you can find the frozen snapshot numbers
12:28technomancyin lein2 `lein deps :tree` will show the frozen version number
12:28muhoooh, ok. so i depend on [foo "0.1.0-20120608.093814-4"] then?
12:29technomancyyeah that should do it
12:32muhoothat worked great for my lein-built library. as for my maven-built google library, not so much. it's literally "1-SNAPSHOT" in lein2 tree and in lein1 ~/m2/repository
12:32technomancyyeah, it means google screwed up their deploy
12:32technomancyI assume you've reported a bug? =\
12:32muhoowell, i did the deploy. so i screwed it up
12:33muhooi built it form their source. they screwed up the version non-numbering :-)
12:33technomancyoh, they don't even put it in a repository?
12:33technomancyeep
12:33technomancythat's several times worse
12:33muhooit's in svn
12:33muhoocome on, this is google we're talking about: the IBM of the 21st cen
12:34technomancybloody unprofessional
12:34muhooafaict, this thing isn't in maven anywhere
12:34technomancymake some noise on the bug tracker; they should feel guilty about this
12:35technomancyif you use `mvn deploy` you should have numbered snapshots I believe
12:36bordatoueis it possible to check if :gen-class is working from the repl
12:37muhoohahaha, mvn deploy does this: https://www.refheap.com/paste/3056
12:37muhooit wants me to sign in in order to deploy! presumably to their internal mvn repo
12:38muhoowhiskey. tango. foxtrot.
12:40technomancyoh yeah, you'd have to switch up the target repository
12:41muhooi was in the target repo. there are several stacked targets, with a parent that is kind of a stub with common deps
12:41muhooand... in a sub repo, same authentication message Authentication realm: <https://step2.googlecode.com:443&gt; Google Code Subversion Repository
12:42muhoooh nevermind
12:42muhoothere's got to be a maven way to tell it which repo to use. i'll have to read up on this
12:43muhootechnomancy: thanks, i think i got it now
12:55muhootechnomancy: wait, no, this sucks. if i'm depending on a library that is perpetually in 1-SNAPSHOT, then i'm always going to have to have people depend on my snapshot dated jars, i.e. "0.1.0-2012xxxx"
12:57amalloyi don't see why. you don't have to make your own library a snapshot version
12:57technomancymuhoo: pretty sure the alternatives are worse =\
12:57gfrederickswhich tool is it that won't let you depend on snapshots unless your own lib is a snapshot?
12:58gfredericksthere must be something because I defenitely had to push some else's lib up to clojars once so I could make a non-snapshot release
12:59technomancygfredericks: you can make releases that depend on frozen snapshots with lein
12:59disoquit
12:59technomancyjust not nondeterministic snapshots
12:59gfredericksah okay; is it lein that makes that restriction?
12:59gfredericksor maven?
12:59technomancylein
12:59gfredericksokay
13:00gfredericks(inc lein)
13:00lazybot⇒ 1
13:00muhoook, i think i got it. i can make my lib depend on a dated frozen snapshot. then my lib doesn't have to be a snapshot, it can be a release. problem solved, i think.
13:00muhoothe b0rken google lib can be a snapshot, i don't give a damn. as long as mine doesn't have to be.
13:01technomancyaye
13:07muhooevery minute that i have to deal with maven, i give thanks to leiningene
13:08gfredericksAbraham Lincoln felt that so strongly he made it a national holiday
13:08Hodappmuhoo: curiously, I was in #java and had an Ant question. They promptly chased me up a tree and lit it on fire to try to get me to not only use Maven but to swear allegiance to Maven.
13:09muhoowell maven > ant, but leiningen > maven, imho
13:11nDuffmuhoo: ...depends on the use case. Building JIRA plugins, for instance, Leiningen isn't so much the right tool.
13:12borkdudeif you guys like playing hangman on heroku programmed in clojure, some of my students just sent their link: http://clojurehangman.herokuapp.com/
13:12borkdude=)
13:13HodappI liked the simplicity of Ant, really.
13:13technomancyborkdude: pretty cool =)
13:13bordatouecould anyone please guide me on how to create a fat jar using counterclockwise plugin
13:14bordatouei can't imagine the number of steps required to attain simple things such as a executable jar
13:14borkdudebordatoue just "lein uberjar" from the console
13:15bordatoueborkdude: please can you tell me how to do it with eclipse
13:15technomancyIIRC task invocation hasn't been implemented yet in CCW?
13:15borkdudebordatoue I wouldn't know how to do it with eclipse, I never needed to
13:15bordatoueborkdude: lein seems to work , but i need to work with eclipse as well
13:27josteinkabout clojure and web
13:27josteinkis noir considered the standard web framework for clojure or should I also look into other stuff? :)
13:27ejacksonjosteink: pretty standard
13:28josteinkI must admit I didnt pay that much attention. NDC has a "overflow" room with projectors covering ALL sessions in paralell
13:28josteinkso I was jumping between that, billy hollis on UX and async in C#
13:29josteinkguess Ill go look for some more detailed samples
13:29amalloyjosteink: noir is easiest. it's also popular to just use the layer underneath it (compojure) directly
13:29josteinkwhile C# suffers from inability for language users to -extend- the language itself, the async stuff was pretty good
13:29josteinkbut would be neat to fool around with something which isnt my day to day language ;)
13:30josteinkamalloy: thanks for the tip. I guess Ill start at the top and work my way down if things starts feeling icky ;)
13:30borkdudejosteink noir is easy - I teached some students only 5 lessons of clojure and they already could come up with Hangman in noir: http://clojurehangman.herokuapp.com/
13:30ystaelIs there a general principle for what causes "IllegalStateException: Attempting to call unbound fn" at runtime in code that was perfectly happy at compile time? I don't think I'm doing anything clever with fn bindings.
13:30josteinkborkdude: nice
13:31borkdude(others are building an irc client using seesaw)
13:32S11001001ystael: look at the frame where the throw happens; the var get should be under where you use it
13:32amalloywell, for example (declare x) (defn y [] (x)) (...never define x...)
13:32borkdudehave their ever been 500 people in this room at the same time?
13:32amalloyyes
13:33josteinkborkdude: Ive written enough raw protocol level irc-code in enough languages to be very decided on the fact that Im not doing that again ;)
13:33borkdudejosteink I saw a tweet about NDC/Clojure, but I'm curious who presented what
13:33josteinkborkdude: some chick I have not heard about before. bodill stokke or something.
13:33borkdudejosteink they keep it simple and probably unfinished proof of concept
13:33josteinkborkdude: she was trying to overplay cool/humerous IMO
13:33josteinkbut ah well
13:33josteinkshe kept the code fairly managable
13:34borkdudeat least clojure picks up chicks, maybe clojure is a brogrammer language?
13:34borkdude:P
13:34josteinkhttps://twitter.com/#!/bodiltv
13:34ystaelS11001001: I see the call that fails, I just don't understand why it fails... The fn in question is the ->Type of a defrecord which is required and properly namespace-referenced at the call site
13:35borkdudejosteink cool tnx
13:35Hodappcuriously enough, I found out on date #2 that my current girlfriend is a Linux user.
13:35pepijndevoswhat does Clojure use to transform * to __STAR__ or something?
13:35josteinkborkdude: NDC typically publishes videos of ALL sessions some time after the conference
13:35Hodappshe never thought much of it. Her brother put it on her netbook after her Windows install killed itself, and since she could still browse and play her music she didn't care.
13:35S11001001ystael: check ->Type and (meta #'->Type)
13:35josteinkborkdude: in case you are interested. but it was way more clojure talks last year
13:35ystaelS11001001: ok, will do, thank you!
13:36borkdudeHodapp well that is how some linuxens are intended right
13:37borkdudejosteink this looks interesting https://github.com/bodil/catnip
13:38josteinkI mean... not linux itself, just the crappy desktop environments :P
13:38josteinkborkdude: nice
13:39Hodappborkdude: I just find it kind of hilarious since I have plenty of friends who, if they were asking about said girlfriend, the first question they'd get out of the way is "Does she use Linux?"
13:39borkdudeHodapp ah well
13:39josteinkthe first thing my GF asked when she saw my KDE machine was "That looks like a computer from the stone age"
13:39josteinkcant say I blame her :P
13:40Hodappwhen I lugged my newly-built computer into college, some people there had literally never seen a tower before
13:40josteinkuh
13:40HodappSome thought it was from the stone age. Others thought it was a goddamn Gibson.
13:40josteinklaptops havent been the standard for -that- long
13:40josteinkunless you are 15 years old
13:40borkdudeHodapp I met my girlfriend/wife in a chatroom, we added each other on ICQ to continue our conversation about topology (math)
13:40technomancyjosteink: pffft; that's nothing: http://p.hagelb.org/glasstty.png
13:40borkdudeHodapp math girls…
13:40josteinktechnomancy: heh
13:41josteinktechnomancy: is that like emacs OS or what? :P
13:41technomancyjosteink: "emacs OS" is redundant =)
13:41technomancyit's just emacs in a full-screen terminal with the glasstty font
13:41ystaelS11001001: interesting. the var metadata is {:ns #<Namespace the.ns>, :name ->Type} and (prn ->Type) prints as #<Unbound Unbound: #'the.ns/->Type>
13:42Hodapptechnomancy: is this what the Overtone demo used?
13:42ystaelThis is an aot-compiled jar loaded into a groovy interpreter, I expect that has something to do with it
13:42technomancyHodapp: I think that was a custom terminal program. this is just gnome-terminal with a fancy font.
13:42Hodappah, okay
13:42borkdudethis is pretty cool, has anyone tried it? https://github.com/bodil/catnip
13:42HodappI did like that Overtone demo. Too bad I'm music-tarded.
13:43septominthere's some terminal for mac that distorts the screen like a CRT
13:43amalloyystael: you have to init the clojure runtime, probably
13:43Hodappwhy not just use a real CRT >:(
13:43Hodappbetter color!
13:44josteinkCRT :(
13:44septomini actually considered looking for a CRT after buying my first atari 2600 recently
13:44ystaelamalloy: before any non-aot-compiled call will work?
13:44josteinkoooh. I tried hooking my old amiga 1200 up to me LCD 40" HDTV
13:44josteinklet me just now NOT recommend that
13:45Hodappif I had the desk space I'd get one of those old Sun or SGI ones that needed a forklift to move and set off car alarms outside when you turn them on
13:45josteinkI think the LCD TV came out confused of that occation too. I mean... the odd interlacing and all :P
13:45Hodappthose had the best image and color I've ever seen
13:45septominmy tv was fine, it just seemed weird to have these perfectly defined rectangles
13:47Hodappseptomin: yeah, this is why things like scale2x were made I guess
13:48Hodappor hq3x... https://en.wikipedia.org/wiki/Scale2x#hqnx_family
13:48Hodappthose techniques are neat from the standpoint of basically being LUTs, very easy to do
13:48borkdudeI'll say it one last time ;-) : this is cool! https://github.com/bodil/catnip
13:49josteinkso out of curiousity.... I saw this talk about hadoop today. saw it was JVM based and all
13:49josteinkanyone tried clojure with hadoop? :P
13:49Hodappborkdude: could you repeat whatever you just said?
13:49borkdudeI'll say it one last time ;-) : this is cool! https://github.com/bodil/catnip
13:49HodappBAHAHAHA
13:49borkdude:P
13:49technomancyjosteink: most people who need hadoop use cascalog
13:49technomancyyou can do raw hadoop, but it isn't fun
13:50S11001001ystael: try loading the clojure module before waking up the class
13:50S11001001oh, n/m
13:51ystaelI'm guessing I'm in some state where anything that requires the binding of a var to be found will fail?
13:52pepijndevosHow does Clojure turn symbols with non-alphanumeric characters into something Java understands?
13:52amalloypepijndevos: it's in Compiler somewhere
13:53pepijndevosamalloy, erm, ok, so not something I'm supposed to actually use I guess :(
13:53amalloy&clojure.lang.Compiler/CHAR_MAP
13:53lazybotjava.lang.SecurityException: You tripped the alarm! class clojure.lang.Compiler is bad!
13:53amalloy,clojure.lang.Compiler/CHAR_MAP
13:53clojurebot{\@ "_CIRCA_", \! "_BANG_", \" "_DOUBLEQUOTE_", \# "_SHARP_", \% "_PERCENT_", ...}
13:53pepijndevosI was hoping something like clojure.core/garble
13:54pepijndevosnice
13:54amalloy,(clojure.lang.Compiler/munge "empty?")
13:54clojurebot"empty_QMARK_"
13:54technomancyso ring requires its session secret for encrypting cookie data be 16 bytes
13:55ystaelthis is extra interesting because it works from jruby but not from groovy
13:55technomancywould it be appropriate to use post-conditions to enforce that?
13:55ystaelso some aspect of how things are getting initialized is different
13:55pepijndevosamalloy, thanks
13:57technomancyalso, why is the issue tracker on ring disabled?
13:57amalloypepijndevos: btw, you could find that just by searching for _QMARK_ in the clojure source
13:59hyPiRionOne question there though
13:59pepijndevosamalloy, hm, true. I couldn't remember when clojure generated these, and which ones.
13:59hyPiRionwould (def a_QMARK_ ...) and (def a? ...) conflict?
14:00amalloyhyPiRion: you can try that faster than you can ask the question
14:01ystaelS11001001, amalloy: i think i figured it out, thanks for your help
14:03hyPiRion,(fn a? [])
14:03clojurebot#<sandbox$eval27$a_QMARK___28 sandbox$eval27$a_QMARK___28@62d22770>
14:04hyPiRion,(fn a_QMARK[])
14:04clojurebot#<sandbox$eval55$a_QMARK__56 sandbox$eval55$a_QMARK__56@2375b4dd>
14:04hyPiRionThey're equivalent without the gensym-append.
14:05borkdudehyPiRion try with defn, does it matter?
14:05hyPiRionOh, I know their names refer to different objects in Clojure.
14:06S11001001so even aoted you wouldn't get a conflict
14:07borkdudeif I defn a_QMARK_: #<user$a_QMARK_ user$a_QMARK_@12b8501d>
14:07borkdudeand defn a? #<user$a_QMARK_ user$a_QMARK_@1330b13c>
14:07gfredericks:/
14:07borkdudeso how does this work?
14:08gfredericksprobably just "don't do that"
14:08borkdudegfredericks still I don't get a conflict in the repl
14:08hyPiRionIt hides the gensym-number, I suppose.
14:08S11001001,first
14:08clojurebot#<core$first clojure.core$first@25a81332>
14:09gfredericksthe gensym-number?
14:09S11001001maybe not
14:09S11001001,(class first)
14:09clojurebotclojure.core$first
14:09S11001001well now
14:09S11001001make class, instantiate, replace class, instantiate
14:10hyPiRion,[(fn a?[]) (gensym "a_QMARK_") (fn a?[])]
14:10clojurebot[#<sandbox$eval133$a_QMARK___134 sandbox$eval133$a_QMARK___134@6baacbb8> a_QMARK_139 #<sandbox$eval133$a_QMARK___136 sandbox$eval133$a_QMARK___136@67eb04cf>]
14:10gfredericksah yeah
14:10gfredericksthe two classes are not identical?
14:11hyPiRionthe functions, you mean?
14:11gfredericks(identical? (class a?) (class a_QMARK_))
14:11S11001001,(identical? (do (defn x[]) (class x)) (do (defn x[]) (class x)))
14:11clojurebot#<Exception java.lang.Exception: SANBOX DENIED>
14:11S11001001heh
14:12borkdudeS11001001 false
14:12hyPiRion,(class a_QMARK_)
14:12clojurebot#<CompilerException java.lang.RuntimeException: Unable to resolve symbol: a_QMARK_ in this context, compiling:(NO_SOURCE_PATH:0)>
14:14gfredericksit's odd the jvm allows it
14:14solussdis there a way to 'dump' your current namespace (in the repl) so you can restore require/use 'd libraries?
14:15gfredericks(ns user1234)
14:15hyPiRionjust change from one ns to another
14:16solussdby dump I meant print out all the currently required/used namespaces, not 'get rid of'. :)
14:16technomancyit would be awesome if namespaces printed as their ns form
14:17borkdudeso how does clojure distuingish between a defned function called a? and a_QMARK_ ?
14:17solussdone of these days I'll give consolidating all the nice things I want in my repl into a library.. (un-intern symbols, dump ns, etc)
14:18hyPiRionsolussd: I'd probably look at the ns- functions
14:18S11001001borkdude: because it doesn't use class names for stuff
14:19technomancy(defmethod print-method clojure.lang.Namespace [x writer] (print-method `(ns (.getName x) [...]) writer)) ; plz
14:19borkdudeS11001001 clojure doesn't use the emitted classes?
14:20technomancyhm; I wonder if namespaces have enough info in their fields to reconstruct the ns form from them...!
14:20amalloytechnomancy: java.lang.ClassCastException: clojure.lang.PersistentList cannot be cast to java.lang.String
14:21amalloyor no, you were cleverer than that
14:21amalloysneaky
14:21solussdhyPiRion: what's "ns-functions"?
14:22borkdudeS11001001 when would this become problematic, only when calling these functions from Java or what?
14:22amalloytechnomancy: i don't think they do
14:22hyPiRion,(ns-imports *ns*)
14:22hyPiRionetc
14:22clojurebot{ProcessBuilder java.lang.ProcessBuilder, Enum java.lang.Enum, SuppressWarnings java.lang.SuppressWarnings, Throwable java.lang.Throwable, InterruptedException java.lang.InterruptedException, ...}
14:23solussdah
14:23technomancyamalloy: yeah it looks like it has refer info but not require-as
14:23technomancyat least according to the slime inspector
14:23S11001001borkdude: and you don't call clojure functions from java by referring to the class that happens to implement the function, particularly as it probably doesn't exist while you're compiling java
14:24technomancyoh, not true; ns-aliases
14:24amalloytechnomancy: funny, i read it as the other way around. maybe it has both
14:25technomancyC-c S-i on a namespace instance shows the refers; on the class it shows the aliases
14:26stuarthallowayany org-mode users want to upvote this for me? http://dev.clojure.org/jira/browse/CLJ-1009
14:28gfredericksstuarthalloway: yes.
14:28gfredericksI have a pile of code I could delete if that got in
14:29technomancygfredericks: have you tried doric?
14:29gfrederickstechnomancy: nope
14:29technomancyIIRC it's org-compatible
14:29nDuffWhat's the point of building a stack of DynamicClassLoader instances? clojure.lang.RT.baseLoader() returns Compiler.LOADER if it's bound, and makeClassLoader builds a new DynamicClassLoader on top of the current baseLoader... but why?
14:30gfrederickstechnomancy: it looks orgy-mody-compatible-y
14:31timvisher_would the right place to grab slime from related to clojure development be technomancy/slime on github?
14:31technomancytimvisher_: if you have to work from source for some reason, sure.
14:32timvisher_i'm just trying to build an info manual for it
14:32timvisher_but it would make sense for me to have docs for it related specifically to the version i care about
14:33timvisher_i'm assuming your copy is the bundled copy
14:34technomancyoh sure; that makes sense
14:53solussdI'm using enliven w/ noir and it appears that I cannot use dynamic vars (e.g. *errors*) inside an enliven template selector handler function. The dynamic vars are unbound in the template. Supposedly there was a fix for this in v1.0.1, but it appears to still not work. :/ anyone else have any familiarity with this issue?
14:53solussd*enlive (damnyouosxautocorrect)
14:56cemericksolussd: it really, really should work. Are you certain you're using 1.0.1?
14:56solussdcemerick, I am. :/ at least my repl spits out the right source
14:56solussde.g. (source net.cgrand.enlive-html/snippet*)
14:57cemerickhrm
14:58cemericksolussd: I'll see what I can see.
14:58solussdthanks
15:08muhoocemerick, technomancy: bumped version to release, got maven squared away, fixed demo app so it actually works. *whew*
15:08technomancycool
15:09muhootechnomancy: thanks especially for your help.
15:09technomancyno problem. I understand the build environment isn't always transparent, and we're working on improving that.
15:10muhoogoogle apps login in clojure/noir through friend on heroku http://young-cloud-3820.herokuapp.com/
15:10technomancythere are OSS replacements for the entire build chain, but they're not quite polished and ready to become default yet
15:10muhoo(if you have a google apps account, that is)
15:10cemerickmuhoo: I don't, but awesome that you have a demo app up too :-D
15:11muhoomaven isn't oss? it's from apache...
15:11technomancymuhoo: I mean for the heroku-specific parts
15:11muhoooh, i had no trouble with the heroku parts
15:11technomancywell, you did have an issue with the build's cached .m2 dir
15:11muhooit was google's openid that was giving me the shits
15:12technomancywhere if it was local you could have just gone in and done rm -rf on the old snapshot
15:12borkdudemuhoo what am I supposed to fill in?
15:12nDuffWhoa.
15:12borkdudemy password is going straight into your db? ;)
15:13muhooborkdude: that's not how opneid works :-)
15:13borkdudeah, I can just fill in google.com
15:13cemerickborkdude: google is asking, not muhoo :-)
15:14borkdudegmail.com
15:14muhoogmail.com should work too
15:14borkdudeInternal error. It has been reported.
15:14cemerickwell, only if you have google apps gmail
15:14amalloymuhoo: pretty cool
15:15amalloyi don't really know what it's for, but hurrah
15:15borkdudecemerick I have a gmail address.. should it work?
15:15cemerickborkdude: gmail != google apps
15:15cemerickI don't have google apps either, but a fair number of others do.
15:15technomancycemerick: turns out the oauth workflow I needed was too trivial for friend; I was overcomplicating it and it turned out to be like five lines of compojure+clj-http.
15:15muhooi haven't tried that. my use caase is a corporate intranet with a google apps auth setup
15:16amalloyi have a few google apps accounts, and this works fine. now muhoo's app knows my first and last name!
15:17kaoD_I can't believe this
15:17borkdudeI have done oauth too, with http://whosnotfollowingme.heroku.com
15:17kaoD_I'm generating an image and outputting it through Ring
15:17kaoD_it doesn't work
15:18kaoD_but when I run it using lein-ring
15:18kaoD_and make any change to the namespace so it reloads
15:18kaoD_it works
15:18kaoD_what the hell is going on
15:18kaoD_even if the change is adding a space or removing a newline!
15:18cemericktechnomancy: presumably you had to learn about oauth? Sounds painful enough to want to use friend anyway ;-)
15:19jedmtnman1is (defn- …) valid syntax - if it is, i dont know how it diffs from (defn ..)
15:19gfredericksdefn- makes it private
15:19cemerickborkdude: that's cool, now I know who to not send holiday cards to! :-D
15:19jedmtnman1ahh
15:19technomancycemerick: the only complicated bit was actually registering my application with github and figuring where the tokens go: http://develop.github.com/p/oauth.html
15:19gfredericks== (defn ^:private foo ...)
15:19borkdude:-)
15:20borkdudeYoung-cloud-3820.herokuapp.com is asking for some information from your Google Account michielborkent@gmail.com
15:20borkdudeAllow -> Internal error. It has been reported.
15:20borkdudeshould this not just work then? google has an openid provider thing
15:21winkopenid is horrible in its own way
15:22technomancyworked for me
15:22borkdudeah wait, maybe it is a third party cookie thing
15:23muhoointernal error means a discovery exception i didn't catch :-)
15:23muhooyou don't have a google apps account, i bet
15:24borkdudemuhoo it doesn't work with whatever openid provider?
15:24borkdudemuhoo ok
15:25muhoonot my thing. the built-in openid workflow of friend does.
15:25borkdudemuhoo I don't have google apps then I guess…. I do have a google appspot account
15:25muhoomine is a special case, written and tested for google apps only
15:25cemerickI think a friend-demo webapp is called for. Include all known friend workflows. :-P
15:27solussdcemerick: if I wrap my call to the template in a 'doall', it works… not very elegant or intuitive for someone writing the body of a defpage though. :/
15:27josteinkborkdude: google apps is overrated. provides you with a vanity email, and no early access to any new google stuff :P
15:28borkdudejosteink at least you can search in your mail properly and don't have stupid 1 GB mail limits I now have at my work
15:28josteinkheh
15:29josteinki love the spam filter we have at work
15:29nDuff...oh, you mean as opposed to a gmail.com account.
15:29josteinkit has like 100% false positives
15:29borkdudeI never think about spam filters since my gmail
15:29nDuffI like Google, but willing to lock my online identity into them forever? No thanks.
15:30josteinkand whenever you whitelist something it has caught which it shouldnt, it says "OK dude!" and then promptly forgets about it and categorizes everything from that sender as spam also in the future
15:30josteinknDuff: fair enough
15:30josteinkit means you owe your email identity, which can also be argued to be a oath identity
15:31josteinkor openid identity or whatever
15:31gfredericksnDuff: why do you need your own domain when you could get a microblog on a transient app made by a hipster startup?
15:31borkdudejosteink I remember doing those kinds of things as well, it was 2006 and we had a sysadmin installing special spam software and spam plugins in our outlook clients
15:31josteinkyeah
15:31josteinkI probably spent more time tuning spamassasin than reading mail before I gave up on doing my own email server
15:32borkdudejosteink I think that was the software
15:32cemericksolussd: I dunno, some quick REPL tests with enlive 1.0.1 look good here.
15:32cemerickUsing both snippet and deftemplate, bound vars appear to be used as I'd expect.
15:32cemericksolussd: can you boil it down to a small example?
15:33cemericknDuff: that way lies madness :-)
15:33nDuffcemerick: ...by the way, I think I've had a message sitting in the moderation tool for clojure-tools for weeks.
15:33cemerickOh? crap.
15:33nDuffs/tool/queue/
15:34cemericknDuff: no pending messages…
15:34nDuff...hmm; bizarre.
15:35borkdudehaha, I took a look at appspot and there's still an app I made once on there: http://borkent-app2.appspot.com/ (self tutoring for learning hebrew)
15:35amalloymaybe you accidentally sent it to rec.games.baseball, and they're still scratching their heads over it
15:35nDuffcemerick: ...on a related note, would you have any experience worth sharing on the madness in question, or would that be a good topic for a mailing list post? :)
15:35cemericknDuff: do resend :-)
15:36borkdudeunfinished though
15:36cemericknDuff: ML, please. I'm vaguely aware of your struggling with classloaders and REPLs and atlassian kit, and god knows what else, but I've not been following closely. :-)
15:38borkdudeI guess this page needs updating with respect to dynamic vars: http://clojure.org/lisps
15:39solussdcemerick: https://www.refheap.com/paste/4fd25367e4b0e13ddf181b31
15:39solussdpardon the indentatino
15:39muhoooverall friend demo does sound like a good idea, but the workflows do have their differences
15:43cemerickmuhoo: yeah, each workflow would have its own form, etc.
15:45borkdudetechnomancy issue 592 can be solved now just by changing one character in project.clj :-)
15:50muhoowell i won't promise anything, but i suppose i might hack something like that up at some point (using noir)
15:51cemerickmuhoo: oh, I wasn't suggesting that you do it :-)
15:52muhooi kinda got halfway there when i was trying to figure out how this stuff worked anyway
15:52muhooi implemented interactive-form, openid, and now this step2. the only one i didn't do is basic
15:52borkdude,(or "friend" "foe")
15:52clojurebot"friend"
15:53muhoothe mock_app.clj was clear enough
16:11dnolengetting close to optimizing away protocol dispatch in CLJS when we have type information ...
16:16lpetitnDuff: interested in reading you. We may have related problems: when working on Counterclockwise itself with live REPL, I have to do some tricks to get the code sent to nrepl server evaluated from the right class loader context.
16:17lpetitnDuff: I was thinking about adding some mechanism to deal with that, so I was reluctant to do it in an OSGi-specific only way
16:21nDufflpetit: *nod*. Atlassian/Felix does things differently enough from Eclipse/Equinox that I haven't been able to use clojure.osgi directly, but it's been very useful reading.
16:21lpetitnDuff: so if you can bring a second use case to the table, then it'll help find the right abstraction to not hardwire things in Counterclockwise anymore. Currently, it relies on clojure.osgi providing some OSGi specific way of getting a bundle's class loader and injecting it before evaluation (System's context class loader, RT.baseLoader .. -out of my head).
16:22lpetitnDuff: it is certainly possible, tho, to decomplect (yeah, really) those 2 concerns from clojure.osgi to make it more general: mechanism to inject classloader, being passed either the class loader to inject, or a function to be called to return the class loader
16:23Bronsai'm wondering why we have both `second` and `fnext`
16:24lpetitnDuff: the only "concern" is that with clojure.osgi, changing the class loader is side effect full, like changing the current ns is. Though it may not be a concern, after all. One must just understand that it's changed for the current thread (like is also the current ns, after all, lol)
16:24dnolenBronsa: the reasons are mostly historical I believe.
16:24lpetit,(source fnext)
16:24clojurebotSource not found
16:25Bronsalpetit: they are exactly the same :)
16:25Bronsadnolen: ok, thanks
16:25lpetitindeed
16:27josteinklinked in, now last.fm
16:27josteinkand then you have the whole "flame" malware with a whole new kind of md5 busting
16:27josteinkthis is a bad week for internet security
16:27borkdudeo no, what if someone will scrobble a track of an artist I dislike!
16:27Bronsalol
16:28josteinkborkdude: you say that now
16:28devnlol lastfm got hacked too? jesus. another password i have to change.
16:28josteinkborkdude: but when nicki minaj will be forever stitched to your last.fm profile, following justin bieber
16:28neotykstuarthalloway: clj-1009, should keywords be printed in header, rather than it's name?
16:28josteinkyou WILL know better
16:28borkdude:-)
16:29devnThis really needs to get changed: http://richhickey.github.com/clojure-contrib/
16:29lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure-contrib/ and try to stop linking to rich's repo.
16:30stuarthallowayneotyk: I don't understand...
16:31neotykstuarthalloway: (print-table [{:a 1}])
16:31neotyk| :a |
16:31neotyk+----+
16:31neotyk| 1 |
16:31stuarthallowayis that desired, or current?
16:31neotykcurrent
16:32amalloyprinting the name instead sounds disastrous, neotyk. if you want to print something other than a keyword, don't give it a keyword?
16:33devnre: stuart sierra's post on the list about additions to clojure.string -- would it not be possible make a clojure.string.format or something that lives out in the world as a "contrib" library?
16:34stuarthallowaydevn: sure
16:34stuarthallowayneotyk: that looks right to me -- name cuts off options
16:34neotykstuarthalloway: just asking
16:35stuarthallowayneotyk: np -- opinions most welcome
16:35neotykamalloy: I see your point
16:35devnstuarthalloway: btw, too bad you had to take off after your talk at euroclojure, would have liked to chat
16:35devnoh well, the next clojure conf/j
16:36stuarthallowaydevn: agreed -- my spousal travel vouchers expired :-)
16:36devnstuarthalloway: :D
16:36stuarthallowaydevn: I will be at StrangeLoop
16:37devnstuarthalloway: Well then, see you there. :)
16:38borkdude"Clojure, the cool newcomer" -> http://files.zeroturnaround.com/developer-productivity-report/zeroturnaround-developer-productivity-report-2012.pdf
16:47solussdcemerick: do you know how to 'select' the sibling of an element using enlive templates? e.g. If I had <label …> <input .. >, how to select input right after label?
16:50michaelr525he;;o
16:50Raynesh; ;here
16:51michaelr525whats up?
17:14zakaIs there a way to create an (lazy)-sequence that adds the previous item from the sequence + 3. The result is for example: [1 4 7 10 13 16] or [2 5 8 11[ (doesn't matter if it return an array, list or something else, just as long it iterable)
17:15nDuffIs there an equivalent to RT.var(String ns, String name) that fails, rather than returning a new unbound var, if nothing exists in the desired namespace?
17:15gfrederickszaka: yes.
17:16gfrederickszaka: your example looks like you're just incrementing everything?
17:16zakagfrederiks: yes
17:17gfredericks,(map inc [1 4 7 10 13 16])
17:17clojurebot(2 5 8 11 14 ...)
17:17jaleyzaka: (defn foo [x] (iterate (partial + 3) x)) ;; something like that?
17:17amalloygfredericks: he's asking for iterate, not map
17:18gfredericksamalloy: I must be drunk because I have no idea what's going on here
17:18gfredericksoh I see
17:18gfredericksha yeah I misread that
17:53cemericksolussd: try [(left [:label])]
17:53cemericksolussd: Haven't had a chance to look at your paste yet, will have to wait until tonight/tomorrow. Maybe start a ML thread on it if you get impatient. :-)
18:05gfredericksman this monet library
18:06livingstonif I'm trying to call a specific java function that I can pass a null pointer to but it wants a null X and not a null Y I tried type-hinting ^X nil in the call, but does that not actually work as I expect?
18:07amalloylivingston: you need to provide enough hints to resolve the entire thing statically, or all the hints get ignored (so specifically, you're probably missing a hint on the target object)
18:07amalloy(.foo ^Target target ^X nil) should work
18:07livingstonOH I didn't know that
18:08amalloyor...can you put metadata on nil? you might need to do something wonky like (let [^X x nil] (.foo ^Target target x))
18:11livingstonhrm... that didn't work either.
18:11gfredericksamalloy: surely you can't put metadata on nil??
18:11lazybotgfredericks: Definitely not.
18:12gfredericksain't it java null?
18:12livingstonbasically I'm trying to call the airity 3 form of contains here: http://jena.apache.org/documentation/javadoc/jena/com/hp/hpl/jena/rdf/model/Model.html
18:12gfredericksoh you mean the symbol
18:12amalloygfredericks: i don't think nil is a symbol, is the point
18:12amalloylivingston: you shouldn't need any hint at all
18:12amalloy&(class (read-string "nil"))
18:12lazybot⇒ nil
18:13gfredericksamalloy: ooh sorry you were questioning in the opposite direction
18:13gfredericksI should stop talking for the remainder of the evening
18:13livingstonI wouldn't think so, the call is unambiguous, I think I'm getting the right call signature, but the library is complaining about the "type" of null thing I passed in.
18:14amalloylibrary sucks, bro
18:14amalloyif you get as far as calling the method, and something inside there complains, ain't nothing clojure can do to pass a nil that is somehow different
18:14livingstonI hinted to the thing in the call signature ^RDFNode nil and it says null Literals not allowed (literals are a subtype...)
18:14livingstonok
18:14gfrederickssurely the lib couldn't be examining the type of a null at runtime
18:15gtrakI don't have to use deref on a dynamic var do I, and why not?
18:15livingstonthat's what I figured
18:15gfredericksgtrak: cuz the value is always available so that'd be needless
18:15gfredericksor wait
18:15gfredericksno
18:15gtrakhaha, right?
18:15gfredericksthe reason is because that would be annoying
18:16gfredericksit shouldn't be changing out from under you also
18:16gfredericksat least not any more than any other var would
18:16pepijndevosCan you modify the play speed of a buffer in overtone?
18:16gtrakah, indeed, since it's thread-local the value would stay the same for the execution of your function
18:16gfredericksyeps
18:17livingstonluckily there is an arity 2 form of the function that is the same as nil for the third and that seems right. although the docs say I can do what I've tried so I was just trying to figure out why I couldn't.
18:17livingstonthanks
18:26livingstonif I want to release a maven-ified library, and open source it, what seems to the be the community preferred locations? code on github, and pom/jar where?
18:26gfredericksclojars
18:28livingstonI just have to create an account and it'll let me push there, no questions?
18:28technomancythe current implementation accepts nearly anything
18:29technomancyin the future you will have to declare a license and stuff to push to the releases repo
18:29livingstoni'll go EPL - so I'm compatible with clojure itself.
18:31livingstondoes the central repository mirror clojars now? I've notice clojure itself only publishes there now doesn't it?
18:36amalloymaven central does not now, and almost certainly never will, mirror clojars
19:05dnolencore.logic on CLJS has achieved Racket performance!
19:06amalloyyou're some kind of superhuman, dnolen
19:07dnolen12ms-15ms on V8 to solve zebrao
19:08dnolenfingers crossed that PHMs can get us to ~3-4ms
19:35scottjif you want to make sure you always have a copy of jars your projects use (in case they get removed from repos) is the best way to create a local maven repo? any special tools there people like or just follow general docs?
19:41technomancyscottj: probably best to run a nexus server
20:06livingstonscottj: your local maven repo should keep them indefinitely, unless you instruct it to delete them.
20:07aperiodicscottj: you could also stick them in an s3-maven-wagon (I've found this to be less pain than running a nexus server)
20:07livingstonif it's just you on one machine periodically backing up ~/.m2/repository is probably good enough, but like technomancy said a server would be even more convenient if you use a couple of machines etc.
20:10livingstonhuh, I've heard the term maven wagon before, but just always glossed over it, when did they start that?
20:11aperiodici think wagon is the maven repo storage protocol?
20:12livingstonright but I didn't know you could kind of off load them places, eh, that'll go back to the back of my brain to be forgotten again
20:13aperiodicyeah, i wrote this shell script that just apes what the s3-wagon-private plugin does to deploy things to an s3 bucket, and it seems to be sufficient
20:14technomancynexus is more convenient in the long haul; just more pain up-front
20:14frozenlockIs there a command to open in another software? I would like to save an html file and immediatly after make it open in the user's default browser.
20:14aperiodicwhy's that?
20:14technomancyit caches transparently and lets you check only a single repo
20:15technomancypublishing a couple artifacts to an s3 repo is easy, but making sure everything your project depends upon is in s3 is more work
20:15technomancyfrozenlock: try clojure.java.browse
20:15frozenlockWill do immediatly, thanks!
20:16technomancysometimes it goofs up the browser selection, but it nearly always opens *something*
20:16livingstonfishes through your history, picks a good one ...
20:39johnmn3so, there is not already a clj wrapper for java.util.zip.* or some other zip variant?
20:40johnmn3I see clj-msgpack, but that's not really zipping
20:41johnmn3and I'd like to use a zip file as a database to persist clojure datastructures. Being able to open it with a unzip program would be neat, for my purposes, I think.
20:43scottjjohnmn3: not sure if it helps, https://github.com/mikejs/ring-gzip-middleware/blob/master/src/ring/middleware/gzip.clj
21:01frozenlockjohnmn3: I've done something that you might find useful: https://gist.github.com/2898908
21:01frozenlock(spit-to-zip "test.zip" "test.txt" "asdfadsfas") will result in a zipped file named test.zip, with inside it a file named test.txt and with the content "asdfadsfas"
21:02frozenlockAnd to spit to a zip with more than a file: (spit-to-zip "test.zip" "test.txt" "asdfadsfas" "test2.txt" "adsfasdfdsa")
21:03johnmn3frozenlock: that's fantastic. simple and works as advertised.
21:03johnmn3going about making a slurp-from-zip, would it look relatively the same, but with .getNextEntry?
21:04frozenlockProbably. Might need ZipInputStream too.
21:05frozenlockFeel free to post a link here if you ever make this slurp-from-zip :)
21:05johnmn3so for anyone who was here when I was talking about using Chris Granger's simpledb (not the amazon simpledb) for persisting clojure data
21:05johnmn3https://www.refheap.com/paste/3063
21:06johnmn3I had the idea to just add a watcher to the atom and, whenever an event triggers, to write the atom to disk.
21:06johnmn3but I realized that that doesn't work well with io
21:06septominthis is the flat file thing?
21:07frozenlockjohnmn3: Y u no like congomongo?
21:07johnmn3(map update-atom-with-write (range 0 10000000)) would be detrimental
21:07johnmn3frozenlock: oh yea, I forgot about that. I should def look into that.
21:09johnmn3So, I built some logic into it that basically says: "if there has been a write in the last second, wait another second and try again. If there is still contention, give up"
21:09johnmn3and then there is also the original timer that persists automatically every 10 seconds (from granger's original 5 min)
21:09septomineventual safety!
21:09johnmn3:)
21:10johnmn3but it's still not atomic
21:11johnmn3and I was thinking about gaurding writes with a ref of some kinds... or maybe I could build some journaling into the atom's map, so that operations can be rolled back if they fail.
21:11johnmn3but yea, I should check out congomongo
21:12johnmn3one benefit I was thinking, with the current way, was that I could just crack it open with a zip utility and then there clojure datastructures are right there, easy to troubleshoot.
21:12johnmn3I'm aware that I'm reinventing the rule.. but my needs are very minimal.
21:13johnmn3er, s/rule/wheel
21:13septomini mean if performance is an issue at all it seems like you should use something real
21:13septominbut this looks nice for very early stage stuff
21:14septominare your files even large enough that you need to bother zipping them?
21:17johnmn3it might just be one file.. that's all I need to persist a whole environment, right? Yea, the file could keep growing and growing to be a few megs, over time.
21:18johnmn3though it might be more efficient to store in multiple files in the zip, so as to create a random access situation, rather than re-writing the whole thing every time.
21:18johnmn3In which case, each write could be a delta and I could have versioning.. hey look, I just invented chouchdb
21:19johnmn3yea, I might as well go with a simple but strong db lib like congomongo
21:19frozenlockI'm trying clojure.java.browse/browse-url. It works fine for... well a URL, but how can I make it work with a local file?
21:20septominfile:///path ?
21:22frozenlockNo, it chokes on the path, saying it's not a URI
21:52frozenlockDamnit
21:52frozenlockI'm such an idiot
21:53frozenlockAll this time I was trying to open a not-yet-existing file.
22:10johnmn3congo mongo is giving me errors
22:11johnmn3but I used pomegranate to load it...
22:14johnmn3test2.core=> (insert! :robots {:name "robby"}) => Jun 08, 2012 10:07:37 PM com.mongodb.DBTCPConnector fetchMaxBsonObjectSize WARNING: Exception determining maxBSON size using0java.io.IOException: couldn't connect to [/127.0.0.1:27017] bc:java.net.ConnectException: Connection refused: connect
22:20frozenlockIs mongoDB running correctly?
22:32johnmn3mmmm
22:32johnmn3right
22:33johnmn3so you're saying "(make-connection ... doesn't actually stand the server side up, and I have to go download mongo seperately? :/
22:35johnmn3I think I'm more inclined to just use the spit-to-zip you mentioned. That has the added benefit that I can peer into it as a zip file.
22:52eslick_Anyone know of SF-area consulting firms with clojure experience / expertise?
22:56semperoshttps://groups.google.com/forum/?fromgroups#!searchin/clojure/clojurescript$20extend/clojure/-epqvr3pPPg/NPYztkPGWZEJ
22:56semperosClojureScript has extend-type, but no extend
22:56semperosis there any equivalent mechanism for passing around default implementations for protocols?
22:56johnmn3frozenlock: it looks like the contents are just being dumped into the *out*, rather than going into the zip file
22:59semperosjohnmn3: *out* can be dynamically rebound to point where you want it
22:59semperoshttp://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/*out*
22:59lazybotNooooo, that's so out of date! Please see instead http://clojure.github.com/clojure/clojure.core-api.html#clojure.core/*out* and try to stop linking to rich's repo.
22:59semperosthere's also the built-in with-out-str when you just want to capture things sent to *out* as a string
23:03johnmn3but I don't see a setter method on ZipEntry, so I'm not sure how to put the data in it.
23:08johnmn3I think you have to call .write on the ZipOutputStream
23:09johnmn3ugh, manually pouring bytes into arrays using offsets just feels so... uncivilized
23:20aperiodicyeah, it sucks to have to think about array indices
23:20frozenlockjohnmn3: Sorry about that, I gave you an older version.. hang on
23:21frozenlockhttps://gist.github.com/2898908 try this one
23:21frozenlock(I spent almost a day trying to get this work the first time)
23:21frozenlockprinter and buffer will be my death :)
23:27johnmn3trying
23:30johnmn3worked!
23:30johnmn3fantastic
23:31francisis their a fix for the lein repl so when I use M-p it grabs the last definition I used rather than the line? Or am I going to have to write it