#clojure logs

2009-12-09

00:00hiredmanhttp://gist.github.com/252269
00:02cp2hiredman: nifty!
00:06hiredmanrewriting findClass in asm means I need to figure out try/catch and for loops
00:06hiredmanand most likely casting since I decided to ignore generics
00:09cp2write examples in java and then just run asmifier over it
00:09cp2them*
00:10hiredmanI'd have to figure out how asmifier works
00:10hiredmanhow to use it, I should say
00:10cp2http://asm.ow2.org/doc/faq.html#Q10
00:12hiredmanwe'll see, maybe tomorrow
00:13cp2you could always just plow through the jvm spec with a few cups of coffee :D
00:14hiredmanI do have a few redbulls in the fridge
00:15hiredmanyeah! who needs ASM, I'll generate the bytes myself!
00:16cp2all the cool kids are doing it
00:17interferoni have an array of the form [["x" 4] ["x" 5] ["y" 6]] - what's a good way to convert it to {"x" [4 5], "y" [6]}
00:17hiredman,(apply hash-map (apply concat [["x" 4] ["x" 5] ["y" 6]]))
00:17clojurebot{"x" 5, "y" 6}
00:18hiredmanhmmm
00:18hiredman,(map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]])
00:18clojurebot({"x" 4} {"x" 5} {"y" 6})
00:18interferoni was heading down the merge-with path
00:19interferonbut not getting anywhere
00:19hiredman,(apply merge-with #(if (list? %1) (conj %1 %2) (list %1 %2)) (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]]))
00:19clojurebot{"x" (4 5), "y" 6}
00:19interferon,(apply merge-with conj (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]])
00:19clojurebotEOF while reading
00:20interferon,(apply merge-with conj (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]]))
00:20clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection
00:20hiredmanyou know
00:20hiredman,(apply merge-with conj {} (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]]))
00:20clojurebotjava.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection
00:20hiredmanbah
00:20interferon:)
00:22chouser,(reduce (fn [m [k v]] (assoc m k (conj (m k []) v))) {} [["x" 4] ["x" 5] ["y" 6]])
00:22clojurebot{"y" [6], "x" [4 5]}
00:22konrI need to include an image in .jar, but I'm not sure how. Must I do this with leiningen?
00:23interferonwow
00:23interferonchouser: i'm going to spend a few minutes picking that apart :)
00:23cp2chouser: stop hacking
00:23cp2^_^
00:24chousermore fun than writing English
00:25interferonthat's a very nice use of reduce
00:26hiredmanwhat do you think merge-with uses?
00:27chouserbah. wrong!
00:27chouserhm, into does though.
00:27hiredman:P
00:42dnolen_ato: you there?
00:44dnolenor technomancy as well, so my travails with leiningen led me to discover another issue on the master branch. lein swank no longer properly loads the classpath, I did a git bisect to figure out the commit where things stopped working: http://github.com/technomancy/leiningen/issues/#issue/5
00:49polypusi've been wondering about how clojure's structural sharing would fare if it's vectors were used for genetic algorithms. if every generation were composed of vectors concatenated from two vectors in the previous generation. would access performance really no degrade?
00:49chouserpop quiz
00:49polypuss/no/not
00:49chouser(->> {:a 1, :b 2} (map #(conj % (first %))) (apply concat) (apply hash-map))
00:49chouserguess the return value before you try it!
00:50chouserpolypus: 'concat' is not fast for two subvectors. It's essentially O(n) where n is the length of the second vector.
00:50devlinsfchouser: {1 :a 2 :b}
00:50chouserdevlinsf: nice try! but no.
00:51devlinsfdammit
00:51chouserit's pretty twisted. don't beat yourself up. :-)
00:51devlinsfLet's see....
00:52chouserpolypus: actually, the 'concat' function doesn't return vectors at all. you'd use 'into' to add one vector to the end of another.
00:53devlinsf(let [& comp p partial] ((& (p apply hash-map) (p apply concat) (p map #(conj % (first %)) {:a 1 :b 2}))
00:54chouser:-)
00:54chouserit's like algebra. No need to understand it even if you need to rearrange it.
00:55devlinsfYour form didn't make sense
00:55devlinsf:-p
00:55chouserI can't imagine when it would be useful, that's for sure.
00:55devlinsfOkay, my final answer
00:56devlinsf{:a 2 :b 2}
00:56cp2like algebra its. even you rearrange undertand need no to it to if it.
00:56chouserdevlinsf: strike two.
00:56chouseractually, I just realized...
00:57devlinsfI'm not sure about this conj
00:57chouserthere are two possible answers if literal maps aren't guaranteed to maintain their original order.
00:57chouserdevlinsf: yes, that's the crux of it.
00:58chouser,(first {:a 1})
00:58clojurebot[:a 1]
00:58chouser,(class (first {:a 1}))
00:58devlinsfOh
00:58clojurebotclojure.lang.MapEntry
00:58chouser,(class (conj (first {:a 1}) 2))
00:58clojurebotclojure.lang.PersistentVector
00:58devlinsfOkay.
00:58polypuschouser: but even with into you have both 'ends' of the vector structurally shared with the vectors they were split-at'ed from in the previous generation right?
00:58chouserpolypus: no, only the first half
00:59devlinsfHere comes the pitch
00:59chouserpolypus: into's second arg is taken as a seq, so the structure of that second vector is lost.
01:00devlinsf{:a :b :b 2}
01:00devlinsfAnd here comes clojurebot...
01:00devlinsf,(->> {:a 1, :b 2} (map #(conj % (first %))) (apply concat) (apply hash-map))
01:00clojurebot{2 :b, :a :b}
01:00devlinsfDAMMIT
01:01devlinsf,(map #(conj % (first %)) {:a 1 :b 2})
01:01clojurebot([:a 1 :a] [:b 2 :b])
01:01devlinsfAh, okay
01:02chouserdevlinsf: thanks for playing! :-)
01:02devlinsfI'll have one for you someday
01:02chousermy pop quizes are no fun when I'm the only one who answers them. :-P
01:02devlinsfOkay, I've got a riddle for you
01:02polypusit's be cool if you could go:
01:03polypus~quiz (blah blah ...)
01:03clojurebotGabh mo leithscéal?
01:03polypusand then:
01:03polypus~answer (foo bar)
01:03clojurebotFoo is not Baz.
01:03polypuswhere clojurebot would tell you if you were right or wrong
01:03devlinsfRemember my talk of a map visitor?
01:04chouserpolypus: ooh, neat!
01:04chouserdevlinsf: yes!
01:04devlinsfI found a legitimate used of (keys-pred take-while ...) and (keys-pred drop-while ...)
01:04cp2polypus: fork clojurebot work on it :)
01:05polypusk
01:05cp2i missed an 'and' somehow
01:05devlinsfSee if you can find one in two days :)
01:05cp2this keyboard sucks :)
01:06chousera legitimate use of (keys-pred take-while ...)? hm...
01:06devlinsfYup
01:07devlinsfThere's a hint in sun's javadocs
01:08devlinsfI'll post my case to the dev list thursday night
01:08chouserthat's the same as visit-keys-pred ?
01:08chouserfrom your email?
01:08devlinsfYes, that function
01:10devlinsfchouser: Well, time for me to be responsible
01:11devlinsfchouser: See if you can post it to the list before me
01:16somniumchouser: how did you implement TCO in clojurescript?
01:16chouserthe same way rhickey didn't in JVM clojure. :-)
01:16chouseroh, do you mean loop/recur?
01:16somniumchouser: yeah
01:17chouserwhile loop, I think.
01:17cp2oh what, how come i didnt know about clojurescript
01:17cp2chouser: stop being so awesome
01:17somniumok, im writing a mini-special form compiler
01:17chouserdo{}while() actually
01:18somniumright labeling blocks and using continue seems least painful
01:18somniumright now, I mean
01:18chouserrecur can only go to the enclosing loop (or fn) form
01:20somniumright, ii it encounters loop* or fn*, it gensyms a label and puts a continue on recurs in tail positions
01:20chousersomnium: you can look at clojurescript's compiler -- each special form is a just a defmethod, with the emitted javascript right in there.
01:20chouserit's only about 350 lines of code
01:21chousersomnium: for javascript, or something else?
01:21somniumIm yrying using deftypes to build the ast, so more breathing room
01:21somniumdawm dvorak
01:22somniumno runtime like clojure script, but all non-concurrent special forms
01:22somniumthen deftype can operate on prototypes
01:23somniumwhat comes first, deftype, var, or ns?
01:23chouserhm. I've been thinking about the possibility of writing a converter to translate from the tree of Java objects Compiler produces to a tree of regular maps and vectors
01:23chouserthe output would be interesting in its own right, for expressions you wanted to understand better
01:24somniumthe asts its producing seem valid, hoping to put a demo on appengine this weekend
01:24chouserbut it could also act as an eventual api for clojure-in-clojure. The compiler would eventually emit this format directly, and all the back ends would consume it to emit the appropriate output.
01:24somniumif it works then hopefully people smarter than myself can implement persistent vectors and goodies
01:25chouserwhat are you emitting?
01:26somniumfirst it walks the input lists and does some gensymming
01:26somniumthen it emits a tree of deftypes
01:26somnium(bound-block, fn, etc)
01:26chouserhuh.
01:26chouserI'm sorry, I don't think I see the purpose yet.
01:26somniumthen those call eachother recursively with emit-js
01:27somniumhmm, mostly to help me organize my thoughts about the ast (the type system)
01:28chouseroh! ok, so you are producing javascript.
01:28somniumyes!
01:29chouserI think perhaps I didn't know about javascript labels when I did clojurescript.
01:29somniumtracking return values is tricky
01:29chouserI use a local flag variable everywhere instead. :-/
01:29somniumso the types help with that
01:29somniumthe protocol handles ti as an extra arg
01:30somniumjs is so squishy, cousd vars be defined in terms of deftype?
01:30chouserClojure's Compiler does a bunch of type hint inference, tracking of locals for closures, and such.
01:30somniumjs offers some convenient runtime features over java it seems
01:31chouserhm, we didn't have deftype...
01:32somniumwell, its fun watching it produce gensym trees, if turns out to be useful too, all the better
01:33somniumjust got chrome on linux today, js seems sooo fast now :)
01:33chouserVars are mutable. deftype's are not. I'm not sure how you'd resolve that.
01:34somniumwell, the goal is just to hit all special forms
01:34chouserthough I guess since javascript isn't going to enforce 'final' for you, you could just use 'set!' on deftype fields.
01:35somniumthen maybe a simple list, and hopefully thats enough to experiment with writing real stuff
01:36somniumecmascript defines an immutable flag, but Ive never seen it used
01:36chouserwell, have fun! I'd be happy to have use of something like clojurescript without having to write it. :-)
01:36chouserI should sleep.
01:36somniumcheers
01:36somniummore like a tool to help build a clojure-script I think
01:37konrHmm, anyone has any idea of what would be the clojure equivalent of URL foo = this.getClass().getResource(bar)?
01:43hiredman(-> this .getClass (.getResource bar))
02:31dnolentechnomancy: well I figured out a solution to both my problems and sent a pull request for the fix.
03:25LauJensenMorning gents
03:54piccolinoI'm getting an exception thrown out of APersistentVector.invoke(), but I have no idea why that is called. What does invoke() do?
03:56piccolinoOh, I see. Nevermind.
03:57Chousukeif you're on master, you can try using clojure.stacktrace to print more clojureish stacktraces
03:57piccolinoWhat's being on master?
03:57clojurebotWhat is meta
03:57Chousukepiccolino: using the git repo master branch instead of the 1.0.0 release . :)
03:57piccolinoOh, right.
03:59LauJensenChousuke: Haven't tried it yet, how to you enable that stacktrace?
03:59piccolinoWait, how does one use that?
04:00Chousukethere are functions in the namespace to pretty-print stacktraces
04:00Chousukeyou need the exception object for it. usually *e
04:00piccolinoBut how do you give the arguemnt?
04:00piccolinoOh, I see
04:00Chousuke(*e = last exception thrown)
04:02piccolinoThanks a lot.
04:02LauJensenAnd why isn't this just standard wrapping for backtraces?
04:04ChousukeI guess some tools depend on the java format?
04:04ChousukeI don't know :P
04:11AWizzArdbtw, is there a way to access local variables for each stack frame?
04:11AWizzArdAnd function parameters?
04:21noidiis there a way to call instanceof from Clojure code?
04:22noidiah, instance?
04:29LauJensenAWizzArd: Recently Disclojure mentioned a little lib which lets you insert a repl instead of a prn for debugging, would that do ?
04:30esjmorning all.
04:31LauJensenMorning
04:35meeI'm trying to write a libary, starting with setting the namespace and using the clojure.test functions, but (ns my-ns (:use (clojure test))) isn't working as expected. It seems in accordance with http://richhickey.github.com/clojure/clojure.core-api.html#clojure.core/ns to me. What am I missing?
04:36meeI get "Could not locate clojure/test__init.class or clojure/test.clj on classpath"
04:37Chousukeare you using 1.0.0?
04:37meeyep, ubuntu package
04:37Chousukethen there's no clojure.test namespace :)
04:38Chousukethose docs are for the master branch
04:38meewhich is post-1.0?
04:38meeah
04:38Chousukewhich raises the question... where are then 1.0 docs?
04:42meeah, I was able to get it working using my git checkout of clojure, cool.
05:02meeis there a way to get clojure.test/is to dump the expected/actual values in a pretty-printed way?
05:16lpetithello there
06:03hipertrackerWhere is the best Textmate bundle for Clojure? This one? http://github.com/nullstyle/clojure-tmbundle
06:21fliebelI'd like to know the same as hipertracker… still looking for a good editor, now stuck at JEdit.
06:24hipertrackerfliebel: I tried to learn Emacs, several times. No joy. To weird
06:24hipertrackerer, too
06:25fliebelhipertracker: so what are you you using for Clojure on Mac now?
06:25hipertrackerIntellij IDEA
06:26hipertrackerToday I also installed the latest plugin for Netbeans. Just checking how it works
06:27fliebelEclipse, Netbeans and Intellij IDEA are all very large and bloated Java applications, right?
06:28esjfliebel: for forms sake, and I promise to say nothing more, I strongly advise you to learn Emacs, and be done with ever looking for another IDE again.
06:28hipertrackerI don't like Eclipse. It is slow. IntelliJ IDEA is the most advanced. And I use it for more than one language.
06:29hipertrackeresj: Emacs is not full IDE. It has not debugger, inteligent analise code on fly, advanced refactoring etc. I use Netbeans and Intellij IDEA for programming in PHP, Ruby, Python, Scala and recently started to play with Clojure
06:30fliebelesj: Maybe if I was a linux use I would… But for Mac, I'd like something that blends in with the rest.
06:30esjas per my promise, my lips, sealed they are.
06:30hipertrackerAlthough maybe Emacs might be good choice because it is based on Lisp and Clojure is a Lisp dialect...
06:31hipertrackerBut this scares me a bit ;) http://edward.oconnor.cx/2009/07/learn-emacs-in-ten-years
06:32AWizzArdHonestly, those IDEs (NetBeans, Eclipse, IDEA) look promising, and one day they will be better suited for coding Clojure. In some areas they already are better. But really, I try it again and again, but they simply can't compete with Emacs+Slime+Swank-Clojure+Clojure-Mode+Clojure :)
06:34AWizzArdmee: You can (use 'clojure.contrib.pprint) and then just (pprint your-object)
06:36fliebelhipertracker: lol
06:37hipertrackerhttp://lca2srv30.epfl.ch/sathe/data/emacs_learning_curves.png
06:37hipertrackerThere must be something in those jokes ;)
06:38fliebelhave you read the comments on those posts?
06:42fliebelhipertracker: the question remains: are those jokes made by people who use(d) emacs, or those who briefly looked at it? a comment on that pst of yours: "This is like the old arguments about the Linux Command line. People who don't use it don't get it."
06:42hipertrackerhmm, it might be helpfull http://lispcast.blip.tv/
06:43hipertrackerfliebel: maybe you have right, but first link is the opinion of old users
07:27interferonis there a built-in equivalent to (defmacro rescue [default & expression] `(try ~@expression (catch Throwable _# ~default)))
08:11AWizzArdIs there a way to access local variables (including function parameters) for stack frames?
08:16_atoAWizzArd: http://java.sun.com/javase/6/docs/jdk/api/jpda/jdi/com/sun/jdi/StackFrame.html
08:18_atoAWizzArd: are you thinking of extending debug repl so you can look at stuff in other frames?
08:18_atonot sure if you can access that from within the VM or whether you have to connect via debugger interface
08:19AWizzArdi see
08:19AWizzArdBut yes, I would be interested to see at least the function args, although all local vars would be interesting of course
08:20rhickeyAWizzArd: Clojure does emit all the proper stuff so you can see locals (including fn args) via the debug interface, as you can see in any Java debugger
08:22AWizzArdI tried it with jswat some months ago, but besides behaving very strangely at times (i wasn't able to set break points and such) it gave me results not in the form that I would like to see.
08:23AWizzArdInstead I see arrays of arrays, and need to go into deep structures to see the values that I want to see, while in the repl (or with print debugging) I can see [10 20 30]
08:25chouserthis debug-repl thing has me stunned.
08:26chouserand I haven't even tried it yet.
08:26rhickeyAWizzArd: IntelliJ has smart collection representation, as does Netbeans (enclojure) now AFAIK
08:27AWizzArdchouser: what debug-repl you mean? Is that something in Contrib?
08:27chouserhttp://gist.github.com/252421
08:27AWizzArdrhickey: btw, do you know Findbugs? http://findbugs.sourceforge.net/
08:27chouserAWizzArd: discussed here: http://groups.google.com/group/clojure/browse_thread/thread/8d77ad0da8d190c8
08:28AWizzArdchouser: thank you
08:28rhickeyAWizzArd: yes, I've run it in Clojure's Java code in the past
08:29AWizzArdGood. On their homepage they say that they would be interested to know how to improve it. I was wondering if it could be possible to let Findbugs do some static type checking to some extend on Clojure code.
08:31AWizzArdIf the Findbugs team would be interested in using data that Clojure can provide, could then maybe metadata be used to let FB know what type args, forms and return values have?
08:35AWizzArdThey already have a nice infrastructure, and on top of that optional type checking could be done. All Clojure code compiles as usual, but FB can inform a user when it discovers (+ 10 x) and x is not proven to be a number.
08:36rhickeyAWizzArd: SofCheck http://www.sofcheck.com/ looks more promising, as it works at the bytecode level. I had some conversations with people there about an eval but it didn't go anywhere
08:37AWizzArdI already looked at that company and found it nice. Only the very high costs of their product may be a challenge.
08:45rhickeyAWizzArd: $245 for 200 classes didn't seem bad - does it rise steeply from there?
08:48AWizzArdOn their homepage they give an example and mention: "With an annual subscription pricing model on the order of $500 per thousand lines of code, organizations may realize annual labor savings of three to four times their investment, along with significant improvements in time to market."
08:48AWizzArdthis sounded to me (as a non-native speaker) that they want 50 cents per loc
08:49rhickeyAWizzArd: do you have a link for that quote?
08:50AWizzArdhttp://www.sofcheck.com/products/inspector.html
08:51AWizzArdThe section is titled "SofCheck Inspector Maximizes Your ROI"
08:51rhickeygot it
08:52_fogus_AWizzArd: Playing around with dr now. Really really cool. Excellent work!
08:54AWizzArdThis debug-repl looks very nice. Maybe there is a way to get it deeper integrated. When one calls (debug-on 'some-namespace) then each time when an exception fires one gets thrown into the debug repl automatically.
08:55_atoAWizzArd: yeah that would be neat. I'm not sure there's anyway to catch exceptions like that though, except to wrap every single java method call with a (try ... (catch Throwable t (debug-repl)))
08:56_atoperhaps there's a way using the debugger API somehow
08:56chouser_ato: ah, is that your code?
08:57_atochouser: the simpler version is mine. George Jahad did the original one that required modifications to the compiler
08:58AWizzArdMaybe Clojure can implicitly wrap each call into such a try-catch block if todays current jvm doesn't support this feature. The nice thing is that then every exception would give us a chance to see what is going on.
08:59chouser_ato: great teamwork. :-)
08:59chouser_ato: care to sign a CA and donate the code to contrib?
08:59_atoI did sign and send a CA over a month ago but AFAIK rhickey hasn't received it :(
09:00_atoperhaps I should try sending again
09:00chouser:-(
09:00AWizzArdMaybe if we ask very nice then Rich will accept such a CA via fax :)
09:01_atoperhaps it got lost in the mail, not sure how reliable international snail mail is
09:05_ato'course the other problem with wrapping every call in an exception catch that calls debug-repl is that it breaks local clearing as it hangs on to everything, but that's probably something you can live with for debugging
09:05rhickey_ato: just added you this morning
09:05rhickeyhttp://clojure.org/contributing
09:06_atorhickey: ah, awesome! :-)
09:06AWizzArdThis implicit wrapping would not replace the manual placement of such debug-repl calls in the code. Maybe there could be three modes: debugging off, debugging on (only reacts to explicit calls) and debugging automatic which is like on, but gets you into the debug repl on every exception
09:07dysingerso George worked on that debug repl a long time - it would be good to give him some credit if _ato injects his version into contrib
09:07rhickeyAWizzArd: this so that you don't have to use a real debugger and all of its facilitites?
09:07chouserAWizzArd: _ato's version doesn't require "debugging on" mode or wrapper. It leverages Compiler internals so it can be "always on" without added cost.
09:08chouserdysinger: I agree. Clearly his idea was instrumental in getting here.
09:08_atodysinger: definitely
09:09AWizzArdI don't mind using a real debugger if I find one that works nicely in my working environment. But anyway, such a debug repl can be a very nice helper tool.
09:10rhickeyI'm concerned about people rewriting an 'interpreted' debugger whilst compiled debuggers with many facilities are already there. Ditto homemade profiling etc
09:11_atobut compiled debuggers don't let you eval stuff do they?
09:11AWizzArdYes sure, but this is better than print debugging that we all do. I even found outcommented prints in Clojures sources ;)
09:12rhickey_ato: JAva ones do, and have for some time
09:12rhickeyAWizzArd: those prints wouldn't have been replaced by a debug repl
09:13AWizzArdok
09:13dysingerrhickey & _ato we find it useful for lots of remote clojure processes running in screen. We may not have anticipated failure. The debug repl lets us come back later, see a problem, inspect the state of things and possibly continue.
09:13dysingerI consider it a different use than active java debugging on the desktop
09:13rhickeyNote I am not arguing against getting a repl at a break point, but no one seems to be plugging into the (extensive) existing JAva debug infrastructure
09:14AWizzArdThe debugger of idea or netbeans are not a choice yet - those code editors still lack behind in too many aspects, compared to emacs so that I can't use them yet.
09:14_atoyeah, I think if we did want to extend it to break on exceptions we'd need to look into java debug API
09:14rhickeydysinger: but if all you are doing at the repl is issuing "show me x" commands...
09:15_atoI think it's worthwhile even just because it doesn't require installing or learning how to use any special tools
09:15_atonot saying that it replaces a more extensive debugger though
09:15dysingerI am no expert for sure. I just like the idea. Other lisps have it as a tool. 
09:15dysingerFor example http://jlongster.com/blog/2009/07/5/remotely-debugging-iphone-scheme/
09:15rhickeydysinger: yes, but they have much different runtime infrastructure to support them
09:16chouserdoesn't proper use of jvm debugging require a second jvm instance?
09:16AWizzArdtoo bad that the Backwards Debugger is not very actively developed anymore: http://www.lambdacs.com/debugger/
09:16rhickeyyou can attach a JAva debugger to a running process you didn't anticipate debugging other than to start with the requisite hook
09:17rhickeyset a breakpoint and stop it anywhere
09:17rhickeyremotely etc
09:17dysingertrue. I guess we just aren't used to doing that with emacs.
09:18rhickeyLike I said, I don;t want to argue against debug-repl, but for acknowledging there is awesome infrastructure which Clojure already supports
09:18dysingerjava debugger doesn't allow for changing anything though - just inspecting
09:18rhickeydysinger: not true at all
09:18AWizzArdI wouldn't mind combining that with emacs. It is just that jswat did not yet look promising in combination with it.
09:18rhickeyyou can change, eval etc
09:18dysingerrhickey: oh - rly - I have to go try that
09:19AWizzArddysinger: did you try jswat yet?
09:19rhickeynow, there could be some hooks there that could be leveraged better for Clojure. I don't have time to work on that
09:19dysingerI am too brain-warped by emacs prolly
09:19_atohttp://georgejahad.com/clojure/cljdb.html
09:19rhickeybut I don't think rolling interpreted runtime suport is the way to go
09:19_atoI haven't tried it though, it sounds hard to get setup
09:19dysinger_ato I tried it a while ago - it's not hard
09:20dysingerI just was unaware that you could change, eval etc.
09:20cemerickdysinger: FWIW, you can run a java/clojure debugger over the wire with enclojure in a snap
09:20dysingerinteresting.
09:21AWizzArdcemerick: and does Enclojures debugger show Clojure objects as we like them to see?
09:21cemerickEric proposed adding enclojure's repl lib to contrib as a good baseline, but I guess that fell by the wayside
09:21chouserone benefit of debug-repl is the drop-dead simple setup. No new tools, guis, or terminology to learn.
09:21AWizzArdchouser: I agree
09:21dysingerI have DLed Idea 9.0 CE and have fired it up. It's hard to accept going back into a Java IDE after 5 years of not using them. The 30 second wait to launch and 300-400MB memory usage is hard to swallow.
09:21dysingerafter using console emacs/slime
09:21AWizzArdi would like it more than inserting all those println
09:22AWizzArddysinger: it would be okay if we only use the debugger in it
09:22cemerickAWizzArd: I'm a few revs behind, but I'd say the presentation rates a solid B, probably because of how decently maps, vectors, etc. map onto Java maps and collections.
09:22chousercemerick: that's better than jdb
09:22AWizzArdwe can do normal coding in emacs, and for debugging maybe a separate Enclojure or Idea could be used, possibly on a different computer.
09:23AWizzArdcemerick: i just saw what jswat was doing, and that showed me arrays of arrays of ... instead of just [10 20 30]
09:23cemerickdysinger: 5 years is a long time. IDEA and netbeans are both top-notch environments, IMO.
09:24AWizzArdonly that their code editors can't yet compete with emacs
09:24AWizzArdI try Enclojure every few months, and it is improving. But it still isn't there yet.
09:24cemerickAWizzArd: never used jswat, so I can't compare there intelligently. The string representations are certainly reasonable though, and the underpinnings are totally usable.
09:24dysingerAWizzArd: says it perfectly - nothing competes with emacs for lisp editing
09:24cemerickAWizzArd: I'd strongly disagree, but *shrug*
09:24chouserI suppose I should try enclojure+jvi again
09:25dysingerand I can run it on my my netbook :P
09:25the-kennyCan I get a link to the debug-repl?
09:25chouserthe-kenny: http://gist.github.com/252421
09:25dysingerhttp://georgejahad.com/clojure/cljdb.html & http://gist.github.com/252421
09:25AWizzArdcemerick: did you try emacs yet? :)
09:25AWizzArdLittle things like using the POS 1 key doesn't work as I like it. It jumps to the beginnig of the line, which is "|user==> (some code here)" When I press POS 1 it brings me to the |, but instead I want to be before the opening paren
09:26dysingerOne word: paredit
09:26cemerickAWizzArd: twice -- once about three years ago for a couple of weeks, and again 2 years ago for 2 months. Those were the least productive and most frustrating months of my professional life.
09:26chouserheh
09:26AWizzArddysinger: I was talking about Enclojure. Because of challenges like that I use Emacs, where those problems not exist.
09:26the-kennyAWizzArd: Try C-a
09:27the-kenny(move-to-bol)
09:27dysingerAlso on my team we all work remote but still pair-program all day - emacs is key to sharing screens and co-editing over thousands of miles.
09:27AWizzArdthe-kenny: is that C-a for Enclojure?
09:28lpetitIs there a (historical ?) reason that me living in France cannot understand about the very bad popularity of Eclipse as an IDE in USA ? (Not speaking about the comparative merits of ccw, enclojure, La clojure , just trying to understand why Eclipse is somehow the standard in Europe, and is bashed to death in USA) ?
09:28the-kennyAWizzArd: Oh, I thought you're in emacs. Sorry.
09:28rhickeyMy point is not to say - go to JSwat/Enclojure/IntelliJ necessarily, it's that - there is an infrastructure for Java debugging. It's very good, Clojure already supports it, it has an API... vs - let's wrap every function with some home-made cruft and reinvent stack navigation, breakpoints, step execution etc...
09:28AWizzArdI am in Emacs where the POS 1 key works perfectly.
09:28the-kennylpetit: I think it's not country- but people-specific.
09:29the-kennyI know some guys here in Germany who love eclipse... I hate it ;)
09:29dysingerrhickey: I hear that - I need to go wipe cobwebs & refresh my java debugger memory
09:29AWizzArdthe-kenny: my criticism was that all those IDEs like NetBeans, Eclipse and IDEA may be very nice and will one day be "better" than emacs. But currently they are not good enough for editing when you are used to emacs.
09:29_atoyeah if it doesn't have paredit-like functionality it's going to be pretty painful to edit code in. But maybe it is okay to just use their debugger. Since they can attach to a remote process presumably you can just attach them to slime's clojure instance
09:30dysingerI think of pre-paredit lisp editing as caveman days
09:30dysingerI can't submit to the caveman tools inside most of the IDEs for lisp editing. :P
09:30the-kenny_ato: After I tried paredit the first time I thought: That's like eclipse does it.. but paredit does it right.
09:30rhickeyalso properly assess the role of an editor in such a debug situation - this quickly became an editor discussion but it really isn't one. Obviously nice integration is good, but debugging isn't editing
09:30AWizzArddysinger: I think they will catch up one day.
09:31dysingerAWizzArd: looking forward to it.
09:31the-kennyAWizzArd: Some day.. but we all live now :)
09:31AWizzArdrhickey: you are right. The point is only that people who are not using idea (but emacs instead) can't profit from the nice debugger of idea.
09:31dysingerrhickey: agree - I played with emacs + jswat - seems like a workable combo
09:31AWizzArdBut as you and others pointed out this seems to be possible.
09:31dysingerI'll try it again today
09:32AWizzArddysinger: let me know if you get jswat working. For me it was not so nice.
09:32dysingerAWizzArd: ok - it's been a long time - 6 months or so
09:32AWizzArdBut I am interested in what rhickey and cemerick said. I already have Enclojure installed and would like to see if I can get its debugger working with my emacs hosted jvm.
09:33chouserwhat version of netbeans should I get to work with enclojure-plugin-2009-11-3.nbm ?
09:33cemerickchouser: probably stick to 6.7.1 for now
09:34cemerickit'll probably work fine with 6.8, but I've not tried the RC yet
09:34chouserubuntu offers 6.5. Too old, right?
09:35cemerickah, probably
09:35cemerickactually, almost certainly
09:36lpetitthe-kenny: no really, I can "feel" that it's not just about personal state. Probably about marketing. e.g. IBM better than Sun in Europe, something like that. (Adn of course i'm speaking about statistics, a single case does not make a statistic :) )
09:36_atohmm "Not able to submit breakpoint LineBreakpoint defpackage.clj : 9, reason: The breakpoint is set outside of any class."
09:37_atoand toggle breakpoint is greyed out
09:37_atois there something special you have to do to enable debugging of clojure code?
09:37AWizzArdchouser: i think you can simply install 6.7.1 in your home dir
09:37_ato(in Enclojure)
09:38AWizzArd_ato: i think I also had this problem. In jswat and enclojure i could not set breakpoints in Clojure files.
09:38_atooh..
09:38AWizzArdJava 6 Update 14?
09:38_atohow do you use the debugger than?
09:38lpetitrhickey: sorry for having high-jacked the discussion. But those days, it seems like everytime the word "Eclipse" is written, #clojure or the ml empties. And it also seems like the word "Eclipse" is not often used when I can see the words "IDEA" or "Netbeans" (when it's not a discussion specific to the clojure plugins, of course, since I recon ccw is still far beyond the functionalities of...
09:38AWizzArdnot :)
09:38lpetit...enclojure)
09:38AWizzArd_ato: (println [var1 var2])
09:39_atooh so you can't use it..
09:39AWizzArdright
09:39_atohmm maybe it works in IDEA or Eclipse then
09:39lpetitrhickey: So I thought it would be interesting trying to understand what seems to me like a "natural" aversion towards Eclipse (not just the traditional emacs vs the rest of the world war)
09:39AWizzArdSo the debug-repl looks promising.
09:39cemerick_ato: I use the debugger in enclojure for clojure code frequently
09:39AWizzArdcemerick: do you use Java 6 Update 17?
09:40cemerickI'm on update 15 at the moment.
09:40cemerickBut it worked fine with older revs, too.
09:40AWizzArdIn older revs I was able to set break points. At some point, don't remember when, it wasn't possible anymore.
09:40AWizzArdFor .java files no problem.
09:41lpetit_ato: currently placing breakpoints in clojure code works to some extent in ccw. A new release is coming (code already commited, not yet release) that will extend it a little bit further. What you can do is place breakpoints in your own code. Placing breakpoints in code that sits inside jars still has some issue we'll have to tackle.
09:42lpetit_ato: that is, we're in the debugging phase for clojure code inside jars (think clojure.core).
09:42_atoah ok
09:43_atocan you set a breakpoint in your code and then step into jars?
09:47LauJensenccw?
09:47_atohttp://code.google.com/p/counterclockwise/
09:47_atough.. having eclipse and netbeans open at the same time is killing my laptop
09:48LauJensenoh
09:48LauJensenDid everybody catch that SBCL Debugging/Morse code video on Reddit today?
09:49_atowoah eclipse has rainbow parens
09:49_atowith christmasy colours too
09:49LauJensens/Reddit/Hacker News
09:50lpetit_ato: yes
09:50LauJensenHe puts Emacs to good use: http://news.ycombinator.com/item?id=985215
09:50lpetit_ato: yes to "can you set a breakpoint in your code and then step into jars?"
09:51lpetit_ato: colors are editable in the project's properties ;-)
09:51AWizzArdlpetit: can code completion already complete things like "(Integer/pars<completion key pressed>" or "(.mu<completion>"?
09:52_atohmmm
09:52_atowell it did break the breakpoint
09:52_atowhich is one up on netbeans
09:52_atobut it says "No source found"
09:52_atoand it just shows vectors as java objects
09:52lpetitAWizzArd: "(Integer/pars<completion key pressed>" = yes ; "(.mu<completion>" = yes. But certain choices I made (for completeness of the completion) make it almost unusable (too slow) at the moment
09:52_atobut you can at least inspect locals that are ints and strings
09:53_atooh I see
09:53AWizzArdlpetit: oki, sounds like it is on the right track
09:53_atoif you double click them it calls toString()
09:53_atothat's not bad
09:53lpetit_ato: Yes, "out of the box eclipse debugging" for the moment, but you can inspect vectors in the "Variables view" via the tree, i guess
09:54_atoand you can change the values of locals, that's neat
09:54cp2mornin
09:55lpetit_ato: concerning the "no source found", it's a problem I worked on yesterday night => you certainly launched the REPL via the contextual menu of a certain file
09:56_atolpetit: yeah, I just created a clj file, set a breakpoint in it, right clicked it and went debug as -> clojure repl
09:56_atobut maybe I don't have the latest version or something
09:56_atoI just got whatever the eclipse install menu thing installed
09:56_atofrom the update site
09:56lpetit_ato: it is addressed in github, and so will be included in the next release. For the time being, you have a very easy way to enable showing the source : start the REPL from the project's node (btw, close your current REPL, or you'll accumulate started JVMs)
09:57lpetit_ato: you have the "officially released version", np.
09:57rhickeylpetit: I'm not sure about Eclipse aversion. I guess the few people that had a Java preference in IDEs and use Clojure had one for IntelliJ or Netbeans first. Also, Netbeans seems to have more credibility as a non-Java IDE than Eclipse, right or wrong
09:57_atoah, that works, very cool
09:58rhickeylpetit: few would turn down a good Eclipse plugin for Clojure. I don't mention it only because I haven't even looked at it (sorry)
09:58gjahadaaaarrggh!
09:58lpetitrhickey: yes, I'm not even trying to compare the merits, just trying to understand.
09:58rhickeyAnd that's because I don't use Eclipse otherwise for anything
09:58_atolpetit: yeah, if other developers at my workplace were into IDEs they'd probably use eclipse as it's what they use for java
09:58rhickeynot even installed
09:59gjahadato: I saw the LOCAL_ENV var, but didn't understand it correctly.
09:59gjahadso I basically reimplemented it
09:59lpetitrhickey: I understand. People coming from Ruby land would come from Netbeans or Intellij. So there's potential for more eclipse/ccw users when people come more in mass from java and scala land :-)
09:59gjahadnicely done
10:00rhickeylpetit: I agree -there will be many there for whom the situation will be reversed - will look for Eclipse support first
10:00chousergjahad: you may have missed where we were all singing the praises of your idea.
10:00_atogjahad: thanks. You had a great idea with that. :-) I just guessed LOCAL_ENV might be available at macro-expand time so tried it in a macro and it worked
10:01gjahadfor what it's worth, I basically agree with Rich that we are not leveraging the java debug infrastructure enough
10:02gjahadbut this seemed like a relatively straightforward hack
10:02gjahadso i decided to try it first
10:02gjahadi also believe there is a place for both
10:02gjahadthanks for the praise chouser
10:03lpetitrhickey: np. It's just that I wouldn't that people coming from Eclipse, reading material on clojure, think, by not seeing an equal treatment of ccw/Eclipse compared to the other IDEs, that they have to use another just for that. Being honest to myself, ccw is still globally beyond enclojure , but for someone not wanting to have two big IDEs like Eclipse and netbeans at the same time (because...
10:03lpetit...they already work in Eclipse), it already does the job, I think.$*
10:03lpetits/$*//
10:03lpetits/\$\*// :)
10:04_fogus_gjahad: I think I praised the wrong person earlier... in any case, awesome work. Really nice.
10:06lpetit_ato: all in all, what's your first impression on ccw, now that you tried it "for real", compared to what you could have "thought" about it ? (your argumented answer will help me identify the strong and weak points, and so help me go in the right direction for the future enhancements)
10:09_atolpetit: heh well as an emacs user my first thought is of course: no paredit! :(
10:09_atothe debugger is very cool
10:09_atothe indenting seems to be off
10:09_atoor maybe I don't know how to turn it on
10:09lpetit_ato: note that in the clojure source code editor, a right clic to get the contextual menu shows you in a clojure submenu the entire set of currently available commands and their shortcuts. For what it was possible to do, I've mimicked the emacs keyboard shortcuts
10:09lpetit_ato: no indenting for the moment :-( -> working on a branch on it currently, but don't expect it to be there before weeks
10:10_atoah.. eval top-level form
10:10_atogood
10:10_atothat's an important one
10:11_atothe s-expression nav stuff is handy but it's more the editing commands that make paredit really useful
10:11rhickeylpetit: yes, that's my negligence - I've added a link here: http://clojure.org/getting_started
10:12AWizzArdAlso for a live repl a slime feature could be interesting: slime remembers the result of the evaluation of every object. You can type "(foo a |" into the repl with | being the cursor, then scroll up to any object, press enter, and it will be placed into the (foo a xyz) thing and will put the exact same xyz into foo that you got above.
10:12_atohttp://p.hagelb.org/paredit-outline
10:12AWizzArd_ato: btw, why Paredit and not slime?
10:12opqdonutdifferent thing
10:12lpetitrhickey: thanks !
10:13_atoAWizzArd: huh? I use both
10:13AWizzArdwhat does paredit give you?
10:13opqdonutparedit is low-level editing commands, slime is high-level ide functionality
10:13opqdonutparedit is _real_ structural editing
10:13LauJensenWow, check out 2.nd article from the top: http://www.multicoreinfo.com/ :D
10:13opqdonutyou can't have unbalanced parens
10:13AWizzArdhmm
10:13_atoit has all these commands for manipulation s-expressions
10:13rhickeyhrm, clojure-mode link there seems pretty stale as well - where's the latest version of clojure-mode - is it still jochu's?
10:13opqdonutwhich are great, yeah
10:14AWizzArdrhickey: yes
10:14AWizzArdrhickey: but if you want to use clojure-mode with clojure-swank and the latest slime you may run into problems.
10:15rhickeyI don't think I was able to get his latest clojure-mode to work stand-alone
10:15rhickeyI don't use swank/slime
10:15AWizzArdSome time in November something in slime changed and was breaking clojure-swank. I think it was the naming of variables or something like that.
10:15_atoisn't technomancy's the latest version? I doubt it works standalone either though
10:16lpetit_ato: if I were to really grok the daunting task of rewriting paredit for ccw, I'll do it in clojure in an hopefully editor unaware way
10:17rhickeylpetit: are you aware of SchemeScript? Now has some Clojure syntax support http://sourceforge.net/apps/wordpress/schemeway/2009/10/19/schemescript-1-3-0-alpha9/
10:18AWizzArdLauJensen: nice article
10:18lpetit_ato: but the real reason is : If I want to implement paredit, I must already know enough of it, so I must use it, and if I use it, I become an emacs user, and if I become an emacs user, I don't hack on ccw for Eclipse anymore :-p
10:18rhickey_ato: I was able to get technomancy's latest to work stand-alone
10:18_atolpetit: yeah, that's true :-)
10:19_atorhickey: ah, cool. :-)
10:19lpetitrhickey: I evaluated it once, but when I started working on ccw, it was to help the original author, and he already took some design decisions I still live with.
10:19_atolpetit: is there tab completion of some sort in CCW?
10:19_atothat's not as important with clojure, as clojure code usually has sensible names but can be handy
10:20lpetit_ato: sure, but be prepare for a certain amount of "hangup" if your prefix is not long enough. Works on completing for clojure and java symbols (only those that are available to the project via the dependencies)
10:20lpetit_ato: it's Ctrl+Space which triggers it.
10:20LauJensenAWizzArd: thx
10:20_atoah right
10:20_atoyep, cool
10:21_atohmm
10:21_atonot in the REPL it seems though
10:21lpetit_ato: the current implementation is not my final word.
10:21lpetit_ato: no, sorry, just in the editor for now on. One point to enclojure for this one :-)
10:21_atoalso something really handy is a way to cycle through the things you've entered in the REPL
10:21_atolike pressing M-p or up in a shell
10:21lpetit_ato: yes, the current "REPL" is a weak point of ccw
10:22lpetit_ato: Eric published an article on enclojure REPL. there's room to share things between projects there, but did not have to time to look at it yet.
10:23_atois there a jump-to-definition key? in emacs you press M-. and it'll jump to the definition of the function under the cursor. You can keep doing that recursively and it pushes to a stack, then you can use M-, to pop off the stack and return to where you were.
10:24_atoI think in Eclipse + Java it's F3
10:24lpetitrhickey: thanks for the info concerning SchemeScript, I didn't notice. Think maybe the indentation stuff can be borrowed from them, if licenses allow it (and also implementation detail, where all the evil hides ...)
10:26lpetit_ato: currently, jump to definition is half-done : not in the editor, but available via the "Namespace Browser". The namespace browser requires a running REPL on the project to work. And it will reflect the state of the loaded namespaces.
10:26_atoanother thing that emacs does which is very useful is macro expasion, you hit C-c M-m and it'll popup the expansion of a macro that's under the cursor
10:26_atothat should be pretty easy to implement, even if it just puts (macroexpand ...) into the repl for you
10:27lpetit_ato: hovering on a definition will give you the doc. Double clicking on a node will open the file. You can search for a certain symbol by typing strings in the text zone. You can enter regexps in the texte zone. The checkboxes allow you to either search the symbols names, or also the symbols docs
10:28lpetit_ato: you're right. I'll create a separate issue for macroexpansion. The trick of doing it quickly by placing it in the repl (along with pprint I guess) will indeed provide 80% of the value, even if not very sexy :-)
10:30_atoI like the way errors get highlighted
10:30_atothat's something SLIME sucks with
10:30_atoit just pops up a stack trace dialog and you have to goto the line yourself
10:40lpetit_ato: thanks for the feedback, I've updated my todo list, and a little bit reprioritized things.
10:41_atono worries. :-)
10:47mac__Hello all. Anyone in here who has used the autoinstall feature of swank-clojure with carbon emacs on mac os x 10.6? It does not seem to work out of the box.
10:47ChousukeI wonder if the community edition of IDEA is any good.
10:48ChousukeIt seems like open sourcing your Java IDE is popular nowadays.
10:49tomoj_ato: is there really no way to jump to the location of the error?
10:49mac__Chousuke: Haven't tried it myself but a friend told me it was gimped compared to the real version
10:49lpetitChousuke: who else than IntelliJ did this recently ?
10:49mac__Chousuke: No idea in what way though :)
10:50Chousukelpetit: well, not recently, but I mean NetBeans
10:51lpetitChousuke: oh ok, but NetBeans open sourced is not *that* recent, is it ?
10:51ChousukeWell, I guess not.
10:52lpetit:-p
10:52rhickeyFor $249 individual license ($149 upgrade), IntelliJ is well worth the money. I'm happy to pay for it, and have for years
10:53mac__rhickey: What's the difference between community and payed version then?
10:54rhickeymac__: slide the slider here: http://www.jetbrains.com/idea/features/index.html
10:56mac__Ok so it basically has all the core features but lacks a lot of the enterprise stuff. Not too shabby then
10:57_atotomoj: well you can press M-g g and type the line number.. I didn't see a way to jump from the stacktrace to the right file and line though. But maybe I'm just missing a hotkey
10:57rhickeymac__: right, but if you pay for it then the people that make it can stay alive and make new versions
10:58mac__rhickey: hehe stay alive, but yeah I agree, I usually pay for good software. I use emacs for clojure though and eclipse for java at work because everyone else uses eclipse...
11:00tomoj_ato: I figured there would be something in slime to do it (which might have not worked for clojure), but couldn't find anything :(
11:02rhickeymac__: I pay for Aquamacs
11:03rhickeyopen source should not mean free
11:03rhickeybut there's no way to enforce that
11:04chouserI'm under the impression that open-sourcing Clojure was a purely practical decision, just another part of the strategy to drive adoption.
11:05mac__rhickey: Oh right there is a donation button on their page. You just gave me a guilty conscience, I've been using it for a while now, guess I should donate.
11:05rhickeychouser: yes, there's simply no way to get people to use a non-open source language anymore
11:05rhickeynor should they
11:06notallamain clojure's case, reading the source is actually very helpful for learning the language
11:06chousercontrasting, for example, with my few open-source projects which choose that route mostly because I'm too lazy and uninterested in devoting effort to building a commercial infrastructure (order tracking, support contract wording, tracking, hobbled trial versions, etc.)
11:07chousernot to mention the fact they've never been sufficiently valuable for anyone to expect anyone to pay
11:07rhickeybut, if we keep using software and not paying for it, or more important, letting the companies we work for not pay for it, we will continue to devalue our profession, and ensure that programmers will always be just employees of those that make non-free things
11:08chouserit seems unlikely, though, that a few of us volunteering to pay for our favorite software will have a particularly dramatic impact on that final consequence.
11:08rhickeythe open source world needs to establish a consistent way to pay for open source, and not donations
11:08rhickeyand to have those payments make it to the creators
11:09rhickeyand to have companies feel an obligation to pay
11:09esjrhickey: you nailed it.
11:09rhickeythis all separate for support fees, which serve support companies but ofetn not the creators
11:09_atoyeah, it's a hard problem though, particularly where software is created by heaps of different people (emacs is a good example of this)
11:09rhickey_ato: yeah, at scale it seems like a problem
11:10rhickeybut still, ASCAP/BMI dole out royalties from pooled payments, there are models
11:10chouserthat's an interesting point. I have paid Apple for software, and regretted it. I'd rather have paid the same for Ubuntu, but only if the money were distributed rougly proportionally to the amount of work done per individual.
11:11rhickeywhy do we only pay for the most restricted software we buy?
11:11rhickeyer, use
11:11chouserright. lousy.
11:12rhickeyI think a big part of the problem is there is simply no mechanism to pay. And donations just seem like a hand out for charity, completely the wrong model
11:12rullieit's more of a moral issue, i'd say
11:12rullieif the moral is there, the model would follow
11:13chouserthere are sub-markets where donations or other fees work better than others.
11:15chouserI had a project that appealed to Windows-using small businesses, and get a better donation rate than I expected, and never any complaints. On the other hand I once asked for a "bounty" to upgrade a firefox extension and was roundly accused of extortion.
11:19_atoI think a reasonably number of people would pay for stuff if it was easy, expected and you actually felt like whatever you were paying went to the authors. Not everyone of course, but it would not need to be everyone. For most projects even 5% would be enough to keep them going
11:20_atoI use probably thousands of pieces of open source software daily, probably written by tens to hundreds of thousands of people. It'd be really hard to pay them all.
11:21the-kennys/I/he/
11:21chouser_ato: right. But I might be willing to pay into the top level of a few specific projects, if I felt certain the money would "trickle down" appropriately.
11:22chouserI'm afraid that "appropriately" might be the detail where the devils lie.
11:22_atoyeah
11:23cemericksomething like apache would be a great place to start an experiment in that direction. The only sponsorship they offer is for the foundation itself AFAIK, though.
11:23rhickeychouser: people contributing to projects might only do so where they felt their compensation was appropriate
11:24rhickeywhen you buy something from Apple or Microsoft you are relying on their internal mechanism for compensation being deemed fair by their employess
11:25arohner_it's also worth pointing out, there are a lot of people who will do something for free that they won't do for $1. Once they start getting paid small amounts of money, they remember their "billing rate", and feel taken advantage of
11:26rhickeyarohner: and a lot of that work will be uncompensated - the compensation is the bug for which you submitted a patch will be gone in the future versions you use without you having to reapply it
11:27arohner_rhickey: definitely. My point was that in some cases, those "trickle down" payments could be small enough to *introduce* friction, unless you only pay, e.g. people working on a project full time
11:27rhickeythe-kenny: how will they use that beer to send their kids to college?
11:28rhickeyarohner_: I think full or substantial part timers would be primary recipients, and it is not necessary to pay e.g. per patch
11:29_atoA colleague gave an interesting "what if?" talk a while ago about completely replacing copyright (for everything: books, music, software etc) with a lending-right like royalty system administered by the government (we have some smaller scale versions of this in Australia for libraries and radio licenses). He argued that it'd be workable in getting enough money to the right people, but would of course be really hard to get implemented
11:29_atodue to politics.
11:30rhickeyideally, we could all work , in employee-owned companies, which, like the original software companies,rely solely on the revenues from the products we work on. e.g. PostgreSQL could be a company employing its primary devs
11:32chouserI'd be ok with private (even for-profit) organization taking money for high-level projects and distributing royalty-like payments as long as the ratios seemed appropriate. I would also be willing to take payments from such an organization. :-)
11:32rhickeyI worry that IntelliJ might suffer due to the open sourcing - I knew prior to that that the employees were dedicated to making it great, could focus on that all day, etc
11:32cemerickyeah, they seem to be moving on/up to other products
11:32chouserthat might be easier to implement than replacing copyright
11:32rhickeynow, they may be distracted as the revenue for it falls away
11:33cemerickrhickey: feel free to ignore if you prefer, but: what would you like to see happen for clojure w.r.t. the whole making-a-living thing?
11:34cemerick"if rhickey ain't happy, there ain't nobody happy" ;-)
11:35rhickeyI brought up ASCAP/BMI before - they get pools of money from blanket performance royalties (from say, radio) and distribute it to creators based upon some fraction-of-airtime estimates
11:35_atoMy work often contracts authors of projects we use to add features that we want, but that model only works for certain types of applications
11:37rhickeyits imperfect, but easy (and required) for users/payers, something for creators
11:38cemerickrhickey: musician friends of mine say that creators generally get screwed by ASCAP/BMI. Good idea, poor impl, perhaps.
11:39cemerickrhickey: I thought you were aghast at the notion of a Clojure Foundation, though.
11:39rhickeycemerick: ASCAP works less well the smaller you are, yes
11:40rhickeycemerick: I'm all for something that pays me for the work I do. I want to get paid to work on Clojure. I want to hire chouser and cgrand :)
11:41dnolenperhaps Clojure needs a yearly _organized_ community fund raising drive, not just a Pledgie, donate a little here a little there icon on the GitHub.com - but something time constrained, 1 month to raise 20K, 30K, more ?
11:41dnolenI find http://www.kickstarter.com/ inspiring.
11:41cemerickdnolen: that's a superb idea.
11:42esjseems to work for Wikipedia
11:43rhickeyI think if everyone who used Clojure at work considered it worth $100/year/developer, there would eventually be enough money to do that. Right now the donations compensate < 5% of my time, never mind the sunk time
11:43cemerickrhickey: you could always simply offer commercial licenses.
11:43danlarkinwell once we get everyone together for clojure conj 2010 you can milk everyone there :)
11:44dysingermilk!
11:45dysingerrhickey: I am trying to organize "Clojure Conj 2010" - if there's profit to be had from it - you can have it.
11:45chouserAt the moment, where I work, I think allowing me to use Clojure at all is as much as they're willing to risk.
11:45dysinger(tutorial days are profitable)
11:45dnolenrhickey: $100/year isn't asking much. But I think even Clojure enthusiasts would be willing to chip in if they can see there's a concrete goal that's being worked towards (why I think Wikipedia fundraising and Kickstarter projects work so well).
11:45the-kenny"you can slurp* everyone there" :D
11:45chouserdysinger: in Hawaii?
11:45dysingerno probably west coast before/after javaone
11:45dysingerlike Scala Lift
11:46danlarkindysinger: east coast, you mean
11:46dysingerI was thinking I would do it next to ICFP but there would be more java devs at JavaOne
11:46danlarkinoh
11:46danlarkinI see
11:46rhickeycemerick: at this point, I think some of the early adopter companies should band together and fund the next year of Clojure development, so maybe kickstarter is the right approach
11:48dysingerrhickey: you could come work for our clojure team :)
11:48rhickeyI'm excited about a Clojure conference (not for income-production, though I'll take what I can get)
11:48dysingerwe'd give you generous time to do your own thing :)
11:49rhickeydysinger: consulting in Clojure doesn't have me working *on* Clojure
11:49dysinger1/2 & 1/2 ?
11:49rhickeydysinger: but we should talk
11:49cemerickrhickey: sounds like a winner to me. Seems like the population involved is small enough that we can avoid kickstarter (or, its fees, to be precise).
11:50chousersmall and probably inter-trusting enough, if that communicates what I mean.
11:51angermanNo matching method found: println for class swank.util.io.proxy$java.io.StringWriter$0 :(
11:51cemericksure. No need for intermediaries when the principles are available with their checkbooks.
11:51angermanit's caused by clojure.contrib.sql.internal$print_update_counts__7482.invoke(internal.clj:125)
11:51cemerickprincipals*, of course
11:52chouserangerman: did you rebind *out*?
11:52angermanchouser: to nothing special
11:52chousercemerick: though if principles had checkbooks, they might get more respect.
11:52arohner_chouser: hah!
11:52cemerickbah dum bump *crash*
11:52cemerick:-P
11:52angermanlein swank -> emacs -> slime-connect -> "(with-connection db (do-prepared *stmt* '(val1 val2)))"
11:53rhickeyClojure2010 funding drive
11:53rhickey?
11:53rhickeyhrm, yeah, kickstart 5% is a lot
11:53cemerickthat's what I was saying
11:54chousera specific thing like that would make it easier for me to make a specific request to my employer.
11:54chouserdunno that it would increase the chances of them contributing, but it might.
11:54cemerickrhickey: you'd have to work things out on your end taxes-wise, but a simple check is just an expense on my (or any other company's) end.
11:55rhickeycemerick: I'm all for making it a company expense - that's one problem with donations
11:56chousereveryone using clojure already obviously trusts rhickey to a certain extent. all we'd need is a goal and a little progress bar. :-)
11:56rhickeyI'm happy to invoice everyone, and to pay taxes
11:56angermanrhickey: education discounts?
11:56dnolenrhickey: cemerick: yeah, wasn't suggesting to actually put in on kickstarter but just as a way to get some ideas about how to build general community excitement to help Clojure.
11:56cemerickrhickey: well, then it's all very straightforward.
11:57chouseris it? what's the item on the invoice?
11:57chouser15 seconds of online techincal support: $3000
11:57rhickeychouser: there's a pledgie progress bar here: http://github.com/richhickey/clojure ($565) we'd need another system for this
11:58cemerickrhickey: how many companies do you know of using clojure for production work? It seems the numbers are small enough still that "system" is overstating the requirements.
11:58rhickeydnolen: agreed, its interesting, especially the 'sufficient promises in place before anyone's on the hook' aspect
11:59rhickeycemerick: yes, I don't mean another system, just that pledgie isn't working right now :(
11:59angermandoes anyone have an idea why c.c.sql has those printing issues?
11:59cemerickchouser: it really is as easy as that at this point, assuming the contributors aren't looking for specific "deliverables"
11:59rhickeychouser: I don't know - people could pay me for consulting hours to work on Clojure
11:59cemerickrhickey: well, I wouldn't bother with it because of the inevitable fees, anyway
12:00danlarkincan we pay you to fix our pet-peeve bugs? :)
12:00chousercemerick: I just didn't know if the IRS cared about specific deliverables for it to be an expense instead of a donation.
12:01chouserMaybe just one big sponser is needed. If only there was someone at Sun who could get the ball rolling...
12:01cemerickchouser: as long as the recipient is a corp (or has a TIN, for a DBA), then it really doesn't matter. Presumably, the invoice would be worded better than "15s of tech support" :-)
12:01stuartsierraUnless you're a registered non-profit, I think it's always an expense.
12:03cemerickrhickey: do you have a corp, or TIN? MA has *very* stringent rules on 1099 contractors (effectively, they're always considered emps).
12:04cemerickif not, an LLC is a cinch to set up
12:05esjthe question is why are all the big OS projects charities ?
12:06esjif it does inhibits, rather than promotes, their interaction with large supporters.
12:08rhickeycemerick: I have an LLC
12:08rhickeyI have a lunch appt - bbl
12:10cemericknifty
12:11cemerickhrm, what about clojure.org hosting a clojure-specific job board?
12:11cemerickthat'd be a win-win all around, I think.
12:12cemerickimmediate answer for the "ok, so where are the clojure jobs?" question, good source of revenue, and a marketing op for contributing co's
12:14_fogus_I'm actually surprised that hasn't been done yet.
12:15angermanok. I figured it tries to write to *err*
12:15cemerick_fogus_: the question is, is there enough volume so that it doesn't look like a ghost town?
12:18_fogus_cemerick: Agreed. I wish I knew the answer. With my focus on the Clojure community it seems likely that there are enough, but it may just be my insular perspective
12:18angerman~source println
12:20cemerick_fogus_: well, maybe jobs could just be listed on a corporate "sponsors" page as they're available to start
12:20LauJensenWhy pay for something you can get for free?
12:21cemerickLauJensen: ?
12:21LauJensenI think most of this discussion really requires an answer to that question. I agree with Rich that OpenSource makes for a bad business model which relies on 'hand outs' more than sponsor agreements etc, so there needs to be some motivation to pay other than charity and good will
12:23cemerickEnlightened self-interest. If Rich stops doing what he's doing, then our jobs will be harder and less pleasant as time progresses.
12:23LauJensenI was thinking more along the lines of something similar to JBoss licensing options :)
12:23cemerickThat won't work for the general population, but there's some set of clojure early adopters that are likely pretty enlightened. :-)
12:24_fogus_LauJensen: Well that's the root of the problem. People (in general) tend to not pay if they are not forced to and Clojure might never gained as much exposure without its license
12:24cemerickLauJensen: it doesn't seem that rhickey wants to offer commercial licenses *shrug*
12:24cemerickwhich I can totally understand. Selling software sucks.
12:24LauJensenhehe, says the software vendor :)
12:24cemerickExactly.
12:25LauJensenWell, when it comes to money I wouldn't spend my time trying to appeal to the community spirit, because people don't part from their money unless they have to, specially in these times. And I DO really want to see the good work on Clojure continue. So perhaps we need to think out of the box here, come up with a third path
12:26_fogus_Mark Tarver (Qi) said something interesting once, "there is no argument so feeble or lacking in conviction that people will not employ it to take the things they want."
12:26cemerickSelling is awesome, as challenging and rewarding as solving the most difficult programming problems. Selling *software* complicated, laden with obstacles and false starts, and is generally tied to a dreadfully flawed "support" model after the fact.
12:26chouserI've always been intruiged by the idea of having the newest version available only for pay, with older versions fully open.
12:27cemerickchouser: that would really impact the feedback loop though, no? Consider how new would have turned out without all those eyes...
12:28LauJensenThats not bad, considering how much time Rich puts in between even minor revisions
12:28LauJensencemerick: sure, the cheap eyes would loose out :)
12:28cemerickmaybe once there's dozens or hundreds of bleeding-edge corporate users...
12:28cemerickLauJensen: I don't think that's a bad tradeoff.
12:28LauJensenMaybe Rich should start by ramping Clojure Inc., and hire a sales force of 5 who can get those 100 companies
12:29chousercemerick: how many of those eyes are (or will be in future versions) will to pay for access? Maybe enough? Dunno.
12:29chousercemerick: it's definitely a valid concern.
12:29LauJensenDepends on the price-tag, that will set the entry barrier
12:29cemerickyeah, I have no idea
12:30cemerickThis whole problem is where systems companies are supposed to take up the slack, but the relevant ones are unfortunately otherwise occupied.
12:30chousercertainly wouldn't have worked for 1.0, and probably not for 1.1
12:30_fogus_chouser: I have some precedent with both side of the equation. My former employer sold a really nice piece of software, but the particular joint project that I worked on offered a far inferior, but *free* version. People were almost universally willing to go with the inferior product and in your case I fear they would likewise hold onto the *free* version
12:32chouser_fogus_: I can see that. It might also depend quite a bit on the type of product and type of user.
12:32cemerickyeah, the general case is, people don't pay unless they are forced to
12:32LauJensen_fogus_: Yet JBoss is a huge success, I think due to their sales organisation
12:32cemerickLauJensen: I think that's because the buyers trust JBoss more than their own internal I.T. orgs.
12:33LauJensenTrue
12:33_fogus_LauJensen: I'm not familiar with their licensing
12:33LauJensenGood insight
12:33LauJensen_fogus_: its expensive, and all you get is 'support' :)
12:35chouserI actually don't think that's quite right. I think people are willing to pay when it's the only "right" thing to do, even if not forced.
12:35_fogus_LauJensen: In my aforementioned former company, our revenue from support far outstripped the cost of licenses -- maybe this is universal
12:35esjI know they distract from the actual work, but training courses are both reasonably lucrative and increase the user base ?
12:35LauJensenchouser: you're wrong I'm afraid
12:35chouserThat is, I think money lost through piracy is much lower than generally claimed.
12:36LauJensen_fogus_: outstripped?
12:36_fogus_LauJensen: Was much larger
12:36LauJensenInteresting
12:37LauJensenHmm.. .... must revise business model :)
12:37Chousukechouser: I think people will generally pay if they feel the price is right.
12:37LauJensenChousuke: yes, + 10% discount
12:37chouserChousuke: yes, I'm sure that's a factor.
12:37LauJensenAt least here in Denmark you cant sell anything without those last 10% :)
12:37Chousukechouser: of course, that varies for everyone so you must find the sweet spot for your target audience.
12:38chouserright
12:38Chousukea professional developer will pay more than a student.
12:39ChousukeI think people generally like to spend money, so long as it's within their "safety margin"
12:40esjif you license the language now why do you not lose your user base to Scala, Go, Caml etc etc that are all free.
12:40hiredmanhow do people do completion in emacs?
12:40hiredmanI got this "smart-tab" thing off the emacs wiki and it doesn't seem to do jack
12:41LauJensendabbrev-expand
12:41hiredmanI saw a reference to that in the smart-tab code
12:43esjthe money has to come from something over and above the language itself
12:44Chousukeesj: Don't worry, Clojure will stay free.
12:45hiredmangrrr
12:45ChousukeThere is no market for new proprietary general purpose languages.
12:45_atohiredman: hmm.. M-tab is bound to slime-complete-symbol for me
12:45esjchousuke: this is good, but not my worry, which is how do we attract money to keep this going.
12:46angermanwhat's the better language suited for an ocaml implementation ontop, scala or clojure?
12:46mac___ato: the problem with M-tab is that it won't work with most windowing systems :(
12:46LauJensenI expand with M-RETR
12:46_atoyou can bind it to something else
12:46mac__LauJensen: Yeah M-RET is good
12:47_atoI bind all my windowing stuff to the hyper key
12:47hiredman_ato: and M-tab pops up a list I can go through and click on a symbol
12:47hiredmanexcept it doesn't include symbols in open buffers
12:47hiredmanand it doesn't use a single keypress
12:47hiredmanand it doesn't just do it inline
12:48_atoit should if there's only one completion
12:48hiredman(all of which vim does :P)
12:48ChousukeI have some completion system that works with just tab
12:48mac__hiredman: if you have evaluated the buffer slime-complete-symbol will suggest stuff in it
12:48Chousukeand does inline expasion
12:48Chousuke+n
12:48hiredmanChousuke: I would be interested to know what that is
12:48Chousukehiredman: I'm not too sure myself
12:49AWizzArdLauJensen: in your round 2 (Scala vs Clojure) you link to http://bestinclass.wordpress.com/2009/09/04/hello-world/
12:49hiredmanclojure-mode's syntax highlighting seems rather anemic too
12:50Chousukeah, right, auto-complete.el :P
12:51LauJensenAWizzArd: Thanks :)
12:51Chousukehiredman: http://github.com/Chousuke/emacs.d/blob/master/init-autocompletion.el this is what I have in my autocompletion init file. I should probably tweak it a bt
12:52Chousukerequires auto-complete.el, which I have in my site-lisp
12:54Chousukethis code is inherited from starter-kit or something I think
13:01Drakesontechnomancy: ping
13:02Drakesonlein self-install does not work :p
13:03Drakesonthe leiningen-*-standalone.jar that lein wants is not there. why don't you point it to clojars.org instead of repo.technomancy.us
13:04technomancyDrakeson: self-install only works with the stable branch
13:07Drakesonhow can I bootstrap the trunk ? is there a smallish build.xml somewhere?
13:07Chousukejust run ant?
13:07technomancyDrakeson: it's explained in the "Hacking" section of the readme.
13:07technomancyyou bootstrap from an earlier release
13:07Chousukeoh, never mind
13:08AWizzArdtechnomancy: good that so much work is going into Lein.
13:09Chousuketechnomancy: is it possible to build without a binary though? :/
13:10technomancyChousuke: without an earlier lein version? yeah, ieure wrote a script to do it with ant for macports.
13:11ChousukeI think if (when) Clojure becomes self-hosting there'll have to be some stripped down version that works for bootstrapping without a previous version.
13:12ChousukeI wonder how much work maintaining one would be. :/
13:12technomancyChousuke: I am not ambitious enough to have thought that far ahead. =)
13:14ChousukeI guess you could just strip the current java stuff to a bare minimum (to minimise the maintenance burden) and use that for bootstrapping.
13:15ChousukeI suppose it'll require quite a lot of design work to actually make that work smoothly though.
13:18chouseryou don't the the .class files will be sufficient?
13:19johnmn3.
13:20angermantechnomancy: any plans to allow jvm arguments_
13:20angermantechnomancy: e.g. -Xmx 512M
13:21headiuseveryone always worries about self-hosted code somehow winking out of existence
13:21headiusI don't really get it
13:21LauJensenheadius: then you obviously haven't used Common Lisp :)
13:21Chousukechouser: I guess they might be, but not having to find a suitable previous version for building would be convenient :/
13:22technomancyheadius: ...says the guy with a 1.7kLOC build.xml file =)
13:24technomancyangerman: I think it could be added, but I haven't run into the need myself
13:24headiustechnomancy: I blame XML and ant for that :)
13:25headiusif I could do a bloody "if", it would probably be half the size
13:25cemericktechnomancy: way to soft-pedal the maven ;-)
13:28angermantechnomancy: I did. using incanter and some "larger" matrices
13:28angermantechnomancy: on a sidenote, what the idea behind using -client instead of -server?
13:38cemericktechnomancy: what do you think of clojure-maven-plugin, anyway? I presume you've used it in your travels at some point.
13:47scellusi'm using clojure-mode without slime or anything. is there a way to easily fix clojure's behaviour with C-c C-c, which now makes it to terminate.
13:47scellus... way to fix clojure's behaviour with C-c C-c which terminates it now
13:48the-kennyscellus: Rebind C-c C-c in the buffer you're working on
13:48scellusthe-kenny: what signal should it send?
13:49the-kennyscellus: hm.. don't know. Something that don't interrupt clojure? None, maybe?
13:49scellusi'd like it to get back to repl
13:49the-kennyI don't know much about using clojure-mode without anything
13:50scellusi guess it's better with slime?
13:50the-kennyI think so.
13:50scellusok, thanks
13:50the-kennyAlmost everything is better with slime ;)
13:50the-kennyAnd the setup isn't very complicated
13:50the-kennyYou should try it
13:52LauJensenkenny baby, what did it take to get fuzzy completion running with Clojure? I want to try it out
13:52the-kennyLauJensen: First, you need slime-fuzzy.el from the contrib/ directory of slime
13:52the-kennyPut it anywhere in your load path, and then put some code in your .emacs.. wait, I'll paste the code
13:53LauJensen~paste
13:53clojurebotlisppaste8, url
13:53lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
13:53LauJensenThanks alot
13:55lisppaste8the-kenny pasted "Fuzzy with Clojure" at http://paste.lisp.org/display/91828
13:56the-kennylisppaste8: There you are
13:56the-kennyuhm.. LauJensen
13:56LauJensenuhm, Kenny? :)
13:57the-kennyhm?
13:59LauJensenThat just fried my REPL
13:59the-kennylol
13:59LauJensenoh, there we go
14:00LauJensenI called slime-fuzzy-completion-mode one too many times
14:00the-kennyin a new repl, typing some text and hitting TAB should be fine
14:00the-kenny(C-c TAB in a source buffer)
14:00LauJensenYea, looks fun
14:04chouserscellus: there's add-break-thread! in repl-utils that might help.
14:05samlhey, is there shortcut for (doc symbol) ? in Clojure Box
14:11scellusa lot of reflection warnings from repl utils :)
14:12the-kennyscellus: Get a CA and write a patch :)
14:13scellusadd-break-thread! solves the clojure-mode C-c thing, great!
14:16the-kennyscellus: What "thing"?
14:17the-kennyscellus: ah, sorry. Got it.
14:18scellusthe-kenny: yes. and reflection warnings are not worth a patch...
14:21dysingercemerick: we use clojure-maven-plugin at work on a mulitmodule clojure project with a dozen submodules.
14:21dysingerwe don't use lein
14:22cemerickdysinger: yeah, we're in the same position
14:22dysingerIt works well enough (maven-plugin)
14:22dysingerhappy to share if you need
14:22dysinger(our parent / child pom setup)
14:23cemerickdysinger: thanks, but we have our own über-parent that refers to internal builds of clojure and contrib :-)
14:24cemerickI did need to add a simple patch to the plugin to make it usable for us: http://github.com/cemerick/clojure-maven-plugin/tree/clojure-options
14:24cemerickpassing options at compile- and test-time is a must-have, IMO
14:25dysingercemerick: agree - we use profiles and properties to trigger
14:26dysingersuch as 'mvn -Dnotest'
14:26dysinger(triggers testless quick builds)
14:26dysingerinstead of typing the whole long maven.test.skip=true
14:26cemerickyeah, I wouldn't have bothered with a patch, but we needed -Xmx for tests
14:27dysingerah
14:27cemerick(I assume properties can't be used to pass jvm flags)
14:28dysingerI think in the long run we'll be on maven3 rather than lein for big projects. there's just too much good stuff in maven3
14:28dysingeror maven rather
14:28dysingerI like being able to use dependency:tree and versions:display-dependency-updates
14:29dysingerand versions:lock-snapshots and "assembly:assembly -DdescriptorId=jar-with-dependencies"
14:29dysingeretc.
14:29dysingeretc.
14:29cemerickagreed. The tooling (in NB, anyway) is pretty darn handy with an authoritative pom, too.
14:40devlinsfHey, quistion about clojure.lang.PersistentTreeMap
14:40devlinsfIs it the only sorted my type in Clojure?
14:40devlinsf*map
14:41ordnungswidrighi all
14:41fliebelHas anyone ever got VimClojure working with MacVim? There are a bunch of texts and video's describing the process, but I can't get that to work with MacVim, everything is just in another place!
14:42devlinsfNevermind... the Sorted interface will do what I need
14:42dnolenordnungswidr: pc user before or no?
14:43ordnungswidrigbuilding business models as persistent datastructures is no fun in java. my eyes hurt.
14:43ordnungswidrigdnolen: mainly linux. But I know my bsd and have had some macs at work, um, 5 y ago
14:44ordnungswidrigdnolen: mostly I like the hardware.
14:44leafwordnungswidrig: same here. Linux runs great on macbooks.
14:46ordnungswidrigleafw: I think I'll end up in dual boot and some virtualization... however os X is not so bad, after all.
14:47the-kennyThe well-written programs make osx so cool
14:47fliebelAny chance someone can talk me through the process of installing VimClojure in MacVim? Or tell me what to put where. I'm confused mainly by the dot files in ~ and the nailgun thing...
14:47ordnungswidrigWhat I noticed is that all the brains between the fun stuff like clojure and erlang goes together with mac users. As far as I can judge from the screencast.
14:48ordnungswidrigs/between/behind/
14:48solussdon a mac here! perfect dev environment
14:49ordnungswidrigsolussd: with a ssd or is this a purely incidental nickname regex match?
14:49solussdpurely incidental
14:50ordnungswidrigsolussd: *g*
14:51the-kennysolussd: wouldn't say "perfect", but very very good
14:51LauJensenhehe
14:51the-kennysolussd: It would be perfect, if I could run emacs in Terminal.app with CMD mapped to Meta
14:51the-kenny:D
14:52LauJensenI'd say OsX is as good for development as a bicycle is for F1-Racing. It just works :)
14:53pjstadigok
14:53solussdunix + slick interface (well thought out gui, 2 levels of window management [application and app window] virtual desktops, etc) + stability + top end hardware = as good as it gets
14:53pjstadigi've been working on 1.0 compatible terracotta
14:53pjstadigand i think i have a much nicer solution
14:53solussdi develop in linux at work
14:53devlinsfsolussd: Don't forget the real feature of a Mac
14:53solussdcan't imagine doing development in windows- unless I'm writing windows apps
14:53pjstadig(defn #^{:tcshared true} foo [] 42)
14:53ordnungswidrigme likes xmonad with emacs
14:54devlinsfsolussd: Starcraft
14:54cburroughsIs there a clojure json library that isn't strict (ie accepts unquoted keys, javascript comments etc.)
14:54pjstadigcreates a shared function
14:54the-kennydevlinsf: hrhr yes
14:54solussdmmm starcraft 2
14:54polypuspj: i'm on a mac, and agree w/ most of your points, except the well thought out gui bit. i miss wmii from my linux days
14:54the-kennysolussd: Can't wait for it :)
14:54pjstadig(alter-meta! #'foo assoc :tcshared false) removes it from terracotta
14:54the-kennyBut I'm afraid it won't run on my Macbook
14:54the-kenny(white one, without a "real" graphics chip)
14:54devlinsfsolussd: Yeah, work is gonna stop for a week then...
14:54solussdI'm just glad it didn't come out a couple years ago- it would have cost me my engineering degree. :)
14:55devlinsfhahaha - me too
14:56solussdi've got a 2.53GHz 15" macbook pro w/ 512MB nvidia 9600 and 4GB ram. plus a 24" cinema display. Hopefully it runs on that.
14:56the-kennysolussd: I'm ~1 year before graduation with "Abitur" (german).. I hope SCII doesn't come out before that
14:57dysingerhey pjstadig :)
14:57pjstadighey dysinger :)
14:57ataggartdoes anyone have some info on the status (if it's being pursued at all) of providing default implementations for defprotocol/deftype
14:57dysingerordnungswidrig: I am also an xmonad / (console) emacs user
14:58the-kennyataggart: Look at the "new" branch in git
14:58dysingerguis are for teh wimps
14:58solussdthe-kenny: you have the 'use option as meta key' option checked in Terminal.app, right?
14:58ataggartI have it, did soemthign get added recently?
14:58ordnungswidrigsolussd: did you buy it with 4GB or did you upgrade yourself?
14:58the-kennysolussd: That's option, not CMD
14:58the-kenny;)
14:58solussdthe-kenny: I know it doesn't help you w/ the cmd key, but at least it works
14:58solussdyeah
14:58dysingerthe-kenny: I just hooked up "new" to the build.clojure.org maven snapshots repo
14:58ordnungswidrigdysinger: if osx is a real bsd then nothing shall prevent me from using xmonad/emacs on osx as well :)
14:59dysingersince we have qualifiers now (thanks chouser
14:59the-kennydysinger: Sounds good :) Can I use it in leiningen then?
14:59dysingerosx has X and you should be able to do it.
14:59dysingerthe-kenny: yes
14:59the-kennydysinger: Great! :)
14:59dysingerout of the box
15:00dysingerhttp://build.clojure.org/snapshots/org/clojure/clojure/1.1.0-new-SNAPSHOT/
15:01ordnungswidrigemacs users: is there a clojre/paredit-mode command to pull all closing parenthesis/braces/brackets on a line? say )\n))\n]\n) to )))])
15:02the-kennymh.. looks like swank needs to be built with the new-jar too. (RestFn-Errors)
15:04dnolenordnungswidri: I don't think so, but that's because you would never need to do that in paredit :) it always adds the closing paren.
15:04ordnungswidrigdnolen: It's not about adding but about having them nicely at the of the line
15:05ordnungswidrigdnolen: IMHO it's common lips stile to have sexp end with ")))))))))"
15:05ordnungswidrigwith common lisp style I mean a common style in lisp, not a style in common lisp
15:06fliebelordnungswirdig: I like )\n)\n)\n)\n)\n)\n)\n better I think…
15:06ordnungswidrigfliebel: whis is rather uncommon?
15:06Chousukefliebel: everyone will complain at you if you use that style.
15:07Chousukeclosing parens go on one line. :P
15:07fliebelI know that, but it looks a lot more readable to me...
15:07dnolenfliebel: you will eventually discard your errant ways ;)
15:07Chousukemaybe in the beginning :)
15:07ordnungswidrigChousuke: in the end, indentation would be sufficient but I leave that to the haskell guys.
15:08the-kennymh.. when will new be merged into master?
15:08Chousuketo me it just looks silly.
15:08ordnungswidrigChousuke: yes, and it eats valuable screen estate!
15:08fliebelchousuke; you mean that you find it easier to see where a paren starts when it looks like )))))?
15:08dnolenthe-kenny: probably not anytime soon. lots of possible breaking changes in there.
15:08the-kennyordnungswidrig: I'm sure there is a no-paren-mode
15:08Chousukefliebel: why would you need to see where it starts? and that's what highlight is for.
15:08ordnungswidrigfliebel: you editor shows you.
15:09ordnungswidrigthe-kenny: ha, I read "no parents mode".
15:09ordnungswidrigthe-kenny: what we all have dreamed of as teenagers...
15:09ordnungswidrigscary: flash-paren.el --- flash matching parens a la Zmacs
15:09ordnungswidrig
15:10dnolenthe-kenny: FWIW, new is stable enough to hack with and I'm doing that without much issue. Leiningen makes it easy to work off stable clojure when I need it.
15:10ChousukeI don't think there's usually much need to see where an expression starts and ends, especially in clojure
15:10the-kennydnolen: Yeah, I worked with new a long time, but there are some issues with leiningen and new. The packages (for example swank-clojure) isn't available for the new-branch.
15:10fliebelordnungswirdig: At the moment I have no editor. emacs = hard, bunch of Java IDE's = bloated, JEdit = not integrated into OS X… I'm looking at Textmate and MacVim now, but I cant get Vim to install the Clojure mode.
15:11Chousukebecause they tend to be only one expression anyway
15:11dnolenthe-kenny: yeah, I think most of the issues arise from the locals clearing changes.
15:12the-kennydnolen: Yes, the RestFn-Stuff
15:12ordnungswidrigfliebel: you will not master the full power of lisp and s-expressions until you have a decent editor like lisp which supports those. better learn you emacs now
15:12the-kennyordnungswidrig: s/lisp/emacs/?
15:12cemerickdysinger: are those snapshots going to refresh automatically now?
15:12ordnungswidrigthe-kenny: s/like lisp/like emacs/
15:12dysingercemerick: y
15:13the-kennyordnungswidrig: Yes.. better regexp ;) I'm lazy
15:13Chousukeemacs is worth learning for lisp
15:13cemericknice
15:13the-kennyChousuke: Absolutely. I agree.
15:13Chousukebesides, it doesn't take much to get started with clojure-mode, lisp and paredit.
15:13Chousukeer
15:13Chousukeslime
15:13ordnungswidrigthe-kenny: or better, regexing your regex: s#/#\0 like#
15:13ordnungswidrigChousuke: and hl-parens
15:14fliebelordnungswidrig: I like my Mac interface and my mouse, so the terminal-like, keyboard-orientated emacs is not my style I think.
15:14Chousukefliebel: you can try aquamacs.
15:14the-kennyfliebel: You can use Aquamacs.
15:14the-kennylol
15:14ChousukeMy mouse has a broken scrollwheel and I still haven't bothered to buy a new one :P
15:14dysingerwe actually only hire emacs lovers :P
15:15fliebelthen I might just as well not use emacs at all...
15:15ordnungswidrigthe-kenny: clojurebot could do the regex stuff :)
15:15Chousukedysinger: to avoid editor wars, huh?
15:15dnolenfliebel: well It's not like VIM is much friendlier than Emacs.
15:15cemerickmight be time to stop using internal builds, perhaps
15:15ordnungswidrigdysinger: this is one of the few reasonable corporate policies
15:15the-kennyordnungswidrig: I wrote a bot with a functionality like this once in perl. It was annoying ;)
15:15pjstadigare we having an editor war?
15:15dysingerChousuke: so everyone is on the same page and makes pair-programming easy
15:15dnolenpjstadig: no.
15:15dnolenVIM and Emacs are equally powerful and unfriendly.
15:16cemerickheh
15:16fliebelpistadig: not yet :P but I'm not sure how lang it can stay that way if I don't learn emacs.
15:16pjstadigi don't use an editor i twiddle bits using a fork and dental floss
15:16dysingerI use butterflies
15:16jasappI prefer cat and ctrl d
15:16ChousukeI would like the modal interface of vim but emacs is superior because of its extensibility :/
15:16solussddnolen- i'd have to disagree- if they were unfriendly, why would anyone continue to use them? Especially younger people like me who have had 'fancy' IDEs their whole lives?
15:16cemerickI wave magnets over my laptop *really fast*
15:16pjstadig~suddenly
15:16clojurebotCLABANGO!
15:17solussdthe-kenny: that is a terrible abuse of butterfly.
15:17ordnungswidrigjasapp: what about "copy con: file"
15:17dysingerhttp://xkcd.com/378/
15:17ChousukeSome day there will be an emacs extension that writes code fo you without you having to do anything.
15:17the-kennysolussd: It's the real intention of butterfly.
15:17devlinsfYou guys are all lame. I observe electrons :)
15:17the-kenny;)
15:17Chousukefor*
15:17the-kennyChousuke: I'm sure there is one already
15:17jasappheh
15:17dysingerM-x butterfly !
15:18solussdso what does M-x butterfly do? I hear they added it to v23
15:18the-kennysolussd: Nothing interesting
15:18the-kennyMoves some characters and forms a sentence
15:19fliebelDoes anyone know why the mouse was invented? I think the whole point is to move the RSI from your left pinky finger to your right wrist. :)
15:31ataggartanyone have installation instructions for the emacs-start-kit that actualy contain information on how to get the emacs-starter-kit into emacs?
15:38_atoataggart: what are you having problems with? just check it out as ~/.emacs.d (and move ~/.emacs.d and ~/.emacs out of the way if you already have them).
15:39rfgpfeifferis there a continuous integration server for slime, swank-clojure and clojure itself?
15:41chouserrfgpfeiffer: for clojure: http://build.clojure.org/
15:47polypusataggart: you still there?
15:47ataggart_ato: check *what* out? the instructions say to get emacs, cd to ~, and start emacs
15:47ataggartpolypus: yes
15:48_atoataggart: checkout the emacs-starter-git with git
15:48ataggartto?
15:48_ato~/.emacs.d as the instructions say
15:48clojurebotemacs is best configured for Clojure with instructions at http://technomancy.us/126
15:48_atocd ~; git clone git://github.com/technomancy/emacs-starter-kit.git .emacs.d
15:48ataggartthe instructions don't make it clear what I'm suppoed to pull from git
15:49ataggart_ato: thanks, that's actually jelpful
15:49ataggart*helpful
15:49_ato"the directory containing this file" -- ie the directory containing the README file, so the whole thing ;-)
15:49ataggartconsidering I'm reading the website, the context isn't clear
15:49_atookay perhaps that's a strange way of putting it, I think he was expecting people to check it out and then read the README
15:50ataggartyeah
15:50ataggartI didn't
15:51ataggartplus cloneing it to ~/.emacs.d would be a good piece of info for those of us neither proficient in emacs nor git
15:54polypusataggart. make sure you do not have a .emacs file. if you do rename it to ~/emacs.d/<yourusername>.el
15:55polypusthat tripped me up at first
16:04polypus~ping
16:04clojurebotPONG!
16:06fliebelHey, where has the compile thing gone? Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/compile
16:10fliebelI'm trying to get vimclojure to work, but it gives: BUILD FAILED
16:10fliebel/Users/pepijndevos/Downloads/vimclojure-2.1.2/build.xml:66: Could not find clojure.lang.Compile. Make sure you have it in your classpath
16:11fliebelI tried running clojure manually. clojure.main works fine, but clojure.jang.compile give this error.
16:11fliebel`compile
16:11fliebel,`compile
16:11clojurebotclojure.core/compile
16:11fliebelthat did not work either
16:12defntechnomancy: NetNewsWire doesn't show me a list of all your recent posts, they only go up to: Oct 26, 2008 in which a scheme will be expounded upon
16:12hiredmanfliebel: there is no such thing
16:12hiredmanthere is a clojure.lang.Compile
16:13fliebelhiredman: that is what ant is looking for, but it says it can't find it.
16:14hiredmanthen it's not on ant's classpath
16:14clojurebotclasspath is (System/getProperty "java.class.path")
16:15fliebelhiredman: how can I check ant's classpath? Thet tut I'm following told me to make a local.properties fiel conaining my clojure file.
16:15technomancydefn: it's valid atom; sounds like a bug report is in order.
16:15defntechnomancy: nevermind found it: http://technomancy.us/feed/atom
16:15defnthat works
16:15samlclojure.core/str
16:15saml([] [x] [x & ys]) does this mean that str takes [] or [x] or [x & ys] ?
16:15the-kennysaml: Yes
16:15samlthanks the-kenny
16:16samlmy first emacs copy and paste to irc
16:16the-kenny(str) or (str 42) or (str "abc" 42 "foobar")
16:16defnM-w C-y
16:16defnso sweet
16:16hiredmanfliebel: what are you doing?
16:16fliebelcompiling vimclojure
16:16hiredmanI see
16:17hiredmanand what are the contents of your local.properties file?
16:17fliebelclojure.jar = /opt/local/share/java/clojure/lib/clojure.jar
16:17fliebelclojure-contrib.jar = /opt/local/share/java/clojure/lib/clojure-contrib.jar
16:17fliebelnailgun-client = ng
16:17fliebelvimdir = /Users/pepijndevos/.vim
16:17samlhow come (.toUpperCase "a") works but not (.toUpperCase \a) ?
16:17saml\a is primitive char not Character?
16:18saml(class \a) says it's java.lang.Character
16:18the-kennysaml: It's a static method on Character
16:18samlthe-kenny, ah thanks
16:18the-kenny(Character/toUpperCase \a)
16:18the-kenny,(Character/toUpperCase \a)
16:18clojurebot\A
16:18samlis upper case symbol always java class? like Character
16:19hiredmansaml: nope
16:19hiredman,'A
16:19clojurebotA
16:19fliebelhiredman: that path is confirmed to be working, i ran java -cp that-thing clojure.main
16:19the-kennysaml: Read the page about java interop on clojure.org
16:19samlalrighty
16:19hiredmanfliebel: how are you running ant?
16:19hiredmando you have the local.properties file in the right place?
16:20fliebelwell, just typing ant while in the project directory
16:20hiredmancan you pastebin the error you get somewhere?
16:21fliebelhiredman: http://pastebin.com/m7c1b63ab (don't ask me why my mac is called ubuntu)
16:23fliebelhiredman: 2 java command with the same path: http://pastebin.com/ma5011d5
16:25jasapphas anyone written a lot of c or c++ code?
16:25the-kennyjasapp: Here
16:26jasappI've been writing in lisp for the 6 years and I haven't touched c for ages
16:26jasapphow do you recommend going about writing good code (functional) in c?
16:27fliebelhiredman: the files at least exist. Can you, or anyone else see what's wrong?
16:27the-kennyoh.. no idea. Sorry. I've never bothered with functional code in c
16:27jasappahh, ok
16:27jasappthanks though
16:28_atoheh, I guess you start by implementing Clojure's data structures
16:28_ato(or restrict yourself to linked lists)
16:28jasappwho had that quote?
16:29jasappevery language at it's heart is a broken lisp?
16:29jasappsomething like that
16:29KirinDave_greenspun's 10th rule, I think?
16:29stuartsierraGreenspun's 10th Rule, yse
16:29stuartsierrayes
16:29KirinDave_http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule
16:29stuartsierraIt's really hard to write functional code without a garbage collector.
16:30KirinDave_stuartsierra: Is it?
16:30jasappkirinDave: that's it
16:30_atoyou can get a GC library for C
16:30_atoI've never tried it though
16:30KirinDave_stuartsierra: There is a lisp that is a pure functional lisp, has no explicit GC. It's all in the stack frames, so it's a natural method of GC.
16:30KirinDave_I'm trying to remember the name.
16:30hiredmanfliebel: I between lines 65 and 66 in build.xml can you stick <echo message="${clojure.jar}" />
16:31_atohttp://www.hpl.hp.com/personal/Hans_Boehm/gc/
16:31hiredman65 and 66 or there abouts
16:31stuartsierraKirinDave_: Forth :)
16:31hiredmanboehm is pretty easy to use
16:31KirinDave_stuartsierra: No.
16:31clojurebotstuartsierra is volunteering
16:31KirinDave_stuartsierra: I mean, yes. But no. :)
16:31hiredmanforth seems pretty cool
16:31stuartsierraclojurebot: who said that?
16:31clojurebotHuh?
16:32stuartsierraHmph.
16:32KirinDave_Not chicken...
16:32fliebelHow do I turn on line number with MacVim :$
16:34the-kenny:set lines or something like this
16:34hiredmanfliebel: set :66
16:34hiredmaner
16:34hiredman:66
16:34hiredmanwill put you on line 66
16:34fliebelcool
16:35rfgpfeifferfliebel: ask in #vim
16:35hiredmanrfgpfeiffer: whatever
16:35the-kennyOh, I thought he want to enable line numbering
16:35hiredmanrfgpfeiffer: people ask emacs questions here all the time
16:35chouser:set number if you actually want to see them
16:36rfgpfeifferi did not mean to offend anybody
16:36rfgpfeifferi just thought most of us use emacs
16:36micampeset lines=66 sets the number of lines displayed
16:36KirinDave_technomancy: ping?
16:36hiredmanfliebel: around those line numbers, dunno if we are looking at exactly the same xml file
16:37hiredmanI don't see where emacs users get off with their sense of superiority
16:37fliebelhiredman: It prints this now: [echo] /opt/local/share/java/clojure/lib/clojure.jar
16:37hiredmanhmmm
16:38fliebeldoes it matter if I'm using 1.0 or 1.1 alpha?
16:38hiredmanshouldn't
16:38hiredmanfliebel: what version of ant are you using?
16:39ataggartthis (http://technomancy.us/126) has been updated to refer to this (http://github.com/technomancy/swank-clojure). Does anyone have any installation instructions for someone who doesn't already understand how to install it?
16:39fliebelhiredman: Apache Ant version 1.7.1 compiled on September 22 2009
16:39hiredmanataggart: use epla
16:39ataggartthat doesn't mean anything to me
16:39hiredmanthe README for swank-clojure has a link
16:39hiredmanREADME.md
16:40ataggartok I think I have that from the starter-kit
16:40hiredmanataggart: http://tromey.com/elpa/install.html
16:40the-kennyataggart: package.el :)
16:40ataggartbut I have no clue what to do
16:40the-kennyM-x package-list-packages
16:40hiredmanataggart: jsut read the instructions
16:40hiredmanit's not rocket science
16:40the-kennysearch for swank-clojure and clojure-mode, i and press x
16:40ataggart"Install from ELPA using package.el[1]."
16:40hiredmanI did it the first time the day before yesterday
16:41ataggarthave you used emacs before doing so?
16:41ataggartcuz I haven't
16:41hiredmannope
16:41ataggartwell then you're just smater than me
16:41hiredmanthe readme is there
16:41ataggart"Install from ELPA using package.el[1]." doesn't tell me anything
16:41hiredmanyou just have to click through the links
16:41hiredmanwhere it says EPLA? click on that
16:42ataggartthere's only one link, and it's to elpa (whatever that is) and I already have it from the starter-kit
16:42fliebelhiredman: is version 1.7.1 fine?
16:42ataggartnow that I "have it" I assume I need to do something
16:42ataggartwhat that something is is beyond me
16:42hiredmanfliebel: that is what I have
16:42hiredmanataggart: did you click on the EPLA link?
16:43ataggartyes, it doesn't tell me how to install swank-clojure
16:43the-kennyhiredman: I think it's called "ELPA" :)
16:43hiredmanon the install page for epla it tells you the command to open the list of packages
16:43fliebelhiredman: the strange thing is that I successfully compiled it this very morning, but gave up and threw it away.
16:43ataggartbut I already have it installed
16:43KirinDave_the-kenny: You were the xkcdexplained fan, right?
16:43hiredmanataggart: so?
16:43the-kennyKirinDave_: Yes
16:43hiredmanataggart: the instructions are on the install page
16:43tomojsomeone already gave the instructions :)
16:44KirinDave_the-kenny: Look at it. (and tell me if you can tell if I had a long, pointless meeting today or not).
16:44ataggarthiredman: as I said, I already have elpa from the starter-kit, so the instructions to install elpa don't help me
16:44hiredmanataggart: I did not say instillation instructions
16:44hiredmanI said on the install page it has instructions
16:45tomojstart reading where it says "Once you have installed the package manager" :)
16:45hiredmanit's not like I am trying to mislead you or anything
16:46hiredmanI understand that you have it installed, and I am still telling you to look at the install page
16:46fliebelhiredman: I removed some whitespace, and now I got another error.
16:46ataggarthiedman: this? "Once you have installed the package manager, type M-x package-list-packages. Type r in the package menu buffer to update the list of packages available from the server. If you want a particular package, type i next to its name to mark it for installation, and then x to download and install it."
16:46hiredman~xml
16:46clojurebotXML is like violence; if it doesn't solve your problems, you're not using enough of it.
16:46hiredmanataggart: yes
16:46ataggartwhat's a "package menu buffer"?
16:47tomojoi
16:47hiredmanataggart: do you see where it says "type M-x package-list-packages"?
16:47ataggartyes
16:47tomojit's the buffer that says "Package Menu" on it :P
16:47hiredmanFOLLOW THE INSTRUCTIONS AND DO THAT
16:47fliebelhiredman: java.lang.ClassNotFoundException: clojure.contrib.pprint.PrettyWriter (pprint.clj:14)
16:47tolstoyIs there a good discussion about using "use" or "require" in the repl? I can never actually ever use any contrib modules.
16:47the-kennyKirinDave_: Looks good :) Nice and detailed explaination.
16:48ataggartk clearly I'm too dumb to use emcas, thanks anyway
16:48tomojtolstoy: slime?
16:48tolstoyNah, just the raw repl. I've not waded in to getting slime working yet. (Used it a lot with CL a few years ago.)
16:48tomojoh, well you need to have contrib on the classpath
16:48hiredmanfliebel: you need to aot compile your contrib
16:48tolstoyIt is.
16:49tomojthen.. something's wrong
16:49hiredmanataggart: well emacs is dumb
16:49fliebelhiredman: how? It's already a jar.
16:49hiredmanfliebel: a jar is just a zip file
16:49tolstoy(use [clojure.contrib.prxml])
16:49tolstoyjava.lang.ClassNotFoundException: clojure.contrib.prxml (NO_SOURCE_FILE:5)
16:49tomojoh, heh
16:49tomojon the repl you need to quote
16:49tomoj(use 'clojure.contrib.prxml)
16:50tomojin the ns macro you don't need this because it's a macro
16:50hiredmanfliebel: where did you get contrib from?
16:50tolstoyI quoted a list. Trying all the variations.....
16:50fliebelhiredman: macports
16:50hiredmanfliebel: well, they did not create the jar properly
16:50tolstoyhomebrew seems to have got installing clojure down nicely.
16:51fliebelhiredman: so what do I do now? unzip it and compile it somehow?
16:51technomancyKirinDave_: heya
16:51KirinDave_technomancy: hey. I was trying to use that resources/ directory last night
16:51Chousuketolstoy: (use 'clojure.contrib.prxml)
16:52KirinDave_technomancy: JARs work correctly, but lein repl does not. the resources dir doesn't end up on the classpath.
16:52hiredmanfliebel: that might actually work, but it would be easier to just grab contrib from git and follow the build isntructions
16:52KirinDave_technomancy: Is that on a more forwards branch than master?
16:52fliebelhiredman: can't I just leave out contrib?
16:53tomoj..not if you want pprint
16:53hiredmanfliebel: maybe, vimclojure may depend on it
16:54fliebelit does...
16:54technomancyKirinDave_: it should have made it into 1.0, but it looks like you're running into a bug. =\
16:54fliebelso, let's get my own contrib...
16:55KirinDave_technomancy: I mean, I already have to do this manually for the swank-clojure.
16:55tomojthoughts on this syntax? I don't think I like it https://gist.github.com/1f1bfe9a3a2dffe8be25
16:55KirinDave_technomancy: So it's not an overwhelming nuisance. But I thought I'd mention it to you.
16:55KirinDave_And sorry if I was obnoxious yesterday. I had one of those terrible days that starts with 3 hours sleep.
16:56technomancyKirinDave_: no worries. if you could send a message to the leiningen mailing list just so I don't forget this conversation I should have it fixed for 1.0.1
16:56KirinDave_Sure.
16:57technomancythat's what I get for suggesting you use something I haven't tested myself.
16:57technomancy"What we need more of is Science."
17:00ordnungswidriggood night to all...
17:00hiredmanclojurebot: reason?
17:00clojurebotI don't understand.
17:01hiredmanclojurebot: reason is <reply>Reason is, and ought only to be the slave of the passions, and can never preted to any other office than to serve and obey them -- Hume
17:01clojurebotOk.
17:01hiredmandamn
17:01hiredmanclojurebot: forget reason|is|<reply>Reason is, and ought only to be the slave of the passions, and can never preted to any other office than to serve and obey them -- Hume
17:01clojurebotI forgot reason|is|<reply>Reason is, and ought only to be the slave of the passions, and can never preted to any other office than to serve and obey them -- Hume
17:02hiredmanclojurebot: Reason is, and ought only to be the slave of the passions, and can never preted to any other office than to serve and obey them -- Hume
17:02hiredmanbah, they coma bust be tripping it up
17:02polypusnow all you have to do is implement some passion
17:03technomancyno, it's confused because you're trying to teach a bot to follow passion over reason.
17:04hiredmantechnomancy: I'm teaching the bot to quote Hume
17:05technomancyit's like that time Kirk disabled that AI by feeding it two contradictory facts
17:05technomancyclojurebot is probably sputtering and spewing smoke
17:05the-kennyclojurebot: the nest sentence is true
17:05hiredman(first time I've ever been compared to Kirk)
17:05the-kennyclojurebot: the previous sentence is false
17:05clojurebotclojurebot has a lot of features
17:05clojurebot'Sea, mhuise.
17:05clojurebotRoger.
17:05technomancyhiredman: with any luck it won't be the last
17:05the-kennydamn, typo
17:05hiredmanclojurebot's fuzzy matcher is spining
17:07fliebelhiredman: another error: java.io.FileNotFoundException: Could not locate clojure/contrib/pprint__init.class or clojure/contrib/pprint.clj on classpath: (util.clj:23)
17:07hiredmanfrom where?
17:07hiredmanstill from vimclojure?
17:07fliebelyea
17:07hiredmandid you rebuild contrib?
17:07hiredmanand follow the directions?
17:08fliebelyep… I think so at leas, but apparently not.
17:08hiredmanhow did you build contrib?
17:08hiredman(did you see and read the WARNING?)
17:08fliebelwhich warning?
17:08hiredmanthe one it prints out when you don't do it right
17:09hiredmanwhen you run ant
17:10fliebelhttp://pastebin.com/m65abeb0a
17:11hiredmanwhich version of clojure do you have?
17:11fliebel1.0 I think… one moment
17:11hiredmanif you have 1.0 then you need the 1.0 compat branch of contrib
17:11fliebelI did that...
17:11hiredmanare you sure?
17:11fliebelat least i thought i was doing that...
17:11fliebelI went to that branch and clicked donwload
17:11hiredmanbecause that stacktrace says you don't
17:12hiredmangithub doesn't do that
17:12hiredmanthe download always grabs a tarball of master
17:12fliebeloh :S so how do i get the 1.0 version?
17:12hiredmanhttp://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.0-SNAPSHOT/ these might work
17:13hiredmandunno if they are aot'ed properly for pprint
17:13tomojfliebel: don't know git?
17:13fliebeltomoj: not really, could try to do it...
17:13tomojnot too bad to install on mac
17:14fliebelI did already, at least runnign git gives me some usage info
17:14tomojthen you just git clone git://github.com/richhickey/clojure && git checkout 1.0.x
17:14tomojor something like that
17:14tomojwith a cd into the new clojure directory in between...
17:15tomojoh, and with contrib instead of clojure :)
17:15fliebeluuuhm… how about git clone git://github.com/richhickey/clojure-contrib/tree/clojure-1.0-compatible
17:15tomojI doubt that will work
17:16defnclone the repo and then checkout the branch you want
17:17fliebelgit clone git://github.com/richhickey/clojure-contrib.git and now?
17:17fliebelgit checkout ….
17:18tomojperhaps: cd clojure-contrib; git checkout origin/clojure-1.0-compatible
17:18stuartsierraThe checkout command you want is like this:
17:18stuartsierragit checkout -b clojure-1.0-compatible --track origin/clojure-1.0-compatible
17:19hiredman:|
17:19hiredmandoes anyone know if build.clojure.org builds the contrib jars with -Dclojure.jar=...
17:19fliebelSwitched to a new branch 'clojure-1.0-compatible'
17:20tomojyou should be good to compile now
17:20fliebelno errors this time….
17:20technomancyhiredman: ant nightly-build -Dclojure.jar=/var/lib/hudson/jobs/clojure/workspace/clojure.jar
17:21tomojdid you use the -Dclojure.jar stuff?
17:21technomancyis what's being used. that path could be wrong though
17:21fliebelsure...
17:21fliebel(what is the -slim.jar)
17:21defngod i need to figure out how to package stuff -- ive been REPL'ing for too long
17:21hiredmantechnomancy: neat!
17:22defnleiningen has me closer, but im still sort of confused by the directory structure, what goes where
17:22polypusdefn: i just went through that yesterday
17:22fliebelIT WORKED! Thank you all! Now for the rest of the installation… *wishes to go to bed*
17:23defnhttp://zef.me/2470/building-clojure-projects-with-leiningen
17:23defnthat's better -- would be nice to know how to use resources/ properly though
17:24technomancydefn: that feature is a week old and still buggy... just put stuff in src/ for now
17:24defneven other source? like public/stylsheets/blah.css?
17:24defnsort of "support" src
17:26technomancyyes, resources is broken right now, so you have to either use src/ or fix lein. =)
17:28fliebelafter running ant install, where should vimclojure.jar be located?
17:29hiredmanI think it puts it in the vim directory, but I always did the install stuff manually
17:30fliebelhiredman: Only vimclojure.vim there. I did find a vimclojure.jar in the build directory...
17:30defnhow do i use several files in clojure to split functions out to different files? like i have some function that is a server function, so i put it in server.clj -- do i just use the same namespace in that file to have access to a client.clj function?
17:31defnthat's a really convoluted question, bear with me
17:31the-kennydefn: namespaces, (:use) and leiningen :)
17:31fliebelhiredman: do I need to start that server every time?
17:31micampeso is vimclojure preferred over slimv?
17:31hiredmanI don't use the nailgun server stuff
17:32hiredmanI use slime.vim
17:32defnthe-kenny: like client.clj: (ns client (:use server)), server.clj: (ns server (:use client))?
17:32the-kennydefn: That's not very beautiful in my opinion - cyclical dependencies
17:32fliebelhiredman: I'd like to know about that tomorrow, for now I'm just going to try to get this working.
17:32the-kennya depends on b and b depends on a
17:32ataggartdefn: also namespaces need to have more than one segment
17:32clojurebotnamespaces are (more or less, Chouser) java packages. they look like foo.bar; and corresponde to a directory foo/ containg a file bar.clj in your classpath. the namespace declaration in bar.clj would like like (ns foo.bar). Do not try to use single segment namespaces. a single segment namespace is a namespace without a period in it
17:33hiredman~botsnack
17:33clojurebotthanks; that was delicious. (nom nom nom)
17:33hiredmanthat was a 1/200 shot
17:34defnataggart: like (ns application.client (:use server))?
17:34ataggartdefn: more like (ns application.client (:use application.server))
17:35defnataggart: how would you rewrite my code above? is that what you'd do?
17:35ataggartdefn: personally, I'd write it like: (ns application.client [:use application.server])
17:35fliebelhiredman: where is my ng client located? is that the same as the jar?
17:36defnataggart: thanks for that
17:36ataggartjdefn: as I prefer not to use unquoted parens outside of a function call.
17:36hiredmanfliebel: no idea
17:36hiredmanif you watch ant run it is pretty verbose
17:37fliebelhiredman: I love spotlight....
17:37fliebelhiredman: in macvim .vimrc is called .mvimrc, right?
17:38hiredmannever used macvim
17:38defnfliebel: i dont see why it wouldnt just use vimrc
17:38micampefliebel: no, macvim uses .vimrc
17:39micampeand .gvimrc
17:39fliebeli see, thanks
17:42fliebel"what a beautiful mess, this is" — Jack Johnson (rainbow parens)
17:42fliebelbut at least it's working!
17:43hiredmanI love rainbow parens
17:44fliebelyea, kind of helps when you see ))))))
17:44hiredmanbut I am learning emacs at the moment, and no one can tell me how to turn them
17:44hiredmanon
17:44technomancyisn't it distracting? I have my parens set to nearly-imperceptible grey
17:44defndo you always use (:gen-class)/
17:44defn?
17:44hiredmandefn: never
17:44hiredmanunless I need to
17:44tomojI also have my parens almost invisible
17:44hiredmanif you don't know, you don't need to
17:44tomojbut I occasionally find myself trying to pick out the right one in a series of )))))
17:44hiredmantechnomancy: nope, it's festive
17:44defnsome of the examples ive seen for building a basic hello world application with leiningen show (:gen-class)
17:45hiredmanand clojure-mode's syntax highlighting is rather bland compared to what vimclojure offers
17:45hiredmandefn: so?
17:45technomancyhiredman: like you'd prefer more interesting colors, or it's just not highlighting as many terms?
17:45defnhiredman: i dont really understand what it does
17:46fliebelhiredman: so vimclojure is actually quite good?
17:46hiredmantechnomancy: it's not highlighting as many terms
17:46hiredmanfliebel: yes
17:46defnthe doc for gen-class is huge, so i was wondering if someone could sum up why you'd use it
17:46fliebelhiredman: sometimes I almost feel ashamed for not using emacs :D
17:46hiredmanwell, don't
17:46tomojhuh, is 1.1 almost upon us?
17:46hiredmanemacs puts its pants on just like everybody else
17:47technomancyhiredman: the list of core vars is circa pre-1.0; it could use a refresh.
17:47defnonly it does it with lisp
17:47defnEmacs: "I'm putting my panths on"
17:50hiredmanhttp://www.thelastcitadel.com/images/vim.jpg
17:50opqdonutgah, jpeg
17:50opqdonuti was about to criticize your fonts
17:50hiredman:P
17:51fliebelhiredman: what is this?
17:51hiredmananyway, this in the office on windows in putty
17:51hiredmanthis is vim, in putty, with vimclojure looking at core.clj
17:51defntechnomancy: what's the way to force indentation with RET instead of hitting C-j every time?
17:51hiredmanvim tabs across the top, screen tabs across the bottom
17:52defnspecifically in clojure-mode
17:54fliebelthis is mine now: http://img.ly/gew
17:55micampefliebel: set go-=T
17:55fliebelmicampe: what?
17:56micampeuse it to get rid of the useless toolbar
17:56mtmfliebel: sort an angry fruit salad :)
17:56hiredmanhttp://gist.github.com/252269 <-- laboriously written in emacs
17:56fliebelmicampe: which useless toolbar?
17:57micampevim's
17:57tomojhiredman: using paredit, right?
17:57hiredmanmicampe: it might not be useless for him yet
17:57hiredmantomoj: yes
17:57hiredmanminus the times I some how lost a paren then paredit wouldn't let me add it back in
17:57fliebelmicampe & hiredman: If you mean the open and save thing… as soon as I learn some command, okay?
17:57chouserouch
17:58tomojthat used to happed to me, I think my upgrade of paredit fixed it
17:58tomoj_something_ fixed it anyway
17:58ChousukeC-q )
17:58hiredmanI know
17:59hiredmananyway, it's an editor
17:59_mstChousuke: I had to disable C-q (paren) because I kept doing it and messing up parens. Now when I need an extra paren I'm forced to borrow one from somewhere else in the buffer :P
17:59fliebelmicampe: I can also use the oval in the right top corner to show and hide that toolbar.
17:59_mstit's reminiscent of that XKCD comic where a fledgling lisp programmer was given his father's parens :P
17:59Chousuke:P
18:00Chousukehiredman: anyway, looks pretty neat.
18:00hiredmanYes
18:00micampefliebel: yes, but that wouldn't stick. while my command in .vimrc would.
18:00ataggarthttp://xkcd.com/297/
18:00hiredmanthe macros really need to be cleaned up
18:00fliebelThanks once more, I'm gone for now :)
18:00micampeI think I could retype http-agent from memory. I am trying to build something analogous around a socket.
18:01hiredmanmacros calling macros is bad, macros calling helper functions is good
18:02micampebut I just can't see how in/out streams would/should work
18:03hiredmanmicampe: one option is to treat it like an agent
18:03hiredmanwhich I imagine is sort of how http-agent works, but I've never used it
18:04micampeyes, that's how I did it
18:04micampebut now I'm stuck trying to do input/output
18:05micampebasically, I am trying to write a client for KirinDave's chat server
18:05hiredmanthat is what I am saying, you pass a function and at some point later the function is called with the inputstream and outputstream as args
18:07lisppaste8micampe pasted "socket-agent" at http://paste.lisp.org/display/91838
18:12hiredman:|
18:12hiredmanI don't use duck-streams
18:12hiredmanwouldn't
18:12micampeI think I should have a thread reading and printing what's coming down the pipe and a loop for reading input and sending it over
18:12micampewhy not? looks simple and easy to me
18:13hiredmanonly works for character streams
18:13micampeyes, it's enough for this experiment
18:13hiredmanthere was a recent commit that added a socket-reader or some such
18:14micampeoh. let me see.
18:15micampeah yes, I have that
18:44PrinceOfAhi, i just started to study clojure. how do i use the contrib libs?
18:46hiredmanbut the jar on your classpath
18:46clojurebotclasspath is (System/getProperty "java.class.path")
18:46dnolenPrinceOfA: how are you using clojure? What evironment are you using?
18:47PrinceOfAi'm on os x. i installed clojure via macports
18:47dnolenso you're just using it at the command line PrinceOfA?
18:47PrinceOfAdnolen: yes
18:49PrinceOfAsay i need str-utils
18:49PrinceOfAi found the api in http://richhickey.github.com/clojure-contrib/str-utils-api.html
18:49dnolenPrinceOfA: as hiredman says you'll need clojure-contrib, I'm not sure if MacPorts installs that as well. Just start up the clojure repl with the classpath option (-cp) pointing to the location of your clojure.jar as well as clojure-contrib.jar
18:50dnolenPrinceOfA: how do you start your REPL?
18:50PrinceOfAwith "clj"
18:51PrinceOfAwhich clj says /opt/local/bin/clj
18:52dnolenwell does the clj shell script mention clojure-contrib?
18:53liebkejust type (use 'clojure.contrib.str-utils) at the repl. If it returns nil, you have clojure.contrib on your classpath
18:54PrinceOfAno it does not :(
18:55PrinceOfAstr-utils is not on the classpath
18:55PrinceOfAis there a clever way off adding libs or just manually build contrib jars etc?
18:56hiredmanadding libs and building jars are completely different things
18:56hiredmanyou have clojure-contrib.jar?
18:59PrinceOfAhiredman: no i haven't
19:02hiredmanthen you should get it
19:02PrinceOfAwhere can i get it?
19:02hiredmanwhat version of clojure are you running?
19:03PrinceOfA1.0.0.
19:05hiredmanhttp://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.0-SNAPSHOT/clojure-contrib-1.0-20091208.130239-27.jar
19:16defnwhat does (ns mynamespace (:gen-class)) do?
19:16defnthe gen-class portion specifically
19:17Chousukedefn: it means there will be a named class generated corresponding to the namespace.
19:17Chousukedefn: and you can define java methods in your code.
19:17defnah-ha
19:17defnwithout it i can still compile a jar right?
19:18defni keep seeing this hello-world example with leiningen that use :gen-class
19:18defni dont really see the point
19:19hiredmana jar is not compiled
19:19hiredmana jar is just a zipfile
19:19defnah ok
19:19Chousukedefn: it's mainly an interop construct.
19:20hiredmanjava happens to treat jars files as directories
19:23defnChousuke: hiredman: thanks
19:24hiredmanjava happens to treat jars on the classpath as directories
19:24hiredmanahem
20:01tolstoyHow do people work with slime/emacs as far as class path libs go.
20:01tolstoyIs there a function that loads JARs or updates the classpath dynamically?
20:02tolstoySurely, you don't have to have a hardcoded CLASSPATH in your environment before starting emacs....
20:03meeI'm not an emacs user, but I think you do specify it in your configuration file (which can be re-eval'd while emacs is running)
20:06technomancytolstoy: you have to restart your instance if you want to change your classpath. sad but true. (but it's easy to do)
20:06technomancybut the classpath is calculated dynamically by M-x swank-clojure-project; it's not hardcoded
20:08slyrustolstoy: yes, this has been driving me crazy too...
20:09tolstoyYeah, I'm not a fan of conflating project level dependencies in my generic shell environment.
20:09twbrayTuning concurrent Clojure: http://www.tbray.org/ongoing/When/200x/2009/12/08/WF-Tuning-Clojure
20:10technomancytwbray: I was hoping for a "On Baked Potatoes 2" post, but that looks interesting too. =)
20:10tolstoytwbray: Hah. I was JUST looking at your site to see if you'd posted that yet.
20:11lghtngim really enjoying all this stuff on clojure, thanks bunches
20:12lghtngjust bought Programming Clojure and am watching the videos, this is all just so fantastic, ive been waiting years for this
20:19LuytYes, and the best way to learn a new language is to get your feet wet with it.
20:27patrkrisanybody here capable of answering compojure questions?
20:27patrkrisregarding route patterns
20:36lghtngi've spent the last couple nights getting emacs eclipse slime, etc all setup
20:37lghtngonly problem i had was with netbeans, but i dont really use it anyways, still, it would be nice to have the clojure plugin working
20:39lghtngi have a jar file that runs an application that i use alot, im going to try and use it as a set of libraries to call from emacs in clojure-mode and use emacs instead of the rather featureless ui its running on now, should be a good project to learn from i think
20:40lghtngthe socket-agent snippet that was posted to lisppaste caught my eye, so i logged in here hoping to catch the author
20:42tolstoycoming from lisp, I wish there was a better error message when I forget to use [ instead of ( for the lambda list. ;)
20:42tolstoyBut I'm getting used to it!
21:00hiredmanI didn't change anything and suddenly slime seems to have forgotten how to work
21:02hiredman"Polling /tmp/slime.65055.. (Abort with `M-x slime-abort-connection'.)"
21:02hiredman*no slime*
21:02hiredmanthe java process is started
21:03hiredmanand this persists across emacs restarts
21:05hiredmanno hints? advice?
21:05hiredman(no completion joy yet either)
21:07Chousukeslime-restart-inferior-lisp usually works for me but... hm.
21:09hiredmanah there, it just wanted me to wait five minutes
21:09cp2hiredman: how goes your classloader adventures?
21:10hiredmanI've done nothing all day
21:11hiredmanI added some code let me use lowercase symbols, and went test it, and slime wouldn't run, and while I was waiting/working on that I've gone off on other yak shaving adventures
21:11defnhmf, havent seen that syntax used in awhile: for i <- 0:15 do
21:12cp2mm, sounds a bit like my days...
21:13hiredmancode from http://www.emacswiki.org/emacs/TabCompletion seems to be completely useless
21:13hiredmanno joy
21:13defnhave you tried autocomplete?
21:14hiredmanlooks like it completes based on a list of symbols
21:14hiredmanI just want to hit tab and have the editor fill in based on words/symbols in open buffers
21:16defntechnomancy has hippie-expand
21:16hiredmanno wonder the autocomplete page looks familiar
21:16hiredmanI already have it in .emacs.el
21:16hiredmanhippie-expand apparently ships with emacs
21:17defnyeah i didnt know that
21:17defndo you have it set to a hotkey?
21:17defni use it a lot
21:19defnhiredman: technomancy has this in his misc.el: ;; Hippie expand; at times perhaps too hip \n (delete 'try-expand-line hippie-expand-try-functions-list) (delete 'try-expand-list hippie-expand-try-functions-list)
21:19defnim guessing those cut down on a lot of false garbage you might get since hippie-expand checks all over God's creation for expansion posibilities
21:20hiredmanI have a few pieces of code from the emacs wiki that claim to set up tab to both use hippieexpand and indent
21:20defnthat just sounds weird
21:20defnhiredman: if you do find a nice expansion setup other than using hippie, id be interested to know about it
21:20hiredmanwtf
21:20hiredmanok
21:21somniumhas anyone consolidated all the slime expansions with smart-tab et-all?
21:21hiredmannow I am getting a weird completion menu thing in elisp buffers, but nothing in clojure buffers
21:22somniumIve got tab in repl, C-tab in clojure mode, and M-/ for hippie
21:23interferononce i create a future with (future ....) does it start computing immediately?
21:23hiredmanI have smart-tab, and it does nothing
21:23hiredmaninterferon: yes
21:23interferonthanks!
21:23defnhow do you get clojure to auto-indent on RET
21:23defninstead of C-j
21:28interferonin CL, i can do (cond ((accessor blah)) ..) and then if (accessor blah) is non-nil, the cond evaluates to that variable
21:28interferonis that impossible with clojure cond?
21:28somniumhiredman: smart-tab works for me for most modes, but need to set special bindings for clojure/slime/sime-repl buffers it seems :/
21:28interferon(also, do you pronounce it CLOH-zhur or cloh-ZHOOR?)
21:29hiredman,(cond 1 :foo)
21:29clojurebot:foo
21:29lghtngCLOH-zhur
21:29hiredman,(cond nil :foo)
21:29clojurebotnil
21:29hiredman,(cond nil :foo :else 1)
21:29clojurebot1
21:30arohnerinterferon: cond only takes an even number of forms
21:30cp2interferon: like 'closure'
21:30lghtng,(find-doc cond)
21:30clojurebotjava.lang.Exception: Can't take value of a macro: #'clojure.core/cond
21:30cp2just with a j :)
21:30interferoni think i'm pronouncing it more french
21:31hiredman,(doc cond)
21:31clojurebot"([& clauses]); Takes a set of test/expr pairs. It evaluates each test one at a time. If a test returns logical true, cond evaluates and returns the value of the corresponding expr and doesn't evaluate any of the other tests or exprs. (cond) returns nil."
21:31arohnerthough you might want to look at condp
21:31lghtngthat was my next guess
21:31lghtngis clojurebot released anywhere?
21:31hiredmanclojurebot: where are you?
21:31clojurebothttp://github.com/hiredman/clojurebot/tree/master
21:32JAS415clojurebot: who is your daddy?
21:32clojurebotGabh mo leithscéal?
21:32JAS415hmm
21:32interferonthe combination of git, slime, and clojure is quite comfortable
21:40lghtng,(get-tweets clojure)
21:40clojurebotjava.lang.Exception: Unable to resolve symbol: get-tweets in this context
21:42lghtng,(hiredman/get-tweets clojure)
21:42clojurebotjava.lang.Exception: No such namespace: hiredman
21:43lghtng,(doc tweet)
21:43clojurebotHuh?
21:43lghtng,(find-doc tweet)
21:43clojurebotjava.lang.Exception: Unable to resolve symbol: tweet in this context
21:43JAS415,(all-ns)
21:43clojurebot(#<Namespace clojure.contrib.sql.internal> #<Namespace dk.bestinclass.clojureql.util> #<Namespace clojure.set> #<Namespace hiredman.clojurebot.simplyscala> #<Namespace clojure.contrib.macro-utils> #<Namespace hiredman.sandbox> #<Namespace hiredman.schedule> #<Namespace clojure.contrib.generic> #<Namespace clojure.contrib.shell-out> #<Namespace clojure.contrib.javadoc.browse> #<Namespace hiredman.clojurebot.seenx> #<Namesp
21:45JAS415,(ns-publics hiredman.sandbox)
21:45clojurebotjava.lang.ClassNotFoundException: hiredman.sandbox
21:45JAS415,(ns-publics 'hiredman.sandbox)
21:45clojurebot{*bad-forms* #'hiredman.sandbox/*bad-forms*, eval-in-box #'hiredman.sandbox/eval-in-box, eval-in-box-helper #'hiredman.sandbox/eval-in-box-helper, enable-security-manager #'hiredman.sandbox/enable-security-manager, my-doc #'hiredman.sandbox/my-doc, write-test #'hiredman.sandbox/write-test, priv-action #'hiredman.sandbox/priv-action, empty-perms-list #'hiredman.sandbox/empty-perms-list, force-lazy-seq #'hiredman.sandbox/fo
21:46lghtnga macro to send stuff to lisppaste
21:46lghtngor a function, rather
21:46hiredmanclojurebot: paste?
21:46clojurebotlisppaste8, url
21:46lisppaste8To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste.
21:47JAS415everyone should have a clojurebot
21:47JAS415it would be cool to integrate it with slime
21:47hiredmanI do
21:48hiredman(add-hook 'clojure-mode-hook (lambda () (auto-complete-mode t)))
21:48hiredmanis that how that is supposed to work?
21:48lghtng,(get-latest-tweets clojurebot clojure #clojure)
21:48clojurebotNo dispatch macro for: c
21:49hiredmanlghtng: clojurebot used to, long ago, dump recent clojure tweets into the channel
21:49lghtngspammy?
21:49hiredmanyes
21:49lghtngfigures
21:49hiredmanand clojurebot used to tweet clojure commits
21:49hiredmanI need to figure out why it stopped sending commits to irc
21:50hiredman(except at start up when it dumps them all)
21:50lghtng,(google clojure into)
21:50clojurebotjava.lang.Exception: Unable to resolve symbol: google in this context
21:51hiredman~google clojure
21:51clojurebotFirst, out of 53400 results is:
21:51clojurebotClojure - home
21:51clojurebothttp://clojure.org/
21:51hiredman~def into
21:52lghtngah
21:53djorkanybody here playing with VisualVM?
21:53djorkalso, tbray's new article is pretty interesting
21:53djorkhas it been discussed here?
21:53djorkhttp://www.tbray.org/ongoing/When/200x/2009/12/08/WF-Tuning-Clojure
21:53lghtng,(process-commits)
21:53clojurebotjava.lang.Exception: Unable to resolve symbol: process-commits in this context
21:54lghtng,(hiredman.sandbox/process-commits)
21:54clojurebotjava.lang.Exception: No such var: hiredman.sandbox/process-commits
21:54lghtngi obviously am missing a step here
21:55lghtng,(var process-commits)
21:55clojurebotjava.lang.Exception: Unable to resolve var: process-commits in this context
21:58lghtngclojurebot: What do you mean when you say Unable to resolve var, and how does that relate to First, out of?
22:02hiredmanlghtng: not user accesable code
22:04hiredmanseriously, what do I set to get auto-complete-mode always run for a clojure-mode buffer?
22:04alexykhow do I specify heap space like -Xmx2g with lein?
22:09alexykor, are you supposed to use JAVA_OPTS in the environment?
22:11_msthiredman: your add-hook line above looks fine to me, so long as you have (require 'clojure-mode) and (require 'auto-complete) somewhere before that
22:13hiredmanah
22:13hiredmanI don't have the require for clojure-mode
22:16alexykis there a way to limit printing of a large map in repl?
22:17_mstah, actually that might not make a difference. I was worried that loading clojure-mode after your add-hook would clobber the value you were setting, but that doesn't seem to be the case
22:18alexyklein doesn't respect JAVA_OPTS.
22:18alexykno respect at all, it seems
22:19hiredman_mst: it doesn't
22:20hiredman(make a difference)
22:21somniumhiredman: what does auto-complete-mode do? it may conflict with key-bindings in clojure mode
22:21_msthm, drat. So when you enter your .clj buffer and auto-complete doesn't work, does M-: (run-hooks 'clojure-mode-hook) throw any errors?
22:22hiredmansomnium: it works if I just turn in ot
22:22hiredmanon
22:22somniumhmm
22:22hiredmanno keybinding, it just pops up a list of possible completions while I type, which is an acceptable substitute for hitting tab (so far)
22:24hiredmanrun-hooks does turn on ac
22:24hiredmangrrr
22:25alexyktechnomancy: ping
22:27_mstannoying. and M-: major-mode RET yields clojure-mode? Does re-evaluating (clojure-mode) from within that buffer enable it too?
22:27_mstI wonder if the mode is erroring before it runs the hook or something
22:30hiredmanevaling (clojure-mode) does not turn ac on, and if it is on it turns it off, and re-evaling (clojure-mode) does not renable it
22:31_msthm, so the hook's being evaluated...
22:31hiredmanis it? if it was wouldn't re-evaling (clojure-mode) again turn ac on?
22:32_mstah sorry, I misunderstood... you mean re-evaling (clojure-mode) toggles clojure-mode on and off but has no effect on ac?
22:33hiredman(clojure-mode) turns ac of if ac is on, but has no other effect not matter how many times I re-eval it
22:34hiredmanis there a difference between run-mode-hooks and run-hooks?
22:34hiredmanrun-mode-hooks is how clojure-mode is calling the hook
22:35hiredmandoesn't appear to have a revelant difference
22:37_mstyeah, it looks like in your case it should just fall through to a regular run-hooks anyway
22:39hiredmangah
22:40hiredmanit enables paredit-mode if I replace auto-complete-mode in the add-hook
22:40hiredmanGAH
22:40_mstone of the first things clojure-mode does is a (kill-all-local-variables), which explains why re-evaling that knocks off AC mode again
22:41_msthm. if you M-: clojure-mode-hook is there anything else besides your entry?
22:41hiredmannope
22:44hiredmanif I add the ac hook and the paredit hook, paredit is enabled, ac is not, and I can see both lambdas in clojure-mode-hook
22:44hiredmanthis must have something to do with ac
22:44_mstyeah, it's looking that way... just digging through the .el now
22:44hiredmanexcept I don't understand why ac works if I start the mode manually
22:45hiredmanM-x auto-complete-mode or M-: (auto-complete-mode t)
22:46alexykhow do you write: (map #(% 1) (take 10 reps)) ; in (-> ...) form, left to right?
22:47hiredman(->> reps (take 10) (map #(% 1)))
22:47hiredman(-> reps ((partial take 10)) ((partial map #(% 1))))
22:49hiredmanhmmm
22:49_msthm, I notice AC defines itself as a global minor mode
22:50hiredmanlooks like maybe you are supposed to add the name of modes you want to use ac in to ac-modes
22:50_mstso it defines a predicate which gets handed every buffer you open, and can selectively enable itself for those buffers
22:50_mstyeah, that :)
22:50arohnerit appears the definition of my macros aren't changing, after a C-c C-l
22:50arohneris that expected?
22:51_mstso maybe just (add-to-list 'ac-modes 'clojure-mode) and forget about the hook
22:53hiredmanahhh
22:53hiredmanexcellent
22:53hiredman_mst: thanks!
22:54JAS415~lisppaste
22:54clojurebotNo entiendo
22:54hiredmanclojurebot: lisppaste is <reply>lisppaste8: url
22:54clojurebotc'est bon!
22:54_mstno worries. That seemed unnecessarily painful :)
22:54hiredmanyou don't have to tell me that
22:55_mstheheh just didn't want to give the impression that emacs always sucks quite that badly ;)
22:55defnHow do I turn on paredit-mode by default for .clj docs?
22:56hiredman(add-hook 'clojure-mode '(lambda () (paredit-mode t)))
22:56lisppaste8JAS415 pasted "Why do I suck so badly" at http://paste.lisp.org/display/91854
22:56defnhiredman: thanks
22:56JAS415it runs very... slowly
22:56hiredmanthe lisppaste webserver is down
22:56JAS415ah damn
22:57JAS415wait really?
22:57JAS415i just connected to it
22:57hiredmangah, now it works for me
22:59alexykhiredman: so ->> does partial for us? are -> and ->> effective enought compared to (f (g (h ... x))) forms?
23:01arbschtJAS415: set-sort-fn is not idiomatic. you probably want to use binding on a var, rather than redefining
23:02JAS415i'm not sure that it would be visible in all of the threads then?
23:02JAS415maybe 2 bindings
23:02arbschtJAS415: then use a ref or possibly even an atom
23:07arbschtJAS415: actually, you can probably parameterize on sort-fn, since you know it before launching your threads
23:08JAS415oh, like pass it through all of the layers?
23:09arbschtpass it to the new thread, at least, and maybe let it rebind a var
23:10arbschtdefprocess could take an arg for sort-fn use binding
23:10JAS415oh ok
23:10arbschtincidentally, you should probably rename defprocess to make-process or something, since it's not really defining anything at the top level
23:10JAS415yeah that is a good call
23:17hiredmanalexyk: ->> puts the form at the end of the next form
23:18hiredman,(macroexpand-1 '(->> x (a b c)))
23:18clojurebot(a b c x)
23:18hiredman,(macroexpand-1 '(-> x (a b c)))
23:18clojurebot(a x b c)
23:18hiredman,(macroexpand-1 '(-> x (map a)))
23:18clojurebot(map x a)
23:18hiredman:(
23:18hiredman,(macroexpand-1 '(->> x (map a)))
23:18clojurebot(map a x)
23:18hiredman:)
23:18JAS415I'm not sure that that gets me anywhere with "I killed a 3ghz computer running at 800Mhz with it tonight," however :-/
23:19JAS415not killed but mortally wounded
23:19hiredmanthat is a lot of code the look through
23:20JAS415I don't expect you to, its also quite convoluted
23:20JAS415I appreciate the style comments, however
23:28arohnera line I just wrote: (alter my-ref update-in [:foo] conj val)
23:28arohnerjust figured out how cool it is to chain functions like that
23:28arohnerI feel like I've leveled-up in clojure
23:28hiredman:D
23:29alexykhiredman: ->> does it at compile time? i.e. macros are not wasting any efficiency?
23:29hiredmanalexyk: -> and ->> are both macros
23:29clojurebotBarking spiders!
23:29hiredmanmacros are expanded before compilation
23:29chouserhaha
23:29hiredmanor durring, or something
23:29alexykhiredman: so the final code is as fast as (f (g ... x))?
23:29chouserbarking?
23:29hiredmanyep
23:29somnium,(macroexpand '(->> (range 5) (map inc) (map inc)))
23:29clojurebot(map inc (clojure.core/->> (range 5) (map inc)))
23:29alexykcool
23:29hiredman(to both of you)
23:30somniumI think ->> has become my favorite macro
23:30alexyksomnium: is there a "recursive" macroexpand? until no stone is left unturned?
23:31alexyk->> is Unix's | and F#'s |>
23:31hiredmanso I have auto-completion, paredit, and highlight-parentheses enabled automatically in emacs-lisp-mode and clojure-mode
23:31hiredmanlets not forget about ->
23:31somniumyeah, the compiler keeps evaluating until no macros left
23:31alexykhiredman: it needs verbose partial, who needs that?
23:32hiredmanalexyk: it doesn't always
23:32chouseralexyk: that's not quite how the clojure compiler works, but I think there might be something in contrib that would give you a sense of what a recursively macroexpanded form would look like.
23:32alexyksomnium: in your example, clojurebot expanded ->> once for the first inc, the second stayed
23:32hiredman,(macroexpand-1 '(-> b (a c)))
23:32clojurebot(a b c)
23:32somnium,(use 'clojure.contrib.macro-utils)
23:32clojurebotnil
23:32hiredman,(-> {:a 1} (update-in [:a] inc))
23:32clojurebot{:a 2}
23:33somnium(mexpand-all '(->> (range 5) (map inc) (map dec)))
23:33somnium,(mexpand-all '(->> (range 5) (map inc) (map dec)))
23:33clojurebot(map dec (map inc (range 5)))
23:33alexyksomnium: nice
23:33chousersomnium: quick work!
23:33hiredman(->> 5 range ...)
23:34chouserso that's an approximation of what the clojure compiler does, but it's not exactly the same.
23:34alexykhiredman: I don't quite grasp why update-in doesn't need partial
23:34technomancyalexyk: pong
23:34alexykin ->
23:34somniumchouser: what does it actually do?
23:34hiredman,(macroexpand-1 '(-> b (a c)))
23:34clojurebot(a b c)
23:34technomancywould love to see a patch for lein to make it honor $JAVA_OPTS
23:34hiredmanalexyk: do you see what that does?
23:34hiredman,(macroexpand-1 '(-> b (update-in [:a] inc)))
23:34clojurebot(update-in b [:a] inc)
23:35alexyktechnomancy: ah! how do I tell lein to gimme -Xmx2g? it seems disrespectful of JAVA_OPTS...
23:35hiredman
23:35alexykhiredman: ah, got it. It sticks the arg into the first position after prefix.
23:35chousersomnium: it macroexpands the outer form completely, then ...going from probably incomplete memory here... goes through an analysis step of the resulting special form
23:35alexykdoc should say that instead of "second position"
23:35hiredmanalexyk: it is the second position
23:36hiredman(1 2 ...)
23:36alexykhiredman: yeah, it's not clear right away to noobz
23:36technomancyhiredman: functions like paredit-mode etc. are toggles, so adding them as bare hooks is not a great idea
23:36technomancythat's why they're often wrapped in lambdas to give them an actual arg
23:36chousersomnium: if it's a 'let', it'll build up its understanding of the available locals, for example, or whatever else it needs to do.
23:36hiredmantechnomancy: I know
23:36technomancyhiredman: ok, cool
23:36technomancyalexyk: no way to do that right now; it'd need a patch to the bin script
23:36hiredmaninfact I made a lisp-stuff function and added that to the hooks for clojure-mode and emacs-lisp-mode
23:37hiredmanDRY
23:37technomancyhiredman: yeah, I have a generalized "coding-hook" for stuff like that
23:37chousersomnium: then depending on the specific special form may proceed to macroexpand and analyze some of that special forms' args.
23:37alexyktechnomancy: gah! crap! shock and awe! havoc!
23:37hiredmanif you set JAVA_OPTS should the java binary just pick that up from the env?
23:37alexykI need -Xmx50g for my data mining things!
23:37clojurebotfor is not used enough
23:38somniumchouser: thanks, my java-fu isnt up to the task of reading Compiler.java yet :/
23:38alexykhiredman: I'm not sure it picks it up
23:38chousersomnium: :-)
23:38technomancyalexyk: welcome to software that's only been released for two weeks. =)
23:38chousersomnium: these are the things I ended up learning when writing ClojureScript.
23:38alexyktechnomancy: is lein supposed to respect JAVA_OPTS?
23:38clojurebottechnomancy is to blame for all failures
23:38JAS415compiler.java is crazy
23:38technomancyclojurebot: watch it. just... watch it.
23:39technomancyalexyk: it's not designed to do that right now, but it would not be hard to add.
23:39hiredmanman, I already backed clojurebot's noise plugin back from 1/100 to 1/200 today
23:39technomancyhiredman: just giving it a hard time. I like it in general. =)
23:39alexyktechnomancy: lein is a sh script, would JAVA_OPTS go there for repl?
23:40technomancyalexyk: yup.
23:40clojurebotGabh mo leithscéal?
23:40technomancyalexyk: you'd actually need it in two places (since the repl task is special-cased), but it should be easy to figure out
23:43hiredmanfyi you can fake linked lists in sh if you ever want to add a lisp interpreter to lien
23:43hiredmanlein
23:44hiredmanI keep hitting M-:w
23:44hiredmanand get the debugger because w is a void-variable
23:44technomancyhiredman: I like the cut of your gib
23:44technomancyI suck so much at shell scripting.
23:45hiredmanI have an interpreter for a stack based language written in sh
23:45alexykhiredman: my sh is zsh. It has hashes, too.
23:45hiredmanit is *ugly*
23:45meeM-:w? That looks like the offspring of vi and emacs
23:45hiredmanalexyk: yeah, I use zsh too, but sh is more universal
23:45hiredmanmee: vimer trying out emacs
23:45alexykhiredman: true
23:45meeah ok :)
23:46hiredmanit's pure vim really. just and accident that M-: is bound to something in emacs
23:46alexykthere's an awesome boatload of clj stuff from mmcgrana on github, is he ever here?
23:46meeyeah, I am trying to learn emacs too, since it seems it's far and away the best development environment
23:46hiredmanmee: meh
23:47somniumhiredman: you *might* like ergoemacs if coming from vim, it adds a set of 'ergonomic' bindings for common commands
23:48meeI haven't been able to get vimclojure or ccw to work w/o crashing. the netbeans plugin works ok, but I'm not really a fan
23:48hiredmansomnium: already set in my emacs ways
23:48arbschtalexyk: he was last here in june, I think
23:48somniummy pinkies never hurt anymore
23:48hiredmanI use the static part of vimclojure (highlighting basically) and slime.vim
23:49alexykwith prettier graphics
23:49alexyk]
23:49hiredman*eye roll*
23:49somniumanti-aliased fonts + slime, what more could you want?
23:50hiredmanI want rainbow parens
23:50hiredmanand more highlighting
23:51alexykIDEA's support of Clojure is not bad either
23:51somniumit would be nice if it highlighted user defined funs, im sure it will eventually
23:51meeyeah, enclojure works
23:51hiredmanI can generate a class that loads a constant string, grabs the static out field from the class java.lang.System, and then calls the println method on the PrintStream from the outfield to print the string
23:52hiredmanand I kinda got the whole looping thing working, I am just sure how I am going to use this to walk a List
23:53hiredmanjust not sure
23:53hiredmanthe println is four instructions
23:54hiredman(.println System/out "foo")
23:54hiredmanunless ASM ops are not exactly a 1:1 to bytecode
23:56somniumhiredman: are you writing a clojure compiler in clojure?
23:56hiredmanjust a layer over the asm library
23:57hiredmanalthough don't think that hasn't crossed my mind
23:57somniumsounds cool
23:57hiredmanit is, and surprisingly easy (so far)
23:58hiredmanthe syntax I have right now is kind of similar in form to deftype
23:58hiredman(make-class *name* *direct-super* *interfaces* & *methods-or-fields*)
23:59somniumhow does the compiler handle let scoping in jvm land?
23:59alexykare there ways to simplify this: (->> {:a {:b [1 2 3]}} (map #(% 1)) (map first) (map #(% 1))) => ([1 2 3])