2009-12-09
| 00:00 | hiredman | http://gist.github.com/252269 |
| 00:02 | cp2 | hiredman: nifty! |
| 00:06 | hiredman | rewriting findClass in asm means I need to figure out try/catch and for loops |
| 00:06 | hiredman | and most likely casting since I decided to ignore generics |
| 00:09 | cp2 | write examples in java and then just run asmifier over it |
| 00:09 | cp2 | them* |
| 00:10 | hiredman | I'd have to figure out how asmifier works |
| 00:10 | hiredman | how to use it, I should say |
| 00:10 | cp2 | http://asm.ow2.org/doc/faq.html#Q10 |
| 00:12 | hiredman | we'll see, maybe tomorrow |
| 00:13 | cp2 | you could always just plow through the jvm spec with a few cups of coffee :D |
| 00:14 | hiredman | I do have a few redbulls in the fridge |
| 00:15 | hiredman | yeah! who needs ASM, I'll generate the bytes myself! |
| 00:16 | cp2 | all the cool kids are doing it |
| 00:17 | interferon | i 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:17 | hiredman | ,(apply hash-map (apply concat [["x" 4] ["x" 5] ["y" 6]])) |
| 00:17 | clojurebot | {"x" 5, "y" 6} |
| 00:18 | hiredman | hmmm |
| 00:18 | hiredman | ,(map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]]) |
| 00:18 | clojurebot | ({"x" 4} {"x" 5} {"y" 6}) |
| 00:18 | interferon | i was heading down the merge-with path |
| 00:19 | interferon | but not getting anywhere |
| 00:19 | hiredman | ,(apply merge-with #(if (list? %1) (conj %1 %2) (list %1 %2)) (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]])) |
| 00:19 | clojurebot | {"x" (4 5), "y" 6} |
| 00:19 | interferon | ,(apply merge-with conj (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]]) |
| 00:19 | clojurebot | EOF while reading |
| 00:20 | interferon | ,(apply merge-with conj (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]])) |
| 00:20 | clojurebot | java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection |
| 00:20 | hiredman | you know |
| 00:20 | hiredman | ,(apply merge-with conj {} (map (partial apply hash-map) [["x" 4] ["x" 5] ["y" 6]])) |
| 00:20 | clojurebot | java.lang.ClassCastException: java.lang.Integer cannot be cast to clojure.lang.IPersistentCollection |
| 00:20 | hiredman | bah |
| 00:20 | interferon | :) |
| 00:22 | chouser | ,(reduce (fn [m [k v]] (assoc m k (conj (m k []) v))) {} [["x" 4] ["x" 5] ["y" 6]]) |
| 00:22 | clojurebot | {"y" [6], "x" [4 5]} |
| 00:22 | konr | I need to include an image in .jar, but I'm not sure how. Must I do this with leiningen? |
| 00:23 | interferon | wow |
| 00:23 | interferon | chouser: i'm going to spend a few minutes picking that apart :) |
| 00:23 | cp2 | chouser: stop hacking |
| 00:23 | cp2 | ^_^ |
| 00:24 | chouser | more fun than writing English |
| 00:25 | interferon | that's a very nice use of reduce |
| 00:26 | hiredman | what do you think merge-with uses? |
| 00:27 | chouser | bah. wrong! |
| 00:27 | chouser | hm, into does though. |
| 00:27 | hiredman | :P |
| 00:42 | dnolen | _ato: you there? |
| 00:44 | dnolen | or 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:49 | polypus | i'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:49 | chouser | pop quiz |
| 00:49 | polypus | s/no/not |
| 00:49 | chouser | (->> {:a 1, :b 2} (map #(conj % (first %))) (apply concat) (apply hash-map)) |
| 00:49 | chouser | guess the return value before you try it! |
| 00:50 | chouser | polypus: 'concat' is not fast for two subvectors. It's essentially O(n) where n is the length of the second vector. |
| 00:50 | devlinsf | chouser: {1 :a 2 :b} |
| 00:50 | chouser | devlinsf: nice try! but no. |
| 00:51 | devlinsf | dammit |
| 00:51 | chouser | it's pretty twisted. don't beat yourself up. :-) |
| 00:51 | devlinsf | Let's see.... |
| 00:52 | chouser | polypus: actually, the 'concat' function doesn't return vectors at all. you'd use 'into' to add one vector to the end of another. |
| 00:53 | devlinsf | (let [& comp p partial] ((& (p apply hash-map) (p apply concat) (p map #(conj % (first %)) {:a 1 :b 2})) |
| 00:54 | chouser | :-) |
| 00:54 | chouser | it's like algebra. No need to understand it even if you need to rearrange it. |
| 00:55 | devlinsf | Your form didn't make sense |
| 00:55 | devlinsf | :-p |
| 00:55 | chouser | I can't imagine when it would be useful, that's for sure. |
| 00:55 | devlinsf | Okay, my final answer |
| 00:56 | devlinsf | {:a 2 :b 2} |
| 00:56 | cp2 | like algebra its. even you rearrange undertand need no to it to if it. |
| 00:56 | chouser | devlinsf: strike two. |
| 00:56 | chouser | actually, I just realized... |
| 00:57 | devlinsf | I'm not sure about this conj |
| 00:57 | chouser | there are two possible answers if literal maps aren't guaranteed to maintain their original order. |
| 00:57 | chouser | devlinsf: yes, that's the crux of it. |
| 00:58 | chouser | ,(first {:a 1}) |
| 00:58 | clojurebot | [:a 1] |
| 00:58 | chouser | ,(class (first {:a 1})) |
| 00:58 | devlinsf | Oh |
| 00:58 | clojurebot | clojure.lang.MapEntry |
| 00:58 | chouser | ,(class (conj (first {:a 1}) 2)) |
| 00:58 | clojurebot | clojure.lang.PersistentVector |
| 00:58 | devlinsf | Okay. |
| 00:58 | polypus | chouser: 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:58 | chouser | polypus: no, only the first half |
| 00:59 | devlinsf | Here comes the pitch |
| 00:59 | chouser | polypus: into's second arg is taken as a seq, so the structure of that second vector is lost. |
| 01:00 | devlinsf | {:a :b :b 2} |
| 01:00 | devlinsf | And here comes clojurebot... |
| 01:00 | devlinsf | ,(->> {:a 1, :b 2} (map #(conj % (first %))) (apply concat) (apply hash-map)) |
| 01:00 | clojurebot | {2 :b, :a :b} |
| 01:00 | devlinsf | DAMMIT |
| 01:01 | devlinsf | ,(map #(conj % (first %)) {:a 1 :b 2}) |
| 01:01 | clojurebot | ([:a 1 :a] [:b 2 :b]) |
| 01:01 | devlinsf | Ah, okay |
| 01:02 | chouser | devlinsf: thanks for playing! :-) |
| 01:02 | devlinsf | I'll have one for you someday |
| 01:02 | chouser | my pop quizes are no fun when I'm the only one who answers them. :-P |
| 01:02 | devlinsf | Okay, I've got a riddle for you |
| 01:02 | polypus | it's be cool if you could go: |
| 01:03 | polypus | ~quiz (blah blah ...) |
| 01:03 | clojurebot | Gabh mo leithscéal? |
| 01:03 | polypus | and then: |
| 01:03 | polypus | ~answer (foo bar) |
| 01:03 | clojurebot | Foo is not Baz. |
| 01:03 | polypus | where clojurebot would tell you if you were right or wrong |
| 01:03 | devlinsf | Remember my talk of a map visitor? |
| 01:04 | chouser | polypus: ooh, neat! |
| 01:04 | chouser | devlinsf: yes! |
| 01:04 | devlinsf | I found a legitimate used of (keys-pred take-while ...) and (keys-pred drop-while ...) |
| 01:04 | cp2 | polypus: fork clojurebot work on it :) |
| 01:05 | polypus | k |
| 01:05 | cp2 | i missed an 'and' somehow |
| 01:05 | devlinsf | See if you can find one in two days :) |
| 01:05 | cp2 | this keyboard sucks :) |
| 01:06 | chouser | a legitimate use of (keys-pred take-while ...)? hm... |
| 01:06 | devlinsf | Yup |
| 01:07 | devlinsf | There's a hint in sun's javadocs |
| 01:08 | devlinsf | I'll post my case to the dev list thursday night |
| 01:08 | chouser | that's the same as visit-keys-pred ? |
| 01:08 | chouser | from your email? |
| 01:08 | devlinsf | Yes, that function |
| 01:10 | devlinsf | chouser: Well, time for me to be responsible |
| 01:11 | devlinsf | chouser: See if you can post it to the list before me |
| 01:16 | somnium | chouser: how did you implement TCO in clojurescript? |
| 01:16 | chouser | the same way rhickey didn't in JVM clojure. :-) |
| 01:16 | chouser | oh, do you mean loop/recur? |
| 01:16 | somnium | chouser: yeah |
| 01:17 | chouser | while loop, I think. |
| 01:17 | cp2 | oh what, how come i didnt know about clojurescript |
| 01:17 | cp2 | chouser: stop being so awesome |
| 01:17 | somnium | ok, im writing a mini-special form compiler |
| 01:17 | chouser | do{}while() actually |
| 01:18 | somnium | right labeling blocks and using continue seems least painful |
| 01:18 | somnium | right now, I mean |
| 01:18 | chouser | recur can only go to the enclosing loop (or fn) form |
| 01:20 | somnium | right, ii it encounters loop* or fn*, it gensyms a label and puts a continue on recurs in tail positions |
| 01:20 | chouser | somnium: you can look at clojurescript's compiler -- each special form is a just a defmethod, with the emitted javascript right in there. |
| 01:20 | chouser | it's only about 350 lines of code |
| 01:21 | chouser | somnium: for javascript, or something else? |
| 01:21 | somnium | Im yrying using deftypes to build the ast, so more breathing room |
| 01:21 | somnium | dawm dvorak |
| 01:22 | somnium | no runtime like clojure script, but all non-concurrent special forms |
| 01:22 | somnium | then deftype can operate on prototypes |
| 01:23 | somnium | what comes first, deftype, var, or ns? |
| 01:23 | chouser | hm. 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:23 | chouser | the output would be interesting in its own right, for expressions you wanted to understand better |
| 01:24 | somnium | the asts its producing seem valid, hoping to put a demo on appengine this weekend |
| 01:24 | chouser | but 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:24 | somnium | if it works then hopefully people smarter than myself can implement persistent vectors and goodies |
| 01:25 | chouser | what are you emitting? |
| 01:26 | somnium | first it walks the input lists and does some gensymming |
| 01:26 | somnium | then it emits a tree of deftypes |
| 01:26 | somnium | (bound-block, fn, etc) |
| 01:26 | chouser | huh. |
| 01:26 | chouser | I'm sorry, I don't think I see the purpose yet. |
| 01:26 | somnium | then those call eachother recursively with emit-js |
| 01:27 | somnium | hmm, mostly to help me organize my thoughts about the ast (the type system) |
| 01:28 | chouser | oh! ok, so you are producing javascript. |
| 01:28 | somnium | yes! |
| 01:29 | chouser | I think perhaps I didn't know about javascript labels when I did clojurescript. |
| 01:29 | somnium | tracking return values is tricky |
| 01:29 | chouser | I use a local flag variable everywhere instead. :-/ |
| 01:29 | somnium | so the types help with that |
| 01:29 | somnium | the protocol handles ti as an extra arg |
| 01:30 | somnium | js is so squishy, cousd vars be defined in terms of deftype? |
| 01:30 | chouser | Clojure's Compiler does a bunch of type hint inference, tracking of locals for closures, and such. |
| 01:30 | somnium | js offers some convenient runtime features over java it seems |
| 01:31 | chouser | hm, we didn't have deftype... |
| 01:32 | somnium | well, its fun watching it produce gensym trees, if turns out to be useful too, all the better |
| 01:33 | somnium | just got chrome on linux today, js seems sooo fast now :) |
| 01:33 | chouser | Vars are mutable. deftype's are not. I'm not sure how you'd resolve that. |
| 01:34 | somnium | well, the goal is just to hit all special forms |
| 01:34 | chouser | though I guess since javascript isn't going to enforce 'final' for you, you could just use 'set!' on deftype fields. |
| 01:35 | somnium | then maybe a simple list, and hopefully thats enough to experiment with writing real stuff |
| 01:36 | somnium | ecmascript defines an immutable flag, but Ive never seen it used |
| 01:36 | chouser | well, have fun! I'd be happy to have use of something like clojurescript without having to write it. :-) |
| 01:36 | chouser | I should sleep. |
| 01:36 | somnium | cheers |
| 01:36 | somnium | more like a tool to help build a clojure-script I think |
| 01:37 | konr | Hmm, anyone has any idea of what would be the clojure equivalent of URL foo = this.getClass().getResource(bar)? |
| 01:43 | hiredman | (-> this .getClass (.getResource bar)) |
| 02:31 | dnolen | technomancy: well I figured out a solution to both my problems and sent a pull request for the fix. |
| 03:25 | LauJensen | Morning gents |
| 03:54 | piccolino | I'm getting an exception thrown out of APersistentVector.invoke(), but I have no idea why that is called. What does invoke() do? |
| 03:56 | piccolino | Oh, I see. Nevermind. |
| 03:57 | Chousuke | if you're on master, you can try using clojure.stacktrace to print more clojureish stacktraces |
| 03:57 | piccolino | What's being on master? |
| 03:57 | clojurebot | What is meta |
| 03:57 | Chousuke | piccolino: using the git repo master branch instead of the 1.0.0 release . :) |
| 03:57 | piccolino | Oh, right. |
| 03:59 | LauJensen | Chousuke: Haven't tried it yet, how to you enable that stacktrace? |
| 03:59 | piccolino | Wait, how does one use that? |
| 04:00 | Chousuke | there are functions in the namespace to pretty-print stacktraces |
| 04:00 | Chousuke | you need the exception object for it. usually *e |
| 04:00 | piccolino | But how do you give the arguemnt? |
| 04:00 | piccolino | Oh, I see |
| 04:00 | Chousuke | (*e = last exception thrown) |
| 04:02 | piccolino | Thanks a lot. |
| 04:02 | LauJensen | And why isn't this just standard wrapping for backtraces? |
| 04:04 | Chousuke | I guess some tools depend on the java format? |
| 04:04 | Chousuke | I don't know :P |
| 04:11 | AWizzArd | btw, is there a way to access local variables for each stack frame? |
| 04:11 | AWizzArd | And function parameters? |
| 04:21 | noidi | is there a way to call instanceof from Clojure code? |
| 04:22 | noidi | ah, instance? |
| 04:29 | LauJensen | AWizzArd: Recently Disclojure mentioned a little lib which lets you insert a repl instead of a prn for debugging, would that do ? |
| 04:30 | esj | morning all. |
| 04:31 | LauJensen | Morning |
| 04:35 | mee | I'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:36 | mee | I get "Could not locate clojure/test__init.class or clojure/test.clj on classpath" |
| 04:37 | Chousuke | are you using 1.0.0? |
| 04:37 | mee | yep, ubuntu package |
| 04:37 | Chousuke | then there's no clojure.test namespace :) |
| 04:38 | Chousuke | those docs are for the master branch |
| 04:38 | mee | which is post-1.0? |
| 04:38 | mee | ah |
| 04:38 | Chousuke | which raises the question... where are then 1.0 docs? |
| 04:42 | mee | ah, I was able to get it working using my git checkout of clojure, cool. |
| 05:02 | mee | is there a way to get clojure.test/is to dump the expected/actual values in a pretty-printed way? |
| 05:16 | lpetit | hello there |
| 06:03 | hipertracker | Where is the best Textmate bundle for Clojure? This one? http://github.com/nullstyle/clojure-tmbundle |
| 06:21 | fliebel | I'd like to know the same as hipertracker… still looking for a good editor, now stuck at JEdit. |
| 06:24 | hipertracker | fliebel: I tried to learn Emacs, several times. No joy. To weird |
| 06:24 | hipertracker | er, too |
| 06:25 | fliebel | hipertracker: so what are you you using for Clojure on Mac now? |
| 06:25 | hipertracker | Intellij IDEA |
| 06:26 | hipertracker | Today I also installed the latest plugin for Netbeans. Just checking how it works |
| 06:27 | fliebel | Eclipse, Netbeans and Intellij IDEA are all very large and bloated Java applications, right? |
| 06:28 | esj | fliebel: 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:28 | hipertracker | I don't like Eclipse. It is slow. IntelliJ IDEA is the most advanced. And I use it for more than one language. |
| 06:29 | hipertracker | esj: 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:30 | fliebel | esj: Maybe if I was a linux use I would… But for Mac, I'd like something that blends in with the rest. |
| 06:30 | esj | as per my promise, my lips, sealed they are. |
| 06:30 | hipertracker | Although maybe Emacs might be good choice because it is based on Lisp and Clojure is a Lisp dialect... |
| 06:31 | hipertracker | But this scares me a bit ;) http://edward.oconnor.cx/2009/07/learn-emacs-in-ten-years |
| 06:32 | AWizzArd | Honestly, 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:34 | AWizzArd | mee: You can (use 'clojure.contrib.pprint) and then just (pprint your-object) |
| 06:36 | fliebel | hipertracker: lol |
| 06:37 | hipertracker | http://lca2srv30.epfl.ch/sathe/data/emacs_learning_curves.png |
| 06:37 | hipertracker | There must be something in those jokes ;) |
| 06:38 | fliebel | have you read the comments on those posts? |
| 06:42 | fliebel | hipertracker: 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:42 | hipertracker | hmm, it might be helpfull http://lispcast.blip.tv/ |
| 06:43 | hipertracker | fliebel: maybe you have right, but first link is the opinion of old users |
| 07:27 | interferon | is there a built-in equivalent to (defmacro rescue [default & expression] `(try ~@expression (catch Throwable _# ~default))) |
| 08:11 | AWizzArd | Is there a way to access local variables (including function parameters) for stack frames? |
| 08:16 | _ato | AWizzArd: http://java.sun.com/javase/6/docs/jdk/api/jpda/jdi/com/sun/jdi/StackFrame.html |
| 08:18 | _ato | AWizzArd: are you thinking of extending debug repl so you can look at stuff in other frames? |
| 08:18 | _ato | not sure if you can access that from within the VM or whether you have to connect via debugger interface |
| 08:19 | AWizzArd | i see |
| 08:19 | AWizzArd | But yes, I would be interested to see at least the function args, although all local vars would be interesting of course |
| 08:20 | rhickey | AWizzArd: 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:22 | AWizzArd | I 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:23 | AWizzArd | Instead 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:25 | chouser | this debug-repl thing has me stunned. |
| 08:26 | chouser | and I haven't even tried it yet. |
| 08:26 | rhickey | AWizzArd: IntelliJ has smart collection representation, as does Netbeans (enclojure) now AFAIK |
| 08:27 | AWizzArd | chouser: what debug-repl you mean? Is that something in Contrib? |
| 08:27 | chouser | http://gist.github.com/252421 |
| 08:27 | AWizzArd | rhickey: btw, do you know Findbugs? http://findbugs.sourceforge.net/ |
| 08:27 | chouser | AWizzArd: discussed here: http://groups.google.com/group/clojure/browse_thread/thread/8d77ad0da8d190c8 |
| 08:28 | AWizzArd | chouser: thank you |
| 08:28 | rhickey | AWizzArd: yes, I've run it in Clojure's Java code in the past |
| 08:29 | AWizzArd | Good. 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:31 | AWizzArd | If 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:35 | AWizzArd | They 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:36 | rhickey | AWizzArd: 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:37 | AWizzArd | I already looked at that company and found it nice. Only the very high costs of their product may be a challenge. |
| 08:45 | rhickey | AWizzArd: $245 for 200 classes didn't seem bad - does it rise steeply from there? |
| 08:48 | AWizzArd | On 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:48 | AWizzArd | this sounded to me (as a non-native speaker) that they want 50 cents per loc |
| 08:49 | rhickey | AWizzArd: do you have a link for that quote? |
| 08:50 | AWizzArd | http://www.sofcheck.com/products/inspector.html |
| 08:51 | AWizzArd | The section is titled "SofCheck Inspector Maximizes Your ROI" |
| 08:51 | rhickey | got it |
| 08:52 | _fogus_ | AWizzArd: Playing around with dr now. Really really cool. Excellent work! |
| 08:54 | AWizzArd | This 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 | _ato | AWizzArd: 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 | _ato | perhaps there's a way using the debugger API somehow |
| 08:56 | chouser | _ato: ah, is that your code? |
| 08:57 | _ato | chouser: the simpler version is mine. George Jahad did the original one that required modifications to the compiler |
| 08:58 | AWizzArd | Maybe 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:59 | chouser | _ato: great teamwork. :-) |
| 08:59 | chouser | _ato: care to sign a CA and donate the code to contrib? |
| 08:59 | _ato | I did sign and send a CA over a month ago but AFAIK rhickey hasn't received it :( |
| 09:00 | _ato | perhaps I should try sending again |
| 09:00 | chouser | :-( |
| 09:00 | AWizzArd | Maybe if we ask very nice then Rich will accept such a CA via fax :) |
| 09:01 | _ato | perhaps 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:05 | rhickey | _ato: just added you this morning |
| 09:05 | rhickey | http://clojure.org/contributing |
| 09:06 | _ato | rhickey: ah, awesome! :-) |
| 09:06 | AWizzArd | This 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:07 | dysinger | so 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:07 | rhickey | AWizzArd: this so that you don't have to use a real debugger and all of its facilitites? |
| 09:07 | chouser | AWizzArd: _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:08 | chouser | dysinger: I agree. Clearly his idea was instrumental in getting here. |
| 09:08 | _ato | dysinger: definitely |
| 09:09 | AWizzArd | I 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:10 | rhickey | I'm concerned about people rewriting an 'interpreted' debugger whilst compiled debuggers with many facilities are already there. Ditto homemade profiling etc |
| 09:11 | _ato | but compiled debuggers don't let you eval stuff do they? |
| 09:11 | AWizzArd | Yes sure, but this is better than print debugging that we all do. I even found outcommented prints in Clojures sources ;) |
| 09:12 | rhickey | _ato: JAva ones do, and have for some time |
| 09:12 | rhickey | AWizzArd: those prints wouldn't have been replaced by a debug repl |
| 09:13 | AWizzArd | ok |
| 09:13 | dysinger | rhickey & _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:13 | dysinger | I consider it a different use than active java debugging on the desktop |
| 09:13 | rhickey | Note 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:14 | AWizzArd | The 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 | _ato | yeah, I think if we did want to extend it to break on exceptions we'd need to look into java debug API |
| 09:14 | rhickey | dysinger: but if all you are doing at the repl is issuing "show me x" commands... |
| 09:15 | _ato | I think it's worthwhile even just because it doesn't require installing or learning how to use any special tools |
| 09:15 | _ato | not saying that it replaces a more extensive debugger though |
| 09:15 | dysinger | I am no expert for sure. I just like the idea. Other lisps have it as a tool. |
| 09:15 | dysinger | For example http://jlongster.com/blog/2009/07/5/remotely-debugging-iphone-scheme/ |
| 09:15 | rhickey | dysinger: yes, but they have much different runtime infrastructure to support them |
| 09:16 | chouser | doesn't proper use of jvm debugging require a second jvm instance? |
| 09:16 | AWizzArd | too bad that the Backwards Debugger is not very actively developed anymore: http://www.lambdacs.com/debugger/ |
| 09:16 | rhickey | you can attach a JAva debugger to a running process you didn't anticipate debugging other than to start with the requisite hook |
| 09:17 | rhickey | set a breakpoint and stop it anywhere |
| 09:17 | rhickey | remotely etc |
| 09:17 | dysinger | true. I guess we just aren't used to doing that with emacs. |
| 09:18 | rhickey | Like I said, I don;t want to argue against debug-repl, but for acknowledging there is awesome infrastructure which Clojure already supports |
| 09:18 | dysinger | java debugger doesn't allow for changing anything though - just inspecting |
| 09:18 | rhickey | dysinger: not true at all |
| 09:18 | AWizzArd | I wouldn't mind combining that with emacs. It is just that jswat did not yet look promising in combination with it. |
| 09:18 | rhickey | you can change, eval etc |
| 09:18 | dysinger | rhickey: oh - rly - I have to go try that |
| 09:19 | AWizzArd | dysinger: did you try jswat yet? |
| 09:19 | rhickey | now, there could be some hooks there that could be leveraged better for Clojure. I don't have time to work on that |
| 09:19 | dysinger | I am too brain-warped by emacs prolly |
| 09:19 | _ato | http://georgejahad.com/clojure/cljdb.html |
| 09:19 | rhickey | but I don't think rolling interpreted runtime suport is the way to go |
| 09:19 | _ato | I haven't tried it though, it sounds hard to get setup |
| 09:19 | dysinger | _ato I tried it a while ago - it's not hard |
| 09:20 | dysinger | I just was unaware that you could change, eval etc. |
| 09:20 | cemerick | dysinger: FWIW, you can run a java/clojure debugger over the wire with enclojure in a snap |
| 09:20 | dysinger | interesting. |
| 09:21 | AWizzArd | cemerick: and does Enclojures debugger show Clojure objects as we like them to see? |
| 09:21 | cemerick | Eric proposed adding enclojure's repl lib to contrib as a good baseline, but I guess that fell by the wayside |
| 09:21 | chouser | one benefit of debug-repl is the drop-dead simple setup. No new tools, guis, or terminology to learn. |
| 09:21 | AWizzArd | chouser: I agree |
| 09:21 | dysinger | I 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:21 | dysinger | after using console emacs/slime |
| 09:21 | AWizzArd | i would like it more than inserting all those println |
| 09:22 | AWizzArd | dysinger: it would be okay if we only use the debugger in it |
| 09:22 | cemerick | AWizzArd: 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:22 | chouser | cemerick: that's better than jdb |
| 09:22 | AWizzArd | we can do normal coding in emacs, and for debugging maybe a separate Enclojure or Idea could be used, possibly on a different computer. |
| 09:23 | AWizzArd | cemerick: i just saw what jswat was doing, and that showed me arrays of arrays of ... instead of just [10 20 30] |
| 09:23 | cemerick | dysinger: 5 years is a long time. IDEA and netbeans are both top-notch environments, IMO. |
| 09:24 | AWizzArd | only that their code editors can't yet compete with emacs |
| 09:24 | AWizzArd | I try Enclojure every few months, and it is improving. But it still isn't there yet. |
| 09:24 | cemerick | AWizzArd: never used jswat, so I can't compare there intelligently. The string representations are certainly reasonable though, and the underpinnings are totally usable. |
| 09:24 | dysinger | AWizzArd: says it perfectly - nothing competes with emacs for lisp editing |
| 09:24 | cemerick | AWizzArd: I'd strongly disagree, but *shrug* |
| 09:24 | chouser | I suppose I should try enclojure+jvi again |
| 09:25 | dysinger | and I can run it on my my netbook :P |
| 09:25 | the-kenny | Can I get a link to the debug-repl? |
| 09:25 | chouser | the-kenny: http://gist.github.com/252421 |
| 09:25 | dysinger | http://georgejahad.com/clojure/cljdb.html & http://gist.github.com/252421 |
| 09:25 | AWizzArd | cemerick: did you try emacs yet? :) |
| 09:25 | AWizzArd | Little 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:26 | dysinger | One word: paredit |
| 09:26 | cemerick | AWizzArd: 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:26 | chouser | heh |
| 09:26 | AWizzArd | dysinger: I was talking about Enclojure. Because of challenges like that I use Emacs, where those problems not exist. |
| 09:26 | the-kenny | AWizzArd: Try C-a |
| 09:27 | the-kenny | (move-to-bol) |
| 09:27 | dysinger | Also 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:27 | AWizzArd | the-kenny: is that C-a for Enclojure? |
| 09:28 | lpetit | Is 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:28 | the-kenny | AWizzArd: Oh, I thought you're in emacs. Sorry. |
| 09:28 | rhickey | My 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:28 | AWizzArd | I am in Emacs where the POS 1 key works perfectly. |
| 09:28 | the-kenny | lpetit: I think it's not country- but people-specific. |
| 09:29 | the-kenny | I know some guys here in Germany who love eclipse... I hate it ;) |
| 09:29 | dysinger | rhickey: I hear that - I need to go wipe cobwebs & refresh my java debugger memory |
| 09:29 | AWizzArd | the-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 | _ato | yeah 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:30 | dysinger | I think of pre-paredit lisp editing as caveman days |
| 09:30 | dysinger | I can't submit to the caveman tools inside most of the IDEs for lisp editing. :P |
| 09:30 | the-kenny | _ato: After I tried paredit the first time I thought: That's like eclipse does it.. but paredit does it right. |
| 09:30 | rhickey | also 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:30 | AWizzArd | dysinger: I think they will catch up one day. |
| 09:31 | dysinger | AWizzArd: looking forward to it. |
| 09:31 | the-kenny | AWizzArd: Some day.. but we all live now :) |
| 09:31 | AWizzArd | rhickey: 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:31 | dysinger | rhickey: agree - I played with emacs + jswat - seems like a workable combo |
| 09:31 | AWizzArd | But as you and others pointed out this seems to be possible. |
| 09:31 | dysinger | I'll try it again today |
| 09:32 | AWizzArd | dysinger: let me know if you get jswat working. For me it was not so nice. |
| 09:32 | dysinger | AWizzArd: ok - it's been a long time - 6 months or so |
| 09:32 | AWizzArd | But 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:33 | chouser | what version of netbeans should I get to work with enclojure-plugin-2009-11-3.nbm ? |
| 09:33 | cemerick | chouser: probably stick to 6.7.1 for now |
| 09:34 | cemerick | it'll probably work fine with 6.8, but I've not tried the RC yet |
| 09:34 | chouser | ubuntu offers 6.5. Too old, right? |
| 09:35 | cemerick | ah, probably |
| 09:35 | cemerick | actually, almost certainly |
| 09:36 | lpetit | the-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 | _ato | hmm "Not able to submit breakpoint LineBreakpoint defpackage.clj : 9, reason: The breakpoint is set outside of any class." |
| 09:37 | _ato | and toggle breakpoint is greyed out |
| 09:37 | _ato | is there something special you have to do to enable debugging of clojure code? |
| 09:37 | AWizzArd | chouser: i think you can simply install 6.7.1 in your home dir |
| 09:37 | _ato | (in Enclojure) |
| 09:38 | AWizzArd | _ato: i think I also had this problem. In jswat and enclojure i could not set breakpoints in Clojure files. |
| 09:38 | _ato | oh.. |
| 09:38 | AWizzArd | Java 6 Update 14? |
| 09:38 | _ato | how do you use the debugger than? |
| 09:38 | lpetit | rhickey: 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:38 | AWizzArd | not :) |
| 09:38 | lpetit | ...enclojure) |
| 09:38 | AWizzArd | _ato: (println [var1 var2]) |
| 09:39 | _ato | oh so you can't use it.. |
| 09:39 | AWizzArd | right |
| 09:39 | _ato | hmm maybe it works in IDEA or Eclipse then |
| 09:39 | lpetit | rhickey: 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:39 | AWizzArd | So the debug-repl looks promising. |
| 09:39 | cemerick | _ato: I use the debugger in enclojure for clojure code frequently |
| 09:39 | AWizzArd | cemerick: do you use Java 6 Update 17? |
| 09:40 | cemerick | I'm on update 15 at the moment. |
| 09:40 | cemerick | But it worked fine with older revs, too. |
| 09:40 | AWizzArd | In older revs I was able to set break points. At some point, don't remember when, it wasn't possible anymore. |
| 09:40 | AWizzArd | For .java files no problem. |
| 09:41 | lpetit | _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:42 | lpetit | _ato: that is, we're in the debugging phase for clojure code inside jars (think clojure.core). |
| 09:42 | _ato | ah ok |
| 09:43 | _ato | can you set a breakpoint in your code and then step into jars? |
| 09:47 | LauJensen | ccw? |
| 09:47 | _ato | http://code.google.com/p/counterclockwise/ |
| 09:47 | _ato | ugh.. having eclipse and netbeans open at the same time is killing my laptop |
| 09:48 | LauJensen | oh |
| 09:48 | LauJensen | Did everybody catch that SBCL Debugging/Morse code video on Reddit today? |
| 09:49 | _ato | woah eclipse has rainbow parens |
| 09:49 | _ato | with christmasy colours too |
| 09:49 | LauJensen | s/Reddit/Hacker News |
| 09:50 | lpetit | _ato: yes |
| 09:50 | LauJensen | He puts Emacs to good use: http://news.ycombinator.com/item?id=985215 |
| 09:50 | lpetit | _ato: yes to "can you set a breakpoint in your code and then step into jars?" |
| 09:51 | lpetit | _ato: colors are editable in the project's properties ;-) |
| 09:51 | AWizzArd | lpetit: can code completion already complete things like "(Integer/pars<completion key pressed>" or "(.mu<completion>"? |
| 09:52 | _ato | hmmm |
| 09:52 | _ato | well it did break the breakpoint |
| 09:52 | _ato | which is one up on netbeans |
| 09:52 | _ato | but it says "No source found" |
| 09:52 | _ato | and it just shows vectors as java objects |
| 09:52 | lpetit | AWizzArd: "(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 | _ato | but you can at least inspect locals that are ints and strings |
| 09:53 | _ato | oh I see |
| 09:53 | AWizzArd | lpetit: oki, sounds like it is on the right track |
| 09:53 | _ato | if you double click them it calls toString() |
| 09:53 | _ato | that's not bad |
| 09:53 | lpetit | _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 | _ato | and you can change the values of locals, that's neat |
| 09:54 | cp2 | mornin |
| 09:55 | lpetit | _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 | _ato | lpetit: yeah, I just created a clj file, set a breakpoint in it, right clicked it and went debug as -> clojure repl |
| 09:56 | _ato | but maybe I don't have the latest version or something |
| 09:56 | _ato | I just got whatever the eclipse install menu thing installed |
| 09:56 | _ato | from the update site |
| 09:56 | lpetit | _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:57 | lpetit | _ato: you have the "officially released version", np. |
| 09:57 | rhickey | lpetit: 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 | _ato | ah, that works, very cool |
| 09:58 | rhickey | lpetit: 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:58 | gjahad | aaaarrggh! |
| 09:58 | lpetit | rhickey: yes, I'm not even trying to compare the merits, just trying to understand. |
| 09:58 | rhickey | And that's because I don't use Eclipse otherwise for anything |
| 09:58 | _ato | lpetit: yeah, if other developers at my workplace were into IDEs they'd probably use eclipse as it's what they use for java |
| 09:58 | rhickey | not even installed |
| 09:59 | gjahad | ato: I saw the LOCAL_ENV var, but didn't understand it correctly. |
| 09:59 | gjahad | so I basically reimplemented it |
| 09:59 | lpetit | rhickey: 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:59 | gjahad | nicely done |
| 10:00 | rhickey | lpetit: I agree -there will be many there for whom the situation will be reversed - will look for Eclipse support first |
| 10:00 | chouser | gjahad: you may have missed where we were all singing the praises of your idea. |
| 10:00 | _ato | gjahad: 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:01 | gjahad | for what it's worth, I basically agree with Rich that we are not leveraging the java debug infrastructure enough |
| 10:02 | gjahad | but this seemed like a relatively straightforward hack |
| 10:02 | gjahad | so i decided to try it first |
| 10:02 | gjahad | i also believe there is a place for both |
| 10:02 | gjahad | thanks for the praise chouser |
| 10:03 | lpetit | rhickey: 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:03 | lpetit | ...they already work in Eclipse), it already does the job, I think.$* |
| 10:03 | lpetit | s/$*// |
| 10:03 | lpetit | s/\$\*// :) |
| 10:04 | _fogus_ | gjahad: I think I praised the wrong person earlier... in any case, awesome work. Really nice. |
| 10:06 | lpetit | _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 | _ato | lpetit: heh well as an emacs user my first thought is of course: no paredit! :( |
| 10:09 | _ato | the debugger is very cool |
| 10:09 | _ato | the indenting seems to be off |
| 10:09 | _ato | or maybe I don't know how to turn it on |
| 10:09 | lpetit | _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:09 | lpetit | _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 | _ato | ah.. eval top-level form |
| 10:10 | _ato | good |
| 10:10 | _ato | that's an important one |
| 10:11 | _ato | the s-expression nav stuff is handy but it's more the editing commands that make paredit really useful |
| 10:11 | rhickey | lpetit: yes, that's my negligence - I've added a link here: http://clojure.org/getting_started |
| 10:12 | AWizzArd | Also 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 | _ato | http://p.hagelb.org/paredit-outline |
| 10:12 | AWizzArd | _ato: btw, why Paredit and not slime? |
| 10:12 | opqdonut | different thing |
| 10:12 | lpetit | rhickey: thanks ! |
| 10:13 | _ato | AWizzArd: huh? I use both |
| 10:13 | AWizzArd | what does paredit give you? |
| 10:13 | opqdonut | paredit is low-level editing commands, slime is high-level ide functionality |
| 10:13 | opqdonut | paredit is _real_ structural editing |
| 10:13 | LauJensen | Wow, check out 2.nd article from the top: http://www.multicoreinfo.com/ :D |
| 10:13 | opqdonut | you can't have unbalanced parens |
| 10:13 | AWizzArd | hmm |
| 10:13 | _ato | it has all these commands for manipulation s-expressions |
| 10:13 | rhickey | hrm, clojure-mode link there seems pretty stale as well - where's the latest version of clojure-mode - is it still jochu's? |
| 10:13 | opqdonut | which are great, yeah |
| 10:14 | AWizzArd | rhickey: yes |
| 10:14 | AWizzArd | rhickey: but if you want to use clojure-mode with clojure-swank and the latest slime you may run into problems. |
| 10:15 | rhickey | I don't think I was able to get his latest clojure-mode to work stand-alone |
| 10:15 | rhickey | I don't use swank/slime |
| 10:15 | AWizzArd | Some 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 | _ato | isn't technomancy's the latest version? I doubt it works standalone either though |
| 10:16 | lpetit | _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:17 | rhickey | lpetit: 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:18 | AWizzArd | LauJensen: nice article |
| 10:18 | lpetit | _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:18 | rhickey | _ato: I was able to get technomancy's latest to work stand-alone |
| 10:18 | _ato | lpetit: yeah, that's true :-) |
| 10:19 | _ato | rhickey: ah, cool. :-) |
| 10:19 | lpetit | rhickey: 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 | _ato | lpetit: is there tab completion of some sort in CCW? |
| 10:19 | _ato | that's not as important with clojure, as clojure code usually has sensible names but can be handy |
| 10:20 | lpetit | _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:20 | lpetit | _ato: it's Ctrl+Space which triggers it. |
| 10:20 | LauJensen | AWizzArd: thx |
| 10:20 | _ato | ah right |
| 10:20 | _ato | yep, cool |
| 10:21 | _ato | hmm |
| 10:21 | _ato | not in the REPL it seems though |
| 10:21 | lpetit | _ato: the current implementation is not my final word. |
| 10:21 | lpetit | _ato: no, sorry, just in the editor for now on. One point to enclojure for this one :-) |
| 10:21 | _ato | also something really handy is a way to cycle through the things you've entered in the REPL |
| 10:21 | _ato | like pressing M-p or up in a shell |
| 10:21 | lpetit | _ato: yes, the current "REPL" is a weak point of ccw |
| 10:22 | lpetit | _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 | _ato | is 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 | _ato | I think in Eclipse + Java it's F3 |
| 10:24 | lpetit | rhickey: 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:26 | lpetit | _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 | _ato | another 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 | _ato | that should be pretty easy to implement, even if it just puts (macroexpand ...) into the repl for you |
| 10:27 | lpetit | _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:28 | lpetit | _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 | _ato | I like the way errors get highlighted |
| 10:30 | _ato | that's something SLIME sucks with |
| 10:30 | _ato | it just pops up a stack trace dialog and you have to goto the line yourself |
| 10:40 | lpetit | _ato: thanks for the feedback, I've updated my todo list, and a little bit reprioritized things. |
| 10:41 | _ato | no worries. :-) |
| 10:47 | mac__ | 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:47 | Chousuke | I wonder if the community edition of IDEA is any good. |
| 10:48 | Chousuke | It seems like open sourcing your Java IDE is popular nowadays. |
| 10:49 | tomoj | _ato: is there really no way to jump to the location of the error? |
| 10:49 | mac__ | Chousuke: Haven't tried it myself but a friend told me it was gimped compared to the real version |
| 10:49 | lpetit | Chousuke: who else than IntelliJ did this recently ? |
| 10:49 | mac__ | Chousuke: No idea in what way though :) |
| 10:50 | Chousuke | lpetit: well, not recently, but I mean NetBeans |
| 10:51 | lpetit | Chousuke: oh ok, but NetBeans open sourced is not *that* recent, is it ? |
| 10:51 | Chousuke | Well, I guess not. |
| 10:52 | lpetit | :-p |
| 10:52 | rhickey | For $249 individual license ($149 upgrade), IntelliJ is well worth the money. I'm happy to pay for it, and have for years |
| 10:53 | mac__ | rhickey: What's the difference between community and payed version then? |
| 10:54 | rhickey | mac__: slide the slider here: http://www.jetbrains.com/idea/features/index.html |
| 10:56 | mac__ | Ok so it basically has all the core features but lacks a lot of the enterprise stuff. Not too shabby then |
| 10:57 | _ato | tomoj: 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:57 | rhickey | mac__: right, but if you pay for it then the people that make it can stay alive and make new versions |
| 10:58 | mac__ | 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:00 | tomoj | _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:02 | rhickey | mac__: I pay for Aquamacs |
| 11:03 | rhickey | open source should not mean free |
| 11:03 | rhickey | but there's no way to enforce that |
| 11:04 | chouser | I'm under the impression that open-sourcing Clojure was a purely practical decision, just another part of the strategy to drive adoption. |
| 11:05 | mac__ | 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:05 | rhickey | chouser: yes, there's simply no way to get people to use a non-open source language anymore |
| 11:05 | rhickey | nor should they |
| 11:06 | notallama | in clojure's case, reading the source is actually very helpful for learning the language |
| 11:06 | chouser | contrasting, 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:07 | chouser | not to mention the fact they've never been sufficiently valuable for anyone to expect anyone to pay |
| 11:07 | rhickey | but, 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:08 | chouser | it 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:08 | rhickey | the open source world needs to establish a consistent way to pay for open source, and not donations |
| 11:08 | rhickey | and to have those payments make it to the creators |
| 11:09 | rhickey | and to have companies feel an obligation to pay |
| 11:09 | esj | rhickey: you nailed it. |
| 11:09 | rhickey | this all separate for support fees, which serve support companies but ofetn not the creators |
| 11:09 | _ato | yeah, it's a hard problem though, particularly where software is created by heaps of different people (emacs is a good example of this) |
| 11:09 | rhickey | _ato: yeah, at scale it seems like a problem |
| 11:10 | rhickey | but still, ASCAP/BMI dole out royalties from pooled payments, there are models |
| 11:10 | chouser | that'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:11 | rhickey | why do we only pay for the most restricted software we buy? |
| 11:11 | rhickey | er, use |
| 11:11 | chouser | right. lousy. |
| 11:12 | rhickey | I 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:12 | rullie | it's more of a moral issue, i'd say |
| 11:12 | rullie | if the moral is there, the model would follow |
| 11:13 | chouser | there are sub-markets where donations or other fees work better than others. |
| 11:15 | chouser | I 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 | _ato | I 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 | _ato | I 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:21 | the-kenny | s/I/he/ |
| 11:21 | chouser | _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:22 | chouser | I'm afraid that "appropriately" might be the detail where the devils lie. |
| 11:22 | _ato | yeah |
| 11:23 | cemerick | something 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:23 | rhickey | chouser: people contributing to projects might only do so where they felt their compensation was appropriate |
| 11:24 | rhickey | when you buy something from Apple or Microsoft you are relying on their internal mechanism for compensation being deemed fair by their employess |
| 11:25 | arohner_ | 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:26 | rhickey | arohner: 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:27 | arohner_ | 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:27 | rhickey | the-kenny: how will they use that beer to send their kids to college? |
| 11:28 | rhickey | arohner_: I think full or substantial part timers would be primary recipients, and it is not necessary to pay e.g. per patch |
| 11:29 | _ato | A 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 | _ato | due to politics. |
| 11:30 | rhickey | ideally, 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:32 | chouser | I'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:32 | rhickey | I 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:32 | cemerick | yeah, they seem to be moving on/up to other products |
| 11:32 | chouser | that might be easier to implement than replacing copyright |
| 11:32 | rhickey | now, they may be distracted as the revenue for it falls away |
| 11:33 | cemerick | rhickey: 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:34 | cemerick | "if rhickey ain't happy, there ain't nobody happy" ;-) |
| 11:35 | rhickey | I 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 | _ato | My 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:37 | rhickey | its imperfect, but easy (and required) for users/payers, something for creators |
| 11:38 | cemerick | rhickey: musician friends of mine say that creators generally get screwed by ASCAP/BMI. Good idea, poor impl, perhaps. |
| 11:39 | cemerick | rhickey: I thought you were aghast at the notion of a Clojure Foundation, though. |
| 11:39 | rhickey | cemerick: ASCAP works less well the smaller you are, yes |
| 11:40 | rhickey | cemerick: 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:41 | dnolen | perhaps 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:41 | dnolen | I find http://www.kickstarter.com/ inspiring. |
| 11:41 | cemerick | dnolen: that's a superb idea. |
| 11:42 | esj | seems to work for Wikipedia |
| 11:43 | rhickey | I 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:43 | cemerick | rhickey: you could always simply offer commercial licenses. |
| 11:43 | danlarkin | well once we get everyone together for clojure conj 2010 you can milk everyone there :) |
| 11:44 | dysinger | milk! |
| 11:45 | dysinger | rhickey: I am trying to organize "Clojure Conj 2010" - if there's profit to be had from it - you can have it. |
| 11:45 | chouser | At the moment, where I work, I think allowing me to use Clojure at all is as much as they're willing to risk. |
| 11:45 | dysinger | (tutorial days are profitable) |
| 11:45 | dnolen | rhickey: $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:45 | the-kenny | "you can slurp* everyone there" :D |
| 11:45 | chouser | dysinger: in Hawaii? |
| 11:45 | dysinger | no probably west coast before/after javaone |
| 11:45 | dysinger | like Scala Lift |
| 11:46 | danlarkin | dysinger: east coast, you mean |
| 11:46 | dysinger | I was thinking I would do it next to ICFP but there would be more java devs at JavaOne |
| 11:46 | danlarkin | oh |
| 11:46 | danlarkin | I see |
| 11:46 | rhickey | cemerick: 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:48 | dysinger | rhickey: you could come work for our clojure team :) |
| 11:48 | rhickey | I'm excited about a Clojure conference (not for income-production, though I'll take what I can get) |
| 11:48 | dysinger | we'd give you generous time to do your own thing :) |
| 11:49 | rhickey | dysinger: consulting in Clojure doesn't have me working *on* Clojure |
| 11:49 | dysinger | 1/2 & 1/2 ? |
| 11:49 | rhickey | dysinger: but we should talk |
| 11:49 | cemerick | rhickey: 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:50 | chouser | small and probably inter-trusting enough, if that communicates what I mean. |
| 11:51 | angerman | No matching method found: println for class swank.util.io.proxy$java.io.StringWriter$0 :( |
| 11:51 | cemerick | sure. No need for intermediaries when the principles are available with their checkbooks. |
| 11:51 | angerman | it's caused by clojure.contrib.sql.internal$print_update_counts__7482.invoke(internal.clj:125) |
| 11:51 | cemerick | principals*, of course |
| 11:52 | chouser | angerman: did you rebind *out*? |
| 11:52 | angerman | chouser: to nothing special |
| 11:52 | chouser | cemerick: though if principles had checkbooks, they might get more respect. |
| 11:52 | arohner_ | chouser: hah! |
| 11:52 | cemerick | bah dum bump *crash* |
| 11:52 | cemerick | :-P |
| 11:52 | angerman | lein swank -> emacs -> slime-connect -> "(with-connection db (do-prepared *stmt* '(val1 val2)))" |
| 11:53 | rhickey | Clojure2010 funding drive |
| 11:53 | rhickey | ? |
| 11:53 | rhickey | hrm, yeah, kickstart 5% is a lot |
| 11:53 | cemerick | that's what I was saying |
| 11:54 | chouser | a specific thing like that would make it easier for me to make a specific request to my employer. |
| 11:54 | chouser | dunno that it would increase the chances of them contributing, but it might. |
| 11:54 | cemerick | rhickey: 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:55 | rhickey | cemerick: I'm all for making it a company expense - that's one problem with donations |
| 11:56 | chouser | everyone using clojure already obviously trusts rhickey to a certain extent. all we'd need is a goal and a little progress bar. :-) |
| 11:56 | rhickey | I'm happy to invoice everyone, and to pay taxes |
| 11:56 | angerman | rhickey: education discounts? |
| 11:56 | dnolen | rhickey: 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:56 | cemerick | rhickey: well, then it's all very straightforward. |
| 11:57 | chouser | is it? what's the item on the invoice? |
| 11:57 | chouser | 15 seconds of online techincal support: $3000 |
| 11:57 | rhickey | chouser: there's a pledgie progress bar here: http://github.com/richhickey/clojure ($565) we'd need another system for this |
| 11:58 | cemerick | rhickey: 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:58 | rhickey | dnolen: agreed, its interesting, especially the 'sufficient promises in place before anyone's on the hook' aspect |
| 11:59 | rhickey | cemerick: yes, I don't mean another system, just that pledgie isn't working right now :( |
| 11:59 | angerman | does anyone have an idea why c.c.sql has those printing issues? |
| 11:59 | cemerick | chouser: it really is as easy as that at this point, assuming the contributors aren't looking for specific "deliverables" |
| 11:59 | rhickey | chouser: I don't know - people could pay me for consulting hours to work on Clojure |
| 11:59 | cemerick | rhickey: well, I wouldn't bother with it because of the inevitable fees, anyway |
| 12:00 | danlarkin | can we pay you to fix our pet-peeve bugs? :) |
| 12:00 | chouser | cemerick: I just didn't know if the IRS cared about specific deliverables for it to be an expense instead of a donation. |
| 12:01 | chouser | Maybe just one big sponser is needed. If only there was someone at Sun who could get the ball rolling... |
| 12:01 | cemerick | chouser: 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:01 | stuartsierra | Unless you're a registered non-profit, I think it's always an expense. |
| 12:03 | cemerick | rhickey: do you have a corp, or TIN? MA has *very* stringent rules on 1099 contractors (effectively, they're always considered emps). |
| 12:04 | cemerick | if not, an LLC is a cinch to set up |
| 12:05 | esj | the question is why are all the big OS projects charities ? |
| 12:06 | esj | if it does inhibits, rather than promotes, their interaction with large supporters. |
| 12:08 | rhickey | cemerick: I have an LLC |
| 12:08 | rhickey | I have a lunch appt - bbl |
| 12:10 | cemerick | nifty |
| 12:11 | cemerick | hrm, what about clojure.org hosting a clojure-specific job board? |
| 12:11 | cemerick | that'd be a win-win all around, I think. |
| 12:12 | cemerick | immediate 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:15 | angerman | ok. I figured it tries to write to *err* |
| 12:15 | cemerick | _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:18 | angerman | ~source println |
| 12:20 | cemerick | _fogus_: well, maybe jobs could just be listed on a corporate "sponsors" page as they're available to start |
| 12:20 | LauJensen | Why pay for something you can get for free? |
| 12:21 | cemerick | LauJensen: ? |
| 12:21 | LauJensen | I 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:23 | cemerick | Enlightened self-interest. If Rich stops doing what he's doing, then our jobs will be harder and less pleasant as time progresses. |
| 12:23 | LauJensen | I was thinking more along the lines of something similar to JBoss licensing options :) |
| 12:23 | cemerick | That 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:24 | cemerick | LauJensen: it doesn't seem that rhickey wants to offer commercial licenses *shrug* |
| 12:24 | cemerick | which I can totally understand. Selling software sucks. |
| 12:24 | LauJensen | hehe, says the software vendor :) |
| 12:24 | cemerick | Exactly. |
| 12:25 | LauJensen | Well, 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:26 | cemerick | Selling 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:26 | chouser | I've always been intruiged by the idea of having the newest version available only for pay, with older versions fully open. |
| 12:27 | cemerick | chouser: that would really impact the feedback loop though, no? Consider how new would have turned out without all those eyes... |
| 12:28 | LauJensen | Thats not bad, considering how much time Rich puts in between even minor revisions |
| 12:28 | LauJensen | cemerick: sure, the cheap eyes would loose out :) |
| 12:28 | cemerick | maybe once there's dozens or hundreds of bleeding-edge corporate users... |
| 12:28 | cemerick | LauJensen: I don't think that's a bad tradeoff. |
| 12:28 | LauJensen | Maybe Rich should start by ramping Clojure Inc., and hire a sales force of 5 who can get those 100 companies |
| 12:29 | chouser | cemerick: how many of those eyes are (or will be in future versions) will to pay for access? Maybe enough? Dunno. |
| 12:29 | chouser | cemerick: it's definitely a valid concern. |
| 12:29 | LauJensen | Depends on the price-tag, that will set the entry barrier |
| 12:29 | cemerick | yeah, I have no idea |
| 12:30 | cemerick | This whole problem is where systems companies are supposed to take up the slack, but the relevant ones are unfortunately otherwise occupied. |
| 12:30 | chouser | certainly 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:32 | chouser | _fogus_: I can see that. It might also depend quite a bit on the type of product and type of user. |
| 12:32 | cemerick | yeah, the general case is, people don't pay unless they are forced to |
| 12:32 | LauJensen | _fogus_: Yet JBoss is a huge success, I think due to their sales organisation |
| 12:32 | cemerick | LauJensen: I think that's because the buyers trust JBoss more than their own internal I.T. orgs. |
| 12:33 | LauJensen | True |
| 12:33 | _fogus_ | LauJensen: I'm not familiar with their licensing |
| 12:33 | LauJensen | Good insight |
| 12:33 | LauJensen | _fogus_: its expensive, and all you get is 'support' :) |
| 12:35 | chouser | I 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:35 | esj | I know they distract from the actual work, but training courses are both reasonably lucrative and increase the user base ? |
| 12:35 | LauJensen | chouser: you're wrong I'm afraid |
| 12:35 | chouser | That is, I think money lost through piracy is much lower than generally claimed. |
| 12:36 | LauJensen | _fogus_: outstripped? |
| 12:36 | _fogus_ | LauJensen: Was much larger |
| 12:36 | LauJensen | Interesting |
| 12:37 | LauJensen | Hmm.. .... must revise business model :) |
| 12:37 | Chousuke | chouser: I think people will generally pay if they feel the price is right. |
| 12:37 | LauJensen | Chousuke: yes, + 10% discount |
| 12:37 | chouser | Chousuke: yes, I'm sure that's a factor. |
| 12:37 | LauJensen | At least here in Denmark you cant sell anything without those last 10% :) |
| 12:37 | Chousuke | chouser: of course, that varies for everyone so you must find the sweet spot for your target audience. |
| 12:38 | chouser | right |
| 12:38 | Chousuke | a professional developer will pay more than a student. |
| 12:39 | Chousuke | I think people generally like to spend money, so long as it's within their "safety margin" |
| 12:40 | esj | if you license the language now why do you not lose your user base to Scala, Go, Caml etc etc that are all free. |
| 12:40 | hiredman | how do people do completion in emacs? |
| 12:40 | hiredman | I got this "smart-tab" thing off the emacs wiki and it doesn't seem to do jack |
| 12:41 | LauJensen | dabbrev-expand |
| 12:41 | hiredman | I saw a reference to that in the smart-tab code |
| 12:43 | esj | the money has to come from something over and above the language itself |
| 12:44 | Chousuke | esj: Don't worry, Clojure will stay free. |
| 12:45 | hiredman | grrr |
| 12:45 | Chousuke | There is no market for new proprietary general purpose languages. |
| 12:45 | _ato | hiredman: hmm.. M-tab is bound to slime-complete-symbol for me |
| 12:45 | esj | chousuke: this is good, but not my worry, which is how do we attract money to keep this going. |
| 12:46 | angerman | what's the better language suited for an ocaml implementation ontop, scala or clojure? |
| 12:46 | mac__ | _ato: the problem with M-tab is that it won't work with most windowing systems :( |
| 12:46 | LauJensen | I expand with M-RETR |
| 12:46 | _ato | you can bind it to something else |
| 12:46 | mac__ | LauJensen: Yeah M-RET is good |
| 12:47 | _ato | I bind all my windowing stuff to the hyper key |
| 12:47 | hiredman | _ato: and M-tab pops up a list I can go through and click on a symbol |
| 12:47 | hiredman | except it doesn't include symbols in open buffers |
| 12:47 | hiredman | and it doesn't use a single keypress |
| 12:47 | hiredman | and it doesn't just do it inline |
| 12:48 | _ato | it should if there's only one completion |
| 12:48 | hiredman | (all of which vim does :P) |
| 12:48 | Chousuke | I have some completion system that works with just tab |
| 12:48 | mac__ | hiredman: if you have evaluated the buffer slime-complete-symbol will suggest stuff in it |
| 12:48 | Chousuke | and does inline expasion |
| 12:48 | Chousuke | +n |
| 12:48 | hiredman | Chousuke: I would be interested to know what that is |
| 12:48 | Chousuke | hiredman: I'm not too sure myself |
| 12:49 | AWizzArd | LauJensen: in your round 2 (Scala vs Clojure) you link to http://bestinclass.wordpress.com/2009/09/04/hello-world/ |
| 12:49 | hiredman | clojure-mode's syntax highlighting seems rather anemic too |
| 12:50 | Chousuke | ah, right, auto-complete.el :P |
| 12:51 | LauJensen | AWizzArd: Thanks :) |
| 12:51 | Chousuke | hiredman: 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:52 | Chousuke | requires auto-complete.el, which I have in my site-lisp |
| 12:54 | Chousuke | this code is inherited from starter-kit or something I think |
| 13:01 | Drakeson | technomancy: ping |
| 13:02 | Drakeson | lein self-install does not work :p |
| 13:03 | Drakeson | the leiningen-*-standalone.jar that lein wants is not there. why don't you point it to clojars.org instead of repo.technomancy.us |
| 13:04 | technomancy | Drakeson: self-install only works with the stable branch |
| 13:07 | Drakeson | how can I bootstrap the trunk ? is there a smallish build.xml somewhere? |
| 13:07 | Chousuke | just run ant? |
| 13:07 | technomancy | Drakeson: it's explained in the "Hacking" section of the readme. |
| 13:07 | technomancy | you bootstrap from an earlier release |
| 13:07 | Chousuke | oh, never mind |
| 13:08 | AWizzArd | technomancy: good that so much work is going into Lein. |
| 13:09 | Chousuke | technomancy: is it possible to build without a binary though? :/ |
| 13:10 | technomancy | Chousuke: without an earlier lein version? yeah, ieure wrote a script to do it with ant for macports. |
| 13:11 | Chousuke | I 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:12 | Chousuke | I wonder how much work maintaining one would be. :/ |
| 13:12 | technomancy | Chousuke: I am not ambitious enough to have thought that far ahead. =) |
| 13:14 | Chousuke | I guess you could just strip the current java stuff to a bare minimum (to minimise the maintenance burden) and use that for bootstrapping. |
| 13:15 | Chousuke | I suppose it'll require quite a lot of design work to actually make that work smoothly though. |
| 13:18 | chouser | you don't the the .class files will be sufficient? |
| 13:19 | johnmn3 | . |
| 13:20 | angerman | technomancy: any plans to allow jvm arguments_ |
| 13:20 | angerman | technomancy: e.g. -Xmx 512M |
| 13:21 | headius | everyone always worries about self-hosted code somehow winking out of existence |
| 13:21 | headius | I don't really get it |
| 13:21 | LauJensen | headius: then you obviously haven't used Common Lisp :) |
| 13:21 | Chousuke | chouser: I guess they might be, but not having to find a suitable previous version for building would be convenient :/ |
| 13:22 | technomancy | headius: ...says the guy with a 1.7kLOC build.xml file =) |
| 13:24 | technomancy | angerman: I think it could be added, but I haven't run into the need myself |
| 13:24 | headius | technomancy: I blame XML and ant for that :) |
| 13:25 | headius | if I could do a bloody "if", it would probably be half the size |
| 13:25 | cemerick | technomancy: way to soft-pedal the maven ;-) |
| 13:28 | angerman | technomancy: I did. using incanter and some "larger" matrices |
| 13:28 | angerman | technomancy: on a sidenote, what the idea behind using -client instead of -server? |
| 13:38 | cemerick | technomancy: what do you think of clojure-maven-plugin, anyway? I presume you've used it in your travels at some point. |
| 13:47 | scellus | i'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:47 | scellus | ... way to fix clojure's behaviour with C-c C-c which terminates it now |
| 13:48 | the-kenny | scellus: Rebind C-c C-c in the buffer you're working on |
| 13:48 | scellus | the-kenny: what signal should it send? |
| 13:49 | the-kenny | scellus: hm.. don't know. Something that don't interrupt clojure? None, maybe? |
| 13:49 | scellus | i'd like it to get back to repl |
| 13:49 | the-kenny | I don't know much about using clojure-mode without anything |
| 13:50 | scellus | i guess it's better with slime? |
| 13:50 | the-kenny | I think so. |
| 13:50 | scellus | ok, thanks |
| 13:50 | the-kenny | Almost everything is better with slime ;) |
| 13:50 | the-kenny | And the setup isn't very complicated |
| 13:50 | the-kenny | You should try it |
| 13:52 | LauJensen | kenny baby, what did it take to get fuzzy completion running with Clojure? I want to try it out |
| 13:52 | the-kenny | LauJensen: First, you need slime-fuzzy.el from the contrib/ directory of slime |
| 13:52 | the-kenny | Put it anywhere in your load path, and then put some code in your .emacs.. wait, I'll paste the code |
| 13:53 | LauJensen | ~paste |
| 13:53 | clojurebot | lisppaste8, url |
| 13:53 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 13:53 | LauJensen | Thanks alot |
| 13:55 | lisppaste8 | the-kenny pasted "Fuzzy with Clojure" at http://paste.lisp.org/display/91828 |
| 13:56 | the-kenny | lisppaste8: There you are |
| 13:56 | the-kenny | uhm.. LauJensen |
| 13:56 | LauJensen | uhm, Kenny? :) |
| 13:57 | the-kenny | hm? |
| 13:59 | LauJensen | That just fried my REPL |
| 13:59 | the-kenny | lol |
| 13:59 | LauJensen | oh, there we go |
| 14:00 | LauJensen | I called slime-fuzzy-completion-mode one too many times |
| 14:00 | the-kenny | in a new repl, typing some text and hitting TAB should be fine |
| 14:00 | the-kenny | (C-c TAB in a source buffer) |
| 14:00 | LauJensen | Yea, looks fun |
| 14:04 | chouser | scellus: there's add-break-thread! in repl-utils that might help. |
| 14:05 | saml | hey, is there shortcut for (doc symbol) ? in Clojure Box |
| 14:11 | scellus | a lot of reflection warnings from repl utils :) |
| 14:12 | the-kenny | scellus: Get a CA and write a patch :) |
| 14:13 | scellus | add-break-thread! solves the clojure-mode C-c thing, great! |
| 14:16 | the-kenny | scellus: What "thing"? |
| 14:17 | the-kenny | scellus: ah, sorry. Got it. |
| 14:18 | scellus | the-kenny: yes. and reflection warnings are not worth a patch... |
| 14:21 | dysinger | cemerick: we use clojure-maven-plugin at work on a mulitmodule clojure project with a dozen submodules. |
| 14:21 | dysinger | we don't use lein |
| 14:22 | cemerick | dysinger: yeah, we're in the same position |
| 14:22 | dysinger | It works well enough (maven-plugin) |
| 14:22 | dysinger | happy to share if you need |
| 14:22 | dysinger | (our parent / child pom setup) |
| 14:23 | cemerick | dysinger: thanks, but we have our own über-parent that refers to internal builds of clojure and contrib :-) |
| 14:24 | cemerick | I 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:24 | cemerick | passing options at compile- and test-time is a must-have, IMO |
| 14:25 | dysinger | cemerick: agree - we use profiles and properties to trigger |
| 14:26 | dysinger | such as 'mvn -Dnotest' |
| 14:26 | dysinger | (triggers testless quick builds) |
| 14:26 | dysinger | instead of typing the whole long maven.test.skip=true |
| 14:26 | cemerick | yeah, I wouldn't have bothered with a patch, but we needed -Xmx for tests |
| 14:27 | dysinger | ah |
| 14:27 | cemerick | (I assume properties can't be used to pass jvm flags) |
| 14:28 | dysinger | I 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:28 | dysinger | or maven rather |
| 14:28 | dysinger | I like being able to use dependency:tree and versions:display-dependency-updates |
| 14:29 | dysinger | and versions:lock-snapshots and "assembly:assembly -DdescriptorId=jar-with-dependencies" |
| 14:29 | dysinger | etc. |
| 14:29 | dysinger | etc. |
| 14:29 | cemerick | agreed. The tooling (in NB, anyway) is pretty darn handy with an authoritative pom, too. |
| 14:40 | devlinsf | Hey, quistion about clojure.lang.PersistentTreeMap |
| 14:40 | devlinsf | Is it the only sorted my type in Clojure? |
| 14:40 | devlinsf | *map |
| 14:41 | ordnungswidrig | hi all |
| 14:41 | fliebel | Has 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:42 | devlinsf | Nevermind... the Sorted interface will do what I need |
| 14:42 | dnolen | ordnungswidr: pc user before or no? |
| 14:43 | ordnungswidrig | building business models as persistent datastructures is no fun in java. my eyes hurt. |
| 14:43 | ordnungswidrig | dnolen: mainly linux. But I know my bsd and have had some macs at work, um, 5 y ago |
| 14:44 | ordnungswidrig | dnolen: mostly I like the hardware. |
| 14:44 | leafw | ordnungswidrig: same here. Linux runs great on macbooks. |
| 14:46 | ordnungswidrig | leafw: I think I'll end up in dual boot and some virtualization... however os X is not so bad, after all. |
| 14:47 | the-kenny | The well-written programs make osx so cool |
| 14:47 | fliebel | Any 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:47 | ordnungswidrig | What 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:48 | ordnungswidrig | s/between/behind/ |
| 14:48 | solussd | on a mac here! perfect dev environment |
| 14:49 | ordnungswidrig | solussd: with a ssd or is this a purely incidental nickname regex match? |
| 14:49 | solussd | purely incidental |
| 14:50 | ordnungswidrig | solussd: *g* |
| 14:51 | the-kenny | solussd: wouldn't say "perfect", but very very good |
| 14:51 | LauJensen | hehe |
| 14:51 | the-kenny | solussd: It would be perfect, if I could run emacs in Terminal.app with CMD mapped to Meta |
| 14:51 | the-kenny | :D |
| 14:52 | LauJensen | I'd say OsX is as good for development as a bicycle is for F1-Racing. It just works :) |
| 14:53 | pjstadig | ok |
| 14:53 | solussd | unix + 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:53 | pjstadig | i've been working on 1.0 compatible terracotta |
| 14:53 | pjstadig | and i think i have a much nicer solution |
| 14:53 | solussd | i develop in linux at work |
| 14:53 | devlinsf | solussd: Don't forget the real feature of a Mac |
| 14:53 | solussd | can't imagine doing development in windows- unless I'm writing windows apps |
| 14:53 | pjstadig | (defn #^{:tcshared true} foo [] 42) |
| 14:53 | ordnungswidrig | me likes xmonad with emacs |
| 14:54 | devlinsf | solussd: Starcraft |
| 14:54 | cburroughs | Is there a clojure json library that isn't strict (ie accepts unquoted keys, javascript comments etc.) |
| 14:54 | pjstadig | creates a shared function |
| 14:54 | the-kenny | devlinsf: hrhr yes |
| 14:54 | solussd | mmm starcraft 2 |
| 14:54 | polypus | pj: 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:54 | the-kenny | solussd: Can't wait for it :) |
| 14:54 | pjstadig | (alter-meta! #'foo assoc :tcshared false) removes it from terracotta |
| 14:54 | the-kenny | But I'm afraid it won't run on my Macbook |
| 14:54 | the-kenny | (white one, without a "real" graphics chip) |
| 14:54 | devlinsf | solussd: Yeah, work is gonna stop for a week then... |
| 14:54 | solussd | I'm just glad it didn't come out a couple years ago- it would have cost me my engineering degree. :) |
| 14:55 | devlinsf | hahaha - me too |
| 14:56 | solussd | i'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:56 | the-kenny | solussd: I'm ~1 year before graduation with "Abitur" (german).. I hope SCII doesn't come out before that |
| 14:57 | dysinger | hey pjstadig :) |
| 14:57 | pjstadig | hey dysinger :) |
| 14:57 | ataggart | does anyone have some info on the status (if it's being pursued at all) of providing default implementations for defprotocol/deftype |
| 14:57 | dysinger | ordnungswidrig: I am also an xmonad / (console) emacs user |
| 14:58 | the-kenny | ataggart: Look at the "new" branch in git |
| 14:58 | dysinger | guis are for teh wimps |
| 14:58 | solussd | the-kenny: you have the 'use option as meta key' option checked in Terminal.app, right? |
| 14:58 | ataggart | I have it, did soemthign get added recently? |
| 14:58 | ordnungswidrig | solussd: did you buy it with 4GB or did you upgrade yourself? |
| 14:58 | the-kenny | solussd: That's option, not CMD |
| 14:58 | the-kenny | ;) |
| 14:58 | solussd | the-kenny: I know it doesn't help you w/ the cmd key, but at least it works |
| 14:58 | solussd | yeah |
| 14:58 | dysinger | the-kenny: I just hooked up "new" to the build.clojure.org maven snapshots repo |
| 14:58 | ordnungswidrig | dysinger: if osx is a real bsd then nothing shall prevent me from using xmonad/emacs on osx as well :) |
| 14:59 | dysinger | since we have qualifiers now (thanks chouser |
| 14:59 | the-kenny | dysinger: Sounds good :) Can I use it in leiningen then? |
| 14:59 | dysinger | osx has X and you should be able to do it. |
| 14:59 | dysinger | the-kenny: yes |
| 14:59 | the-kenny | dysinger: Great! :) |
| 14:59 | dysinger | out of the box |
| 15:00 | dysinger | http://build.clojure.org/snapshots/org/clojure/clojure/1.1.0-new-SNAPSHOT/ |
| 15:01 | ordnungswidrig | emacs users: is there a clojre/paredit-mode command to pull all closing parenthesis/braces/brackets on a line? say )\n))\n]\n) to )))]) |
| 15:02 | the-kenny | mh.. looks like swank needs to be built with the new-jar too. (RestFn-Errors) |
| 15:04 | dnolen | ordnungswidri: 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:04 | ordnungswidrig | dnolen: It's not about adding but about having them nicely at the of the line |
| 15:05 | ordnungswidrig | dnolen: IMHO it's common lips stile to have sexp end with ")))))))))" |
| 15:05 | ordnungswidrig | with common lisp style I mean a common style in lisp, not a style in common lisp |
| 15:06 | fliebel | ordnungswirdig: I like )\n)\n)\n)\n)\n)\n)\n better I think… |
| 15:06 | ordnungswidrig | fliebel: whis is rather uncommon? |
| 15:06 | Chousuke | fliebel: everyone will complain at you if you use that style. |
| 15:07 | Chousuke | closing parens go on one line. :P |
| 15:07 | fliebel | I know that, but it looks a lot more readable to me... |
| 15:07 | dnolen | fliebel: you will eventually discard your errant ways ;) |
| 15:07 | Chousuke | maybe in the beginning :) |
| 15:07 | ordnungswidrig | Chousuke: in the end, indentation would be sufficient but I leave that to the haskell guys. |
| 15:08 | the-kenny | mh.. when will new be merged into master? |
| 15:08 | Chousuke | to me it just looks silly. |
| 15:08 | ordnungswidrig | Chousuke: yes, and it eats valuable screen estate! |
| 15:08 | fliebel | chousuke; you mean that you find it easier to see where a paren starts when it looks like )))))? |
| 15:08 | dnolen | the-kenny: probably not anytime soon. lots of possible breaking changes in there. |
| 15:08 | the-kenny | ordnungswidrig: I'm sure there is a no-paren-mode |
| 15:08 | Chousuke | fliebel: why would you need to see where it starts? and that's what highlight is for. |
| 15:08 | ordnungswidrig | fliebel: you editor shows you. |
| 15:09 | ordnungswidrig | the-kenny: ha, I read "no parents mode". |
| 15:09 | ordnungswidrig | the-kenny: what we all have dreamed of as teenagers... |
| 15:09 | ordnungswidrig | scary: flash-paren.el --- flash matching parens a la Zmacs |
| 15:09 | ordnungswidrig | |
| 15:10 | dnolen | the-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:10 | Chousuke | I don't think there's usually much need to see where an expression starts and ends, especially in clojure |
| 15:10 | the-kenny | dnolen: 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:10 | fliebel | ordnungswirdig: 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:11 | Chousuke | because they tend to be only one expression anyway |
| 15:11 | dnolen | the-kenny: yeah, I think most of the issues arise from the locals clearing changes. |
| 15:12 | the-kenny | dnolen: Yes, the RestFn-Stuff |
| 15:12 | ordnungswidrig | fliebel: 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:12 | the-kenny | ordnungswidrig: s/lisp/emacs/? |
| 15:12 | cemerick | dysinger: are those snapshots going to refresh automatically now? |
| 15:12 | ordnungswidrig | the-kenny: s/like lisp/like emacs/ |
| 15:12 | dysinger | cemerick: y |
| 15:13 | the-kenny | ordnungswidrig: Yes.. better regexp ;) I'm lazy |
| 15:13 | Chousuke | emacs is worth learning for lisp |
| 15:13 | cemerick | nice |
| 15:13 | the-kenny | Chousuke: Absolutely. I agree. |
| 15:13 | Chousuke | besides, it doesn't take much to get started with clojure-mode, lisp and paredit. |
| 15:13 | Chousuke | er |
| 15:13 | Chousuke | slime |
| 15:13 | ordnungswidrig | the-kenny: or better, regexing your regex: s#/#\0 like# |
| 15:13 | ordnungswidrig | Chousuke: and hl-parens |
| 15:14 | fliebel | ordnungswidrig: I like my Mac interface and my mouse, so the terminal-like, keyboard-orientated emacs is not my style I think. |
| 15:14 | Chousuke | fliebel: you can try aquamacs. |
| 15:14 | the-kenny | fliebel: You can use Aquamacs. |
| 15:14 | the-kenny | lol |
| 15:14 | Chousuke | My mouse has a broken scrollwheel and I still haven't bothered to buy a new one :P |
| 15:14 | dysinger | we actually only hire emacs lovers :P |
| 15:15 | fliebel | then I might just as well not use emacs at all... |
| 15:15 | ordnungswidrig | the-kenny: clojurebot could do the regex stuff :) |
| 15:15 | Chousuke | dysinger: to avoid editor wars, huh? |
| 15:15 | dnolen | fliebel: well It's not like VIM is much friendlier than Emacs. |
| 15:15 | cemerick | might be time to stop using internal builds, perhaps |
| 15:15 | ordnungswidrig | dysinger: this is one of the few reasonable corporate policies |
| 15:15 | the-kenny | ordnungswidrig: I wrote a bot with a functionality like this once in perl. It was annoying ;) |
| 15:15 | pjstadig | are we having an editor war? |
| 15:15 | dysinger | Chousuke: so everyone is on the same page and makes pair-programming easy |
| 15:15 | dnolen | pjstadig: no. |
| 15:15 | dnolen | VIM and Emacs are equally powerful and unfriendly. |
| 15:16 | cemerick | heh |
| 15:16 | fliebel | pistadig: not yet :P but I'm not sure how lang it can stay that way if I don't learn emacs. |
| 15:16 | pjstadig | i don't use an editor i twiddle bits using a fork and dental floss |
| 15:16 | dysinger | I use butterflies |
| 15:16 | jasapp | I prefer cat and ctrl d |
| 15:16 | Chousuke | I would like the modal interface of vim but emacs is superior because of its extensibility :/ |
| 15:16 | solussd | dnolen- 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:16 | cemerick | I wave magnets over my laptop *really fast* |
| 15:16 | pjstadig | ~suddenly |
| 15:16 | clojurebot | CLABANGO! |
| 15:17 | solussd | the-kenny: that is a terrible abuse of butterfly. |
| 15:17 | ordnungswidrig | jasapp: what about "copy con: file" |
| 15:17 | dysinger | http://xkcd.com/378/ |
| 15:17 | Chousuke | Some day there will be an emacs extension that writes code fo you without you having to do anything. |
| 15:17 | the-kenny | solussd: It's the real intention of butterfly. |
| 15:17 | devlinsf | You guys are all lame. I observe electrons :) |
| 15:17 | the-kenny | ;) |
| 15:17 | Chousuke | for* |
| 15:17 | the-kenny | Chousuke: I'm sure there is one already |
| 15:17 | jasapp | heh |
| 15:17 | dysinger | M-x butterfly ! |
| 15:18 | solussd | so what does M-x butterfly do? I hear they added it to v23 |
| 15:18 | the-kenny | solussd: Nothing interesting |
| 15:18 | the-kenny | Moves some characters and forms a sentence |
| 15:19 | fliebel | Does 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:31 | ataggart | anyone have installation instructions for the emacs-start-kit that actualy contain information on how to get the emacs-starter-kit into emacs? |
| 15:38 | _ato | ataggart: 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:39 | rfgpfeiffer | is there a continuous integration server for slime, swank-clojure and clojure itself? |
| 15:41 | chouser | rfgpfeiffer: for clojure: http://build.clojure.org/ |
| 15:47 | polypus | ataggart: you still there? |
| 15:47 | ataggart | _ato: check *what* out? the instructions say to get emacs, cd to ~, and start emacs |
| 15:47 | ataggart | polypus: yes |
| 15:48 | _ato | ataggart: checkout the emacs-starter-git with git |
| 15:48 | ataggart | to? |
| 15:48 | _ato | ~/.emacs.d as the instructions say |
| 15:48 | clojurebot | emacs is best configured for Clojure with instructions at http://technomancy.us/126 |
| 15:48 | _ato | cd ~; git clone git://github.com/technomancy/emacs-starter-kit.git .emacs.d |
| 15:48 | ataggart | the instructions don't make it clear what I'm suppoed to pull from git |
| 15:49 | ataggart | _ato: thanks, that's actually jelpful |
| 15:49 | ataggart | *helpful |
| 15:49 | _ato | "the directory containing this file" -- ie the directory containing the README file, so the whole thing ;-) |
| 15:49 | ataggart | considering I'm reading the website, the context isn't clear |
| 15:49 | _ato | okay 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:50 | ataggart | yeah |
| 15:50 | ataggart | I didn't |
| 15:51 | ataggart | plus cloneing it to ~/.emacs.d would be a good piece of info for those of us neither proficient in emacs nor git |
| 15:54 | polypus | ataggart. make sure you do not have a .emacs file. if you do rename it to ~/emacs.d/<yourusername>.el |
| 15:55 | polypus | that tripped me up at first |
| 16:04 | polypus | ~ping |
| 16:04 | clojurebot | PONG! |
| 16:06 | fliebel | Hey, where has the compile thing gone? Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/compile |
| 16:10 | fliebel | I'm trying to get vimclojure to work, but it gives: BUILD FAILED |
| 16:10 | fliebel | /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:11 | fliebel | I tried running clojure manually. clojure.main works fine, but clojure.jang.compile give this error. |
| 16:11 | fliebel | `compile |
| 16:11 | fliebel | ,`compile |
| 16:11 | clojurebot | clojure.core/compile |
| 16:11 | fliebel | that did not work either |
| 16:12 | defn | technomancy: 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:12 | hiredman | fliebel: there is no such thing |
| 16:12 | hiredman | there is a clojure.lang.Compile |
| 16:13 | fliebel | hiredman: that is what ant is looking for, but it says it can't find it. |
| 16:14 | hiredman | then it's not on ant's classpath |
| 16:14 | clojurebot | classpath is (System/getProperty "java.class.path") |
| 16:15 | fliebel | hiredman: 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:15 | technomancy | defn: it's valid atom; sounds like a bug report is in order. |
| 16:15 | defn | technomancy: nevermind found it: http://technomancy.us/feed/atom |
| 16:15 | defn | that works |
| 16:15 | saml | clojure.core/str |
| 16:15 | saml | ([] [x] [x & ys]) does this mean that str takes [] or [x] or [x & ys] ? |
| 16:15 | the-kenny | saml: Yes |
| 16:15 | saml | thanks the-kenny |
| 16:16 | saml | my first emacs copy and paste to irc |
| 16:16 | the-kenny | (str) or (str 42) or (str "abc" 42 "foobar") |
| 16:16 | defn | M-w C-y |
| 16:16 | defn | so sweet |
| 16:16 | hiredman | fliebel: what are you doing? |
| 16:16 | fliebel | compiling vimclojure |
| 16:16 | hiredman | I see |
| 16:17 | hiredman | and what are the contents of your local.properties file? |
| 16:17 | fliebel | clojure.jar = /opt/local/share/java/clojure/lib/clojure.jar |
| 16:17 | fliebel | clojure-contrib.jar = /opt/local/share/java/clojure/lib/clojure-contrib.jar |
| 16:17 | fliebel | nailgun-client = ng |
| 16:17 | fliebel | vimdir = /Users/pepijndevos/.vim |
| 16:17 | saml | how come (.toUpperCase "a") works but not (.toUpperCase \a) ? |
| 16:17 | saml | \a is primitive char not Character? |
| 16:18 | saml | (class \a) says it's java.lang.Character |
| 16:18 | the-kenny | saml: It's a static method on Character |
| 16:18 | saml | the-kenny, ah thanks |
| 16:18 | the-kenny | (Character/toUpperCase \a) |
| 16:18 | the-kenny | ,(Character/toUpperCase \a) |
| 16:18 | clojurebot | \A |
| 16:18 | saml | is upper case symbol always java class? like Character |
| 16:19 | hiredman | saml: nope |
| 16:19 | hiredman | ,'A |
| 16:19 | clojurebot | A |
| 16:19 | fliebel | hiredman: that path is confirmed to be working, i ran java -cp that-thing clojure.main |
| 16:19 | the-kenny | saml: Read the page about java interop on clojure.org |
| 16:19 | saml | alrighty |
| 16:19 | hiredman | fliebel: how are you running ant? |
| 16:19 | hiredman | do you have the local.properties file in the right place? |
| 16:20 | fliebel | well, just typing ant while in the project directory |
| 16:20 | hiredman | can you pastebin the error you get somewhere? |
| 16:21 | fliebel | hiredman: http://pastebin.com/m7c1b63ab (don't ask me why my mac is called ubuntu) |
| 16:23 | fliebel | hiredman: 2 java command with the same path: http://pastebin.com/ma5011d5 |
| 16:25 | jasapp | has anyone written a lot of c or c++ code? |
| 16:25 | the-kenny | jasapp: Here |
| 16:26 | jasapp | I've been writing in lisp for the 6 years and I haven't touched c for ages |
| 16:26 | jasapp | how do you recommend going about writing good code (functional) in c? |
| 16:27 | fliebel | hiredman: the files at least exist. Can you, or anyone else see what's wrong? |
| 16:27 | the-kenny | oh.. no idea. Sorry. I've never bothered with functional code in c |
| 16:27 | jasapp | ahh, ok |
| 16:27 | jasapp | thanks though |
| 16:28 | _ato | heh, I guess you start by implementing Clojure's data structures |
| 16:28 | _ato | (or restrict yourself to linked lists) |
| 16:28 | jasapp | who had that quote? |
| 16:29 | jasapp | every language at it's heart is a broken lisp? |
| 16:29 | jasapp | something like that |
| 16:29 | KirinDave_ | greenspun's 10th rule, I think? |
| 16:29 | stuartsierra | Greenspun's 10th Rule, yse |
| 16:29 | stuartsierra | yes |
| 16:29 | KirinDave_ | http://en.wikipedia.org/wiki/Greenspun's_Tenth_Rule |
| 16:29 | stuartsierra | It's really hard to write functional code without a garbage collector. |
| 16:30 | KirinDave_ | stuartsierra: Is it? |
| 16:30 | jasapp | kirinDave: that's it |
| 16:30 | _ato | you can get a GC library for C |
| 16:30 | _ato | I've never tried it though |
| 16:30 | KirinDave_ | 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:30 | KirinDave_ | I'm trying to remember the name. |
| 16:30 | hiredman | fliebel: I between lines 65 and 66 in build.xml can you stick <echo message="${clojure.jar}" /> |
| 16:31 | _ato | http://www.hpl.hp.com/personal/Hans_Boehm/gc/ |
| 16:31 | hiredman | 65 and 66 or there abouts |
| 16:31 | stuartsierra | KirinDave_: Forth :) |
| 16:31 | hiredman | boehm is pretty easy to use |
| 16:31 | KirinDave_ | stuartsierra: No. |
| 16:31 | clojurebot | stuartsierra is volunteering |
| 16:31 | KirinDave_ | stuartsierra: I mean, yes. But no. :) |
| 16:31 | hiredman | forth seems pretty cool |
| 16:31 | stuartsierra | clojurebot: who said that? |
| 16:31 | clojurebot | Huh? |
| 16:32 | stuartsierra | Hmph. |
| 16:32 | KirinDave_ | Not chicken... |
| 16:32 | fliebel | How do I turn on line number with MacVim :$ |
| 16:34 | the-kenny | :set lines or something like this |
| 16:34 | hiredman | fliebel: set :66 |
| 16:34 | hiredman | er |
| 16:34 | hiredman | :66 |
| 16:34 | hiredman | will put you on line 66 |
| 16:34 | fliebel | cool |
| 16:35 | rfgpfeiffer | fliebel: ask in #vim |
| 16:35 | hiredman | rfgpfeiffer: whatever |
| 16:35 | the-kenny | Oh, I thought he want to enable line numbering |
| 16:35 | hiredman | rfgpfeiffer: people ask emacs questions here all the time |
| 16:35 | chouser | :set number if you actually want to see them |
| 16:36 | rfgpfeiffer | i did not mean to offend anybody |
| 16:36 | rfgpfeiffer | i just thought most of us use emacs |
| 16:36 | micampe | set lines=66 sets the number of lines displayed |
| 16:36 | KirinDave_ | technomancy: ping? |
| 16:36 | hiredman | fliebel: around those line numbers, dunno if we are looking at exactly the same xml file |
| 16:37 | hiredman | I don't see where emacs users get off with their sense of superiority |
| 16:37 | fliebel | hiredman: It prints this now: [echo] /opt/local/share/java/clojure/lib/clojure.jar |
| 16:37 | hiredman | hmmm |
| 16:38 | fliebel | does it matter if I'm using 1.0 or 1.1 alpha? |
| 16:38 | hiredman | shouldn't |
| 16:38 | hiredman | fliebel: what version of ant are you using? |
| 16:39 | ataggart | this (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:39 | fliebel | hiredman: Apache Ant version 1.7.1 compiled on September 22 2009 |
| 16:39 | hiredman | ataggart: use epla |
| 16:39 | ataggart | that doesn't mean anything to me |
| 16:39 | hiredman | the README for swank-clojure has a link |
| 16:39 | hiredman | README.md |
| 16:40 | ataggart | ok I think I have that from the starter-kit |
| 16:40 | hiredman | ataggart: http://tromey.com/elpa/install.html |
| 16:40 | the-kenny | ataggart: package.el :) |
| 16:40 | ataggart | but I have no clue what to do |
| 16:40 | the-kenny | M-x package-list-packages |
| 16:40 | hiredman | ataggart: jsut read the instructions |
| 16:40 | hiredman | it's not rocket science |
| 16:40 | the-kenny | search for swank-clojure and clojure-mode, i and press x |
| 16:40 | ataggart | "Install from ELPA using package.el[1]." |
| 16:40 | hiredman | I did it the first time the day before yesterday |
| 16:41 | ataggart | have you used emacs before doing so? |
| 16:41 | ataggart | cuz I haven't |
| 16:41 | hiredman | nope |
| 16:41 | ataggart | well then you're just smater than me |
| 16:41 | hiredman | the readme is there |
| 16:41 | ataggart | "Install from ELPA using package.el[1]." doesn't tell me anything |
| 16:41 | hiredman | you just have to click through the links |
| 16:41 | hiredman | where it says EPLA? click on that |
| 16:42 | ataggart | there's only one link, and it's to elpa (whatever that is) and I already have it from the starter-kit |
| 16:42 | fliebel | hiredman: is version 1.7.1 fine? |
| 16:42 | ataggart | now that I "have it" I assume I need to do something |
| 16:42 | ataggart | what that something is is beyond me |
| 16:42 | hiredman | fliebel: that is what I have |
| 16:42 | hiredman | ataggart: did you click on the EPLA link? |
| 16:43 | ataggart | yes, it doesn't tell me how to install swank-clojure |
| 16:43 | the-kenny | hiredman: I think it's called "ELPA" :) |
| 16:43 | hiredman | on the install page for epla it tells you the command to open the list of packages |
| 16:43 | fliebel | hiredman: the strange thing is that I successfully compiled it this very morning, but gave up and threw it away. |
| 16:43 | ataggart | but I already have it installed |
| 16:43 | KirinDave_ | the-kenny: You were the xkcdexplained fan, right? |
| 16:43 | hiredman | ataggart: so? |
| 16:43 | the-kenny | KirinDave_: Yes |
| 16:43 | hiredman | ataggart: the instructions are on the install page |
| 16:43 | tomoj | someone already gave the instructions :) |
| 16:44 | KirinDave_ | the-kenny: Look at it. (and tell me if you can tell if I had a long, pointless meeting today or not). |
| 16:44 | ataggart | hiredman: as I said, I already have elpa from the starter-kit, so the instructions to install elpa don't help me |
| 16:44 | hiredman | ataggart: I did not say instillation instructions |
| 16:44 | hiredman | I said on the install page it has instructions |
| 16:45 | tomoj | start reading where it says "Once you have installed the package manager" :) |
| 16:45 | hiredman | it's not like I am trying to mislead you or anything |
| 16:46 | hiredman | I understand that you have it installed, and I am still telling you to look at the install page |
| 16:46 | fliebel | hiredman: I removed some whitespace, and now I got another error. |
| 16:46 | ataggart | hiedman: 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:46 | hiredman | ~xml |
| 16:46 | clojurebot | XML is like violence; if it doesn't solve your problems, you're not using enough of it. |
| 16:46 | hiredman | ataggart: yes |
| 16:46 | ataggart | what's a "package menu buffer"? |
| 16:47 | tomoj | oi |
| 16:47 | hiredman | ataggart: do you see where it says "type M-x package-list-packages"? |
| 16:47 | ataggart | yes |
| 16:47 | tomoj | it's the buffer that says "Package Menu" on it :P |
| 16:47 | hiredman | FOLLOW THE INSTRUCTIONS AND DO THAT |
| 16:47 | fliebel | hiredman: java.lang.ClassNotFoundException: clojure.contrib.pprint.PrettyWriter (pprint.clj:14) |
| 16:47 | tolstoy | Is there a good discussion about using "use" or "require" in the repl? I can never actually ever use any contrib modules. |
| 16:47 | the-kenny | KirinDave_: Looks good :) Nice and detailed explaination. |
| 16:48 | ataggart | k clearly I'm too dumb to use emcas, thanks anyway |
| 16:48 | tomoj | tolstoy: slime? |
| 16:48 | tolstoy | Nah, 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:48 | tomoj | oh, well you need to have contrib on the classpath |
| 16:48 | hiredman | fliebel: you need to aot compile your contrib |
| 16:48 | tolstoy | It is. |
| 16:49 | tomoj | then.. something's wrong |
| 16:49 | hiredman | ataggart: well emacs is dumb |
| 16:49 | fliebel | hiredman: how? It's already a jar. |
| 16:49 | hiredman | fliebel: a jar is just a zip file |
| 16:49 | tolstoy | (use [clojure.contrib.prxml]) |
| 16:49 | tolstoy | java.lang.ClassNotFoundException: clojure.contrib.prxml (NO_SOURCE_FILE:5) |
| 16:49 | tomoj | oh, heh |
| 16:49 | tomoj | on the repl you need to quote |
| 16:49 | tomoj | (use 'clojure.contrib.prxml) |
| 16:50 | tomoj | in the ns macro you don't need this because it's a macro |
| 16:50 | hiredman | fliebel: where did you get contrib from? |
| 16:50 | tolstoy | I quoted a list. Trying all the variations..... |
| 16:50 | fliebel | hiredman: macports |
| 16:50 | hiredman | fliebel: well, they did not create the jar properly |
| 16:50 | tolstoy | homebrew seems to have got installing clojure down nicely. |
| 16:51 | fliebel | hiredman: so what do I do now? unzip it and compile it somehow? |
| 16:51 | technomancy | KirinDave_: heya |
| 16:51 | KirinDave_ | technomancy: hey. I was trying to use that resources/ directory last night |
| 16:51 | Chousuke | tolstoy: (use 'clojure.contrib.prxml) |
| 16:52 | KirinDave_ | technomancy: JARs work correctly, but lein repl does not. the resources dir doesn't end up on the classpath. |
| 16:52 | hiredman | fliebel: that might actually work, but it would be easier to just grab contrib from git and follow the build isntructions |
| 16:52 | KirinDave_ | technomancy: Is that on a more forwards branch than master? |
| 16:52 | fliebel | hiredman: can't I just leave out contrib? |
| 16:53 | tomoj | ..not if you want pprint |
| 16:53 | hiredman | fliebel: maybe, vimclojure may depend on it |
| 16:54 | fliebel | it does... |
| 16:54 | technomancy | KirinDave_: it should have made it into 1.0, but it looks like you're running into a bug. =\ |
| 16:54 | fliebel | so, let's get my own contrib... |
| 16:55 | KirinDave_ | technomancy: I mean, I already have to do this manually for the swank-clojure. |
| 16:55 | tomoj | thoughts on this syntax? I don't think I like it https://gist.github.com/1f1bfe9a3a2dffe8be25 |
| 16:55 | KirinDave_ | technomancy: So it's not an overwhelming nuisance. But I thought I'd mention it to you. |
| 16:55 | KirinDave_ | And sorry if I was obnoxious yesterday. I had one of those terrible days that starts with 3 hours sleep. |
| 16:56 | technomancy | KirinDave_: 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:56 | KirinDave_ | Sure. |
| 16:57 | technomancy | that's what I get for suggesting you use something I haven't tested myself. |
| 16:57 | technomancy | "What we need more of is Science." |
| 17:00 | ordnungswidrig | good night to all... |
| 17:00 | hiredman | clojurebot: reason? |
| 17:00 | clojurebot | I don't understand. |
| 17:01 | hiredman | clojurebot: 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:01 | clojurebot | Ok. |
| 17:01 | hiredman | damn |
| 17:01 | hiredman | clojurebot: 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:01 | clojurebot | I 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:02 | hiredman | clojurebot: 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:02 | hiredman | bah, they coma bust be tripping it up |
| 17:02 | polypus | now all you have to do is implement some passion |
| 17:03 | technomancy | no, it's confused because you're trying to teach a bot to follow passion over reason. |
| 17:04 | hiredman | technomancy: I'm teaching the bot to quote Hume |
| 17:05 | technomancy | it's like that time Kirk disabled that AI by feeding it two contradictory facts |
| 17:05 | technomancy | clojurebot is probably sputtering and spewing smoke |
| 17:05 | the-kenny | clojurebot: the nest sentence is true |
| 17:05 | hiredman | (first time I've ever been compared to Kirk) |
| 17:05 | the-kenny | clojurebot: the previous sentence is false |
| 17:05 | clojurebot | clojurebot has a lot of features |
| 17:05 | clojurebot | 'Sea, mhuise. |
| 17:05 | clojurebot | Roger. |
| 17:05 | technomancy | hiredman: with any luck it won't be the last |
| 17:05 | the-kenny | damn, typo |
| 17:05 | hiredman | clojurebot's fuzzy matcher is spining |
| 17:07 | fliebel | hiredman: another error: java.io.FileNotFoundException: Could not locate clojure/contrib/pprint__init.class or clojure/contrib/pprint.clj on classpath: (util.clj:23) |
| 17:07 | hiredman | from where? |
| 17:07 | hiredman | still from vimclojure? |
| 17:07 | fliebel | yea |
| 17:07 | hiredman | did you rebuild contrib? |
| 17:07 | hiredman | and follow the directions? |
| 17:08 | fliebel | yep… I think so at leas, but apparently not. |
| 17:08 | hiredman | how did you build contrib? |
| 17:08 | hiredman | (did you see and read the WARNING?) |
| 17:08 | fliebel | which warning? |
| 17:08 | hiredman | the one it prints out when you don't do it right |
| 17:09 | hiredman | when you run ant |
| 17:10 | fliebel | http://pastebin.com/m65abeb0a |
| 17:11 | hiredman | which version of clojure do you have? |
| 17:11 | fliebel | 1.0 I think… one moment |
| 17:11 | hiredman | if you have 1.0 then you need the 1.0 compat branch of contrib |
| 17:11 | fliebel | I did that... |
| 17:11 | hiredman | are you sure? |
| 17:11 | fliebel | at least i thought i was doing that... |
| 17:11 | fliebel | I went to that branch and clicked donwload |
| 17:11 | hiredman | because that stacktrace says you don't |
| 17:12 | hiredman | github doesn't do that |
| 17:12 | hiredman | the download always grabs a tarball of master |
| 17:12 | fliebel | oh :S so how do i get the 1.0 version? |
| 17:12 | hiredman | http://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.0-SNAPSHOT/ these might work |
| 17:13 | hiredman | dunno if they are aot'ed properly for pprint |
| 17:13 | tomoj | fliebel: don't know git? |
| 17:13 | fliebel | tomoj: not really, could try to do it... |
| 17:13 | tomoj | not too bad to install on mac |
| 17:14 | fliebel | I did already, at least runnign git gives me some usage info |
| 17:14 | tomoj | then you just git clone git://github.com/richhickey/clojure && git checkout 1.0.x |
| 17:14 | tomoj | or something like that |
| 17:14 | tomoj | with a cd into the new clojure directory in between... |
| 17:15 | tomoj | oh, and with contrib instead of clojure :) |
| 17:15 | fliebel | uuuhm… how about git clone git://github.com/richhickey/clojure-contrib/tree/clojure-1.0-compatible |
| 17:15 | tomoj | I doubt that will work |
| 17:16 | defn | clone the repo and then checkout the branch you want |
| 17:17 | fliebel | git clone git://github.com/richhickey/clojure-contrib.git and now? |
| 17:17 | fliebel | git checkout …. |
| 17:18 | tomoj | perhaps: cd clojure-contrib; git checkout origin/clojure-1.0-compatible |
| 17:18 | stuartsierra | The checkout command you want is like this: |
| 17:18 | stuartsierra | git checkout -b clojure-1.0-compatible --track origin/clojure-1.0-compatible |
| 17:19 | hiredman | :| |
| 17:19 | hiredman | does anyone know if build.clojure.org builds the contrib jars with -Dclojure.jar=... |
| 17:19 | fliebel | Switched to a new branch 'clojure-1.0-compatible' |
| 17:20 | tomoj | you should be good to compile now |
| 17:20 | fliebel | no errors this time…. |
| 17:20 | technomancy | hiredman: ant nightly-build -Dclojure.jar=/var/lib/hudson/jobs/clojure/workspace/clojure.jar |
| 17:21 | tomoj | did you use the -Dclojure.jar stuff? |
| 17:21 | technomancy | is what's being used. that path could be wrong though |
| 17:21 | fliebel | sure... |
| 17:21 | fliebel | (what is the -slim.jar) |
| 17:21 | defn | god i need to figure out how to package stuff -- ive been REPL'ing for too long |
| 17:21 | hiredman | technomancy: neat! |
| 17:22 | defn | leiningen has me closer, but im still sort of confused by the directory structure, what goes where |
| 17:22 | polypus | defn: i just went through that yesterday |
| 17:22 | fliebel | IT WORKED! Thank you all! Now for the rest of the installation… *wishes to go to bed* |
| 17:23 | defn | http://zef.me/2470/building-clojure-projects-with-leiningen |
| 17:23 | defn | that's better -- would be nice to know how to use resources/ properly though |
| 17:24 | technomancy | defn: that feature is a week old and still buggy... just put stuff in src/ for now |
| 17:24 | defn | even other source? like public/stylsheets/blah.css? |
| 17:24 | defn | sort of "support" src |
| 17:26 | technomancy | yes, resources is broken right now, so you have to either use src/ or fix lein. =) |
| 17:28 | fliebel | after running ant install, where should vimclojure.jar be located? |
| 17:29 | hiredman | I think it puts it in the vim directory, but I always did the install stuff manually |
| 17:30 | fliebel | hiredman: Only vimclojure.vim there. I did find a vimclojure.jar in the build directory... |
| 17:30 | defn | how 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:31 | defn | that's a really convoluted question, bear with me |
| 17:31 | the-kenny | defn: namespaces, (:use) and leiningen :) |
| 17:31 | fliebel | hiredman: do I need to start that server every time? |
| 17:31 | micampe | so is vimclojure preferred over slimv? |
| 17:31 | hiredman | I don't use the nailgun server stuff |
| 17:32 | hiredman | I use slime.vim |
| 17:32 | defn | the-kenny: like client.clj: (ns client (:use server)), server.clj: (ns server (:use client))? |
| 17:32 | the-kenny | defn: That's not very beautiful in my opinion - cyclical dependencies |
| 17:32 | fliebel | hiredman: I'd like to know about that tomorrow, for now I'm just going to try to get this working. |
| 17:32 | the-kenny | a depends on b and b depends on a |
| 17:32 | ataggart | defn: also namespaces need to have more than one segment |
| 17:32 | clojurebot | namespaces 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:33 | hiredman | ~botsnack |
| 17:33 | clojurebot | thanks; that was delicious. (nom nom nom) |
| 17:33 | hiredman | that was a 1/200 shot |
| 17:34 | defn | ataggart: like (ns application.client (:use server))? |
| 17:34 | ataggart | defn: more like (ns application.client (:use application.server)) |
| 17:35 | defn | ataggart: how would you rewrite my code above? is that what you'd do? |
| 17:35 | ataggart | defn: personally, I'd write it like: (ns application.client [:use application.server]) |
| 17:35 | fliebel | hiredman: where is my ng client located? is that the same as the jar? |
| 17:36 | defn | ataggart: thanks for that |
| 17:36 | ataggart | jdefn: as I prefer not to use unquoted parens outside of a function call. |
| 17:36 | hiredman | fliebel: no idea |
| 17:36 | hiredman | if you watch ant run it is pretty verbose |
| 17:37 | fliebel | hiredman: I love spotlight.... |
| 17:37 | fliebel | hiredman: in macvim .vimrc is called .mvimrc, right? |
| 17:38 | hiredman | never used macvim |
| 17:38 | defn | fliebel: i dont see why it wouldnt just use vimrc |
| 17:38 | micampe | fliebel: no, macvim uses .vimrc |
| 17:39 | micampe | and .gvimrc |
| 17:39 | fliebel | i see, thanks |
| 17:42 | fliebel | "what a beautiful mess, this is" — Jack Johnson (rainbow parens) |
| 17:42 | fliebel | but at least it's working! |
| 17:43 | hiredman | I love rainbow parens |
| 17:44 | fliebel | yea, kind of helps when you see )))))) |
| 17:44 | hiredman | but I am learning emacs at the moment, and no one can tell me how to turn them |
| 17:44 | hiredman | on |
| 17:44 | technomancy | isn't it distracting? I have my parens set to nearly-imperceptible grey |
| 17:44 | defn | do you always use (:gen-class)/ |
| 17:44 | defn | ? |
| 17:44 | hiredman | defn: never |
| 17:44 | hiredman | unless I need to |
| 17:44 | tomoj | I also have my parens almost invisible |
| 17:44 | hiredman | if you don't know, you don't need to |
| 17:44 | tomoj | but I occasionally find myself trying to pick out the right one in a series of ))))) |
| 17:44 | hiredman | technomancy: nope, it's festive |
| 17:44 | defn | some of the examples ive seen for building a basic hello world application with leiningen show (:gen-class) |
| 17:45 | hiredman | and clojure-mode's syntax highlighting is rather bland compared to what vimclojure offers |
| 17:45 | hiredman | defn: so? |
| 17:45 | technomancy | hiredman: like you'd prefer more interesting colors, or it's just not highlighting as many terms? |
| 17:45 | defn | hiredman: i dont really understand what it does |
| 17:46 | fliebel | hiredman: so vimclojure is actually quite good? |
| 17:46 | hiredman | technomancy: it's not highlighting as many terms |
| 17:46 | hiredman | fliebel: yes |
| 17:46 | defn | the doc for gen-class is huge, so i was wondering if someone could sum up why you'd use it |
| 17:46 | fliebel | hiredman: sometimes I almost feel ashamed for not using emacs :D |
| 17:46 | hiredman | well, don't |
| 17:46 | tomoj | huh, is 1.1 almost upon us? |
| 17:46 | hiredman | emacs puts its pants on just like everybody else |
| 17:47 | technomancy | hiredman: the list of core vars is circa pre-1.0; it could use a refresh. |
| 17:47 | defn | only it does it with lisp |
| 17:47 | defn | Emacs: "I'm putting my panths on" |
| 17:50 | hiredman | http://www.thelastcitadel.com/images/vim.jpg |
| 17:50 | opqdonut | gah, jpeg |
| 17:50 | opqdonut | i was about to criticize your fonts |
| 17:50 | hiredman | :P |
| 17:51 | fliebel | hiredman: what is this? |
| 17:51 | hiredman | anyway, this in the office on windows in putty |
| 17:51 | hiredman | this is vim, in putty, with vimclojure looking at core.clj |
| 17:51 | defn | technomancy: what's the way to force indentation with RET instead of hitting C-j every time? |
| 17:51 | hiredman | vim tabs across the top, screen tabs across the bottom |
| 17:52 | defn | specifically in clojure-mode |
| 17:54 | fliebel | this is mine now: http://img.ly/gew |
| 17:55 | micampe | fliebel: set go-=T |
| 17:55 | fliebel | micampe: what? |
| 17:56 | micampe | use it to get rid of the useless toolbar |
| 17:56 | mtm | fliebel: sort an angry fruit salad :) |
| 17:56 | hiredman | http://gist.github.com/252269 <-- laboriously written in emacs |
| 17:56 | fliebel | micampe: which useless toolbar? |
| 17:57 | micampe | vim's |
| 17:57 | tomoj | hiredman: using paredit, right? |
| 17:57 | hiredman | micampe: it might not be useless for him yet |
| 17:57 | hiredman | tomoj: yes |
| 17:57 | hiredman | minus the times I some how lost a paren then paredit wouldn't let me add it back in |
| 17:57 | fliebel | micampe & hiredman: If you mean the open and save thing… as soon as I learn some command, okay? |
| 17:57 | chouser | ouch |
| 17:58 | tomoj | that used to happed to me, I think my upgrade of paredit fixed it |
| 17:58 | tomoj | _something_ fixed it anyway |
| 17:58 | Chousuke | C-q ) |
| 17:58 | hiredman | I know |
| 17:59 | hiredman | anyway, it's an editor |
| 17:59 | _mst | Chousuke: 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:59 | fliebel | micampe: I can also use the oval in the right top corner to show and hide that toolbar. |
| 17:59 | _mst | it's reminiscent of that XKCD comic where a fledgling lisp programmer was given his father's parens :P |
| 17:59 | Chousuke | :P |
| 18:00 | Chousuke | hiredman: anyway, looks pretty neat. |
| 18:00 | hiredman | Yes |
| 18:00 | micampe | fliebel: yes, but that wouldn't stick. while my command in .vimrc would. |
| 18:00 | ataggart | http://xkcd.com/297/ |
| 18:00 | hiredman | the macros really need to be cleaned up |
| 18:00 | fliebel | Thanks once more, I'm gone for now :) |
| 18:00 | micampe | I think I could retype http-agent from memory. I am trying to build something analogous around a socket. |
| 18:01 | hiredman | macros calling macros is bad, macros calling helper functions is good |
| 18:02 | micampe | but I just can't see how in/out streams would/should work |
| 18:03 | hiredman | micampe: one option is to treat it like an agent |
| 18:03 | hiredman | which I imagine is sort of how http-agent works, but I've never used it |
| 18:04 | micampe | yes, that's how I did it |
| 18:04 | micampe | but now I'm stuck trying to do input/output |
| 18:05 | micampe | basically, I am trying to write a client for KirinDave's chat server |
| 18:05 | hiredman | that 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:07 | lisppaste8 | micampe pasted "socket-agent" at http://paste.lisp.org/display/91838 |
| 18:12 | hiredman | :| |
| 18:12 | hiredman | I don't use duck-streams |
| 18:12 | hiredman | wouldn't |
| 18:12 | micampe | I 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:12 | micampe | why not? looks simple and easy to me |
| 18:13 | hiredman | only works for character streams |
| 18:13 | micampe | yes, it's enough for this experiment |
| 18:13 | hiredman | there was a recent commit that added a socket-reader or some such |
| 18:14 | micampe | oh. let me see. |
| 18:15 | micampe | ah yes, I have that |
| 18:44 | PrinceOfA | hi, i just started to study clojure. how do i use the contrib libs? |
| 18:46 | hiredman | but the jar on your classpath |
| 18:46 | clojurebot | classpath is (System/getProperty "java.class.path") |
| 18:46 | dnolen | PrinceOfA: how are you using clojure? What evironment are you using? |
| 18:47 | PrinceOfA | i'm on os x. i installed clojure via macports |
| 18:47 | dnolen | so you're just using it at the command line PrinceOfA? |
| 18:47 | PrinceOfA | dnolen: yes |
| 18:49 | PrinceOfA | say i need str-utils |
| 18:49 | PrinceOfA | i found the api in http://richhickey.github.com/clojure-contrib/str-utils-api.html |
| 18:49 | dnolen | PrinceOfA: 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:50 | dnolen | PrinceOfA: how do you start your REPL? |
| 18:50 | PrinceOfA | with "clj" |
| 18:51 | PrinceOfA | which clj says /opt/local/bin/clj |
| 18:52 | dnolen | well does the clj shell script mention clojure-contrib? |
| 18:53 | liebke | just type (use 'clojure.contrib.str-utils) at the repl. If it returns nil, you have clojure.contrib on your classpath |
| 18:54 | PrinceOfA | no it does not :( |
| 18:55 | PrinceOfA | str-utils is not on the classpath |
| 18:55 | PrinceOfA | is there a clever way off adding libs or just manually build contrib jars etc? |
| 18:56 | hiredman | adding libs and building jars are completely different things |
| 18:56 | hiredman | you have clojure-contrib.jar? |
| 18:59 | PrinceOfA | hiredman: no i haven't |
| 19:02 | hiredman | then you should get it |
| 19:02 | PrinceOfA | where can i get it? |
| 19:02 | hiredman | what version of clojure are you running? |
| 19:03 | PrinceOfA | 1.0.0. |
| 19:05 | hiredman | http://build.clojure.org/snapshots/org/clojure/clojure-contrib/1.0-SNAPSHOT/clojure-contrib-1.0-20091208.130239-27.jar |
| 19:16 | defn | what does (ns mynamespace (:gen-class)) do? |
| 19:16 | defn | the gen-class portion specifically |
| 19:17 | Chousuke | defn: it means there will be a named class generated corresponding to the namespace. |
| 19:17 | Chousuke | defn: and you can define java methods in your code. |
| 19:17 | defn | ah-ha |
| 19:17 | defn | without it i can still compile a jar right? |
| 19:18 | defn | i keep seeing this hello-world example with leiningen that use :gen-class |
| 19:18 | defn | i dont really see the point |
| 19:19 | hiredman | a jar is not compiled |
| 19:19 | hiredman | a jar is just a zipfile |
| 19:19 | defn | ah ok |
| 19:19 | Chousuke | defn: it's mainly an interop construct. |
| 19:20 | hiredman | java happens to treat jars files as directories |
| 19:23 | defn | Chousuke: hiredman: thanks |
| 19:24 | hiredman | java happens to treat jars on the classpath as directories |
| 19:24 | hiredman | ahem |
| 20:01 | tolstoy | How do people work with slime/emacs as far as class path libs go. |
| 20:01 | tolstoy | Is there a function that loads JARs or updates the classpath dynamically? |
| 20:02 | tolstoy | Surely, you don't have to have a hardcoded CLASSPATH in your environment before starting emacs.... |
| 20:03 | mee | I'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:06 | technomancy | tolstoy: you have to restart your instance if you want to change your classpath. sad but true. (but it's easy to do) |
| 20:06 | technomancy | but the classpath is calculated dynamically by M-x swank-clojure-project; it's not hardcoded |
| 20:08 | slyrus | tolstoy: yes, this has been driving me crazy too... |
| 20:09 | tolstoy | Yeah, I'm not a fan of conflating project level dependencies in my generic shell environment. |
| 20:09 | twbray | Tuning concurrent Clojure: http://www.tbray.org/ongoing/When/200x/2009/12/08/WF-Tuning-Clojure |
| 20:10 | technomancy | twbray: I was hoping for a "On Baked Potatoes 2" post, but that looks interesting too. =) |
| 20:10 | tolstoy | twbray: Hah. I was JUST looking at your site to see if you'd posted that yet. |
| 20:11 | lghtng | im really enjoying all this stuff on clojure, thanks bunches |
| 20:12 | lghtng | just bought Programming Clojure and am watching the videos, this is all just so fantastic, ive been waiting years for this |
| 20:19 | Luyt | Yes, and the best way to learn a new language is to get your feet wet with it. |
| 20:27 | patrkris | anybody here capable of answering compojure questions? |
| 20:27 | patrkris | regarding route patterns |
| 20:36 | lghtng | i've spent the last couple nights getting emacs eclipse slime, etc all setup |
| 20:37 | lghtng | only 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:39 | lghtng | i 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:40 | lghtng | the socket-agent snippet that was posted to lisppaste caught my eye, so i logged in here hoping to catch the author |
| 20:42 | tolstoy | coming from lisp, I wish there was a better error message when I forget to use [ instead of ( for the lambda list. ;) |
| 20:42 | tolstoy | But I'm getting used to it! |
| 21:00 | hiredman | I didn't change anything and suddenly slime seems to have forgotten how to work |
| 21:02 | hiredman | "Polling /tmp/slime.65055.. (Abort with `M-x slime-abort-connection'.)" |
| 21:02 | hiredman | *no slime* |
| 21:02 | hiredman | the java process is started |
| 21:03 | hiredman | and this persists across emacs restarts |
| 21:05 | hiredman | no hints? advice? |
| 21:05 | hiredman | (no completion joy yet either) |
| 21:07 | Chousuke | slime-restart-inferior-lisp usually works for me but... hm. |
| 21:09 | hiredman | ah there, it just wanted me to wait five minutes |
| 21:09 | cp2 | hiredman: how goes your classloader adventures? |
| 21:10 | hiredman | I've done nothing all day |
| 21:11 | hiredman | I 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:11 | defn | hmf, havent seen that syntax used in awhile: for i <- 0:15 do |
| 21:12 | cp2 | mm, sounds a bit like my days... |
| 21:13 | hiredman | code from http://www.emacswiki.org/emacs/TabCompletion seems to be completely useless |
| 21:13 | hiredman | no joy |
| 21:13 | defn | have you tried autocomplete? |
| 21:14 | hiredman | looks like it completes based on a list of symbols |
| 21:14 | hiredman | I just want to hit tab and have the editor fill in based on words/symbols in open buffers |
| 21:16 | defn | technomancy has hippie-expand |
| 21:16 | hiredman | no wonder the autocomplete page looks familiar |
| 21:16 | hiredman | I already have it in .emacs.el |
| 21:16 | hiredman | hippie-expand apparently ships with emacs |
| 21:17 | defn | yeah i didnt know that |
| 21:17 | defn | do you have it set to a hotkey? |
| 21:17 | defn | i use it a lot |
| 21:19 | defn | hiredman: 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:19 | defn | im 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:20 | hiredman | I have a few pieces of code from the emacs wiki that claim to set up tab to both use hippieexpand and indent |
| 21:20 | defn | that just sounds weird |
| 21:20 | defn | hiredman: if you do find a nice expansion setup other than using hippie, id be interested to know about it |
| 21:20 | hiredman | wtf |
| 21:20 | hiredman | ok |
| 21:21 | somnium | has anyone consolidated all the slime expansions with smart-tab et-all? |
| 21:21 | hiredman | now I am getting a weird completion menu thing in elisp buffers, but nothing in clojure buffers |
| 21:22 | somnium | Ive got tab in repl, C-tab in clojure mode, and M-/ for hippie |
| 21:23 | interferon | once i create a future with (future ....) does it start computing immediately? |
| 21:23 | hiredman | I have smart-tab, and it does nothing |
| 21:23 | hiredman | interferon: yes |
| 21:23 | interferon | thanks! |
| 21:23 | defn | how do you get clojure to auto-indent on RET |
| 21:23 | defn | instead of C-j |
| 21:28 | interferon | in CL, i can do (cond ((accessor blah)) ..) and then if (accessor blah) is non-nil, the cond evaluates to that variable |
| 21:28 | interferon | is that impossible with clojure cond? |
| 21:28 | somnium | hiredman: smart-tab works for me for most modes, but need to set special bindings for clojure/slime/sime-repl buffers it seems :/ |
| 21:28 | interferon | (also, do you pronounce it CLOH-zhur or cloh-ZHOOR?) |
| 21:29 | hiredman | ,(cond 1 :foo) |
| 21:29 | clojurebot | :foo |
| 21:29 | lghtng | CLOH-zhur |
| 21:29 | hiredman | ,(cond nil :foo) |
| 21:29 | clojurebot | nil |
| 21:29 | hiredman | ,(cond nil :foo :else 1) |
| 21:29 | clojurebot | 1 |
| 21:30 | arohner | interferon: cond only takes an even number of forms |
| 21:30 | cp2 | interferon: like 'closure' |
| 21:30 | lghtng | ,(find-doc cond) |
| 21:30 | clojurebot | java.lang.Exception: Can't take value of a macro: #'clojure.core/cond |
| 21:30 | cp2 | just with a j :) |
| 21:30 | interferon | i think i'm pronouncing it more french |
| 21:31 | hiredman | ,(doc cond) |
| 21:31 | clojurebot | "([& 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:31 | arohner | though you might want to look at condp |
| 21:31 | lghtng | that was my next guess |
| 21:31 | lghtng | is clojurebot released anywhere? |
| 21:31 | hiredman | clojurebot: where are you? |
| 21:31 | clojurebot | http://github.com/hiredman/clojurebot/tree/master |
| 21:32 | JAS415 | clojurebot: who is your daddy? |
| 21:32 | clojurebot | Gabh mo leithscéal? |
| 21:32 | JAS415 | hmm |
| 21:32 | interferon | the combination of git, slime, and clojure is quite comfortable |
| 21:40 | lghtng | ,(get-tweets clojure) |
| 21:40 | clojurebot | java.lang.Exception: Unable to resolve symbol: get-tweets in this context |
| 21:42 | lghtng | ,(hiredman/get-tweets clojure) |
| 21:42 | clojurebot | java.lang.Exception: No such namespace: hiredman |
| 21:43 | lghtng | ,(doc tweet) |
| 21:43 | clojurebot | Huh? |
| 21:43 | lghtng | ,(find-doc tweet) |
| 21:43 | clojurebot | java.lang.Exception: Unable to resolve symbol: tweet in this context |
| 21:43 | JAS415 | ,(all-ns) |
| 21:43 | clojurebot | (#<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:45 | JAS415 | ,(ns-publics hiredman.sandbox) |
| 21:45 | clojurebot | java.lang.ClassNotFoundException: hiredman.sandbox |
| 21:45 | JAS415 | ,(ns-publics 'hiredman.sandbox) |
| 21:45 | clojurebot | {*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:46 | lghtng | a macro to send stuff to lisppaste |
| 21:46 | lghtng | or a function, rather |
| 21:46 | hiredman | clojurebot: paste? |
| 21:46 | clojurebot | lisppaste8, url |
| 21:46 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 21:47 | JAS415 | everyone should have a clojurebot |
| 21:47 | JAS415 | it would be cool to integrate it with slime |
| 21:47 | hiredman | I do |
| 21:48 | hiredman | (add-hook 'clojure-mode-hook (lambda () (auto-complete-mode t))) |
| 21:48 | hiredman | is that how that is supposed to work? |
| 21:48 | lghtng | ,(get-latest-tweets clojurebot clojure #clojure) |
| 21:48 | clojurebot | No dispatch macro for: c |
| 21:49 | hiredman | lghtng: clojurebot used to, long ago, dump recent clojure tweets into the channel |
| 21:49 | lghtng | spammy? |
| 21:49 | hiredman | yes |
| 21:49 | lghtng | figures |
| 21:49 | hiredman | and clojurebot used to tweet clojure commits |
| 21:49 | hiredman | I need to figure out why it stopped sending commits to irc |
| 21:50 | hiredman | (except at start up when it dumps them all) |
| 21:50 | lghtng | ,(google clojure into) |
| 21:50 | clojurebot | java.lang.Exception: Unable to resolve symbol: google in this context |
| 21:51 | hiredman | ~google clojure |
| 21:51 | clojurebot | First, out of 53400 results is: |
| 21:51 | clojurebot | Clojure - home |
| 21:51 | clojurebot | http://clojure.org/ |
| 21:51 | hiredman | ~def into |
| 21:52 | lghtng | ah |
| 21:53 | djork | anybody here playing with VisualVM? |
| 21:53 | djork | also, tbray's new article is pretty interesting |
| 21:53 | djork | has it been discussed here? |
| 21:53 | djork | http://www.tbray.org/ongoing/When/200x/2009/12/08/WF-Tuning-Clojure |
| 21:53 | lghtng | ,(process-commits) |
| 21:53 | clojurebot | java.lang.Exception: Unable to resolve symbol: process-commits in this context |
| 21:54 | lghtng | ,(hiredman.sandbox/process-commits) |
| 21:54 | clojurebot | java.lang.Exception: No such var: hiredman.sandbox/process-commits |
| 21:54 | lghtng | i obviously am missing a step here |
| 21:55 | lghtng | ,(var process-commits) |
| 21:55 | clojurebot | java.lang.Exception: Unable to resolve var: process-commits in this context |
| 21:58 | lghtng | clojurebot: What do you mean when you say Unable to resolve var, and how does that relate to First, out of? |
| 22:02 | hiredman | lghtng: not user accesable code |
| 22:04 | hiredman | seriously, what do I set to get auto-complete-mode always run for a clojure-mode buffer? |
| 22:04 | alexyk | how do I specify heap space like -Xmx2g with lein? |
| 22:09 | alexyk | or, are you supposed to use JAVA_OPTS in the environment? |
| 22:11 | _mst | hiredman: 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:13 | hiredman | ah |
| 22:13 | hiredman | I don't have the require for clojure-mode |
| 22:16 | alexyk | is there a way to limit printing of a large map in repl? |
| 22:17 | _mst | ah, 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:18 | alexyk | lein doesn't respect JAVA_OPTS. |
| 22:18 | alexyk | no respect at all, it seems |
| 22:19 | hiredman | _mst: it doesn't |
| 22:20 | hiredman | (make a difference) |
| 22:21 | somnium | hiredman: what does auto-complete-mode do? it may conflict with key-bindings in clojure mode |
| 22:21 | _mst | hm, 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:22 | hiredman | somnium: it works if I just turn in ot |
| 22:22 | hiredman | on |
| 22:22 | somnium | hmm |
| 22:22 | hiredman | no keybinding, it just pops up a list of possible completions while I type, which is an acceptable substitute for hitting tab (so far) |
| 22:24 | hiredman | run-hooks does turn on ac |
| 22:24 | hiredman | grrr |
| 22:25 | alexyk | technomancy: ping |
| 22:27 | _mst | annoying. and M-: major-mode RET yields clojure-mode? Does re-evaluating (clojure-mode) from within that buffer enable it too? |
| 22:27 | _mst | I wonder if the mode is erroring before it runs the hook or something |
| 22:30 | hiredman | evaling (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 | _mst | hm, so the hook's being evaluated... |
| 22:31 | hiredman | is it? if it was wouldn't re-evaling (clojure-mode) again turn ac on? |
| 22:32 | _mst | ah sorry, I misunderstood... you mean re-evaling (clojure-mode) toggles clojure-mode on and off but has no effect on ac? |
| 22:33 | hiredman | (clojure-mode) turns ac of if ac is on, but has no other effect not matter how many times I re-eval it |
| 22:34 | hiredman | is there a difference between run-mode-hooks and run-hooks? |
| 22:34 | hiredman | run-mode-hooks is how clojure-mode is calling the hook |
| 22:35 | hiredman | doesn't appear to have a revelant difference |
| 22:37 | _mst | yeah, it looks like in your case it should just fall through to a regular run-hooks anyway |
| 22:39 | hiredman | gah |
| 22:40 | hiredman | it enables paredit-mode if I replace auto-complete-mode in the add-hook |
| 22:40 | hiredman | GAH |
| 22:40 | _mst | one 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 | _mst | hm. if you M-: clojure-mode-hook is there anything else besides your entry? |
| 22:41 | hiredman | nope |
| 22:44 | hiredman | if 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:44 | hiredman | this must have something to do with ac |
| 22:44 | _mst | yeah, it's looking that way... just digging through the .el now |
| 22:44 | hiredman | except I don't understand why ac works if I start the mode manually |
| 22:45 | hiredman | M-x auto-complete-mode or M-: (auto-complete-mode t) |
| 22:46 | alexyk | how do you write: (map #(% 1) (take 10 reps)) ; in (-> ...) form, left to right? |
| 22:47 | hiredman | (->> reps (take 10) (map #(% 1))) |
| 22:47 | hiredman | (-> reps ((partial take 10)) ((partial map #(% 1)))) |
| 22:49 | hiredman | hmmm |
| 22:49 | _mst | hm, I notice AC defines itself as a global minor mode |
| 22:50 | hiredman | looks like maybe you are supposed to add the name of modes you want to use ac in to ac-modes |
| 22:50 | _mst | so it defines a predicate which gets handed every buffer you open, and can selectively enable itself for those buffers |
| 22:50 | _mst | yeah, that :) |
| 22:50 | arohner | it appears the definition of my macros aren't changing, after a C-c C-l |
| 22:50 | arohner | is that expected? |
| 22:51 | _mst | so maybe just (add-to-list 'ac-modes 'clojure-mode) and forget about the hook |
| 22:53 | hiredman | ahhh |
| 22:53 | hiredman | excellent |
| 22:53 | hiredman | _mst: thanks! |
| 22:54 | JAS415 | ~lisppaste |
| 22:54 | clojurebot | No entiendo |
| 22:54 | hiredman | clojurebot: lisppaste is <reply>lisppaste8: url |
| 22:54 | clojurebot | c'est bon! |
| 22:54 | _mst | no worries. That seemed unnecessarily painful :) |
| 22:54 | hiredman | you don't have to tell me that |
| 22:55 | _mst | heheh just didn't want to give the impression that emacs always sucks quite that badly ;) |
| 22:55 | defn | How do I turn on paredit-mode by default for .clj docs? |
| 22:56 | hiredman | (add-hook 'clojure-mode '(lambda () (paredit-mode t))) |
| 22:56 | lisppaste8 | JAS415 pasted "Why do I suck so badly" at http://paste.lisp.org/display/91854 |
| 22:56 | defn | hiredman: thanks |
| 22:56 | JAS415 | it runs very... slowly |
| 22:56 | hiredman | the lisppaste webserver is down |
| 22:56 | JAS415 | ah damn |
| 22:57 | JAS415 | wait really? |
| 22:57 | JAS415 | i just connected to it |
| 22:57 | hiredman | gah, now it works for me |
| 22:59 | alexyk | hiredman: so ->> does partial for us? are -> and ->> effective enought compared to (f (g (h ... x))) forms? |
| 23:01 | arbscht | JAS415: set-sort-fn is not idiomatic. you probably want to use binding on a var, rather than redefining |
| 23:02 | JAS415 | i'm not sure that it would be visible in all of the threads then? |
| 23:02 | JAS415 | maybe 2 bindings |
| 23:02 | arbscht | JAS415: then use a ref or possibly even an atom |
| 23:07 | arbscht | JAS415: actually, you can probably parameterize on sort-fn, since you know it before launching your threads |
| 23:08 | JAS415 | oh, like pass it through all of the layers? |
| 23:09 | arbscht | pass it to the new thread, at least, and maybe let it rebind a var |
| 23:10 | arbscht | defprocess could take an arg for sort-fn use binding |
| 23:10 | JAS415 | oh ok |
| 23:10 | arbscht | incidentally, you should probably rename defprocess to make-process or something, since it's not really defining anything at the top level |
| 23:10 | JAS415 | yeah that is a good call |
| 23:17 | hiredman | alexyk: ->> puts the form at the end of the next form |
| 23:18 | hiredman | ,(macroexpand-1 '(->> x (a b c))) |
| 23:18 | clojurebot | (a b c x) |
| 23:18 | hiredman | ,(macroexpand-1 '(-> x (a b c))) |
| 23:18 | clojurebot | (a x b c) |
| 23:18 | hiredman | ,(macroexpand-1 '(-> x (map a))) |
| 23:18 | clojurebot | (map x a) |
| 23:18 | hiredman | :( |
| 23:18 | hiredman | ,(macroexpand-1 '(->> x (map a))) |
| 23:18 | clojurebot | (map a x) |
| 23:18 | hiredman | :) |
| 23:18 | JAS415 | I'm not sure that that gets me anywhere with "I killed a 3ghz computer running at 800Mhz with it tonight," however :-/ |
| 23:19 | JAS415 | not killed but mortally wounded |
| 23:19 | hiredman | that is a lot of code the look through |
| 23:20 | JAS415 | I don't expect you to, its also quite convoluted |
| 23:20 | JAS415 | I appreciate the style comments, however |
| 23:28 | arohner | a line I just wrote: (alter my-ref update-in [:foo] conj val) |
| 23:28 | arohner | just figured out how cool it is to chain functions like that |
| 23:28 | arohner | I feel like I've leveled-up in clojure |
| 23:28 | hiredman | :D |
| 23:29 | alexyk | hiredman: ->> does it at compile time? i.e. macros are not wasting any efficiency? |
| 23:29 | hiredman | alexyk: -> and ->> are both macros |
| 23:29 | clojurebot | Barking spiders! |
| 23:29 | hiredman | macros are expanded before compilation |
| 23:29 | chouser | haha |
| 23:29 | hiredman | or durring, or something |
| 23:29 | alexyk | hiredman: so the final code is as fast as (f (g ... x))? |
| 23:29 | chouser | barking? |
| 23:29 | hiredman | yep |
| 23:29 | somnium | ,(macroexpand '(->> (range 5) (map inc) (map inc))) |
| 23:29 | clojurebot | (map inc (clojure.core/->> (range 5) (map inc))) |
| 23:29 | alexyk | cool |
| 23:29 | hiredman | (to both of you) |
| 23:30 | somnium | I think ->> has become my favorite macro |
| 23:30 | alexyk | somnium: is there a "recursive" macroexpand? until no stone is left unturned? |
| 23:31 | alexyk | ->> is Unix's | and F#'s |> |
| 23:31 | hiredman | so I have auto-completion, paredit, and highlight-parentheses enabled automatically in emacs-lisp-mode and clojure-mode |
| 23:31 | hiredman | lets not forget about -> |
| 23:31 | somnium | yeah, the compiler keeps evaluating until no macros left |
| 23:31 | alexyk | hiredman: it needs verbose partial, who needs that? |
| 23:32 | hiredman | alexyk: it doesn't always |
| 23:32 | chouser | alexyk: 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:32 | alexyk | somnium: in your example, clojurebot expanded ->> once for the first inc, the second stayed |
| 23:32 | hiredman | ,(macroexpand-1 '(-> b (a c))) |
| 23:32 | clojurebot | (a b c) |
| 23:32 | somnium | ,(use 'clojure.contrib.macro-utils) |
| 23:32 | clojurebot | nil |
| 23:32 | hiredman | ,(-> {:a 1} (update-in [:a] inc)) |
| 23:32 | clojurebot | {:a 2} |
| 23:33 | somnium | (mexpand-all '(->> (range 5) (map inc) (map dec))) |
| 23:33 | somnium | ,(mexpand-all '(->> (range 5) (map inc) (map dec))) |
| 23:33 | clojurebot | (map dec (map inc (range 5))) |
| 23:33 | alexyk | somnium: nice |
| 23:33 | chouser | somnium: quick work! |
| 23:33 | hiredman | (->> 5 range ...) |
| 23:34 | chouser | so that's an approximation of what the clojure compiler does, but it's not exactly the same. |
| 23:34 | alexyk | hiredman: I don't quite grasp why update-in doesn't need partial |
| 23:34 | technomancy | alexyk: pong |
| 23:34 | alexyk | in -> |
| 23:34 | somnium | chouser: what does it actually do? |
| 23:34 | hiredman | ,(macroexpand-1 '(-> b (a c))) |
| 23:34 | clojurebot | (a b c) |
| 23:34 | technomancy | would love to see a patch for lein to make it honor $JAVA_OPTS |
| 23:34 | hiredman | alexyk: do you see what that does? |
| 23:34 | hiredman | ,(macroexpand-1 '(-> b (update-in [:a] inc))) |
| 23:34 | clojurebot | (update-in b [:a] inc) |
| 23:35 | alexyk | technomancy: ah! how do I tell lein to gimme -Xmx2g? it seems disrespectful of JAVA_OPTS... |
| 23:35 | hiredman | … |
| 23:35 | alexyk | hiredman: ah, got it. It sticks the arg into the first position after prefix. |
| 23:35 | chouser | somnium: it macroexpands the outer form completely, then ...going from probably incomplete memory here... goes through an analysis step of the resulting special form |
| 23:35 | alexyk | doc should say that instead of "second position" |
| 23:35 | hiredman | alexyk: it is the second position |
| 23:36 | hiredman | (1 2 ...) |
| 23:36 | alexyk | hiredman: yeah, it's not clear right away to noobz |
| 23:36 | technomancy | hiredman: functions like paredit-mode etc. are toggles, so adding them as bare hooks is not a great idea |
| 23:36 | technomancy | that's why they're often wrapped in lambdas to give them an actual arg |
| 23:36 | chouser | somnium: 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:36 | hiredman | technomancy: I know |
| 23:36 | technomancy | hiredman: ok, cool |
| 23:36 | technomancy | alexyk: no way to do that right now; it'd need a patch to the bin script |
| 23:36 | hiredman | infact I made a lisp-stuff function and added that to the hooks for clojure-mode and emacs-lisp-mode |
| 23:37 | hiredman | DRY |
| 23:37 | technomancy | hiredman: yeah, I have a generalized "coding-hook" for stuff like that |
| 23:37 | chouser | somnium: then depending on the specific special form may proceed to macroexpand and analyze some of that special forms' args. |
| 23:37 | alexyk | technomancy: gah! crap! shock and awe! havoc! |
| 23:37 | hiredman | if you set JAVA_OPTS should the java binary just pick that up from the env? |
| 23:37 | alexyk | I need -Xmx50g for my data mining things! |
| 23:37 | clojurebot | for is not used enough |
| 23:38 | somnium | chouser: thanks, my java-fu isnt up to the task of reading Compiler.java yet :/ |
| 23:38 | alexyk | hiredman: I'm not sure it picks it up |
| 23:38 | chouser | somnium: :-) |
| 23:38 | technomancy | alexyk: welcome to software that's only been released for two weeks. =) |
| 23:38 | chouser | somnium: these are the things I ended up learning when writing ClojureScript. |
| 23:38 | alexyk | technomancy: is lein supposed to respect JAVA_OPTS? |
| 23:38 | clojurebot | technomancy is to blame for all failures |
| 23:38 | JAS415 | compiler.java is crazy |
| 23:38 | technomancy | clojurebot: watch it. just... watch it. |
| 23:39 | technomancy | alexyk: it's not designed to do that right now, but it would not be hard to add. |
| 23:39 | hiredman | man, I already backed clojurebot's noise plugin back from 1/100 to 1/200 today |
| 23:39 | technomancy | hiredman: just giving it a hard time. I like it in general. =) |
| 23:39 | alexyk | technomancy: lein is a sh script, would JAVA_OPTS go there for repl? |
| 23:40 | technomancy | alexyk: yup. |
| 23:40 | clojurebot | Gabh mo leithscéal? |
| 23:40 | technomancy | alexyk: you'd actually need it in two places (since the repl task is special-cased), but it should be easy to figure out |
| 23:43 | hiredman | fyi you can fake linked lists in sh if you ever want to add a lisp interpreter to lien |
| 23:43 | hiredman | lein |
| 23:44 | hiredman | I keep hitting M-:w |
| 23:44 | hiredman | and get the debugger because w is a void-variable |
| 23:44 | technomancy | hiredman: I like the cut of your gib |
| 23:44 | technomancy | I suck so much at shell scripting. |
| 23:45 | hiredman | I have an interpreter for a stack based language written in sh |
| 23:45 | alexyk | hiredman: my sh is zsh. It has hashes, too. |
| 23:45 | hiredman | it is *ugly* |
| 23:45 | mee | M-:w? That looks like the offspring of vi and emacs |
| 23:45 | hiredman | alexyk: yeah, I use zsh too, but sh is more universal |
| 23:45 | hiredman | mee: vimer trying out emacs |
| 23:45 | alexyk | hiredman: true |
| 23:45 | mee | ah ok :) |
| 23:46 | hiredman | it's pure vim really. just and accident that M-: is bound to something in emacs |
| 23:46 | alexyk | there's an awesome boatload of clj stuff from mmcgrana on github, is he ever here? |
| 23:46 | mee | yeah, I am trying to learn emacs too, since it seems it's far and away the best development environment |
| 23:46 | hiredman | mee: meh |
| 23:47 | somnium | hiredman: you *might* like ergoemacs if coming from vim, it adds a set of 'ergonomic' bindings for common commands |
| 23:48 | mee | I 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:48 | hiredman | somnium: already set in my emacs ways |
| 23:48 | arbscht | alexyk: he was last here in june, I think |
| 23:48 | somnium | my pinkies never hurt anymore |
| 23:48 | hiredman | I use the static part of vimclojure (highlighting basically) and slime.vim |
| 23:49 | alexyk | with prettier graphics |
| 23:49 | alexyk | ] |
| 23:49 | hiredman | *eye roll* |
| 23:49 | somnium | anti-aliased fonts + slime, what more could you want? |
| 23:50 | hiredman | I want rainbow parens |
| 23:50 | hiredman | and more highlighting |
| 23:51 | alexyk | IDEA's support of Clojure is not bad either |
| 23:51 | somnium | it would be nice if it highlighted user defined funs, im sure it will eventually |
| 23:51 | mee | yeah, enclojure works |
| 23:51 | hiredman | I 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:52 | hiredman | and I kinda got the whole looping thing working, I am just sure how I am going to use this to walk a List |
| 23:53 | hiredman | just not sure |
| 23:53 | hiredman | the println is four instructions |
| 23:54 | hiredman | (.println System/out "foo") |
| 23:54 | hiredman | unless ASM ops are not exactly a 1:1 to bytecode |
| 23:56 | somnium | hiredman: are you writing a clojure compiler in clojure? |
| 23:56 | hiredman | just a layer over the asm library |
| 23:57 | hiredman | although don't think that hasn't crossed my mind |
| 23:57 | somnium | sounds cool |
| 23:57 | hiredman | it is, and surprisingly easy (so far) |
| 23:58 | hiredman | the syntax I have right now is kind of similar in form to deftype |
| 23:58 | hiredman | (make-class *name* *direct-super* *interfaces* & *methods-or-fields*) |
| 23:59 | somnium | how does the compiler handle let scoping in jvm land? |
| 23:59 | alexyk | are there ways to simplify this: (->> {:a {:b [1 2 3]}} (map #(% 1)) (map first) (map #(% 1))) => ([1 2 3]) |