#clojure logs

2010-06-26

00:11hiredmanlast var wins is really dumb
00:12cemerickhiredman: what's your reason?
00:13hiredmanwhen I try to reload/compile a file in slime it complains that the functions I have defined have *already* been defined in the namespace I am trying to redefine them in
00:13RaynesThe fact that you can't turn it off is enough.
00:14hiredmanall that last var wins has ever done for me is cause grief
00:14hiredmanthe other day I could load some tests that used ring because they did a :reload-all
00:14defnhiredman: yeah I have the same issue all the time
00:14hiredmancouldn't
00:15hiredmanI had to put a (ns-unmap (create-ns 'clojure.core) 'spit) at the top of the file
00:16cemerickthat sounds like a bug IIUC; you should be able to redefine vars in your own ns at any time
00:17cemerickFWIW, I redefine vars all the time...maybe it's a slime issue?
00:18hiredmanit's a complication of the model via the addition of well intention complications to make things "easier"
00:23Rayneshttp://github.com/liebke/clj I just noticed this. This is awesome.
00:27defnStolen from my twitter feed no doubt ;)
00:27Raynesdefn: Totally. Thanks for mentioning it.
00:28defn:) Happy to. It looks really interesting. Obviously liebke has a pretty great track record when it comes to Clojure software.
00:28defnI can see how a simple Emacs interface could be writtin for it
00:28defnwritten
00:29defnsince it will return the classpath and so forth
00:29defnanyone could write nice interface for it really
00:29defnlike with anything Java + classpath I bet there are some (a lot) of caveats
00:40tomojclj scares me
00:42technomancyit's a little too ambitious. I'd rather have something simpler that could be included in Clojure itself in the future.
00:43defnagreed
00:44tomojis it not meant for developers?
00:49tomojI mean, why `clj install`? only meant for tinkerers who don't want to set up real clojure projects?
00:49defnmaybe it grabs the most recent?
00:49RaynesIt shouldn't be that hard to write a simpler thing to be included in Clojure. I'm surprised that *some* sort of script hasn't already been written.
01:03brandonwif i use nailgun as a clojure repl server, and background the process, is it normal for anything calling the server to block until i foreground the server process?
01:04brandonwi could have sworn i backgrounded the nailgun server months back without a problem.. i don't think i am doing anything differently now
01:04tomojhow are you backgrounding the process?
01:04brandonwctrl-z
01:05brandonwand `lein nailgun &`
01:05brandonwboth seem to do the same thing
01:05tomojthe latter sounds right
01:05tomojfor the former I would think you'd need to `bg`
01:06brandonwoh okay
01:06brandonwlet me try that
01:06brandonwokay, yes you are correct
01:07brandonwi guess that makes me a linux newbie still, heh
01:07brandonwnever realized that there was a distinction between `cmd &` and `cmd` then ctrl-z
01:07brandonwthanks :)
01:08tomoj`fg` to get it back
01:10defn:)
01:13bobo_ö-äääääääääääääääääääää
01:13bobo_ö-äääääääääääääääääääää
01:51yacintechnomancy: thanks!
05:54rustemsunievDoes anyone know how to remove a map element with defined x, y from the vector like this?
05:54rustemsuniev[{:x 0, :y 1} {:x 1, :y 0}
06:04tomojrustemsuniev: huh?
06:11noidi,(remove #(= {:x 0 :y 1} %) [{:x 0, :y 1} {:x 1, :y 0}])
06:11clojurebot({:x 1, :y 0})
06:11noidido you mean something like that?
06:15rustemsunievnoidi: Yep, thanks!
06:19rustemsunievIf I define a vector as (def my-vec (ref [{:x 0, :y 1} {:x 1, :y 0}])) how I can make the same remove work?
07:00helinohello everyone! i've just started learning clojure and have a question about Leiningen. Which folders in the project layout are "binary" folders? What's the "classes" folder?
08:50helinohello everyone! for network programming with clojure, which library would you recommend? server-socket in clojure-contrib?
09:14bhenrycan someone give me a working link to ants.clj?
09:15bhenryfound it. ]
09:25raekhelino: server-socket and clojure.contrib.io/clojure.contrib.duck-streams are a good start
09:31raekI also recommend looking into lazy sequences
09:32raekthey can be very handy for representing the incomming (maybe tokenized) data as a stream/sequence
10:04helinoraek: ok, thanks for your answer!
11:26tokedis clojure.repl meant to replace contrib.repl-utils? or is the idea to pull just the most commonly used functions into the core lib?
13:25systayI'm stuck. If anyone feels like helping a noob out, take a look at this: http://gist.github.com/454199
13:25systayI'm using neo4j, and the error I get from that declaration is: "java.lang.RuntimeException: java.lang.IllegalArgumentException: Don't know how to create ISeq from: clojure.lang.Symbol (data.clj:6)"
13:25qbgYou need arguments for defn
13:27qbg(defn create-root [...] (with-tx ...))
13:27systayI feel really stupid now. Can we just pretend I never asked? :)
13:27polypusasked what?
13:27polypus;)
13:27qbgInternet knows all
13:28qbgIt could be worse; the other day I had a brain fart regarding syntax-quote
13:38systayhas anyone tried pair programming clojure? I'm curious
13:39qbgI did a little once with someone who didn't know clojure, but that's it.
13:39systayI was thinking it must be very different from pairing on a verbose language like java
13:43qbgHow so?
13:45systaywell... in a c# (my primary lang), when I'm backseat, I think about the "big picture" while my pair buddy does the boring typing
13:46systayI'm just curious
14:01systayI'm trying to get my repl to reload when a file changes...
14:01systayi write (use :reload-all 'src-file)
14:02systaybut that doesn't seem to work... am I missing something?
14:05chouserthat should work if by src-file you mean my.namespace
14:07systayand if I add a definition to that file, and save it, will it be picked up automagically?
14:20raekseems like i'm doing (into {} (for [x xs] [(make-key x) (make-val x)])) all the time...
14:20raekis there some better/more ideomatic/prettier way of doing this?
14:37qbgraek:
14:37qbg,(doc juxt)
14:37clojurebot"([f] [f g] [f g h] [f g h & fs]); Alpha - name subject to change. Takes a set of functions and returns a fn that is the juxtaposition of those fns. The returned fn takes a variable number of args, and returns a vector containing the result of applying each fn to the args (left-to-right). ((juxt a b c) x) => [(a x) (b x) (c x)]"
14:38oberanyone got clojure working on android?
14:38qbgThere is a thread on the group about clojure on android
14:39oberyeah saw that and was prompting me to hunt for a howto or something
14:39qbgThis thread seems relevant: http://groups.google.com/group/clojure/browse_thread/thread/737a69393a5b111e/4fbaa8c8695e90e9?lnk=gst&q=android#4fbaa8c8695e90e9
14:47kirasanyone have any suggestions on how this could be better? http://gist.github.com/454257
14:49ataggartuse filter
14:50kirasataggart: ok, let me try that
14:50ataggartah sry that was with regard to the comment at the top, not the fn to see is soemthing is divisible by a number
14:51ataggartfor that: (zero? (mod x 3))
14:55kirasataggart: sorry, i don't understand what you mean. i don't actually check to see if something is divisible by a number, are you saying that i should?
14:55ataggartisn't that part of the problem?
14:55ataggartyou need to test if a number is divisible by 3 or 5
14:57kiraswell... the problem is to sum up all the multiples of 3 or 5 under 1000, which i already know is divisible by 3 and 5, so i don't *have* to test that, but i probably should anyway heh
14:58ataggarte.g., (reduce + (filter #(and (zero? (mod % 3)) (zero? (mod % 5))) (range 1000))
14:59ataggart)
15:01kirasi think for this problem, it would be or instead of and
15:01ataggartso it is
15:02ataggartbut notice the difference in structure between yours and mine
15:03kirasthey are definitely different. what aspect in particular are you referring to?
15:03ataggartcomposing together functions that work on sequences
15:04ataggartrather than writing every detail in a loop
15:04ataggartimperative vs functional, basically
15:05kirasthat will probably take me a while to get used to
15:05ataggartheh, perhaps
15:05kirasin some ways, i thought that part of what i did was sort of functional
15:05ataggartit took me a bit to wrap my head around it
15:05kirasthe part using the results of the divide-by-n-list results?
15:06ataggartit's the mental model. In yours you're given an end number and keep doing some math on it.
15:06ataggartit's entirely specialized
15:07ataggartwhereas if you think of the starting data as a list of all the numbers between 0 and 999, then you process that sequence with various functions
15:07ataggartall which are non-specialized
15:08kirasi see what you mean
15:10kirasmine is also wrong, since i accidentally included 1000 in the divisible by 5 list
15:10ataggartalso the one I pasted reads much like the problem: sum the set of numbers which are divisable by 3 or 5 where all numbers are in the range of 0 to 999
15:11kirastrue
15:11systayI'm finding that I have good use of my dba-background. "Good" SQL is also set-based and not looping
15:12systayin re: to your discussion
15:12ataggarttrue, though I loathe sql
15:12kirasmaybe i'll try another problem and try to keep this in mind
15:13ataggartkiras: break the problems down into discrete sub-problems (i.e., functions)
15:13ataggartand then compose them
15:13ataggarte.g., a fn that tests for divisibility by 3
15:14cemerickrhickey: ping?
15:15systaywhat does this mean: #<Object$RelationshipType$c9c4a4fe neo4j.proxy$java.lang.Object$RelationshipType$c9c4a4fe@1c54796>
15:15qbgIt is an object
15:16systayhow do I read it?
15:16systayI mean that string
15:16qbgYou want to read in "#<...>"?
15:17systaywell, I want to learn how to decode the repl-output
15:17systayit contains some data, and I want the decoder ring for it
15:17qbgFirst, #<...> is the syntax for an unreadable object
15:17qbgSo you can't just type it in to get the object
15:18qbgIf that is the last output from the REPL, *1 will be bound to it.
15:19qbgHow are you getting the object?
15:19systayI'm reading all relationships from the top-node in neo4j: (relationship (top-node))
15:23qbgI'd suggest taking a look at the neo4j java docs
15:23systayyeah, I'm reading them...
15:24systayIt's just the combination of two unknowns - clojure and neo4j that's messing me up
15:24qbgThe object is an instance of a subclass of RelationshipType
15:28qbgIf you are using clojure-neo4j, it looks like the relate function could be useful.
15:28systayah... so I'm getting the relationship types, and not the relations...
15:29systayqbg: thanks so much. I'll continue digging. I got the relate part working, now I want to read as well :)
15:50mmarczykkiras: I wonder if this can help to stay within the realm of nicely composing blocks, yet not test divisibility for the "multiples of 3 & 5" problem: http://gist.github.com/454287
15:51mmarczyk(reduce + (take-while #(< % 1000) (apply merge-seqs (map (fn [n] (iterate #(+ % n) 0)) [3 5]))))
15:58kirasmmarcyzk: i'm looking, but it will probably take me a while to understand this
15:59LauJensenGood evening gentlemen
15:59ataggartis it evening already?
15:59qbgDepends on where you live...
16:00mmarczykkiras: updated the Gist to work with comparable stuff which isn't numeric
16:00mmarczykLauJensen: good evening to you!
16:00mmarczykkiras: it's the merge part of merge sort, basically
16:02LauJensenSorry I meant Good morning (UGT) :)
16:02mmarczyk:-)
16:03qbgmmarczyk: merge-seqs looks good to me
16:04mmarczykqbg: thanks; made yet another update just now so it's slightly prettier (I hope)
16:10amatosHow do I convert a seq to a map? I have a map, I want to apply a function to each of its key-value pairs (that is easy using the map function), but that returns a seq, not a map. How do I make that a map?
16:10qbg(into {} (map identity {:a 1, :b 2, :c 3}))
16:11qbg,(into {} (map identity {:a 1, :b 2, :c 3}))
16:11clojurebot{:a 1, :b 2, :c 3}
16:12mmarczyk,(into {} {:a 1, :b 2, :c 3})
16:12clojurebot{:a 1, :b 2, :c 3}
16:13mmarczyksorry, just checking something... had a (wrong) hunch
16:13amatosthanks! Didn't know about the into function. That seems to do what I need. Cheers
16:14amatosSo the type that into returns is always the type of the to argument?
16:14mmarczykright
16:14amatosgreat, thanks
16:14mmarczykso if you might be dealing with sorted maps, you could use
16:15mmarczyk,((fn [m] (let [e (empty m) res (map identity m)] (into e res))) (sorted-map :a 1 :b 2 :c 3))
16:15clojurebot{:a 1, :b 2, :c 3}
16:17amatosgreat
16:19LauJensen$(letfn [(f [x] (inc x))] (reduce #(assoc %1 (key %2) (f (val %2))) {} {:a 1 :b 2 :c 3}))
16:19sexpbot=> {:a 2, :b 3, :c 4}
16:20LauJensenamatos: thats another way to apply a function to the values, without going through map and into
16:21LauJensenthe 'letfn' just being to show you that its an arbitrary function
16:21amatosoh alright
16:21amatosthanks
16:28itistodaywhere is it recommended to get clojure 1.2 from? is it the 'new' branch of http://github.com/richhickey/clojure ?
16:29mmarczykitistoday: master
16:29itistodaymmarczyk: thanks
16:29mmarczykitistoday: plus see the ggroup -- http://groups.google.com/group/clojure -- for a number of threads on changes currently taking place on other branches, notably equiv
16:30itistodaymmarczyk: ok, yeah i need to re-subscribe, i've finally decided to go headfirst into clojure
16:30mmarczykitistoday: way to go! :-)
16:31systayis there a way to clear the screen while in repl?
16:31itistodaymmarczyk: yeah, i'm excited and a little scared, as it means i have a lot to learn... how would you recommend pulling from rhickey's repo if you just want to get the 1.2 stuff that includes datatypes, and you don't want to waste a whole bunch of hard drive space?
16:32kirassystay: in emacs? you can use C-c M-o.
16:32mmarczykitistoday: the whole thing is ~47M
16:33itistodaymmarczyk: oh, ok that's not bad
16:33systaykiras: nah... learning clojure is enough in it self. I'm using trusted old gedit so far
16:33mmarczykitistoday: anyway, just use git clone and maybe stay on master for now
16:33systaykiras: so just a terminal repl
16:33itistodaymmarczyk: k
16:33kirassystay: ah. sorry, i don't know then.
16:34mmarczyksystay: in that case, look to your terminal for that
16:35systaymmarczyk: of course... duh! thanks...
16:36mmarczyksystay: :-) e.g. Gnome Terminal has a 'Reset and Clear' command in the 'Terminal' menu; kills your prompt too, but not the app, plus the last batch of input is still there
16:37mmarczykso use at an empty prompt followed by return to get a mostly-cleared screen with a fresh prompt
16:37yacindoes clojure 1.2/contrib 1.2 not work with swank?
16:37yacini'm getting this error: http://osdir.com/ml/clojure/2010-02/msg00797.html
16:37mmarczykyacin: it works fine, though you might need a fresh-enough swank
16:37systaymmarczyk: yeah, I found it straight away once I started looking for it...
16:37rustemsunievIf I have (def my-vec (ref [{:x 0 :y 1 :val false} {:x 1 :y 0 :val false}])) how I can update a map in it with a value "val = false" say for x 1, y 0?
16:38mmarczykyacin: aahhh, you're being hit by the old contrib-compiled-with-different-clojure.jar problem
16:38mmarczykyacin: you need to use a clojure-contrib.jar matching your clojure.jar
16:38mmarczyksystay: :-)
16:38yacini'm pulling both from clojars
16:39yacinalthough it's 1.2.0-master-SNAPSHOT for clojure and 1.2.0-SNAPSHOT for clojure-contrib
16:39mmarczykand for swank?
16:39yacinleiningen/lein-swank "1.2.0-SNAPSHOT"
16:41mmarczyk(let [my-vec (ref [{:x 0 :y 1 :val false} {:x 1 :y 0 :val false}])] (dosync (alter my-vec (partial clojure.walk/walk #(if (and (== (:x %) 1) (== (:y %) 0)) (assoc % :val false)) identity))
16:41mmarczyk,(let [my-vec (ref [{:x 0 :y 1 :val false} {:x 1 :y 0 :val false}])] (dosync (alter my-vec (partial clojure.walk/walk #(if (and (== (:x %) 1) (== (:y %) 0)) (assoc % :val false)) identity))))
16:41clojurebotjava.lang.ClassNotFoundException: clojure.walk
16:41mmarczykrustemsuniev: see above
16:42rustemsunievCheers! Going to try it.
16:42mmarczykyacin: try a lein clean and lein deps again maybe...?
16:43mmarczykplus I'd bump swank's version to 1.3.0 if that's on Clojars already
16:43mmarczykrustemsuniev: ah, sorry, missed the other branch of the if... just use %
16:43kirasi've been using swank-clojure "1.2.1" instead of leiningen/lein-swank "1.2.0-SNAPSHOT"
16:43kirasnot sure if that's right or not, but it seems to work for me
16:44rustemsunievSure! thanks again!
16:45mmarczykrustemsuniev: plus it would be better to (assoc % :val true) to see that it works, seeing how the original values are already false :-)
16:46yacinkiras: as a :dev-dependencies?
16:46kirasyacin: yes
16:47yacindoesn't let swank start problem with M-x swank-clojure-project for me...
16:47kirasfrom the site: Note that the lein-swank plugin now comes with Swank Clojure; it does not need to be specified as a separate dependency any more.
16:47kirasah... i think they say that it's better to use lein swank at the command line first, then slime-connect
16:48kirasinstead of swank-clojure-project
16:50yacinah, that worked just fine
16:50kirascool
16:51yacinthanks!
16:51yacinis there anyway to specify a port for swank?
16:51kirasnp :)
16:51yacinso i can have multiple lein swanks?
16:51mmarczyklein swank port-number, I think
16:51kiras$ lein swank [PORT=4005] [HOST=localhost]
16:51sexpbotCommand not found. No entiendo lo que estás diciendo.
16:52LauJensensexpbot: hablar espanol?
16:52sexpbotCommand not found. No entiendo lo que estás diciendo.
16:52mmarczykah, lying with a straight face
16:54kirasmmarcyzk: i think i finally understand how that code works lol
16:56mmarczykkiras: :-)
16:56RaynesI should consider changing the primary prepend. $ is too common. Dollars and such.
16:56systayif I wanted to change how the attribute lookup works, how would I do that?
16:57systayI want :foo to mean something other than the normal attribute lookup does
16:57mmarczykRaynes: maybe also require using whatever you choose for s/foo/bar/ style substitutions
16:57Raynesmmarczyk: Huh?
16:57RaynesOh.
16:57mmarczyks/Huh?/Sure!/
16:57qbgsystay: You want :foo to be a function that does something else?
16:57kirasmmarcyzk: that's actually pretty cool... so in the example at the end, it basically creates three lazy sequences, then you merge them into one lazy sequence and take the first 15 elements?
16:57RaynesThe idea is to not use a prepend.
16:58mmarczykkiras: yup
16:58RaynesThat plugin isn't loaded right now, I don't think.
16:58RaynesErik was working on some stuff in that one.
16:58systayqbg: In neo4j, a lookup returns a proxy object. if I do (:name proxy-object), I get nil back. I have to do (:name (properties proxy-object)) instead, and that bothers me
16:58mmarczykkiras: as mentioned above, you can merge (iterate #(+ % 3) 0) with #(iterate #(+ % 5)), then (take-while #(< % 1000) ...) from that
16:59mmarczykkiras: (reduce + ...) / (apply + ...) to top it off
16:59RaynesBut we have a $sed command that does the same thing with more functionality. s/// not requiring a prepend is a bit of a fun easter egg. It can be turned off if people find it annoying though.
16:59Raynes<3
16:59mmarczykkiras: if you use ->>, you can actually write it down in a piped fashion
16:59qbgsystay: Keywords are not variables, so that won't work by itself
17:00qbgYou could always do macro magic, though
17:00mmarczykRaynes: nah, I don't really mind, though as far as usefulness is concerned, hm, I'll look into $sed :-)
17:00kirasmmarcyzk: interesting... i'll have to read about ->>
17:00mmarczykactually having the bot provide a $sed command is just *cool*
17:00systayqbg: I haven't read that chapter in my Programming Clojure-pdf...
17:01qbgEither way, it is probably overkill
17:01mmarczykkiras: (->> (map (fn [n] (iterate #(+ % n) 0)) [3 5]) (apply merge-seqs) (take-while #(< % 1000)) (reduce +))
17:01systayqbg: it just feels like the clojure-neo4j doesn't hide the fact that we're using a java-lib
17:02systayqbg: enough anyway
17:02qbgsystay: That can be a difficult choice to make when designing a library like that
17:02systayI'm sure it is
17:02qbgDo we make it like the java library, or do we do something more idiomatic?
17:02LauJensenmmarczyk: Im unfamiliar with merge-seqs, what would be passed aorund ?
17:03mmarczykLauJensen: I just wrote it :-) -- http://gist.github.com/454287
17:03mmarczykSeqables of Comparables, basically
17:03systayqbg: I was just checking if it was doable. Scratching such itches led me to clojure in the first place... :)
17:03qbgmmarczyk: One downside of merge-seqs is that you can't use it for mergesort
17:04mmarczyk$translate pl en "jejku, fantastyczne! :-)"
17:04sexpbot"Oh dear, fantastic! :-)"
17:04qbgsystay: You have a lot of power with Clojure, and with great power comes great responsibility. :)
17:05mmarczykRaynes: wow, sexpbot has a really cool collection of plugins :-)
17:05systaymmarczyk: Cześć
17:05mmarczykqbg: hm? why not?
17:05mmarczyksystay: o, dobry wieczór :-)
17:05qbgmmarczyk: It looks like it swallows items that are equal
17:05LauJensenmmarczyk: So it concat seqs on each other, removing duplicates on overlap?
17:05mmarczykqbg: ah, of course
17:06mmarczykqbg: could use (cons x (cons x ...)) for the 0 case
17:06mmarczykLauJensen: not concat...
17:06mmarczykLauJensen: (merge-seqs [1 3 5] [2 4]) => (1 2 3 4 5)
17:06qbgmmarczyk: It might be better keep the originals instead of duplicating one
17:07mmarczykqbg: hm, true again
17:07mmarczykqbg: (cons x (cons y ...)) for a left-to-right precedence among the input seqs
17:08kirasmmarcyk: ->> is really cool, thanks for pointing it out to me
17:08qbgWriting a function to remove strings of equal items in a list would be easy
17:08kirashow often is ->> generally used?
17:09LauJensenkiras: often
17:09qbgI use ->> much more than ->
17:09kiraslaujensen: practically by default? heh
17:09LauJensenAlmost. If some kind of sequential processing makes more sense using either -> or ->> I rewrite. Its all about readability
17:10kiraslaujensen: interesting
17:11mmarczykqbg: updated the Gist to contain two versions, merge-seqs which does not remove duplicates and merge-seqs-nub which does
17:11mmarczykqbg: thanks for the idea
17:12mmarczykkiras: yeah, cool it is :-)
17:12qbgmmarczyk: Now there is code duplication. Fix that. ;)
17:12mmarczyk:-P
17:12qbgmerge-seqs-nub is a composition of two functions, in my mind.
17:13mmarczyksure, could use merge-seqs and distinct
17:13mmarczykbut distinct needs to build a set of previously seen objects as it goes
17:13mmarczykwhereas here the point is to exploit the assumptions made about the input
17:13qbgOnce they are in sorted order, equals ones will appear in a string
17:13mmarczyksimple enough to fix, actually, with a helper function -- or rather a macro
17:13qbgYou can fix that in linear time and constant space
17:14qbgFunction would probably be better
17:14mmarczykwhich is not quite as not needing to fix it at all
17:14mmarczykbut sure, it's a good point
17:15LauJensenmmarczyk: is it similar to
17:15LauJensen$(reduce #(clojure.set/union %1 %2) #{} [[1 3 5] [2 4]])
17:15sexpbot=> [1 3 5 2 4]
17:15LauJensen?
17:15mmarczykLauJensen: with (sorted-set), right
17:16LauJensenk
17:16mmarczykah, good idea and the actual way to go for the -nub version, I guess :-)
17:16LauJensenSo wrap it in a call to (set) and you're good to go
17:16mmarczykthough actually not quite
17:16mmarczykbecause again
17:16mmarczykthis builds the whole set
17:16mmarczykwhereas merge-seqs[-nub] just walks a long the seqs lazily
17:17mmarczykoutputting one item at a time
17:17mmarczykbecause it knows the inputs to be sorted
17:17LauJensen$(take 2 (reduce #(do (println "running") (clojure.set/union %1 %2)) #{} [[1 3 5] [2 4]]))
17:17sexpbot=> running running (1 3)
17:17mmarczyk^walks along
17:17LauJensenSo its still lazy, except for the sorting
17:17LauJensenBut to sort, you need to walk the whole set first
17:17mmarczykwhich is the whole point
17:18mmarczykbecause the original problem was to add up all numbers divisible by 3 or 5 under 1000
17:18mmarczykI wanted to use (iterate #(+ % 3) 0) and (iterate #(+ % 5) 0), then do a duplicate-removing merge
17:18mmarczykobviously can't use a set here
17:19LauJensenNope, sorted-set is redundant for data which is incremental in nature
17:20mmarczyk$(take 20 (into (sorted-set) (iterate inc 0)))
17:20sexpbotjava.lang.ClassNotFoundException: clojure.core$iterate$fn__3750
17:20mmarczykhuh?
17:20mmarczyk$(take 20 (into (sorted-set) (range)))
17:20sexpbotExecution Timed Out!
17:20itistodaywhat is the relationship of this (http://build.clojure.org/job/clojure/) to rhickey's master branch on github?
17:21mmarczykitistoday: nightly build
17:21itistodaymmarczyk: is it based on the master branch or some other branch?
17:21mmarczykmaster
17:21itistodaymmarczyk: ok cool thanks
17:22mmarczykLauJensen: so anyway, "redundant" -- sure, in a very theoretical sense, but you can't use it with infinite seqs
17:25LauJensenIts a question of using the right tool for the job. Looks to me like you're trying to model a reality which doesnt exist, ie lazy sorting. For a task that requries sorting, I prefer a combo of reduce and sets, for a task such as the one you describe I wouldnt make it more complicated than it has to be
17:25LauJensenJust my 2 cents - hack away :)
17:26mmarczykqbg: updated the Gist with a DRY version -- do you approve? :-)
17:26mmarczykLauJensen: I don't sort, I *assume* the inputs are sorted
17:26mmarczykLauJensen: as in merge sort -- the merge step knows it works with sorted inputs
17:27mmarczykLauJensen: in fact, the original idea for merging was perfectly lazy, because it needed to be in for dealing with tape drives in an efficient manner I guess :-)
17:28mmarczykLauJensen: anyway, your idea for a strict duplicate-removing merge with (sorted-set) is cool, so thanks; and I'll welcome any improvements to the lazy version :-)
17:28qbgmmarczyk: Note that before you were using compare and now you are using =.
17:29mmarczykqbg: yeah, I thought about it
17:29qbgBut otherwise, it's better :)
17:30mmarczykI'm trying to figure out if the difference between (zero? (compare x y)) and (= x y) is significant
17:31mmarczykok, inserted the (zero? ...) version
17:31mmarczykjust to be safe
17:31LauJensenmmarczyk: on the master branch ?
17:32mmarczykLauJensen: you mean if I'm targetting master with merge-seqs...? yeah, for now
17:32LauJensenmmarczyk: When you're asking questions about '=' I just wanted to know if it was related to the changes in the equal branch or not
17:32mmarczykLauJensen: ah, good point
17:33qbgequiv brings back some equality across types
17:33mmarczykactually I'm doing this on an 'equal' REPL
17:34mmarczyksince I haven't got 'round to building equiv yet... actually might do that now
17:37TeXnomancyLauJensen: did you have your clojure studio recently?
17:37LauJensenzero? calls x.signum() == 0, and = calls x.equals(y) as far as I can tell.
17:37LauJensenTeXnomancy: Yea I just got back from Brussels yesterday as a matter of fact :)
17:37TeXnomancyLauJensen: smashing! how'd it go?
17:39LauJensenTeXnomancy: I'd say it went great. The team got an IRCBot up and running on the first day, and by the second day they had already written some improvements to Clojure.core, which brought speedups of 20%, so I think people came with a super attitude and energy, and took away some skills because of it
17:41TeXnomancysounds like fun. glad to see the ecosystem is already supporting several of these kinds of things.
17:41Raynesmmarczyk: There appears to be a problem with swank servers and clj-sandbox. I suppose some sort of compilation mix up. Either way, iterate and rseq do not work.
17:45mmarczykRaynes: I see... well, no big deal
17:46Raynesmmarczyk: It'll probably be fixed if swank gets compiled with 1.2. Assuming it's actually compiled... If not, then I don't know what causes it and I digress. :p
17:46mmarczykRaynes: no aot'd namespaces for swank iirc
17:47TeXnomancymmarczyk: correct
17:47Raynesmmarczyk: Well, I can run sexpbot through the shell script and it works fine. I normally run it through a swank server, and when I do that, it meows at you on iterate and rseq.
17:47RaynesI have no clue.
17:47mmarczykwow, weird
17:57TeXnomancyany last-minute patches before Leiningen rc2?
17:58mmarczykTeXnomancy: one maybe
17:58mmarczykTeXnomancy: :license & Co. in sample.project.clj
17:58mmarczykTeXnomancy: I think I've sent you a pull request for that
17:59mmarczykTeXnomancy: otherwise it's on add-more-info-to-pom-doc branch in my fork
18:00RaynesTeXnomancy: Did you fix the lein repl thing where it always uses 1.1?
18:00TeXnomancyRaynes: yeah, several weeks ago
18:00RaynesGood boy.
18:00TeXnomancymmarczyk: oh, I thought I had got that one.
18:00Raynes<3
18:01TeXnomancymmarczyk: apply'd!
18:01mmarczykTeXnomancy: cool, thanks
18:01mmarczykTeXnomancy: there's also the new commit
18:01mmarczyk'repositories being maps'
18:02mmarczykjust noticed it
18:02mmarczykanyway, could use an example too
18:02TeXnomancymmarczyk: yeah... I'm using the term "RC" to mean "functionally release candidate"
18:02TeXnomancythere are still documentation tasks remaining for 1.2
18:03mmarczykTeXnomancy: fair enough :-)
18:09TeXnomancyplenty of changes since RC1: http://github.com/technomancy/leiningen/commit/d94d94db096d690b282f90f3edd5569159ba2cb0
18:11mmarczykTeXnomancy: one more thing
18:12mmarczykdeps.clj -> make-repository -> second branch of if -> the let form seems to be missing a binding expression
18:13mmarczyk(let [{:keys [url username password]} settings-goes-here] ...
18:13TeXnomancymmarczyk: dang! you're right.
18:13TeXnomancyI don't have a password-protected repo to test against, but I could have caught that =\
18:13mmarczyk:-)
18:18kirasso i just figured out that lein new allows you to specify a groupid. i'm not sure when this would normally be used, but last week i was trying to figure out how to use lein to set up a project "test-project" without having dashes where there were supposed to be underscores and vice versa. using the groupid option makes it possible to do this. just wondering, are there any other reasons why this option is useful?
18:19TeXnomancykiras: IMO group-id is not useful. =)
18:19TeXnomancybut some people wanted it and were kind enough to contribute a patch
18:19kiraswhat about in the situation i just described?
18:19kirasis there a better way to accomplish that?
18:20TeXnomancykiras: well, the JVM can't load files that have a dash in them. it's just a dumb limitation it has.
18:20TeXnomancythat's why they get replaced with underscores.
18:20mmarczykI'm only using group-ids in :dependencies... and then I occasionally switch back and forth between a couple of them (different folks' jars on Clojars)
18:21kirasi understand that, i just meant, lein currently doesn't let you make a project correctly like this: lein new test-project, at least not that i'm aware of
18:21TeXnomancyoh yeah, you absolutely need group-ids for specifying dependencies on other peoples' projects. I just don't see the point of adding one for your own (other than publishing non-canonical releases to clojars)
18:21kirasso it's useful in that situation, at least
18:22nickikHow can i make this ([1] [2] [3] [4]) out of this ([1] [2]) ([3] [4])
18:22kirasi was thinking if there was no other reason for that option in new, wouldn't it be possible to make lein new handle that automatically?
18:22Raynes$(concat '([1] [2]) '([3] [4]))
18:22sexpbot=> ([1] [2] [3] [4])
18:22kirasso lein new test-project sets up project.clj and core.clj with test-project and the directories are all test_project?
18:22mmarczykkiras: lein new test-project works fine for me
18:22kirasmmarczyk: really?
18:22kiras...
18:22Raynes$(into '([1] [2]) '([3] [4])) ; back asswards
18:22sexpbot=> ([4] [3] [1] [2])
18:23kiraswonder what i'm doing wrong then
18:23mmarczykthe project directory is called test-project, the namespace directory is called test_project, as it needs to be due to JVM issues
18:23TeXnomancykiras: could you describe what it is specifically that you think is wrong?
18:23Raynesconcat is what you're looking for, nickik
18:23TeXnomancywhere are you expecting there do be dashes rather than underscores?
18:23kirastexnomancy: i thought that when i did lein new test-project it was creating dashes everywhere
18:23TeXnomancyso ... I realized leiningen freaks out if I try to run it from my home dir since it tries to put all of ~/src on the classpath... which is like 20+ GB =(
18:24mmarczykkiras: also, how are group-ids of help?
18:24kirasboth in the directories and the source files
18:24mmarczykTeXnomancy: even with lein new? that would be an 'ouch'
18:25mmarczykthen again, maybe not... ah, totally uncertain now
18:25mmarczykkiras: the dashes need to be replaced with underscores for stuff which will end up on the classpath
18:25TeXnomancykiras: hmmm... actually I vaguely recall a patch addressing that which has been applied in 1.2.0; perhaps you could be the first person to try the latest release candidate?
18:25kirastexnomancy: actually... looks like i am wrong... let me check
18:26TeXnomancywell you should try the RC anyway; it's really great. =)
18:26mmarczykkiras: for the "outer" directory of the project, they shouldn't be replaced, but at least in HEAD they aren't, so if there was a problem, it's fixed now :-)
18:27nickikthx for your anwsers works great
18:27mmarczykTeXnomancy: btw, what's the story behind checkout-deps? I notice it's rather stubby right now :-)
18:28TeXnomancymmarczyk: at first I thought it would be useful as a task, but I don't think so anymore. it will probably be merged into deps.clj since there's no need to have it in its own ns.
18:30mmarczykTeXnomancy: so, is the idea to pull from git repos into project/checkout-deps/foo/ ?
18:30TeXnomancymmarczyk: yeah, lein-generated projects will put their git repo info in the pom (which is included in the jar), so it could do that
18:31TeXnomancybut I'm unsure if that would even be useful... if so it belongs in a plugin
18:31mmarczykmaybe an optional hook (hooke?) on the deps task?
18:32TeXnomancypossibly
18:33TeXnomancyhmm... I should list the contributors next to the entries in the NEWS file.
18:33mmarczyk:-)
18:34arohnerTeXnomancy: thanks for applying my patch. What's with your name today? Are you working with tex, or hanging out in texas?
18:34TeXnomancyarohner: oh, heh... I had some issues with my dircproxy that I need to take a look at; falling back to my alt. nick in the mean time.
18:34TeXnomancy(I am actually not very good at typesetting)
18:36itistodayTeXnomancy: is it cool to use leiningen from your master branch, or is that not stable and we should use the RC2 from the Downloads page?
18:36TeXnomancyitistoday: right now they are exactly the same. =)
18:36TeXnomancyitistoday: master generally stays very stable; I use it at work every day.
18:37itistodayTeXnomancy: ok cool, thanks!
18:37TeXnomancyany destabilizing work will be done on a topic branch until it's "ready"
18:37arohneroh that is too cool. Metadata for line numbers are attached to the actual forms, so you can use them in macros
18:37TeXnomancyitistoday: btw; you shouldn't have to download any jars manually, just get the shell script and have it run self-install
18:37TeXnomancy(unless you're on Windows)
18:37itistodayTeXnomancy: yeah i haven't, i've cloned your repo, do i just go in and run ./bin/lein self-install ?
18:38arohnerbut it appears clojure.walk eats metadata :-(
18:38mmarczykarohner: yeah... I remember I didn't get why metadata would be such a big deal when first learning about Clojure *at all*, whereas now I think having them is an *amazing* win
18:38TeXnomancyitistoday: should do the trick
18:39mmarczykwell, clojure.walk/walk doesn't, but the inner & outer functions would need to preserve them
18:39mmarczykthere was a thread on the ggroup mentioning this as a bug recently
18:39TeXnomancyyou don't even need to check it out actually; you can just get the shell script by itself
18:39mmarczykcould be considered a bug in prewalk / postwalk, to be sure...
18:40TeXnomancymmarczyk: the last three little hacks I've done have all centered around metadata. it's great!
18:40mmarczykso it is :-)
18:41TeXnomancy(robert hooke, serializable-fn, and radagast)
18:42arohnerTeXnomancy: what is radagast?
18:42mmarczykserializable-fn & radagast? I want to know more!
18:42arohnerserializable-fn is very clever btw
18:43TeXnomancyoh... I haven't really released radagast yet.
18:43arohnermmarczyk: (defmacro fn [ & body] (fn {:src body} ~@body)
18:43TeXnomancybut I recently decided on that name for http://p.hagelb.org/coverage.clj.html
18:43mmarczykhah, cool :-)
18:43kirastexnomancy: it looks like everything is working as it should... but i'm having trouble running the uberjar after i create it... it should just be java -jar test-project-standalone.jar, right?
18:43mmarczyk(that was re: serializable-fn... looking at the link now)
18:43TeXnomancymmarczyk: we implemented it at one of the seattle clojure meetings: http://github.com/technomancy/serializable-fn
18:44mmarczykkiras: you'd need to specify a main namespace
18:44mmarczykkiras: :main in project.clj
18:44mmarczykkiras: plus the namespace itself needs to be :gen-class'ed
18:44kirasmmarcyzk: i did, but i'm not sure if it is the right one. i have :main test-project.core
18:45mmarczykTeXnomancy: cool commit message on 1.1.0 :-)
18:45mmarczykkiras: and the gen-class?
18:45mmarczyk(ns test-project.core (:gen-class))
18:45kirasmmarcyzk: and the :gen-class is where it should be as well... i had this working last week
18:45mmarczykoh, and you need (defn -main [& args] ...) in there as well
18:46kirasmmarcyzk: well, i have (defn -main [] ...)
18:46mmarczykactually, does java -jar work for you with the regular jar? if it does, then it's definitely something funny with uberjar
18:46kirasthat did work before, although maybe it's wrong
18:46kirasno, it doesn't
18:47kirasi'm thinking maybe this was what made me think there was something wrong with the project creation
18:47TeXnomancyis it possible even to claim copyright by something as vague as Seajure?
18:49kiraswonder if i have the namespace wrong in project.clj...
18:49mmarczykhm, could also replace print-method for fns with one using clojure.repl/source-fn where that is able to find the source
18:50TeXnomancyoh, that'd be nifty
18:51TeXnomancy... just sayin'.
18:51mmarczykTeXnomancy: surely it must be, in fact I would say it gives Seajure an all new existence on the Upper Plane of IP
18:51TeXnomancymmarczyk: you mean IPv6?
18:51TeXnomancybadum-crash!
18:51mmarczyk:-P
18:51TeXnomancyis it easy to concatenate PDFs?
18:52mmarczykTeXnomancy: apparently not really... http://ansuz.sooke.bc.ca/software/pdf-append.php
18:53mmarczykhaven't tried all of the solutions listed, but normally I settle for some print-to-file-like approach
18:55mmarczykhm, leiningen.coverage would be absolutely awesome
18:56TeXnomancymmarczyk: sorta. it's only fn-level coverage.
18:57TeXnomancywhat you really want is branch-level coverage, which would take a lot more than 30 lines to implement. =)
18:57kirasok, so using underscores (e.g. :main test_project.core) in project.clj works for me, but using dashes doesn't. is that as it should be?
18:57mmarczykthough currently I find myself writing macros which define a bunch of functions in one go pretty often... (defparsefns SQL "SQL" expression "SQL expression" ...)
18:57TeXnomancywow, actually that ghostscript hack worked
18:57TeXnomancythakns
18:57itistodaywhat is a good clj script to use? i.e. i've checked out the clojure repos and have a jar file, now i just need a convenient way to run a repl
18:57mmarczykTeXnomancy: oh good :-)
18:57mmarczykitistoday: http://github.com/liebke/clj
18:58mmarczykitistoday: brand new project -- be an early adopter! :-)
18:58itistodaymmarczyk: but isn't that a package manager?
18:58mmarczykitistoday: one of the stated goals is to provide a means to launch repls easily
18:58mmarczykclj repl, clj swingrepl
18:58mmarczykfor a swank server you'd need lein
18:59mmarczyklein is an option for a terminal repl too, of course
18:59itistodaymmarczyk: hmm... ok, this was actually on my list of things to install and use, i didn't know it was also a "standard way to get a repl"
18:59TeXnomancykiras: interesting... no, it should work with dashes there.
18:59mmarczykwell, not really standard quite yet, I guess, but might become one
18:59TeXnomancykiras: could you open an issue on the leiningen github page?
19:00mmarczykkiras: oh, good catch then
19:00kirasheh glad i wasn't totally wrong
19:01mmarczykthe entry in the jar's manifest should be correct, afaict
19:01kirastexnomancy: i think i can do that
19:03itistodaymmarczyk: I have clojure installed in ~/.clojure/clojure/clojure.jar, how do I tell clj to use this clojure?
19:03mmarczykitistoday: um, not sure, haven't really investigated clj yet... just skimmed the readme & code
19:03mmarczykitistoday: the readme seems quite extensive
19:04Raynesmmarczyk: You can start swank servers with clj now.
19:04mmarczykRaynes: oh cool, thanks for the heads up
19:04Raynesmmarczyk: That was actually added just a few hours ago, actually.
19:04Raynesactually :p
19:05mmarczykthat's actually good to know, anyway ;-)
19:08mmarczykkiras: so you say that :main test_project.core works for you?
19:08mmarczykkiras: it doesn't seem to work for me
19:08mmarczykmind you, :main test-project.core doesn't either
19:11kirasmmarcyzk: yes, it works for me
19:11kirasstrange... i really hope i'm not doing something stupid and overlooking it
19:13itistodayok, so for now, until i figure out how to get clj to use a different clojure.jar file, is there any other popular clj script for simply running a repl?
19:13itistodayor do most people simply write their own?
19:14qbgI don't know about others, but I wrote my own
19:16qbgIt isn't that hard to write a simple one
19:16itistodayqbg: it can be daunting if you haven't used java in several years :-p
19:17qbgSimple usage is java -cp <classpath> <java options> clojure.main
19:18qbgWhere <classpath> contains clojure.jar, and any other goodies you like (like clojure-contrib)
19:20itistodayi think i'll just modify this: http://github.com/russolsen/dejour/blob/master/bin/clj
19:20mmarczykitistoday: just a sec, I'll Gist my own
19:21mmarczykitistoday: http://gist.github.com/454436
19:21qbgPython, eh?
19:21mmarczykmore palatable than bash :-)
19:22itistodaymmarczyk: thanks! I might write a newlisp version then :-D
19:22itistodaymmarczyk: (based on yours)
19:22mmarczykitistoday: that would be cool :-)
19:23itistodayi guess writing a clj file is a sort of an initiation into clojure that n00bs must go through :-p
19:24mmarczykkiras: actually I notice I've been doing sth remarkably silly all this time
19:24kirasis this ok for a title for the github issue or would something else be preferred? project-name + project.clj :main project-name.core + lein uberjar + java -jar standalone jar = java.land.NoClassDefFoundError
19:24mmarczykkiras: having fixed that, java -jar ... works for me with uberjar-created jars
19:24mmarczykkiras: um, I'd say something else would be preferred ;-)
19:24kirassth == something?
19:25mmarczykyup
19:25qbgmmarczyk: Now I have an urge to a clj script in Clojure
19:25kirasdo you mean that this issue doesn't exist for you having fixed the sth silly you were doing?
19:25mmarczykqbg: called ouroboros, presumably? ;-)
19:25mmarczykkiras: apparently
19:25mmarczykkiras: just one more thing to check to be sure
19:26mmarczykkiras: because I might be masking it
19:26kirasmmarcyzk: ok, please let me know if you've solved it
19:26mmarczykkiras: will do in a second
19:26mmarczykkiras: yeah, seems to work for me
19:27mmarczykkiras: could you make a Gist of your test-project (directory layout + project.clj + your main namespace)? maybe I'd spot sth
19:28kirasmmarczyk: sure, might take me a few minutes
19:29mmarczykkiras: no problem, planning to hang around for a while yet
19:29kirasok
19:35kirasmmarczyk: http://gist.github.com/454449 let me know if this isn't sufficient
19:36mmarczykkiras: looking now
19:40mmarczykkiras: ok, I replicated your layout, ran `lein deps` then `lein uberjar`
19:40mmarczykkiras: and java -jar ...-standalone.jar works fine
19:40kirasmmarcyzk: hm... ok... let me try "lein deps" and "lein uberjar" again...
19:40mmarczykjava -jar slim-jar doesn't, because it doesn't have the Clojure runtime on the classpath
19:42kirasmmarczyk: i still can't get the standalone jar to run with java -jar ...-standalone.jar
19:43mmarczykkiras: I should note that I'm using lein's HEAD... not sure what issues might be present in earlier versions
19:43kirasmmarczyk: ah... i think i'm still using 1.1.0
19:44mmarczykkiras: could you try out the HEAD?
19:45kirasmmarczyk: sure, if you don't mind telling me how to. i only see 1.1.0 and 1.2.0-RCs 1 and 2 at http://github.com/technomancy/leiningen/downloads
19:45mmarczykRC2 will do
19:45kirasok
19:46mmarczykit's behind by one commit, which is a bugfix, but unrelated to this
19:47kirasok this will likely take me a bit to get setup, as i'm on windows... hopefully i won't need to reboot.
19:48mmarczykTeXnomancy: the link in your announcement is to RC1 :-)
19:49mmarczykkiras: oh, I think you should just get lein.bat
19:49mmarczykfor RC2
19:49mmarczykand tell it to self-install
19:49TeXnomancymmarczyk: noooo... not again. =(
19:49kirasah, didn't realize the new lein.bat could self-install
19:49TeXnomancyactually... I don't think it can. =(
19:50kirasT_T
19:50mmarczykoh :-(
19:50mmarczykTeXnomancy: :-)
19:50TeXnomancystill waiting for someone to port that. not sure how well lein.bat will work with the release candidate; sorry.
19:50mmarczykTeXnomancy: does the RC2 jar include the 'missing local' fix?
19:50kirasback to setting up environment variables by hand again, with the dialog with the textline that you can't expand :(
19:50TeXnomancymmarczyk: it does
19:51mmarczykoh, ok then
19:51mmarczykkiras: actually I'd get the lein.bat
19:51mmarczykkiras: try to run it on a project
19:51mmarczykkiras: then hopefully it would complain about lein's jar missing *at some path*
19:51TeXnomancyfor past releases, Rob Wolfe helped with getting the Windows side working... I should ask him if he could help for this one too.
19:51kirasmmarczyk: you mean without updating the jars?
19:51mmarczykthen you could put it there
19:51kirasah
19:51TeXnomancyunless someone else volunteers, of course.
19:52mmarczykif it doesn't complain, then presumably the old location will do
19:52kiraswell, i was trying to keep it set up like, /leiningen/1.1.0 /leiningen/1.2.0
19:52kirasinstead of just copying over stuff... maybe that's a bad idea though
19:53mmarczykkiras: if the lein.bat from 1.1.0 doesn't mind that, the one from HEAD shouldn't either
19:54kirasmmarczyk: sorry, i don't understand what you mean by that... if the lein bat from 1.1.0 doesn't mind what?
19:54mmarczykkiras: your current placement of the jar
19:55mmarczykkiras: I guess I might not understand what kind of setup you have in mind, though... haven't tried all this on Windows
19:55kirasah... i wouldn't expect it to, barring any changes, but i thought it would be a good idea to keep the various version of leiningen organized so that i could use different ones as needed
19:55kirasbut i guess it doesn't really matter
19:55mmarczykkiras: well, I do have lein-stable set up separately, using the latest release version
20:00kirasmmarczyk: ok, switched my environment variables, now running lein at all gives errors... think this happened the last time i tried this too, probably have to reboot.
20:01mmarczykkiras: :-(
20:01kirashehe
20:01kirasbrb
20:17kirasmmarczyk: back
20:17mmarczykkiras: better luck after the reboot?
20:18kiraslein is working now, my initial attempt at a successful uberjar run was unsuccessful though
20:18kirasmaybe i should try with a new project
20:20mmarczykkiras: nah, just do a lein clean
20:20kirasmmarczyk: ok
20:23kirasmmarczyk: lein builds the jars successfully, but i seem to be getting the same error at runtime
20:24kirasalso, a clojure.lang.LispReader$ReaderException is thrown during the lein uberjar
20:24mmarczyk:-(
20:24mmarczykand what does `lein version` say?
20:24mmarczykjust to be sure
20:24kirasLeiningen nil on Java 1.6.0_20 Java HotSpot(TM) Client VM
20:24kiras:P
20:25mmarczyknil? whoa :-P
20:25mmarczykit's 1.2.0-RC2 for me
20:25kirasyeah, that command has never seemed to work for me on windows
20:25mmarczykoh well
20:25kirasheh
20:26kirasany ideas?
20:26mmarczykho-hum. thinking about it, but no ideas so far
20:26kirasheh
20:26mmarczyk:-/
20:27mmarczykah, the joys of cross-platform compatibility
20:28kiraswrite once...
20:28mmarczykyeah.
20:29mmarczyk... crash in some of the places
20:29mmarczykkiras: what's the exception message?
20:29kirasthe lein uberjar one?
20:30kirasor the runtime one?
20:32mmarczykboth, I guess
20:33kirasmmarczyk: ok, i'll post them
20:33mmarczykin this case, maybe include the stack traces too, just in case
20:34kirasok, i thought that was what you wanted, actually
20:35mmarczykah, I meant just the exception message originally, if there is one... but the full stacktrace idea is better
20:36kirasok
20:39kirasmmarczyk: http://gist.github.com/454496
20:40mmarczykohhhh........
20:40kirasohhhh?
20:40mmarczykstarts to make sense
20:41mmarczykdoes it only happen with uberjar
20:41mmarczykor with, say, lein clean too?
20:42kiraslein clean is fine
20:42mmarczykand lein jar, lein compile, lein deps?
20:42mmarczykhm, every task really
20:42kiraslet me try
20:43kiraslein jar looks like it's giving the same reader error as uberjar
20:43mmarczykgood :-)
20:43kirasheh
20:43mmarczykcould you have a look at the others?
20:44mmarczykthough I think I have an idea as to where the problem might be
20:44mmarczykwith some blank spaces remaining, though...
20:44kiraslein compile: reader error lein deps: java.io.IOException...
20:45kirasi could post that to the gist as well, if you like
20:45mmarczykyes, please
20:47kirasmmarczyk: ok, updated it with the deps error... when you said "all of the tasks" did you literally mean all of them?
20:48mmarczykwell, I hate to ask, but... :-)
20:48kirasheh
20:50mmarczykhm, the IOException is funny... an issue with permissions maybe? either NTFS permissions or JVM security settings, I mean
20:50itistodayphew, ok done with my newlisp clj script, i haven't fully tested it, but it seems to work :-)
20:50itistodayhttp://paste.pocoo.org/show/230451/
20:50itistodaybased on: http://github.com/russolsen/dejour/blob/master/bin/clj
20:51mmarczykitistoday: heh, cool :-)
20:51kirasmmarcyzk: i don't know, but i wonder if it's related to something that's been bothering me, which is that sometimes with emacs open, i'm unable to empty the /lib directory
20:51kirasmaybe i should try it with emacs closed, although i've been using eshell most of the time
20:51mmarczykkiras: well, it would be useful to try doing it in a context where you can clean the directory by hand
20:52kirasmmarczyk: right. ok, i'll close emacs then
20:55kirasmmarczyk: even when i can clean the directory by hand, i get the error message from lein deps if the lib directory isn't already empty
20:56mmarczykhm, not good
20:56mmarczykbut this seems like a separate issue
20:56mmarczykso let's try fixing the uberjar thing for now
20:56kirasprobably
20:56kirasok
20:56kirasstill making my way down the task list
20:56mmarczykthanks :-)
20:57kirasheh np
20:59mmarczykbtw, you're just using the no argument versions of the tasks, right?
20:59mmarczyk`lein jar`, `lein uberjar` etc.
20:59kirasmmarczyk: so far, yes
21:00mmarczykok, that should be enough
21:00mmarczykjust wanted to make sure
21:00kirasok
21:00Raynesitistoday: You really shouldn't put closing parens on their own lines. Lisp isn't C++. :P
21:01itistodayRaynes: I've been told that many times, but I just can't justify not doing it... yet at least. maybe if more people yell at me, but I hate the "standard way"
21:02itistodayRaynes: to me, it's close to unreadable
21:02RaynesIt just looks really ugly, and nobody who knows better does it. It feels okay for curly brackets, but parentheses don't serve the same purpose here.
21:02RaynesBut in the end, it's your code.
21:02RaynesI'm just sayin'. :p
21:03itistodayRaynes: and *I'm just sayin'* that to me the standard way "looks really ugly" :-p
21:03itistodayi don't know why people do it
21:03RaynesBecause your unstandard way is unreadable to us. :p
21:04itistodayRaynes: i've tried to do it the standard way, and i couldn't take it, i had to go back
21:04kirasmmarczyk: ok, think i'm done
21:05kiraslet me know if i missed anything... after this i'm thinking of making a feature subtraction request ;)
21:05mmarczykkiras: :-)
21:05itistodaypeople complain about lisp's "many parenthesis" and "parenthesis zoo", I think it's mostly because people stack up their parenthesis and don't use them to delimit scope
21:05RaynesNew people complain. After a while, they like it.
21:06RaynesOr at least tolerate it with their editors.
21:06RaynesBut I don't think putting closing parens on new lines helps that.
21:06itistodaywell I'm going to try to start a counter-movement :-D
21:06itistodaybecause i think it does :-)
21:06RaynesBesides that, parens aren't just for delimiting scope.
21:06itistodayyou'll thank me later ;-)
21:06RaynesGood luck with that.
21:20mmarczykkiras: so, if I understand correctly, there are .jar files being created by lein jar & Co.
21:21mmarczykkiras: right? if so, could you open one of them up in an archive manager of some sort?
21:21kirasmmarczyk: yes, the jars are being built
21:21mmarczykI'm wondering if they actually contain everything that they should
21:22mmarczyknamely the .class files
21:22kirasmmarczyk: let me try extracting them
21:22mmarczykok
21:23kirashm...
21:23kirasok, so what .class files am i looking for?
21:24kirasmmarczyk: when i extract the non-standalone jar, i have a META-INF folder, a test_project folder and a project.clj folder at the root
21:24mmarczykwell, I guess the top level of the jar includes a test_project directory
21:24mmarczykyeah
21:25mmarczykand inside test_project ?
21:25kirasthe standalone is the same with the addition of a clojure directory
21:25kirascore.clj
21:25mmarczykjust this file?
21:25kirasyeah
21:25mmarczykok
21:25kirasthe classes must be in another castle
21:25mmarczykone more experiment then:
21:26mmarczykapparently :-)
21:26mmarczykI'm not sure how one launches JVMs on Windows
21:26mmarczykso correct any obvious mistakes
21:26kiraswell
21:26mmarczykbut I wonder about something like
21:26kirasi'm new to java
21:27kirasso i may not be able to correct you
21:27mmarczykjava.exe -cp "clojure.jar;clojure-contrib.jar" clojure.main
21:27mmarczyknote the semicolon; I'm not sure this is the correct char, it ought to be the same one Windows uses for separating $PATH entries
21:27Raynessemi-colon is right
21:28kirasthen it would be a semi colon
21:28mmarczykok then, this should be fine
21:28kirasand i remember using a similar command when i first started playing with clojure
21:28clojurebotclojurebot is like life: you make trade-offs
21:28mmarczykclojurebot: um, I'll remember that, thanks
21:28clojurebotPardon?
21:29mmarczykah, wait, I screwed up
21:29mmarczykI meant to include more stuff on the classpath
21:29kirasok
21:29mmarczyknamely the src/ and classes/ directories under the project dir
21:30mmarczykwith that addition, I'm curious about what happens when you evaluate (compile 'test-project.core)
21:31kirasmmarczyk: something like this: java -cp "clojure.jar;clojure-contrib.jar;src;classes" clojure.main in the project's root directory?
21:31mmarczykkiras: right
21:32kirashow many lines can i paste here?
21:32mmarczyknot sure, but do you get an exception of some sort?
21:32kirasyes
21:32mmarczykhah
21:32mmarczykinvolving the LispReader?
21:32kirasno
21:32kirasheh
21:32mmarczyk:-P
21:33kirasException in thread "main" java.lang.NoClassDefFoundError: clojure/main
21:33kirasCaused by: java.lang.ClassNotFoundException: clojure.main
21:33mmarczykoh.
21:33kirasCaused by: java.lang.ClassNotFoundException: clojure.main
21:33kirasoops
21:33kirasmore follows
21:33mmarczykhmmm, try java.exe -classpath maybe
21:35mmarczykinstead of -cp, I mean
21:35kirassame thing
21:35mmarczykactually
21:35mmarczykI'd expect you to need to use lib/clojure.jar
21:35kiraswhich jar is it supposed to be using?
21:35kirasyeah
21:35kirasi was wondering hehe
21:36kiraswindows terminal is so bad
21:39mmarczykyup, one of the major annoyances
21:39kirasmmarczyk: java -cp "lib\clojure-1.2.0-master-2010623.220259-87.jar;lib\clojure-contrib-1.2.0-20100615.150419-128.jar;src;classes" clojure.main
21:39kirasno luck
21:40mmarczyk-cp -> -classpath
21:40mmarczyk?
21:40kirasoh, right
21:40kirassame result
21:40mmarczykhow about java -jar lib\clojure.jar ?
21:41kirasjust that?
21:41mmarczykyeah
21:41kirasi get a repl
21:41mmarczykright, well then that error makes no sense :-/
21:41kirashm
21:42kirasoh...
21:42mmarczykok, maybe try
21:42kirasi made a typo, i think
21:42kiraslet me try again
21:42mmarczykwhew :-)
21:42kirasheh
21:42kirasok
21:42kirasnow it works
21:42mmarczyk:-)
21:42mmarczykso now, (compile 'test-project.core)
21:43kiras-cp and -classpath both work
21:43kirasok
21:44kirastest-project.core is returned
21:44mmarczykhm
21:44mmarczykany .class files in classes/ ?
21:44kiraslet me see
21:45kirasyes
21:45kiras ls classes/test_project/
21:45kirascore$_main.class core$loading__4403__auto__.class core.class core__init.class
21:45mmarczykhuh. in this case, try a lein uberjar again
21:45kirasok
21:46kirassame reader error
21:46mmarczykright, but it might include those .class files in the jar, in which case it would be interesting to see whether java -jar can run it
21:46kirasno luck
21:47mmarczykahhhh, actually, that was nonsense
21:47mmarczykuberjar currently does a `lein clean` first
21:47kirasah, right
21:47mmarczykso hopefully classes/ is now empty :-)
21:47kirasheh
21:48kirasit is :)
21:49kirasso
21:49kirasif i do lein jar
21:49kirasafter the compile from the repl
21:49kirasand lein jar doesn't do a clean
21:50kirasshould i be able to run the program if i give the proper classpath to java?
21:50kirasand would that even do anything for us at all?
21:51mmarczykI suppose it would be interesting to try
21:51mmarczykalthough
21:51mmarczykyou'd have to run it as java -cp ...
21:51kirasright
21:51mmarczyknaming your :main class at the end
21:51kirasah
21:52kiraslike this: java -cp "lib\clojure-1.2.0-master-20100623.220259-87.jar;lib\clojure-contrib-1.2.0-20100615.150419-128.jar;src;classes" test-project.core ?
21:52mmarczykyeah, I think java -jar doesn't take extra classpath args
21:52mmarczykkiras: `um, wait, not quite
21:52kirasah
21:52mmarczyktest_project.core
21:53mmarczykalso
21:53kiraswe're back to that then, are we? :P
21:53mmarczykskip src and classes
21:53kirasok
21:53mmarczykwell, not really
21:53mmarczykthe generated class must use _
21:53mmarczykthough you should never need to care
21:53kirasok
21:53mmarczykexcept you need to name your files / folders appropriately
21:53mmarczykso it's not all that transparent
21:53mmarczykah well
21:53kirasheh
21:55kirasmmarczyk: java -cp "lib\clojure-1.2.0-master-20100623.220259-87.jar;lib\clojure-contrib-1.2.0-20100615.150419-128.jar" test_project.core ?
21:55mmarczykright
21:55kirasit didn't work
21:55kiras:(
21:56mmarczykah wait
21:56mmarczykyour jar too
21:56kirasoh... in the classpath?
21:56mmarczykyes
21:56kirasok
21:56mmarczykthat's were your class should be
21:56mmarczykhopefully :-)
21:56kirasheh
21:58kirasmmarczyk: java -cp "lib\clojure-1.2.0-master-20100623.220259-87.jar;lib\clojure-contrib-1.2.0-20100615.150419-128.jar;test-project-1.0.0-SNAPSHOT-standalone.jar" test_project.core didn't work either
21:58mmarczykwrong jar
21:58kirasohhh
21:59kirasright
21:59kirasthanks
21:59kiraslol
21:59mmarczyk:-)
21:59kirasthat works
21:59mmarczykwoohoo!
21:59kirashehe
21:59kirasso, does that help us at all?
22:01kirasit seems like the problem is that the classes aren't being compiled, but this doesn't really help determine why that's the case, right?
22:01itistodaywhen I run M-x slime it says "it looks like Clojure is not installed, install now?" how can i tell it where my clj file is?
22:01mmarczykkiras: well, it's good to know where to search for the problem
22:01kirasmmarczyk: true
22:10kirasmmarczyk: it seems like the reader error is happening when it hits either the d or the : in some path or another, right? is it possible that lein.bat is sending the wrong string somewhere?
22:11mmarczykyeah
22:12mmarczykseems like lein.bat or leiningen.compile/eval-in-project issue
22:13mmarczykwell, leiningen.compile... the exact function is just a guess
22:13kirasah
22:14kirasso either it's bad input to a function in leiningen.compile from lein.bat or some function in leiningen.compile isn't handling valid input correctly?
22:14mmarczykseems so to me
22:15mmarczykactually it would be possible to check this
22:15mmarczyksth like
22:15kirasi'm diffing the 1.1.0 bat against the 1.2.0 one
22:15kirasmaybe something obvious will show up
22:16mmarczykjava -cp "clojure.jar;clojure-contrib.jar;leiningen.jar;src;classes" leiningen.core uberjar
22:16mmarczykwith proper paths to the jars, of course
22:16mmarczykall this in the project directory, I mean
22:17kirasin the test-project directory or the leiningen project directory?
22:17kirasoh
22:17kirasnm
22:17kirasi could try that
22:17mmarczykit should either work just fine or throw a tantrum like lein uberjar does
22:18kirasheh
22:18mmarczyk...fully expecting to be surprised with a third outcome
22:19kiraslol
22:20itistodaycould someone walk me through how to run ants.clj using lein?
22:20mmarczykitistoday: ants.clj predates lein quite significantly
22:20itistodaymmarczyk: is not possible?
22:20itistodayi mean, i'm sure it is
22:21mmarczykitistoday: use your Clojure launcher script: clj ants.clj
22:21itistodayi copied the source into src/core.clj
22:21itistodaymmarczyk: i'm trying to learn how to use lein
22:21itistoday(and swank-clojure)
22:21mmarczykLeiningen doesn't include a `lein run` task by default
22:22mmarczykif you just mean to run a repl from which you'll be able to call functions from ants.clj
22:22mmarczyklein repl should do that for you
22:22mmarczykor lein swank, for a SLIME repl
22:22itistodayit doesn't work
22:22itistodayThat's not a task. Use "lein help" to list all tasks
22:22mmarczykwhat doesn't work?
22:23itistoday(for: lein swank)
22:23itistodayand lein help doesn't show swank as a command
22:23mmarczykah, well, you'll need to include swank-clojure in :dev-dependencies for your project
22:23itistodayi thought it did:
22:24mmarczyklatest version is 1.3.0-SNAPSHOT, latest stable release -- 1.2.0, I think
22:24itistodayhttp://paste.pocoo.org/show/230481/
22:24kirasmmarczyk: does java -cp "lib\clojure-1.2.0-master-20100623.220259-87.jar;lib\clojure-contrib-1.2.0-20100615.150419-128.jar;d:/xPrograms/leiningen/1.2.0/leiningen-1.2.0-RC2-standalone.jar;src;classes" leiningen.core uberjar look ok?
22:24mmarczykkiras: xPrograms ?
22:24kirasjust a folder
22:25itistodaymmarczyk: http://paste.pocoo.org/show/230481/
22:25mmarczykkiras: yeah, wanted to make sure the 'x' wasn't a typo
22:25mmarczykotherwise it seems fine
22:25mmarczykaaaahhhh
22:25mmarczykno
22:25mmarczykwait wait
22:25kirasheh
22:25mmarczykif you're going to use -standalone.jar
22:25kirasi was wondering about that
22:25mmarczykskip the clojure and contrib jars
22:25kirasok
22:26mmarczykitistoday: already looked at it
22:26kiraswell, you wanted a third outcome ;)
22:26mmarczykitistoday: I'm not sure if this will help, but
22:26mmarczykkiras: can't wait :-P
22:26kirasheh
22:26mmarczykitistoday: you could try moving swank-clojure to :dev-dependencies
22:27mmarczykitistoday: I'm not sure if the regular dependencies are considered when lein looks for plugins
22:27itistodaystill get this: "That's not a task. Use "lein help" to list all tasks."
22:28mmarczykitistoday: what OS?
22:28itistoday10.6.4
22:28itistodayi'm cursing in my head
22:28kirasmmarczyk: http://gist.github.com/454565
22:29itistodaymmarczyk: i appreciate you trying to help me though
22:29mmarczykitistoday: np, trying to come up with a guess as to what it's about
22:29itistodayi'm using the latest git stuff for lein
22:29mmarczykkiras: ah, yeah, I got the class wrong
22:29itistodayi looked at the shell command (lein) and it really doesn't even have the word swank in it
22:29itistodaywtf
22:30kirasi think moving swank-clojure to :dev-dependencies would work, if you haven't tried that yet
22:30itistodaykiras: i did try it
22:30itistodaysame result
22:30kirasi see
22:30itistodayunless i did it wrong: http://paste.pocoo.org/show/230482/
22:30kirasno, that looks right to me
22:31mmarczykkiras: try java -cp "..." clojure.main -e "(use 'leiningen.core) (-main)"
22:31kirasdid you do lein deps afterwards?
22:31kirasmmarczyk: ok, where "..." is the previous classpath?
22:31mmarczykright
22:32itistoday'lein deps' gives me a bunch of errors: http://paste.pocoo.org/show/230483/
22:33mmarczykitistoday: ah, wrong version strings
22:33mmarczykuse "1.2.0-master-SNAPSHOT" for Clojure
22:33mmarczyk"1.2.0-SNAPSHOT" for contrib
22:34itistodaymmarczyk: you're my hero!! :-*
22:34itistoday:-P
22:35mmarczyk:-)
22:35itistodayi had tried changing both to 1.2.0-SNAPSHOT, but that failed
22:35itistodayi didn't think to try that...
22:35itistoday(having one be 1.2.0-SNAPSHOT, the other for some reason different)
22:35mmarczykthat's a carefully installed trip-up device
22:37itistodayok yay, so lein swank has launched a server
22:37kirasmmarczyk: java -cp "d:/xPrograms/leiningen/1.2.0/leiningen-1.2.0-RC2-standalone.jar;src;classes" clojure.main -e "(use 'leiningen.core) (-main)" brings up the lein help list
22:37itistodaynow to try to connect to it
22:37mmarczykkiras: add uberjar to the end
22:37mmarczykkiras: actually I'm wondering why the version using leiningen.core-the-class directly didn't work... I'll save that for later though
22:38mmarczykitistoday: slime-connect
22:38itistodayok, getting an odd prompt: Versions differ: nil (slime) vs. 20100404 (swank). Continue? (y or n)
22:39itistodayis that normal?
22:39mmarczykitistoday: it is
22:39kirasmmarczyk: well... with uberjar it prints the help list again, then i get FileNotFoundException: uberjar
22:40kirasmmarczyk: do i need to pass a full path to the uberjar file as well?
22:40mmarczykkiras: hm, didn't think so
22:40mmarczykkiras: java -cp "..." clojure.main -e "..." uberjar
22:40mmarczykkiras: right?
22:41itistodayholy crap... i have a window...
22:41kirasmmarczyk: java -cp "d:/xPrograms/leiningen/1.2.0/leiningen-1.2.0-RC2-standalone.jar;src;classes" clojure.main -e "(use 'leiningen.core) (-main)" uberjar
22:41mmarczykkiras: right... hmm
22:42itistodayHOORAYYYY! ANTS AH-HOY!
22:42itistodaylook at the litter fuckers go
22:42itistoday*little
22:42itistodaygot a little too excited there
22:42mmarczykitistoday: happy for you ;-)
22:43itistodaymmarczyk: thanks for all your help!! http://cl.ly/baa49f2b89912ffa9a56
22:43mmarczykwell, it was the lein deps suggestion which provided the breakthrough :-)
22:43itistodayi'm surprised that after that everything went pretty smoothly
22:44itistodaythis ancient clojure file just worked
22:44mmarczykkiras: I *really* don't get it, let me dive into lein.bat to see what's its bright idea for how to call into lein
22:44kirasmmarczyk: ok
22:44mmarczykitistoday: no gratuitous breakage in Clojure-land :-)
22:44mmarczykone of the great parts of the experience
22:45itistodayso, one more question, what about auto-completion in emacs?
22:45itistodayis slime needed for that?
22:46mmarczykkiras: ok, so try "(use 'leiningen.core) (-main \"uberjar\")"
22:46mmarczykitistoday: depends on the kind of autocompletion you have in mind
22:46mmarczykM-/ will autocomplete as it usually does
22:46itistodaymmarczyk: the fancy-kind. :-) where it's based on knowledge of dependencies and function params, etc
22:47mmarczykor if you use it for hippy-expand, it'll do the usual thing
22:47mmarczykwell yeah, dynamic knowledge about the project is provided by swank
22:47itistodaymmarczyk: so i need to run 'lein swank' and then connect via slime-connect?
22:47kirasmmarczyk: yes, that works, but gives the same reader exception as just doing "lein uberjar"
22:48kirasso it looks like lein.bat may not be at fault?
22:48mmarczykitistoday: I thought you just did that and it worked?
22:48itistodaymmarczyk: yeah i did, i mean in the future, and in general, for autocompletion
22:48mmarczykkiras: agreed
22:49mmarczykitistoday: that's one good way of doing things
22:49kirasmmarczyk: also, classes is still empty, java -jar standalone.jar doesn't work, etc.... so it looks like it's exactly the same as lein uberjar
22:49mmarczykitistoday: personally, I use M-x slime for standalone "experimental" repls
22:49kiraswhich seems kind of weird
22:50itistodaymmarczyk: i can't do that though, remember the error?
22:50mmarczykitistoday: and a custom clojure-project function when working with a project
22:50itistodaymmarczyk: here, i'll get it again
22:50mmarczykitistoday: well, I've got a totally custom slime setup
22:50itistodaymmarczyk: "It looks like Clojure is not installed. Install now?"
22:50mmarczykitistoday: don't know much about the elpa setup
22:50itistodaymmarczyk: i'm trying to avoid that and just go by the books to avoid breaking anything
22:51mmarczykkiras: right :-(
22:51itistodaythe whole thing seems very fragile to me
22:51mmarczykitistoday: oh? why would that be?
22:51mmarczykitistoday: underdocumented perhaps, if it doesn't come with a clear explanation of how to override various defaults
22:52itistodaymmarczyk: well, i've got so many clojures installed now
22:52itistoday(jars)
22:52mmarczykitistoday: which I wouldn't know anything about, because I haven't even got package.el installed
22:52itistodayi just want to have package.el take care of everything
22:52itistodayand to not introduce conflicts by modifying it directly myself
22:52kirasmmarczyk: well, i think i need to take a break from this. any ideas on where i should go from here?
22:52mmarczykitistoday: I meant a clearly documented way to tell elpa's slime / swank-clojure to "use this jar"
22:52tomojso install clojure-mode and slime-repl from elpa, and you should be good
22:53mmarczykkiras: yeah, well... actually I'm becoming extremely sleepy myself
22:53kirasmmarczyk: same hehe thanks for all your help
22:53mmarczykkiras: I'll be looking into leiningen.compile, maybe I'll figure something out
22:53tomojitistoday: you still have problems after installing those?
22:54mmarczykkiras: np :-)
22:54kirasmmarczyk: ok, how will i know if you find a solution? should i just hang out here? lol
22:54itistodaytomoj: sorry, can you remind me what you're referring to? i was having problems, but mmarczyk helped me out to get ants.clj working with lein/swank/slime. now i'm trying to get M-x slime to use my existing clojure.jar
22:55tomojoh
22:55mmarczykkiras: I'd say make an issue on GitHub, with basic information about the problem -- maybe a link to your Gist (I think it misses info on lein jar, so maybe you could add it); indicate that it might be Windows specific (I can't reproduce it on Linux, plus there's the d: thing)
22:56mmarczykkiras: you could also provide a link to
22:56tomojM-x slime will just use whatever is in ~/.swank-clojure
22:56mmarczykkiras: http://clojure-log.n01se.net/
22:56mmarczykkiras: I mean to one of the date-and-time anchors within this conversation
22:57mmarczykif you want to be extra thorough :-P
22:57mmarczykbut then again, maybe a mention that it's likely related to leiningen.compile would be better
22:57kirasah, you mean just place a link in the gist?
22:58kirasthats kind of cool
22:58kirasthat's
22:58mmarczykkiras: a link in the issue text, to the gist
22:58kirasmmarczyk: i meant about the clojure-log site
22:58kirasbut i think i follow you
22:59kirasi'll probably post the issue tomorrow, kind of tired right now
22:59mmarczykkiras: ah, yeah; you'd need to use a .../date/2010-06-26.html link, though
22:59kirasok
22:59mmarczykkiras: sure; also, of course you should hang around here! :-)
23:00kirasmmarczyk: hehe ok, i'll be around
23:00kirasthanks again for all your help
23:00mmarczykanyway. my `sleep` task is long overdue
23:00kirasheh
23:00kirasnight
23:00mmarczykwill look into this again in my next waking period
23:01kirasok
23:01mmarczykgood night :-)
23:01kirasnight
23:05itistodaytomoj: thanks!
23:05itistodaythanks to you I got M-x slime working too! :-D
23:06itistodayi created symlinks in ~/.swank-clojure to point to clojure.jar and swank-clojure.jar
23:06itistodayand that did the trick
23:07tomojgot paredit?
23:07itistodaytomoj: i do ... but i'm modified it a bit
23:07itistodayit's no longer really paredit
23:07itistodayi've sortof butchered it so that it behaves like TextMate
23:08tomojI don't remember.. how does textmate behave?
23:08itistodaya lot more intuitively :-P
23:08itistodayyou type " and it creates "" and puts the cursor in between them
23:08itistodayit does the same for { ( [, etc
23:09tomojthat sounds exactly like paredit
23:09itistodaywell, not really
23:09itistodayparedit is really funky
23:09itistodayyou can't, for example, delete them like normal
23:09tomojoh, right
23:09tomojthat's a good thing, though :P
23:09itistodayyou have to press some crazy key combination
23:09itistodaywhy is that a good thing?
23:10tomojbecause manually balancing parens is a waste of time
23:10itistodayTextMate will delete both quotation marks if you press delete within an empty pair
23:10tomojparedit does the same
23:10itistodayso you don't end up manually balancing very much
23:10itistodayalso, I frequently will wrap a function in a function
23:10itistodayso I'll have some code like this: (((blah asdf ... etc
23:10itistodayand i want to wrap that in another function
23:11tomojbut I just wanted to make sure you weren't going to go off clojure+slimeing without knowing about paredit, long as you do, cool
23:11itistodayin text mate, I just put an extra parenthesis in front of it
23:11oberwould kill for repl on this portable :P
23:11tomojit will add the closing paren automatically?
23:11itistodaytomoj: no, I C-e to the end and manually balance it
23:12tomojright :)
23:12itistodaybut in paredit, it puts this: () (((blah asdf ... etc
23:12tomojin paredit you put point in front of the (((blah.. and hit M-(
23:12itistodaythat's not very helpful at all
23:12itistodayoh
23:12tomojit is unintuitive, yeah
23:12tomojbut imo very worth getting used to
23:12itistodaywell i might have to give it a chance...
23:13tomojif you ever do, be sure to get the beta, version 22
23:13itistodaytomoj: is that in elpa?
23:13tomojnope :(
23:13itistodaywhy should i get the beta?
23:13tomojit works better with clojure
23:13tomojclojure-mode will detect that you're using version 22 and fix {}
23:13itistodaytomoj: ok i'll give it a try
23:14itistodaywhere can i get it from? is there a github repo?
23:14tomojhttp://mumble.net/~campbell/emacs/paredit-beta.el
23:14itistodayyeah i just found that :-)
23:14itistodayhmm...
23:15itistodaythey should put it on github or some site like that
23:15itistodayso that you can just update it...
23:15tomojthen https://gist.github.com/038be3e78e8fa58d2733 works for me
23:16itistodaytomoj: thanks!
23:17itistodaywhat do you do in the slime repl?
23:17tomojhttp://mumble.net/~campbell/emacs/paredit-beta.html
23:17tomojI don't use paredit in the repl
23:17itistodaywell, i mean in general
23:17tomojI think it causes some problems, but there is some way to resolve the problems, but I just haven't bothered yet
23:18itistodayi just tried running some source code in it from the ants.clj file: (dorun (map #(send-off % behave) ants))
23:18itistodayand it gave me an exception, despite the file being loaded
23:18itistodayso... i'm not sure what it's for
23:18tomojwhat was the exception?
23:19tomojprobably it still says "user>" ?
23:19itistodayhttp://gist.github.com/454599
23:19itistodaytomoj: yes
23:19tomojoh, well, that's fine because ants.clj doesn't declare a namespace, hmm
23:19itistodaywell, actually, it does
23:19itistodayi modified it to do that
23:19itistodayso that it would work with the lein project
23:20itistodayhow do i switch to ants.core?
23:20tomojoh, then you need to switch into that namespace
23:20tomojtype ",i" at the repl
23:20tomojthen you can type a package name (with tab-completion)
23:20itistodayoh, cool
23:20itistodayyay!
23:20itistodaythat works :-)
23:20itistodayok, now i see that it does indeed do what i expected it to
23:21tomojthat's always nice
23:21itistodayis there a way to get a list of the defined functions in a clj file? perhaps have it in speedbar?
23:22itistodayso that i can quickly jump to a function by clicking on it
23:22tomojnot sure if something is there already for that
23:22tomojshould be possible with some elisp though
23:23tomojyou can already jump to a function definition by hitting M-., but that's a bit different
23:24tomoj(e.g. type "map" in the repl and hit M-. :D)
23:24tomojstill amazes me that it reaches into jars
23:24itistodaythanks for that tip! yeah i just noticed that too, and it has autocompletion
23:27itistodaydo you happen to know in advance whether i need to rename paredit-beta.el to paredit.el?
23:27itistodaytomoj: (err.. forgot to include your name)
23:27tomojI did, not sure if it's necessary
23:27tomojprobably a good idea
23:27itistodaymmk
23:35itistodayyup, turned out to be necessary :-p
23:47itistodaytomoj: i don't like how paredit changes the behavior of the backspace key
23:47itistodayanyway to make it not do that?
23:47itistodaynow whenever i highlight something and press backspace, it doesn't delete it
23:48tomojdunno, sorry
23:48tomojI'd use C-w
23:48tomojbut be careful with that, it can unbalance your parens
23:48itistodaytomoj: i don't think that's dangerous at all
23:49itistodayi'm used to normal text editors not adding parenthesis like paredit does
23:49itistodayand most of them have paren-highlighting
23:50tomojbetter (imo) to use delete commands that know about sexps
23:50itistodayi disagree, but to each his own
23:50tomojexcept for a whole bunch of toplevel forms or something
23:50itistodayhow the heck do you delete a parenthesis?
23:50tomojif you must, C-u DEL
23:51itistodayok, thanks, yeah, i'm going to edit this thing so that it always does that
23:51tomojthe idea with paredit is that you should never have to
23:51itistodaytomoj: well, i just ran across a scenario where i needed in the first minute of using it
23:51itistoday*needed it
23:52itistodayi'm not going to force my brain to adapt to this thing also because i don't want to become dependent on it
23:52itistodayno other editor behaves this way
23:52polypusitistoday: i think i've used C-u DEL once in aabout a week of heavy coding so it's rarely needed.
23:52tomojnever considered that
23:52RaynesIf you aren't going to learn to use paredit properly and use it's commands, why bother with it?
23:52tomojit's rarely needed IF you do things the paredit way
23:52itistodaypolypus: like i said, i just needed in the first minute of using it
23:52tomojif you go around C-w'ing or things like that, sure, you'll need it
23:53polypusjust cuz you're not used to it that's all
23:53itistodaypolypus: i don't think so, i copy/pasted some text, and it added an extra paren
23:53itistodayi needed to get rid of it
23:53itistodayhappens all the time
23:53tomojyou're right, though, I don't think I could stand using another editor for clojure
23:53tomojbut that's fine with me :)
23:54itistodayRaynes: i want it for its creation of matching pairs
23:54polypusitistoday: it shouldn't happen all the time. you must not be copy pasting corectly
23:54itistodayRaynes: that's it though
23:54itistodaypolypus: uh huh...
23:54itistodaypolypus: whatever you say
23:54polypusok
23:55tomojitistoday: maybe autopair.el or something like it is more suitable for you
23:55itistodaytomoj: thanks!!!
23:55itistoday autopair
23:55itistodayAutomagically pair braces and quotes like TextMate
23:55itistodaysomeone understands me :-D
23:56tomojparedit needs testimonials
23:57polypustomoj: yeah seriously. after a few days of using it there just isn't any going back
23:57itistodaythat's what scares me
23:58itistodayi like being comfortable with Xcode, TextMate, and millions of other editors
23:58polypusitistoday, don't be scared it's very powerful, and emacs isn't going anywhere
23:58itistodaypolypus: one step at a time, i just finished setting up clojure today
23:58itistodaymaybe you lunatics will convince me in the end, but not today
23:58tomoj:)
23:58polypus;)
23:59itistoday:-p