2011-10-22
| 00:00 | Raynes | jodaro: Ping. |
| 04:00 | kab3wm | Anyone here familiar with redis-clojure? I'm having trouble grasping something.. |
| 04:03 | amalloy | ~anyone |
| 04:03 | clojurebot | Just a heads up, you're more likely to get some help if you ask the question you really want the answer to, instead of "does anyone ..." |
| 04:07 | kab3wm | As soon as I hit enter I thought of that.. So from the redis-clojure tests, I see all of the get/set/etc operations being called within the (redis/with-server) function. This seems wrong to me. So my question is, is it possible to use (redis/with-server) purely as a connection setup function and have (redis/set "foo" "bar") wherever I want them? So far in my testing it's not working. |
| 04:12 | amalloy | kab3wm: this is a fairly standard way to use dynamic scope, if i understand your question |
| 04:13 | amalloy | (defn do-actual-work [] (...redis/set ...)) (defn prepare [] (redis/with-server (do-actual-work))) |
| 04:13 | amalloy | you don't need to be lexically within the with-server block, you just have to set before that block exits. if you want, wrap your whole event loop in with-server and you'll have it whenever you need it |
| 04:14 | amalloy | personally i prefer the way aleph-redis does it, but this way is a common pattern |
| 04:15 | kab3wm | amalloy: maybe I just don't understand the protocol, but with-server is what makes the connection to the redis server. I would think it would be better to connect once and pass commands as needed instead of a new connection for every db operation. |
| 04:17 | kab3wm | amalloy: I'll give your example a try, that looks like it might work.. I'm new to clojure, so I'm sure I just don't know the right way to do things. :) |
| 04:53 | maxalwings | Hello, technomancy_ I have installed leiningen using brew on mac, but when I run lein repl or lein swank within my clojure projct i get an exception like this | http://pastebin.com/bkhQW7YB |
| 04:59 | ejackson | maxalwings: you don't need brew (i'm on a mac using lein and have no idea what brew is) |
| 05:16 | maxalwings | ejackson brew is just a package manage, but I have successfully installed lein, it seems that I don't have some java/clojure classes? |
| 05:16 | ejackson | if you try lein help does it work ? |
| 05:17 | ejackson | thereafter try create a now project with lein new myproject, cd into that dir, and try lein deps. |
| 05:18 | ejackson | that will let you know whether lein or perhaps your project.clj are at fault |
| 05:18 | ejackson | s/now project/new project/ |
| 05:20 | maxalwings | ejackson all these steps works fine |
| 05:20 | ejackson | ok, did you run lein deps in your project ? |
| 05:20 | maxalwings | ejackson yes |
| 05:21 | ejackson | bummer. |
| 05:22 | ejackson | I'm outta ideas, sorry. Perhaps your project.clj is incomplete or malformed ? |
| 05:22 | maxalwings | this is what I have in project.clj "(defproject clojure "1.0.0-SNAPSHOT" |
| 05:22 | maxalwings | :description "FIXME: write description" |
| 05:22 | maxalwings | :dependencies [[org.clojure/clojure "1.2.1"]]) |
| 05:22 | maxalwings | : |
| 05:22 | Raynes | gist.github.com |
| 05:22 | ejackson | well, its hard to go wrong with that. |
| 05:24 | ejackson | I'd try pulling my code to pieces, and rebuilding it step at a time to identify where it blows up. |
| 05:24 | ejackson | i've not seen that error before, so dunno what has gone wrong. |
| 05:26 | maxalwings | thanks for your help, I am going to re install lein make without |
| 05:26 | maxalwings | install lein without brew |
| 05:29 | kjeldahl | ;(= {:a {:b {:c 1}}} {:a {:b {:c 2}}}) |
| 05:29 | kjeldahl | ,(= {:a {:b {:c 1}}} {:a {:b {:c 2}}}) |
| 05:29 | clojurebot | false |
| 05:29 | kjeldahl | ,(= {:a {:b {:c 1}}} {:a {:b {:c 1.0}}}) |
| 05:29 | clojurebot | false |
| 05:29 | kjeldahl | ,(= {:a {:b {:c 1}}} {:a {:b {:c 1}}}) |
| 05:29 | clojurebot | true |
| 08:24 | fliebel | Are there any native speakers around who'd like to proof read a blog post? I usually don't do that, but I saw cemerick do it once, and I'm curious what'll come out of it. |
| 08:38 | fliebel | Ok, I'm going ahead and publish the post. |
| 08:42 | fliebel | Done. after-the-fact corrections still welcome. http://pepijndevos.nl/2011/10/22/the-origin-of-language.html |
| 08:54 | joegallo | Bull5h!t |
| 08:54 | joegallo | dammit |
| 08:54 | joegallo | wrong window |
| 08:54 | joegallo | ignore me |
| 09:54 | hugod | fliebel: leuk - I would argue that one of the ways natural language differs from programming languages is that it has words with different levels of abstraction, for the same concept. |
| 09:56 | hugod | and that is what allows you to have a conversation in English with a 500 word vocabulary, but makes, say, Martin Amis much more interesting to read |
| 10:26 | fliebel | hugod: Interesting though. Thanks. |
| 10:29 | fliebel | *thought |
| 10:31 | fliebel | Almost like polymorphism... Or maybe not... Hm |
| 10:42 | jodaro | Raynes: sup |
| 11:20 | djpowell | Some gclosure functions return NodeLists - how can I deal with those in clojurescript |
| 11:59 | robermann | quick question: what does -> mean in the context of http://blip.tv/clojure/stuart-halloway-simplicity-ain-t-easy-4842694 , at time 25:13 ? |
| 11:59 | robermann | I reported here the example: http://pastebin.com/nvR1wAi3 |
| 12:01 | robermann | There -> isn't a call - it seems an attribute access |
| 12:02 | devn | robermann: I'm not sure actually -- it's not contained within (keys (ns-publics *ns*)) |
| 12:03 | devn | robermann: perhaps it was meant to be an ;=> ? |
| 12:04 | robermann | devn: mmm I can't understand "inputStream->reader" |
| 12:07 | djpowell | i guess it might be some custom function |
| 12:07 | djpowell | clojure.java.io/reader will probably do the same thing? |
| 12:08 | djpowell | -> in the middle of a function name has no special meaning, it is just part of the function name |
| 12:10 | devn | robermann: you're looking at "naming a la carte" |
| 12:11 | robermann | devn: implementation reuse |
| 12:12 | robermann | djpowel: that could be, make sense - I this the only option IMHO :) |
| 12:12 | robermann | I this -> it is |
| 12:21 | devn | robermann: "I think this is the only option IMHO" is I think what you meant. Correct? |
| 13:22 | robermann | devn: yes you are correct |
| 13:31 | zilti | Hmm. For me swank-clojure still doesn't work... damn it. |
| 13:33 | robermann | why zilti? |
| 13:33 | zilti | robermann: Still getting those errors each time I use the slime REPL |
| 13:34 | robermann | on windows? |
| 13:34 | zilti | on Linux |
| 13:35 | zilti | I don't have any manual slime installation. Only clojure-mode. Then I use clojure-jack-in (which is supposed to fetch the correct SLIME I've been told). |
| 13:38 | robermann | having emacs + slime should be a mandatory prerequisite |
| 13:39 | zilti | I removed the manually installed slime because I thought that would solve the problem. |
| 13:43 | zilti | "error in process filter: Wrong type argument: characterp, nil" and then "error in process filter: Variable binding depth exceeds max-specpdl-size" |
| 13:43 | zilti | And then emacs is totally broken and unusable. |
| 13:45 | robermann | I don't konw. I think you 've already seen guides as http://riddell.us/ClojureSwankLeiningenWithEmacsOnLinux.html |
| 13:45 | lazybot | The riddell.us tutorials are much more highly-ranked on Google than they deserve to be. They're old and way too complicated. If you're trying to install Clojure...don't! Instead, install Leiningen (https://github.com/technomancy/leiningen/tree/stable) and let it manage Clojure for you. |
| 13:52 | zilti | Yes, I have everything set up as it should, except that it doesn't work |
| 13:58 | moogatronic | zilti: what OS are you running? |
| 13:58 | robermann | zilti: mm I cannot give much help here, sorry. I installed it on windows |
| 13:58 | moogatronic | nm… i scrolled back and saw. =) |
| 14:00 | moogatronic | I actually followed some instructions from Sam Aaron / Overtone to get my setup working. |
| 14:01 | moogatronic | Does anyone know of a "room-share" board or anything of the like for the Conj? I am looking for a potential roommate to split the hotel costs. |
| 14:02 | moogatronic | <--- (poor'ish PhD student) |
| 14:31 | theignorati | I'm controlling an piece of hardware with Clojure through midi, so I have something like this (set-control 10 15) and that will generate a list of 4 numbers that I can then make a midi shortmessage with (something like this (176 0 10 15), and send to the device. I can also change controls on the device and I will get (176 0 10 15) from it, is there a clever way of going from that back to (set-control 10 15)? |
| 14:32 | AWizzArd | ~seen lpetit |
| 14:32 | clojurebot | Titim gan éirí ort. |
| 14:32 | AWizzArd | ,seen lpetit |
| 14:32 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: seen in this context, compiling:(NO_SOURCE_PATH:0)> |
| 14:42 | TimMc | $seen lpetit |
| 14:42 | lazybot | lpetit was last seen quitting 1 week and 2 days ago. |
| 14:43 | TimMc | theignorati: A way to get from '(1 2 3 4) to '(3 4)? |
| 14:45 | theignorati | from the result of (function param1 param2) being (1 2 3 4) back to (function param1 param2) for several functions) |
| 14:46 | TimMc | Are they invertible functions? |
| 14:48 | theignorati | they're functions that look like this: (defn f [level] (list 176 0 61 level)) |
| 14:55 | AWizzArd | Anybody here who has experience with OSGi+Clojure? |
| 16:46 | lynaghk | Has anyone gotten the ClojureScript browser REPL working nicely with Emacs? |
| 16:47 | lynaghk | I've been following David's instructions on the ClojureScript Github wiki, but after a few commands I always seem to end up hanging the repl. |
| 16:48 | amalloy | theignorati: that's something that i think is usually pretty simple in logic programming, but i don't know much more about it. you might have a look at dnolen's core.logic |
| 16:48 | dnolen | amalloy: nice one ;) |
| 16:49 | amalloy | dnolen: i hit the mark, then? |
| 16:49 | dnolen | lynaghk: some kinds of errors will hang the repl. |
| 16:49 | dnolen | lynaghk: but really that shouldn't happen so much. |
| 16:49 | lynaghk | Undefined functions? |
| 16:49 | dnolen | lynaghk: that doesn't usually hang the REPL for me. |
| 16:50 | lynaghk | I am just playing around with console.log, which is implemented as native code |
| 16:50 | lynaghk | in the browser. Maybe that's an issue |
| 16:51 | dnolen | lynaghk: perhaps. but that doesn't sound right. I've used (. js/console (log …)) a bit, rarely do something that hangs the REPL. |
| 16:51 | lynaghk | Hmm. I'm just thinking there is a bit of strangeness there; |
| 16:51 | dnolen | lynaghk: but it's possible to hang the REPL - haven't look closely at what it take to prevent that more often. |
| 16:51 | lynaghk | (def p (.log js/console)) doesn't work |
| 16:51 | lynaghk | (defn p [x] (.log js/console x)) |
| 16:51 | lynaghk | but that does |
| 16:52 | dnolen | lynaghk: known issue, there no way to differentiate property access w/ method calls. |
| 16:52 | dnolen | w/ -> from, I mean. |
| 16:53 | dnolen | lynaghk: good chance that (.log js/console) will work in the future, and property access will look different than it does now. |
| 16:53 | lynaghk | yeah, I understand that issue. Shouldn't you be able to say (p "hello") after either of those definitions regardless though? |
| 16:53 | lynaghk | since (.log js/console) should be getting the function-as-a-property |
| 16:55 | amalloy | lynaghk: if those two don't behave the same, i'd guess the difference is that the former is called with the wrong "this" binding |
| 16:57 | lynaghk | I'm not sure if console.log relies on `this`. Can't say, since it's native code on Chrome. |
| 16:57 | dnolen | lynaghk: it doesn't work even if you do that in JS |
| 16:57 | dnolen | var p = console.log; p("foo"); results in an Error |
| 16:58 | lynaghk | Ah, good observation. |
| 17:00 | lynaghk | I guess that's just not-quite-a-js-function. |
| 17:06 | pandeiro | you can't just assign native functions to other variables in js... document.getElementById for another example |
| 17:07 | pandeiro | so the idiom is function p(q) { console.log(q); } or function $(id) { return document.getElementById(id); } |
| 17:09 | pandeiro | dnolen: i get a ton of funky output when i initialize my repl (namely when i do the necessary refresh of the browser)... but the repl performance afterwards is pretty stable compared to when i first started |
| 17:10 | dnolen | pandeiro: yeah, it takes a while for the REPL to get going. one enhancement I would like to see is browser REPL relying on WebSockets when available. |
| 17:11 | pandeiro | yeah the REPL is also slow if you try to println a chunk of data into an inferior lisp buffer |
| 17:11 | pandeiro | the combo of datatype conversion and no proper templating also makes working with the DOM feel 1000x slower than jquery |
| 17:12 | dnolen | pandeiro: yes printing back to the REPL would benefits from WebSockets I think. |
| 17:12 | dnolen | pandeiro: you can use jQuery |
| 17:12 | pandeiro | sure i know but jquery and closure? |
| 17:12 | dnolen | pandeiro: yup |
| 17:13 | pandeiro | i would like to build out the functionality with closure if possible... i do see the performance win with the compiler and stuff |
| 17:14 | pandeiro | i think a lot of it is just the proper abstractions havent been built out |
| 17:14 | pandeiro | (i did your enlive tutorial and if something like that could exist for cljs, that would be fantastic) |
| 17:15 | dnolen | pandeiro: yeah datatype conversion stinks, but that's mostly when working w/ other libraries - there's a ticket for emitting JS literals. |
| 17:15 | pandeiro | isn't a lot of the power of clojure in the datatypes though? |
| 17:15 | pandeiro | i am really loving it for grabbing and processing couchdb docs with crazy nesting |
| 17:15 | dnolen | pandeiro: yes, I prefer Clojure's datatypes. |
| 17:16 | pandeiro | dnolen: dont mean to complain btw, awesome fing work youre doing |
| 17:16 | dnolen | pandeiro: but working with other libraries that expect objects is a bit of work. |
| 17:16 | dnolen | dnolen: haha, my contribution so far has been minor compared to everyone else :) |
| 17:16 | dnolen | oops pandeiro |
| 17:16 | scode | With interop, is it idiomatic to use (Integer. xxx) to force use of Integer? (int xxx) gives me a Long in Clojure 1.3. |
| 17:16 | pandeiro | collective you |
| 17:17 | dnolen | scode: yes |
| 17:17 | scode | dnolen: Thanks! |
| 17:28 | TimMc | scode: What is xxx here? |
| 17:28 | TimMc | Just some number? |
| 17:28 | scode | TimMc: yes |
| 17:28 | scode | TimMc: (.getClass (int 5)) |
| 17:29 | scode | TimMc: (yields Long) |
| 17:29 | TimMc | ,(list (.getClass (int 5)) *clojure-version*) |
| 17:29 | clojurebot | (java.lang.Long {:major 1, :minor 3, :incremental 0, :qualifier nil}) |
| 17:29 | TimMc | &(list (.getClass (int 5)) *clojure-version*) |
| 17:29 | lazybot | ⇒ (java.lang.Integer {:major 1, :minor 2, :incremental 0, :qualifier ""}) |
| 17:29 | scode | Nice bot. |
| 17:31 | TimMc | ,(doc int) |
| 17:31 | clojurebot | "([x]); Coerce to int" |
| 17:32 | scode | I was kinda surprised. Could it be a bug rather than intended behavior? |
| 17:32 | TimMc | It is kind of odd. |
| 17:32 | scode | long (the function) certainly still exists. |
| 17:34 | gfredericks | I think it's intended |
| 17:34 | gfredericks | I witnessed a conversation about this earlier |
| 17:34 | gfredericks | might be able to find it in the irc archives actually... |
| 17:35 | amalloy | it's intended. people complain about it whenever they find out though |
| 17:35 | amalloy | there's a(nother) long discussion on the mailing lists going on right now |
| 17:35 | scode | FTR: I am not complaining, just thought it might be a bug :) |
| 17:35 | TimMc | clojure.lang.RT/intCast vs. longCast -- so the distinction is in RT |
| 17:35 | TimMc | The doc might be a bug. |
| 17:36 | amalloy | TimMc: no, int does coerce to int |
| 17:36 | TimMc | Oh, then autopromotes? |
| 17:36 | scode | Ah... |
| 17:36 | scode | *int*, not Integer |
| 17:36 | amalloy | autoboxes, anyway |
| 17:36 | amalloy | (and 1.3 introduces auto-promoting boxing, so yeah, i guess) |
| 17:36 | scode | Hmmm. Why are int:s promoted to Long:s rather than Integers I wonder? |
| 17:37 | TimMc | 1.3 standardizes on Long for some reason |
| 17:37 | scode | Ok. |
| 17:40 | gfredericks | &(list (.getClass (int 6)) (.getClass (long 4))) |
| 17:40 | lazybot | ⇒ (java.lang.Integer java.lang.Long) |
| 17:40 | bartj | which is the recommended clojure library to parse HTML |
| 17:40 | bartj | enlive ? |
| 17:40 | gfredericks | yeah |
| 17:40 | gfredericks | at least that's what everybody always says when somebody asks that question |
| 17:40 | gfredericks | I assume they're not joking |
| 17:40 | bartj | I am trying to do some information extraction work |
| 17:41 | bartj | which also involves getting the HTML width, height, location, color, ec. of elements |
| 17:41 | bartj | of the web page |
| 17:41 | gfredericks | that...sounds like a hell of a lot more than parsing. |
| 17:41 | bartj | I suppose that this can be done only after plugging in to the rendering engine |
| 17:42 | bartj | say maybe Webkit (or) Gecko |
| 17:42 | llasram | I kind of feel like people would find the autopromotion less confusing if Clojure didn't try to be a *little* helpful w/ Java interop by keeping unmolested ints as ints. If ints -> longs as soon as Clojure found them, I think no-one would be complaining that the semantics didn't make sense |
| 17:42 | bartj | I would be really really grateful if someone can point me how to use |
| 17:43 | bartj | or hook onto a rendering engine like Webkit / Gecko |
| 17:43 | llasram | bartj: Hoo boy. That's kind of tricky. Last time I looked into it (from Python, for the calibre project) there wasn't really a good way to do it |
| 17:43 | llasram | As in, at all |
| 17:43 | gfredericks | ,(for [num [(long 5) (int 5) (short 5)]] (.getClass num)) |
| 17:43 | clojurebot | (java.lang.Long java.lang.Long java.lang.Short) |
| 17:43 | gfredericks | ^ the unexpected behaviors keep piling up |
| 17:44 | llasram | bartj: Qt's WebKit bindings get you some of what you need, but it's pretty thoroughly munged. Depending on what you're doing, it may be enough, but I don't think you can get at that info from the JVM |
| 17:45 | bartj | llasram, any pointers sir ? |
| 17:47 | llasram | bartj: It's been a while, but you can look at the Qt webkit api: http://doc.qt.nokia.com/latest/qtwebkit.html But obviously you'd need to then use a language with Qt bindings |
| 17:48 | bartj | which would be mostly python I think |
| 17:48 | llasram | ,(.getClass ((fn [x] (inc x)) (short 0))) |
| 17:48 | clojurebot | java.lang.Long |
| 17:48 | gfredericks | o_o |
| 17:49 | llasram | I think the short -> Short boxing behavior is more arguable the bug |
| 17:55 | gfredericks | ,(.getClass (byte 4)) |
| 17:55 | clojurebot | java.lang.Byte |
| 17:56 | gfredericks | ,(.getClass (inc (byte 4))) |
| 17:56 | clojurebot | java.lang.Long |
| 18:00 | daniel___ | ,(byte 4) |
| 18:00 | clojurebot | 4 |
| 18:00 | daniel___ | ,(byte s) |
| 18:00 | clojurebot | #<CompilerException java.lang.RuntimeException: Unable to resolve symbol: s in this context, compiling:(NO_SOURCE_PATH:0)> |
| 18:04 | llasram | Whoa, crazy-town. There's *are* Java Qt bindings: http://qt-jambi.org/ |
| 18:05 | zilti | llasram: But they're outdated and deprecated. |
| 18:05 | zilti | *not deprecated, but outdated |
| 18:05 | llasram | zilti: Ah, ok. |
| 18:09 | zilti | llasram: iirc trolltech stopped supporting it after Qt 4.5. Recently a small group tried to continue it (the link you posted) but it seems it's too much for them to bite. I mean, click on the Documentation > API link - it links to Qt 4.5.0 API |
| 18:41 | ejackson | dnolen: are these your little Byrds again ? :P |
| 18:41 | dnolen | ejackson: ha! |
| 19:12 | simard | I've just pushed [org.clojars.gsimard/lwjgl "2.8.1"] because [org.lwjgl/lwjgl "2.7.1"] is too old. I used org.clojars.gsimard there, because I was wondering if org.lwjgl has anything "reserved" about it. |
| 19:12 | simard | what is the ethics of choosing a name when pushing to clojars ? |
| 19:13 | scottj | I think the norm is don't use someone else's prefix w/o permission. I don't know if the system enforces it |
| 19:14 | simard | yeah, that's why I didn't use org.lwjgl, also, I didn't want to break anything .. :) |
| 19:16 | duck1123 | so do you always have to use literals when defining match patterns? I tried defining some of my values in vars and it's failing oddly |
| 19:17 | simard | from the clojars wiki "You can’t create a group with the same name as an existing group or user." |
| 19:17 | simard | so no, it's not possible to push to some group that you don't belong to |
| 19:17 | simard | the other user has to add you first |
| 19:49 | gfredericks | actually... |
| 19:49 | gfredericks | you _can_ create a group with the same name as an existing user |
| 19:49 | gfredericks | and once you've done that, that user cannot update their profile (password, keys, etc). |
| 19:55 | gfredericks | I should just stop whining about it and get a replacement account. |
| 20:01 | dnolen | cemerick: I don't believe it. |
| 20:01 | cemerick | ? |
| 20:01 | dnolen | https://twitter.com/cemerick/status/127895772120363008 |
| 20:02 | cemerick | dnolen: https://twitter.com/#!/cemerick/status/127896015272554496 :-) |
| 20:02 | dnolen | cemerick: whew. world was upside down there for a second. |
| 20:02 | cemerick | My job is done here. |
| 20:03 | cemerick | Phil is going to facepalm when he sees that though. He'll be my first tech support /msg if necessary. |
| 21:38 | ozataman | hey all. when using a simple folder with a couple of clojure files, emacs and slime, the slime repl can't find one of the files in its classpath when trying to load the other file that depends on the first. any simple solutions to this? |
| 21:39 | ozataman | I've started a swank-clojure inside this folder and used slime-connect |
| 21:44 | amalloy | ozataman: probably the wrong directory structure |
| 21:45 | cemerick | Does emacs/slime provide an equivalent to a file outline? |
| 21:46 | amalloy | cemerick: it's been a while since i used eclipse, but i remember several features that might be described as a file outline. which one are you asking about? |
| 21:46 | amalloy | (note: i don't know the answer either way, b/c i've never gone looking for an outline in emacs. but if you clarify what you want someone else might know) |
| 21:47 | cemerick | amalloy: a panel separate from the main buffer that maintains an updated listing of all top-levels in that buffer. |
| 21:48 | cemerick | usually with graphical indicators of each one's characteristics (defn/def, private or not, etc) |
| 21:51 | amalloy | i remember that being mostly in the Package Explorer. some quick googling turned up http://ecb.sourceforge.net/ but no idea if it's any good |
| 21:52 | cemerick | oh, I remember that from my last emacs foray. JDEE. *shiver* |
| 21:52 | cemerick | Yeah, that's the ticket. |
| 21:52 | duck1123 | ecb has gotten pretty good |
| 21:52 | cemerick | I think your mode needs to produce ctags or something similar in order for ECB to work… |
| 21:53 | duck1123 | now that it's in elpa |
| 21:53 | cemerick | duck1123: does it work with Clojure? |
| 21:53 | cemerick | er, SLIME, whatever? |
| 21:53 | duck1123 | pretty well, but you can jump to fns even without it |
| 21:53 | duck1123 | it has a fn list, file list, and recent buffers |
| 21:54 | cemerick | good to know, thanks :-) |
| 21:54 | duck1123 | you can also configure it to keep the compile buffers at the bottom |
| 21:55 | cemerick | Then my other question would be, is there a namespace browser somewhere? That is, something like a wildcard apropos view, but organized by namespace, and filterable in-place? |
| 21:57 | duck1123 | cemerick: http://dl.dropbox.com/u/270347/Screenshot%20at%202011-10-22%2021%3A54%3A31.png |
| 21:58 | cemerick | duck1123: sorry; is that ECB on the left? |
| 21:59 | duck1123 | yes, the lower left shows all the symbols |
| 22:04 | cemerick | oh, I see, that's the current buffer outline |
| 22:04 | cemerick | presumably a namespace browser would be a SLIME feature… |
| 22:05 | ozataman | amalloy: FYI, swank-clojure script in .lein/bin needed to be tweaked to add "." to the classpath. that was the problem. |
| 22:07 | duck1123 | If you want all the namespaces C-c M-p <tab> |
| 22:24 | amalloy | ozataman: no, the problem was you wanted . to be in the classpath :P |
| 22:26 | amalloy | lein projects are "supposed" to (though you can customize layout in project.clj) have their source code under the src/ directory, which is on the classpath |
| 22:26 | hugod | cemerick: it would be relatively simple to add a buffer for browsing namespaces in slime - not sure it is worth it |
| 22:27 | cemerick | hugod: yeah, it's not a hard problem; I'm just surveying the current state of things. |
| 22:28 | cemerick | The degree of utility is perhaps a potential point of debate. ;-) |
| 22:29 | scottj | perhaps filtering a namespace browser is akin to slime-apropos-package |
| 22:30 | hugod | scottj: that seems to fit the bill |
| 22:31 | hugod | scottj: btw, have you seen the exception filtering in ritz 0.2.0? |
| 22:31 | cemerick | That's M-x slime-apropos-package then? |
| 22:31 | scottj | hugod: I saw the commit and was excited about it but I haven't actually tried it yet |
| 22:32 | hugod | it's pretty basic at the moment - but will hopefully be enough to provoke some feedback |
| 22:32 | scottj | cemerick: yeah not sure if works on swank-clojure though failed for me |
| 22:32 | cemerick | scottj: Yeah, seems like a no-op |
| 22:33 | hugod | works for me in ritz |
| 22:33 | duck1123 | C-c C-d C-p is slime-apropos-package |
| 22:48 | ozataman | duck1123: what is that folder/tree package that you're using? |
| 22:48 | duck1123 | That's ecb |
| 22:48 | ozataman | amalloy: I don't want a lein project; this needs to be a minimal folder. it's actually for google AI challenge |
| 22:48 | ozataman | duck1123: thank you |
| 22:49 | ozataman | duck1123: and the history box? |
| 22:49 | duck1123 | ozataman: that's all ecb. That's what I was trying to demonstrate with that screenshot |
| 22:50 | ozataman | duck1123: very cool, I'm reading the project info page now. |
| 22:50 | duck1123 | it's in elpa now, so it's much easier to install than it used to be |
| 22:51 | technomancy | cemerick: the file outline thingy that I use is M-x imenu |
| 22:51 | technomancy | (within a single file) |
| 22:52 | technomancy | for namespace listing, I just use the tab-completion in M-. |
| 22:53 | duck1123 | I have C-x <tab> for ido-imenu. Should be default in starter kit |
| 22:55 | ozataman | duck1123: just used elpa to install, but getting an error with ecb-activate. says stack-trace-on-error is void |
| 22:56 | duck1123 | ozataman: try ecb_snap instead |
| 22:56 | duck1123 | despite how you may feel about that underscore |
| 22:57 | cemerick | what are the 3 most compelling things about emacs w.r.t. Clojure programming, aside from the basics (REPL, paredit)? |
| 22:58 | duck1123 | excluding all of slime, or just the repl? Because that's a very big part of it |
| 22:58 | technomancy | cemerick: the fact that M-. for jump-to-definition works on code whether it's your own or in a jar is definitely top-3 material |
| 22:58 | technomancy | cemerick: C-c S-i for the slime inspector is slick too |
| 22:59 | technomancy | because it's hyperlinked; you can jump around from inspecting an instance to inspecting its class to inspecting each method and the return types thereof |
| 22:59 | technomancy | to some degree it can function as a javadoc replacement |
| 22:59 | duck1123 | (inc technomancy) |
| 22:59 | cemerick | duck1123: excluding REPL basics, I mean |
| 23:00 | technomancy | probably for #3 I would list the in-buffer test runner (C-c C-, inside a test file with clojure-test-mode activated) |
| 23:00 | technomancy | since that will highlight failing/errored tests red/yellow and let you see details about the failures with C-c C-' |
| 23:00 | scottj | http://www.youtube.com/watch?v=dio__Qylp-s screencast on using ac-slime as a namespace browser |
| 23:00 | duck1123 | Truthfully, C-c C-k to load the whole file is the biggest feature for me |
| 23:01 | cemerick | I think that's "basics" :-) |
| 23:01 | technomancy | (the last of those being the only feature I actually personally implemnted, heh.) |
| 23:01 | cemerick | technomancy: I've internalized jump-to-definition; I'll have to noodle with the inspector though. This clojure-test-mode sounds interesting. |
| 23:01 | ozataman | duck1123: still getting the same error :( |
| 23:01 | alandipert | being able to configure the editor with emacs lisp is fun and compelling for me |
| 23:02 | ozataman | ecb-activate-internal: Symbol's value as variable is void: stack-trace-on-error |
| 23:02 | technomancy | the inspector is not very well-known, but it's handy |
| 23:03 | cemerick | I'm surprised no one mentioned the debug stuff. :-) |
| 23:03 | duck1123 | ozataman: remove the entire directory for the other one and restart emacs. What version are you running? |
| 23:03 | ozataman | duck1123: did that already. emacs 24 |
| 23:04 | technomancy | cemerick: locals-clearing makes the debug-repl less useful than it could be, though it sounds like hugod is on the job. |
| 23:04 | technomancy | hugod: total crickets from core about that patch though, huh? too bad. |
| 23:04 | duck1123 | I haven't had much luck with debugging. Not enough for it to replace dropping a logging macro and running a test |
| 23:05 | cemerick | scottj: isn't that just code completion / show-docs? |
| 23:06 | cemerick | ("just" not meant derogatorily — just not what I think of as a namespace browser) |
| 23:06 | ozataman | duck1123: got it working! needed to remove the perspective package I had and added a (setq stack-trace-on-error t) |
| 23:06 | scottj | cemerick: pretty much, it knows what code's loaded. what else does a namespace browser do? |
| 23:06 | hugod | technomancy: some sort of comment would be nice, even if just to say that it is never going to happen |
| 23:06 | technomancy | well the full on cdt debugger is one thing, but the swank.core/break to pull up the debug repl with locals access is built-in to swank and thus a lot easier to use. |
| 23:06 | duck1123 | ozataman: nice |
| 23:07 | cemerick | hugod: the locals-clearing stuff is squarely in the realm of the "debug builds" issue, which is long-standing and a high priority AFAIK |
| 23:07 | hugod | cemerick: not really - it can be accomplished with a two line patch |
| 23:08 | hugod | in a much more selective way than a debug build could provide |
| 23:08 | cemerick | scottj: "browser" implies to me a persistent, constantly-updated view of the loaded namespaces and vars |
| 23:09 | cemerick | hugod: "debug builds" is a catch-all for alternative compilation modes as well as potentially different packages. I doubt any patch on that topic would be taken until the powers that be settle on a strategy in general. |
| 23:10 | cemerick | e.g. *assert* is also just a binding, but has sorta-broken semantics IMO, and that's in scope for "debug builds" |
| 23:11 | cemerick | OK, so what about emacs/SLIME is absolute hell when it comes to Clojure programming? |
| 23:11 | hugod | cemerick: sure - some discussion would still be welcome |
| 23:11 | scottj | nothing |
| 23:12 | technomancy | cemerick: on OS X, the $PATH for GUI-launched programs doesn't match the configured $PATH for the shell |
| 23:12 | technomancy | so you get a lot of confused users who can't launch swank servers |
| 23:12 | technomancy | the other huge remaining pain point is attempting to maintain a config that works for CL and Clojure at the same time |
| 23:13 | cemerick | mmm, that's super out of scope IMO :-) |
| 23:13 | scottj | which I've done pretty easily for years |
| 23:13 | alandipert | cemerick: is this for the book? |
| 23:13 | technomancy | scottj: ok, I'll start referring folks to you =) |
| 23:13 | cemerick | alandipert: ostensibly :-) |
| 23:13 | alandipert | it may be worth noting that emacs is still quite useful even with just inferior-lisp + paredit |
| 23:14 | alandipert | that's what i tend to recommend to people i show stuff, knowing they'll stumble into slime later |
| 23:14 | cemerick | I'm still not sure if I want to write the (short) section on emacs. I might just punt to Brian, but I want to know the lay of the land in any case. |
| 23:14 | technomancy | yeah, inf-lisp is underrated |
| 23:14 | technomancy | cemerick: I'd be happy to review either way |
| 23:15 | cemerick | alandipert: Point taken; I'd like to make sure the emacs road is presented in its fullest glory in any case though. |
| 23:15 | alandipert | cemerick: be sure to have a little break-out at the corner of a page that shows off nyan-cat mode |
| 23:15 | scottj | you can easily setup clojurescript to use inf-lisp and clojure to use slime and with browser-repl C-x C-e to eval code backend or frontend |
| 23:15 | cemerick | technomancy: Noted. Once the section is drafted, I'll send you a PDF. Thanks. :-) |
| 23:15 | cemerick | alandipert: :-) |
| 23:15 | cemerick | We're a meme-free book, I think. |
| 23:16 | cemerick | aside from the "WTF are you doing not using Clojure" meme, of course |
| 23:17 | scottj | An emacs feature that hasn't been mentioned is clojure-refactoring which has been dorment for a long time but recently got several patches |
| 23:17 | cemerick | scottj: that's editor-independent, no? |
| 23:17 | scottj | I don't know it has a emacs UI |
| 23:18 | scottj | I know it's part clojure and part emacs lisp, not sure if anyone's hooked the clojure part into another editor |
| 23:19 | technomancy | that might be a bit too edge for the book |
| 23:21 | technomancy | but it would be cool if it were better-known |
| 23:21 | cemerick | Yeah, we're not going in-depth with the tool-specific stuff; just a page or two for emacs and eclipse to give people a flavor of each so they have an idea of what to dig at first. |
| 23:22 | cemerick | We do go deep with foundational REPL techniques, principles, etc. |
| 23:22 | cemerick | The chapter is titled "REPL-oriented programming", actually. |
| 23:23 | scottj | I agree making it an emacs slime tutorial does't make sense, but if you say "Eclipse has debugging, refactoring, etc." I didn't want you to leave off refactoring from the EMacs list :) |
| 23:23 | cemerick | Eclipse doesn't have Clojure refactoring. :-) |
| 23:23 | scottj | maybe you should point that out so they know where to look :) |
| 23:24 | scottj | Eclipse has debugging stepping through clojure and java code right? |
| 23:24 | alandipert | cemerick: good luck on book, looking forward to it nyan or not |
| 23:24 | alandipert | g'night all |
| 23:24 | cemerick | alandipert: Thanks. It'll be done-done-done this month. |
| 23:24 | technomancy | oh wow; that's great |
| 23:24 | alandipert | rockin! |
| 23:25 | cemerick | scottj: Yeah; every JVM debugger should be able to do that. |
| 23:25 | scottj | done-done-done-not-really-done-meaning-not-edited-right? :) |
| 23:26 | cemerick | scottj: Not edited by the publisher's people, but I'm too much of a perfectionist for there to be that much to do. |
| 23:26 | cemerick | That sounded more egotistical than I intended. :-P |
| 23:26 | scottj | cemerick: after joy of clojure I don't think I'll buy another non-edited book unless I really must have it now |
| 23:26 | cemerick | oh? |
| 23:28 | scottj | I posted maybe 10 things about chapter 2 (not sure exact chapter) and then said wtf why am I working as an editor for free |
| 23:28 | cemerick | oh, via the MEAP, etc. |
| 23:28 | scottj | yeah. published version is much better |
| 23:29 | technomancy | cemerick: is that a sand piper on the cover? |
| 23:29 | cemerick | Right. Well, I'm sure they'll have their way with it — but I'm happy enough to close the book on the project mentally once I hand the thing over. |
| 23:29 | cemerick | technomancy: painted snipe |
| 23:30 | cemerick | very similar, IIRC |
| 23:30 | technomancy | oh, like from the movie Up =) |
| 23:31 | cemerick | hrm, perhaps, don't remember the bird's name |
| 23:32 | cemerick | I need to re-watch that at some point; it was only afterwards that I decided I liked it. |
| 23:33 | technomancy | I think it's my favourite of Pixar's. great pathos. |
| 23:34 | cemerick | Wall-E has been my favorite so far, I think. |
| 23:34 | cemerick | More because of the Wall-E/Eva connection than the rest of it. |
| 23:35 | technomancy | yeah. if you counted the first half on its own it would probably be my favourite. |
| 23:36 | cemerick | If they hadn't used the live-action bits for the taped messages from earth, I wouldn't need to qualify my preference. :-/ |