2008-10-25
| 00:03 | pjb3 | (ns foo (:require-clojure)) means switch to the foo namespace and pull everything in from the clojure namespace, right? |
| 00:03 | blbrown | hello |
| 00:04 | pjb3 | blbrown: hello |
| 00:05 | Chouser | pjb3: no need for :require anything |
| 00:05 | pjb3 | Chouser: right, so (ns foo) refers the clojure namespace by default |
| 00:22 | Chouser | yes |
| 00:23 | Chouser | you can use (:refer-clojure ...) if you want to refer clojure things in some non-default way (exclude, rename, etc.) |
| 02:41 | sohail | anyone know how to get clojure-mode to use my classpath |
| 02:42 | sohail | swank-clojure that is |
| 02:42 | sohail | aha, sw-cl-extra-classpaths |
| 04:12 | Lau_of_DK | Morning gents |
| 04:18 | Pupeno | Good morning. |
| 04:19 | Pupeno | Hi Lau_of_DK. |
| 04:19 | Lau_of_DK | Morning |
| 04:20 | Pupeno | Is there a Clojure planet somewhere? |
| 04:21 | Lau_of_DK | You mean if Rich has bought some real estate in the skies ? |
| 04:21 | Pupeno | Lau_of_DK: hehehe, no. |
| 04:22 | Pupeno | Lau_of_DK: a planet is an aggregation of blogs by topic. There's a Debian planet for example, where posts by Debian developers appear. |
| 04:22 | Lau_of_DK | oh, if there is, I'd love to know about it |
| 04:24 | Lau_of_DK | But I really think that the Euler-wiki is becoming quite helpful for learners |
| 04:25 | Lau_of_DK | Its unfortunate that it gives away the award-winning algorithms for solving the project, but if you can disregard that, theres alot of good code |
| 04:25 | Lau_of_DK | (mostly the stuff not written be my though) |
| 04:25 | Lau_of_DK | (although I will brag about my solution for #59) |
| 04:26 | Lau_of_DK | (and also #37, because its pretty concise) |
| 04:26 | Lau_of_DK | (though #40 is actually the most concise) |
| 04:26 | Lau_of_DK | But you get the picture |
| 04:32 | Pupeno | Lau_of_DK: what is the Euler-wiki |
| 04:32 | Lau_of_DK | Its a Wiki where we post solutions/algorithms for solving www.projecteuler.net problems, you'll find it at http://clojure-euler.wikispaces.com |
| 04:39 | Pupeno | Lau_of_DK: Cool, thanks. |
| 04:40 | Lau_of_DK | np, But be careful, Euler steals time |
| 10:33 | milanmitrovic | I played around with closure in the last couple of days... and I must say that it looks great! |
| 10:35 | rhickey | milanmitrovic: cool |
| 10:36 | milanmitrovic | I'd like to try writing something bigger... any hints? |
| 10:36 | milanmitrovic | I use emacs, so swank-clojure would be a really cool thing to have... |
| 10:37 | milanmitrovic | though slime seems to be cl only... |
| 10:39 | rhickey | milanmitrovic: slime for Clojure already exists, nice setup instructions here: http://bc.tech.coop/blog/081023.html |
| 10:40 | milanmitrovic | yes... I've been reading the source of swank-clojure and slime... |
| 10:41 | milanmitrovic | but slime wasn't really built with other lisps in mind... at least as far as I can tell |
| 10:57 | drewr | SLIME just utilizes swank, so as long as there are Clojure implementations of the swank methods, stuff works. |
| 11:11 | milanmitrovic_ | drewr: but slime has a lot of cl specific features (debugging - conditions & restarts) stuff like that... |
| 11:33 | lisppaste8 | sohail pasted "Can't let qualified name" at http://paste.lisp.org/display/69188 |
| 11:33 | sohail | I'm surely missing something obvious up there |
| 11:35 | sohail | err that should be ~x but same thing.. |
| 11:35 | hoeck | sohail: you need ~'x |
| 11:36 | sohail | hoeck, hm. why? |
| 11:37 | sohail | I want (testing-123) to expand to (let [y 1] (print y)) |
| 11:38 | sohail | anyway, that example could be (defmacro testing-123 [] `(let [y 1] (print y))) and same happens |
| 11:39 | hoeck | sorry, i meant ~'y |
| 11:40 | hoeck | the unquote-quote prevents the y from becoming clojure/y |
| 11:40 | sohail | ah |
| 11:41 | sohail | so now I have to use ~'y everywhere... |
| 11:41 | Chousuke | why not use a gensym? |
| 11:41 | sohail | good point |
| 11:42 | sohail | that's good enough for me |
| 11:42 | sohail | thanks people |
| 11:43 | hoeck | sohail: ideally you would use y# (auto-gensym) in this simple macro |
| 11:44 | hoeck | but when you need method-symbols or class literals in macros you need '~ |
| 11:44 | sohail | hoeck, can you give me an example? |
| 11:45 | meredydd | hoeck: Really? I haven't run into that issue with method syms and classes - and I'm fairly sure I've done that. |
| 11:45 | meredydd | Perhaps ` has acquired extra magic. |
| 11:45 | sohail | ps: what is auto-gensym ? |
| 11:46 | Chousuke | sohail: (defmacro testing-123 [] `(let [y# 1] (print y#))) |
| 11:46 | sohail | oh, I see the y# is equivalent to above |
| 11:46 | sohail | nice |
| 11:47 | meredydd | hoeck: My apologies. You're right, it happens on method syms. But it appears to be okay on class names. |
| 11:47 | hoeck | sohail: yeah, you're right too :) |
| 11:48 | hoeck | and its needed for intentional aliasing, for example in proxy |
| 11:49 | Chousuke | gensyms only stay the same within the same syntax-quoted form. so you can't syntaxquote, unquote a subform, and the syntaxquote a subform of that and expect your y# to be the same as in the earlier syntaxquoted forms. |
| 11:49 | Chousuke | unless there's a way to make that happen. I'm not a macro expert either |
| 11:50 | Chousuke | sometimes I wish it'd work though. |
| 12:30 | sohail | binding is not like let* is it.. |
| 12:30 | rhickey | sohail: nope |
| 12:31 | sohail | rhickey, is there some specific reason? |
| 12:31 | sohail | let is like cl:let* |
| 12:33 | rhickey | parallel bindings can be popped in unison, also one dynamic binding referring to the prev is unusual |
| 12:33 | rhickey | that's also why you don;t bind dynamic vars in let like you can in CL |
| 12:33 | rhickey | separate construct and semantics |
| 12:35 | sohail | hm |
| 12:36 | sohail | ok something to think about |
| 12:40 | gnuvince_ | To find the maximum inside a collection, is there a preference towards (apply max coll) or (reduce max coll)? |
| 12:46 | danlarkin_ | discontent in the arc community eh :-/ http://www.arclanguage.org/item?id=8462 |
| 12:48 | gnuvince_ | danlarkin_: not too surprising. And Paul Graham's comment that "Lispers have been willing to wait 50 years for a good implementation" really makes me laugh: a *lot* of experienced Lispers are saying that Clojure is what they've been waiting for, not just a set of macros on top of mzscheme |
| 12:48 | danlarkin_ | well I do agree with pg on one point |
| 12:49 | danlarkin_ | and that is that it's useless to start horse-racing languages |
| 12:49 | danlarkin_ | haha but you're right, I'm not really sure what world he's living in saying that |
| 12:51 | gnuvince_ | oh, *ZING* |
| 12:51 | gnuvince_ | A guy replied to a comment on arclanguage.org by Paul |
| 12:51 | gnuvince_ | "Your mantra in your role running Y-Combinator is "make something people want." |
| 12:51 | gnuvince_ | Is Arc exempt from that?" |
| 12:51 | danlarkin_ | haha burn!! |
| 13:21 | dmiles_afk | (abort) |
| 13:54 | arohner | is there a good way to 'diff' two structures in clojure? |
| 13:54 | arohner | I'd like to see the first place where two datastructures are different |
| 13:55 | clogged | anyone using SLIME with clojure? |
| 13:56 | arohner | clogged: sure |
| 13:56 | arohner | me, and I'm sure a bunch of other people |
| 13:57 | lisppaste8 | clogged pasted "slime" at http://paste.lisp.org/display/69189 |
| 13:57 | clogged | i already have clojure as inferior-lisp but when i try to start M-x slime the repl i get an error |
| 13:57 | clogged | ^^ paste |
| 13:58 | arohner | are you using cvs slime? |
| 13:58 | arohner | and swank-clojure? |
| 13:58 | clogged | cvs slime, not swank-clojure |
| 13:58 | arohner | yeah, you'll need that |
| 13:59 | arohner | http://github.com/jochu/swank-clojure/tree/master |
| 13:59 | lisppaste8 | clogged annotated #69189 with "clojure-setup" at http://paste.lisp.org/display/69189#1 |
| 13:59 | clogged | ok |
| 14:04 | clogged | and u think it is better than the clojure-mode? |
| 14:04 | clogged | can i have both at once? |
| 14:11 | arohner | I think swank and clojure mode are mostly orthogonal |
| 14:11 | arohner | clojure-mode mainly deals with highlighting and indenting |
| 14:11 | arohner | swank deals with eval-buffer, load-file, etc |
| 14:11 | arohner | yes, you can have them both at once, I do |
| 14:12 | arohner | C-c C-d C-d is very nice |
| 14:12 | arohner | prints docs for the function under the cursor |
| 14:19 | clogged | clojure-mode can evan latest s-exp and a whole file too |
| 14:20 | kotarak | How do I have to interpret ClassCastErrors? I have a constructor expecting an IPersistentMap and get said error when a pass eg. a sorted-map: clojure.sorted_map__79. This worked previously. |
| 14:22 | gnuvince_ | meh |
| 14:22 | kotarak | oops. Ok. again my fault. |
| 14:22 | gnuvince_ | Tried Emacs for Clojure and immediately the pinky and wrist strain came back :( |
| 14:26 | drewc | gnuvince: remap capslock and use opposite hand for modifiers |
| 14:26 | drewc | i don't do the latter anymore, now that i have a pinky-of-steel! |
| 14:27 | gnuvince_ | drewc: my capslock is already remapped |
| 14:27 | drewc | gnuvince: ouch .. that's a shame! |
| 14:27 | drewc | gnuvince: get a kenesis :) |
| 14:28 | gnuvince_ | Or keep using vim :) |
| 14:28 | arohner | yeah, I use a keyboard with the split in the middle |
| 14:29 | arohner | I had wrist problems before emacs, with the split keyboard and remapping caps, I'm great |
| 14:30 | gnuvince_ | drewc: it *is* annoying to constantly alt-tab between vim and clj and doing (load-file "foo.clj") constantly |
| 14:31 | Chouser | gnuvince_: have you tried chimp? |
| 14:31 | gnuvince_ | But it's better than the pain I had after two years of Emacsing. |
| 14:31 | gnuvince_ | chimp? |
| 14:31 | Chouser | it's not as bug-free as one would hope, but it's not terrible. |
| 14:31 | Chouser | chimp: http://www.vim.org/scripts/script.php?script_id=2348 |
| 14:32 | gnuvince_ | Nope, haven't tried that. |
| 14:32 | kotarak | Interfacing to the outside world is hard with Vim. :( |
| 14:32 | gnuvince_ | kotarak: indeed. |
| 14:32 | kotarak | I try to make chimp to work as best as I can, but there something strange issues with screen and rlwrap... |
| 14:32 | Chouser | yeah. IMHO, both emacs and vim are showing their age, but I'm not convinced that any of the IDEs are the answer. |
| 14:33 | Chouser | no matter how many complex and featureful plugins are available for them. |
| 14:33 | gnuvince_ | The best of both worlds would be something like Yi |
| 14:33 | Chouser | I keep homing netbeans + jvi + enclojure will do it for me. We'll see... |
| 14:33 | Chouser | hoping |
| 14:33 | gnuvince_ | where the entire editor is scriptable, like Emacs, but where it is completely independant from the key binding. |
| 14:34 | kotarak | Yep. But Haskell is not for everyone. |
| 14:34 | gnuvince_ | kotarak: doesn't need to be Haskell, but the basic idea is good. |
| 14:34 | kotarak | How about jim? |
| 14:34 | gnuvince_ | never heard of it. |
| 14:34 | kotarak | (a clojure "vim") |
| 14:34 | kotarak | It does not exist, yet. ;) |
| 14:34 | gnuvince_ | ah |
| 14:35 | kotarak | When did it change, that I cannot apply hash-map? |
| 14:46 | arohner | kotarak: what do you mean? |
| 14:47 | kotarak | I found the problem. |
| 14:47 | kotarak | I had something like this helper function: (defn x [t k] `(~t ~@k)) |
| 14:48 | kotarak | And used in a macro like that: (defmacro y [& k] (x hash-map k)) |
| 14:48 | arohner | oh. is quasi-quote allowed/good style in a non-macro context? |
| 14:48 | kotarak | This worked before and is now broken. |
| 14:48 | kotarak | arohner: yes it is. |
| 14:49 | kotarak | This is the correct macro: (defmacro y [& k] (x `hash-map k)) |
| 14:49 | kotarak | Note the quote. |
| 14:49 | kotarak | I use the function is driver for several macros, parameterizing over the arguments since the basic function does always the same. |
| 14:50 | kotarak | So the function is called from macros, hence returning the quasi-quoted form. |
| 14:51 | gnuvince_ | You guys are going to need to refresh my memory. If I want to keep a cache of results and keep a piece of code function, I need to use CPS, right? |
| 15:05 | arohner | lisppaste8: url |
| 15:05 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 15:05 | lisppaste8 | arohner pasted "deftempl" at http://paste.lisp.org/display/69194 |
| 15:06 | arohner | weavejester posted that to compojure. I find it to be pretty awesome. |
| 15:29 | clogged | which language is the run script of compojure written in? ruby? |
| 15:31 | meredydd | Bash |
| 15:31 | meredydd | (then Clojure) |
| 15:31 | meredydd | (unless, of course, I'm hideously out of date) |
| 15:57 | jgracin | What's the correct procedure to set *print-length* in repl? In several examples, I've seen (set! *print-length* 100). But how can this work? (it doesn't for me) |
| 15:58 | jgracin | go to (in-ns 'clojure) and (def)? |
| 15:58 | kotarak | jgracin: Probably with (binding [*print-length* 100] (do-print-stuff)) |
| 15:59 | jgracin | kotarak: but I want this to affect the repl. |
| 15:59 | rhickey | jgracin: should work: |
| 15:59 | rhickey | user=> (set! *print-length* 10) |
| 15:59 | rhickey | 10 |
| 15:59 | rhickey | user=> (cycle [1 2 3]) |
| 15:59 | rhickey | (1 2 3 1 2 3 1 2 3 1 ...) |
| 16:00 | jgracin | I'm (expectedly) getting: java.lang.IllegalStateException: Can't change/establish root binding of: *print-length* with set |
| 16:00 | jgracin | I must be doing something wrong... |
| 16:00 | rhickey | jgracin: what repl? |
| 16:01 | jgracin | Slime |
| 16:01 | rhickey | if it creates its own repl it needs to follow clojure.lang.Repl by making bindings for *print-length* etc, probably isn't yet |
| 16:02 | jgracin | oh, that's it. I didn't update Slime! |
| 16:02 | jgracin | swank-clojure, that is. |
| 16:04 | jgracin | right, it's not updated to bind *print-length* yet. |
| 16:06 | Chouser | I didn't have to make any manual changes for ClojureScript to support *print-length*. Re-gerenated boot.js, and it just worked. |
| 16:33 | arohner | I have a macro that returns a fn. I'm trying to put a reflection type hint in it, but the compiler complains |
| 16:34 | arohner | putting the reflection type hint for the same class works just fine on other defns in the same file |
| 16:34 | rhickey | arohner: paste? |
| 16:34 | arohner | lisppaste8: url |
| 16:34 | lisppaste8 | To use the lisppaste bot, visit http://paste.lisp.org/new/clojure and enter your paste. |
| 16:34 | lisppaste8 | arohner pasted "type hint?" at http://paste.lisp.org/display/69205 |
| 16:36 | arohner | java.lang.IllegalArgumentException: Unable to resolve classname: HttpServletRequest |
| 16:36 | rhickey | arohner: and if you fully qualify it? |
| 16:37 | arohner | java.lang.ClassNotFoundException: java.servlet.http.HttpServletRequest |
| 16:37 | arohner | oops |
| 16:37 | arohner | one sec |
| 16:38 | arohner | that works |
| 16:39 | clogged | im using win32, singlecore. i want to write a simple that uses agents. i have never written a program using threads. so i have never encountered these problems. what would be a good exercise-problem to solve? |
| 16:40 | rhickey | arohner: you are in a regular quote there and aren't getting any import help |
| 16:41 | arohner | but I would be if I weren't in the regular quote? |
| 16:42 | rhickey | yes, outside of quote and in ` names will be resolved |
| 16:52 | arohner | rhickey: would you accept a patch that adds source file names to reflection warnings? |
| 16:53 | rhickey | arohner: you mean *warn-on-reflection* warnings? |
| 16:53 | arohner | yes |
| 16:57 | rhickey | you just planning to grab SOURCE.get() at warning points? |
| 16:58 | arohner | I was thinking of passing source into the ctors for the different Expr types |
| 16:58 | clogged | how do i do (info regex)? |
| 16:58 | arohner | some of the expr types already do that, like InstanceMethodExpr |
| 17:01 | fyuryu | clogged: not sure if that's what you want: (find-doc "regex") |
| 17:01 | rhickey | arohner: I'd rather not change any signatures right now |
| 17:02 | rhickey | you could add source reporting to static/instance methods (which already have source) and get most cases |
| 17:03 | arohner | yeah, I did that. It caught about half the cases |
| 17:03 | arohner | I can do SOURCE.get() |
| 17:04 | rhickey | arohner: you have a lot of field access? |
| 17:04 | rhickey | or ctors? |
| 17:05 | arohner | not sure yet. I'm guessing ctors |
| 17:05 | kotarak | How do I fix reflection warnings for the gen-class? eg. I get a warning on (.state object) (where state is defined via :state). After adding a type hint (defn Foo-bla [#^Foo this] (.state this)), I get a more than one matching method found. It seems to assoc. But I'm puzzled. W/o type hint the code worked. |
| 17:08 | rhickey | kotarak: is it derived from another genclas class with state? |
| 17:09 | kotarak | rhickey: it implements clojure.lang.IPersistentMap and the class loader complains about assoc. (. this assoc k v) in assocEx. |
| 17:09 | kotarak | Deriving from Object |
| 17:11 | rhickey | kotarak: I'm confused - is the problem state or assoc? |
| 17:11 | rhickey | can you paste something? |
| 17:11 | kotarak | I'm sorry, I confused myself. Yes. Just a sec. |
| 17:14 | lisppaste8 | kotarak pasted "assoc: more than one matching method" at http://paste.lisp.org/display/69210 |
| 17:15 | kotarak | rhickey: adding a type hint to this in the method definition gives the failure. Without it works. |
| 17:15 | kotarak | rhickey: the state things was confusion sorry. |
| 17:18 | rhickey | kotarak: and if you hint IPersistentMap instead of the concrete type? |
| 17:18 | kotarak | Will test.... |
| 17:19 | kotarak | No. Still complaining. |
| 17:20 | clogged | anyone know python? i can do pat=re.compile(pattern) then pat.sub(topattern, phrase) |
| 17:20 | clogged | is there similar function n java or clojure? |
| 17:21 | rhickey | kotarak: I can reproduce with a smaller case here - will look into it |
| 17:21 | kotarak | rhickey: thanks :) |
| 17:31 | hoeck | clogged: i don't know python, but there is http://clojure.org/other_functions (the re-* functions) |
| 17:34 | meredydd | clogged: clojure.contrib.str-utils/re-sub is probably what you're looking for |
| 17:34 | meredydd | Or, of course, (.replaceAll str "some regexp string") |
| 17:34 | meredydd | (although the latter doesn't precompile it - it's just a string, and the regexp gets recompiled every time) |
| 17:38 | clogged | is there a help or doc function available at the repl? like (doc re) ? |
| 17:38 | kotarak | (doc doc) ;) |
| 17:40 | rhickey | or (find-doc "re-") |
| 17:41 | clogged | meredydd: do i need to import something to use replaceAll? |
| 17:42 | meredydd | clogged: Nope; that method's already in the String class. |
| 17:42 | kotarak | clogged: note the leading dot: .replaceAll. This indicates a method of the following object. |
| 17:42 | meredydd | (.replaceAll str exp) is just sugar for (. str replaceAll exp) - it's just an ordinary method call. |
| 17:44 | rhickey | kotarak: fixed - svn rev 1080 |
| 17:44 | kotarak | rhickey: fast as always. :) thanks. |
| 17:45 | gnuvince_ | Is there an easy bool->int conversion? |
| 17:46 | rhickey | (if x 1 0) |
| 17:48 | clogged | meredydd: doens it need 3 params? the string to look in, the exp to be replcaed and then the new expr? |
| 17:48 | clogged | (.replaceAll str pat) -> java.lang.IllegalArgumentException: No matching method found: replaceAll |
| 17:49 | meredydd | clogged: You are, of course, correct. When the advice of a random fool on IRC and the API docs disagree, go with the API docs :) |
| 17:49 | clogged | :) |
| 17:50 | meredydd | http://tinyurl.com/5zcvfs |
| 17:52 | clogged | (.replaceAll "hoh" "[bcdfghjklmnpqrstvwxyz]o[bcdfghjklmnpqrstvwxyz]" "h") |
| 17:52 | clogged | "h" |
| 17:52 | clogged | works |
| 18:00 | clogged | hmm somehow i need to know the letter of the match |
| 18:01 | clogged | like if i match hoh i need to know the first letter h so i can do -> h or if it is sos i should be -> |
| 18:02 | lisppaste8 | clogged pasted "regex-replace" at http://paste.lisp.org/display/69211 |
| 18:34 | lisppaste8 | achim blomkvist annotated #69211 with "hoha" at http://paste.lisp.org/display/69211#1 |
| 19:08 | duck1123 | how do I concat a string and the value of a hash? |
| 19:08 | duck1123 | it's not working for me |
| 19:20 | Chouser | "the" value? |
| 21:03 | danlarkin | billc``: howdy |
| 22:25 | danlarkin | room's dead on the weekend eh |
| 22:28 | Chouser | indeed |
| 22:49 | RadioApeShot | Anyone about using Slime with clojure? |
| 22:49 | arbscht | yes |
| 22:50 | RadioApeShot | I think I understand that if I put a (clojure/ns testspace) at the top of a file, then slime should automatically switch to that namespace when I evaluate a form from that file. |
| 22:50 | RadioApeShot | Is that right? |
| 22:50 | RadioApeShot | This is how it works with packages in CL |
| 22:50 | RadioApeShot | My clojure/slime alas seems to be confused |
| 22:51 | RadioApeShot | It is trying to evaluate forms with C-X C-E in the user namespace. |
| 22:51 | RadioApeShot | Regardless of what the current namespace of clojure is on my REPL and regardless of namespace declarations at the top of the file. |
| 22:53 | RadioApeShot | So if I have like (clojure/ns testspace (:use provides.foldl)) at the top of my file |
| 22:53 | RadioApeShot | And a form that says (foldl cons '(4 5) '(1 2 3)) |
| 22:54 | RadioApeShot | When I try to execute it with C-X C-E I get an error that user does not contain foldl, even if I manually change the namespace of the repl to testspace |
| 22:54 | RadioApeShot | If I select a region which contains the namespace declaration AND the form I want to evaluate, then C-X C-R works. |
| 22:55 | RadioApeShot | Also regardless of the state of the REPL. |
| 22:56 | arbscht | yes, I can reproduce it. hm. |
| 22:59 | RadioApeShot | It sort of makes dealing with namespaces a hassle. |
| 22:59 | RadioApeShot | How weird is the slime/clojure/elisp ecosystem |
| 22:59 | RadioApeShot | ? |
| 22:59 | RadioApeShot | Do I have a shot at figuring out the issue? |
| 22:59 | RadioApeShot | I am fluent in elisp and pretty conversant in CL. |
| 23:00 | RadioApeShot | If someone could give a hint at where the general vicinity of the bug may be I can look at the code. |
| 23:07 | arbscht | RadioApeShot: if you call (ns testspace ...) in the repl, return to user, and then C-x C-e, does it work? |
| 23:07 | RadioApeShot | No |
| 23:07 | RadioApeShot | even if the repl is living in the namespace |
| 23:07 | RadioApeShot | Apparently slime is switching back to user before evaluating the form |
| 23:07 | RadioApeShot | And then switching to whatever the repl is in |
| 23:08 | RadioApeShot | If I copy/paste the form onto the repl inside the namespace, then that works. |
| 23:08 | arbscht | do you have a recent swank-clojure? |
| 23:08 | RadioApeShot | Or, as I said above, if I select a region which contains the ns form and the form I am interested in and C-R |
| 23:08 | RadioApeShot | Yeah, svn from a day or two ago. |
| 23:08 | RadioApeShot | Newest clojure, also pulled from svn |
| 23:08 | RadioApeShot | I think on thursday |
| 23:09 | RadioApeShot | My slime might be a bit stale, but I rebuilt it with my SBCL using clbuild no more than a month ago. |
| 23:09 | RadioApeShot | And I think clbuild pulls from the latest version. |
| 23:11 | arbscht | I can't reproduce all of that behaviour; it only happens when the ns is not already known to the clojure instance |
| 23:11 | akopa | Does clojure have a type-predicate for characters-- character? and char? aren't bound. |
| 23:13 | Chouser | Apparently not. (instance? Character n) |
| 23:14 | RadioApeShot | arbscht: let me fool around with it some more |
| 23:19 | RadioApeShot | Maybe it has something to do with the fact that the working directory is not on the classpath? |
| 23:19 | RadioApeShot | Does a namespace necessarily correspond to some directory structure on the classpath? |
| 23:19 | RadioApeShot | Or is it independent? |
| 23:20 | Chouser | It's technically independant, but there are a few functions and macros that only work right if they match up. |
| 23:20 | RadioApeShot | Is there a way to dynamically extend the classpath from clojure? |
| 23:22 | Chouser | (doc add-classpath) but there are a few different classloaders, and I'm not not sure which are involved in which context. |
| 23:23 | RadioApeShot | Well, is my expectation of the behavior correct? |
| 23:23 | RadioApeShot | Should I expect slime to automatically contextualize forms to the package at the top of the file? |
| 23:23 | RadioApeShot | Or am I crazy/stupid? |
| 23:23 | RadioApeShot | I mean I might be crazy/stupid anyway. |
| 23:23 | Chouser | I don't know anything about emacs or slime, sorry. |
| 23:24 | RadioApeShot | How... |
| 23:24 | RadioApeShot | How do you do things without... emacs? |
| 23:24 | Chouser | hehe |
| 23:25 | RadioApeShot | What are you using? |
| 23:25 | RadioApeShot | Maybe I should use that. |
| 23:26 | RadioApeShot | I can Vim as well as Emacs. |
| 23:26 | Chouser | yeah, vim. |
| 23:26 | RadioApeShot | Hm |
| 23:26 | Chouser | I have clojure in another terminal window, with rlwrap for history, and readline set up with vi keystrokes. |
| 23:27 | RadioApeShot | I did some wild shit with Vim and Screen back in the day. |
| 23:27 | RadioApeShot | But eventually I just realized I was writing emacs. |
| 23:27 | RadioApeShot | So I switched. |
| 23:27 | RadioApeShot | I use viper-mode most of the time. |
| 23:27 | RadioApeShot | But not for lisp. |
| 23:27 | Chouser | funny you should say that. There's a thing called "chimp" that does some vim/screen/clojure integration. |
| 23:28 | Chouser | lets you send clojure code from vim to your clojure prompt. It works ok. |
| 23:29 | Chouser | Last time I tried to use emacs, I was trying to do things the "emacs way". |
| 23:29 | Chouser | Next time I try to use emacs, I'll try to use it my own way. That probably means viper-mode. |
| 23:30 | RadioApeShot | Emacs is about doing it your way. |
| 23:30 | RadioApeShot | Not to give a pat recommendation |
| 23:30 | RadioApeShot | But I have found emacs to be an almost religious experience. |
| 23:30 | RadioApeShot | Emacs Lisp literally flies out of my fingers |
| 23:31 | Chouser | bleh. I want to customize my editor in clojure, not in some ancient, namespace-less, dynamically bound lisp. |
| 23:31 | RadioApeShot | The curve of usefulness for any given project in emacs starts negative and then becomes positive and rapidly approaches indispensable. |
| 23:31 | RadioApeShot | Emacs Lisp is not so awful. |
| 23:31 | Chouser | I don't believe you. ;-) |
| 23:31 | RadioApeShot | The fact that variables can be buffer local helps |
| 23:31 | Chouser | hm. |
| 23:31 | RadioApeShot | And you can use the cl package for lexical scoping. |
| 23:32 | RadioApeShot | I mean the system is awful |
| 23:32 | RadioApeShot | And yet |
| 23:32 | RadioApeShot | At the same time |
| 23:32 | RadioApeShot | I want every application to be like emacs. |
| 23:32 | RadioApeShot | Plus, the imperfection of EL makes it push you to just do what works |
| 23:32 | RadioApeShot | Not what is ideal |
| 23:32 | RadioApeShot | Write the code, move on. |
| 23:32 | Chouser | Is it stupid to consider a new clojure-based editor? Is emacs with all its warts still so far ahead of the game? |
| 23:32 | RadioApeShot | Like a Samurai |
| 23:32 | RadioApeShot | It is pretty far ahead. |
| 23:33 | RadioApeShot | I need interactive shells, at the very least. |
| 23:33 | RadioApeShot | There is an emacs implemented in MIT-Scheme. |
| 23:33 | RadioApeShot | This is attractive to me, since I am a schemer at heart. |
| 23:33 | RadioApeShot | But it is not documented and the library of features is quite small. |
| 23:33 | RadioApeShot | I don't have time to bring it up to speed. |
| 23:33 | RadioApeShot | So I use emacs. |
| 23:34 | RadioApeShot | Plus, Scheme is too "do it right" |
| 23:34 | RadioApeShot | Emacs is very "do it now." |
| 23:34 | RadioApeShot | There is something to be said for that. |
| 23:34 | RadioApeShot | Ok |
| 23:34 | RadioApeShot | I have to turn in for the evening. |
| 23:34 | RadioApeShot | I have an engagement |
| 23:34 | RadioApeShot | Which might resemble a date. |
| 23:35 | Chouser | ah, very well. Enjoy yourself. |
| 23:35 | RadioApeShot | With a very attractive blond |
| 23:35 | RadioApeShot | And I need rum. |
| 23:39 | akopa | There are emacs implemented in most lisp (see also climacs, hemlock, etc.) GNU Emacs and XEmacs have usually been more featureful. Zemacs might be an excetion, but I've never used a Lisp Machine. |
| 23:47 | akopa | null? |
| 23:48 | akopa | whoops.. wrong buffer |