2008-11-02
| 01:06 | asbjxrn | Is anyone using any profiling tools they can recommend? |
| 03:57 | Lau_of_DK | Morning guys |
| 04:14 | Kerris4 | morning Lau_of_DK |
| 04:20 | Lau_of_DK | I asked this question yesterday and I still need answers. I have a directory structure on my HD which is similar to /foo/bar/Baz.class* and I need to be able to (import '(foo.bar Baz)) - How do I do this ? |
| 04:43 | cgrand | Lau_of_DK: did you try to add / to the classpath? |
| 04:43 | Lau_of_DK | Yes |
| 04:44 | Lau_of_DK | (btw. Welcome back from holiday cgrand, hope you had a good one) |
| 04:57 | cgrand | no idea then :-( |
| 08:13 | tomppa | Is there some clean and idiomatic way to update structures? Especially when updating several (possibly interdependent) fields I end up with several nested ASSOCs which look quite ugly |
| 08:13 | Chouser | assoc-in |
| 08:15 | tomppa | that looks better. I was thinking about writing a macro that would be a bit like a combination of Haskell struct update syntax and CLs WITH-ACCESSORS |
| 08:15 | Chouser | there's also update-in |
| 08:19 | tomppa | Thanks, I'll have to play with those |
| 09:26 | rhickey | http://thediscoblog.com/2008/11/02/poll-javas-2008-memorable-moment/ |
| 09:27 | duck1123 | voted |
| 09:28 | Chouser | heh, results seem a little skewed |
| 09:29 | kotarak | hehe |
| 11:46 | kib2 | Hi, stupid question but why when I type (1 2 3) in the REPL do I get an error ? |
| 11:47 | Kerris4 | what is the expected output, kib2? |
| 11:47 | kib2 | (1 2 3) like in Lisp |
| 11:48 | kib2 | sorry, I though it was. But it raises an error too. |
| 11:49 | kib2 | because it's not a function |
| 11:50 | Hun | that's because 1 is (usually) not a function |
| 11:50 | vy | Hi! How can I get a list of all available symbols (functions, variables, macros, etc.) in a specific namespace? |
| 11:51 | danlarkin | kib2: if you want the literal list (1 2 3) you can type '(1 2 3) |
| 11:51 | kib2 | danlarkin: yes, I must escape the eveluation, that's it ? |
| 11:52 | danlarkin | kib2: yup |
| 11:52 | danlarkin | kib2: (list 1 2 3) produces the list (1 2 3) too... but you'll see the first element in that list is a function |
| 11:53 | kib2 | a thing I cannot understand well at the moment is how to deal with global variables. |
| 11:53 | kib2 | danlarkin: yes, thanks. |
| 11:54 | Hun | what's the problem with globals? |
| 11:55 | kib2 | Hun : I'm currently reading "Practical Common Lisp" by Seibel, he uses globals all the times ,ie *db* and Clojure does not from what I've read. |
| 11:55 | Chouser | vy: (ns-publics 'clojure) |
| 11:56 | Hun | those are special (aka dynamic) variables |
| 11:56 | Hun | which can be dynamically rebound |
| 11:56 | Hun | iirc there's bind or binding in clojure (have no repl at this machine) |
| 11:57 | Kerris4 | kib2: you might be interested in Stuart Holloway's port of the Practical Common Lisp code samples to Clojure |
| 11:57 | Kerris4 | http://blog.thinkrelevance.com/2008/9/16/pcl-clojure |
| 11:57 | vy | Chouser: Thanks. |
| 11:58 | kib2 | yes, but does Clojure has something like this too or should I write any function using my database with another argument ie 'db' and pass it trhough each time ? |
| 11:58 | kib2 | Kerris4: really nice, thanks ! |
| 11:59 | Kerris4 | You're welcome, I'm new to both Lisp and Clojure and Stuart Holloway's work helped me immensely too. :P |
| 11:59 | Hun | hmm... maybe i can get a jvm to run on my avr. then i could do embedded clojure :) |
| 12:01 | kib2 | Does someone here works with Clojure on Windows ? It's really annoying to have to open a console each time to enter the REPL and write (load-file "myscript.clj"). |
| 12:02 | kotarak | kib2: I do. Working with Vim and Chimp. |
| 12:02 | Kerris4 | kib2: I use enclojure, a NetBeans plugin http://enclojure.net/GettingStarted.html |
| 12:02 | kib2 | kotarak: interesting, what's Chimp exactly ? |
| 12:02 | Hun | kib2: me with emacs and slime. works fine |
| 12:03 | kib2 | Kerris4: yep, I've installed it too, but my scripts are 10 lines long at the moment and launching NetBeans takes a while ! |
| 12:03 | kotarak | kib2: it uses screen to talk to the REPL. But it's one street. But I'm working on Gorilla, which will also provide information back to vim. eg. for doc lookup |
| 12:03 | kotarak | kib2: Chimp also needs Cygwin... |
| 12:04 | kib2 | kotarak: I have Cygwin installed two : where can I find Chimp ? |
| 12:04 | kotarak | kib2: www.vim.org, search for chimp in the scripts. |
| 12:05 | kib2 | Hun: can you show me how you configured emacs to work with Clojure ? |
| 12:05 | kib2 | kotarak: ok, I'll search : thanks for the tips |
| 12:05 | Hun | get swank-clojure and the newest slime-dev |
| 12:09 | kib2 | Hun: thanks, I've got it |
| 12:09 | Hun | watch the slime video |
| 12:09 | Hun | it's for CL, but a lot of this stuff works for clojure, too |
| 12:10 | danlarkin | Bill Clementson's got some good instructions on setting up slime for clojure -- http://bc.tech.coop/blog/081023.html |
| 12:10 | Hun | i haven't found a solution for java documentation that i'm happy with yet, but it's pretty usable overall |
| 12:12 | kotarak | Hun: where can I get a copy? All links refer to the same dead one. |
| 12:13 | kib2 | Hun : seems very interesting, thanks ! |
| 12:15 | Hun | i saw one at cliki some time ago. i don't think i have it lying around... |
| 12:17 | Hun | kotarak: i found it |
| 12:17 | Hun | do you have 150M webspace lying around? |
| 12:26 | duck1123 | where do you guys reccomend for webspace? |
| 12:26 | duck1123 | I need it to be cheap right now |
| 12:26 | danlarkin | I like webfaction.com a lot |
| 12:28 | duck1123 | what would it take to get clojure-mode working with semantic? any emacs hackers in here? |
| 12:28 | kib2 | Sorry, I'm not from the Java world : how do I compile Clojure SVN with ant ? |
| 12:28 | duck1123 | jjust ant |
| 12:28 | duck1123 | you cd into the directory, and just type ant |
| 12:29 | duck1123 | the default is to build clojure |
| 12:34 | kib2 | duck1123: wich directory, the 'trunk' one? |
| 12:35 | danlarkin | java.lang.OutOfMemoryError: Java heap space |
| 12:36 | danlarkin | that's annoying... the jvm won't grow as needed... :-/ |
| 12:52 | duck1123 | um yeah, if you checked out the trunk |
| 12:59 | duck1123 | can you destructuring bind hashmaps? |
| 13:00 | duck1123 | like how common lisp has it? |
| 13:00 | kotarak | duck1123: let [{:key a b c} {:a 1 :b 2 :c 4}] ...) |
| 13:00 | kotarak | :keys |
| 13:00 | kotarak | Similiar with :syms |
| 13:01 | duck1123 | thanks. does that also work with defn? |
| 13:01 | kotarak | I think so, but haven't tried, yet. |
| 13:02 | kotarak | more info is in the let section of http://clojure.org/special_forms |
| 13:55 | Lau_of_DK | Anybody remember the command to echo the classpath from clojure-repl ? |
| 13:56 | sohail | Lau_of_DK, I use (.getProperty System "java.class.path") I think |
| 13:56 | sohail | or is it java.lang.path |
| 14:00 | Lau_of_DK | I used (.. System (getProperty "java.class.path")), but thanks for the tip, you set me on the path |
| 14:00 | danlarkin | I suppose it "should" be written as (System/getProperty "java.class.path") |
| 14:01 | Lau_of_DK | Youre right |
| 14:01 | Lau_of_DK | ...so now we are sworn enemies |
| 14:01 | danlarkin | :-o |
| 14:01 | Lau_of_DK | :) |
| 14:04 | Lau_of_DK | What happend to the old :uses, is that now just another import? |
| 17:07 | danlarkin | I'm having trouble with JSwat, I get a NullPointerException when I start it up -- version 3.61 on OS X. Any ideas? :) |
| 17:11 | aperotte | hello everyone, wanted to know if anyone knows whether it's possible to tab-complete java class names from within swank/slime in emacs |
| 17:38 | Lau_of_DK | Anybody here done some SqlLite from Clojure ? |
| 18:07 | kotarak | For the vimming part of the community: a little teaser for an improvement of Chimp: Gorilla - http://www.screencast-o-matic.com/watch/cjXn2Nnog |
| 18:16 | Chousuke | looks cool. that doesn't use any weird screen trickery? |
| 18:17 | kotarak | no. But Ruby. :/ Vim is too limited otherwise. |
| 18:17 | Chousuke | well that's acceptable I guess |
| 18:17 | kotarak | Better than Cygwin on Windows. :) |
| 18:18 | kotarak | And all my vims (MacVim and the Windows one) come with Ruby enabled. So I guess it shouldn't much trouble. |
| 18:19 | Chousuke | I'm using aquamacs for clojure stuff mostly because the lisp interaction is a lot better |
| 18:19 | kotarak | Im working on changing that. ;) |
| 18:19 | Chousuke | That's good to hear. |
| 18:25 | adymo | hey, did someone tried to use clojure's Compiler from inside jruby program? |
| 18:26 | adymo | i've tried but i couldn't load the clojure.lang.Compiler class (http://rafb.net/p/aGB5cw31.html)... at the same time Repl loads fine |
| 18:42 | danlarkin | So I've got more path questions... I've got baz.clj in foo/bar/baz/ with (ns foo.bar.baz) at the top. If I want to add a new file like baz-helper.clj can I put that in foo/bar/baz/ too? or must it be in foo/bar/baz-helper/baz-helper.clj |
| 18:56 | danlarkin | Ok I figured it out, I put it in foo/bar/baz/baz_helper/baz_helper.clj |
| 18:58 | raul | hi |
| 19:03 | danlarkin | raul: hi |
| 20:41 | danlarkin | I'm missing something obvious, I know, but what's the higher-order way to apply a function that takes one argument to each of the items in a list and just throw away the output |
| 20:41 | danlarkin | (I'm dealing with a java object so it has side effects) |
| 20:52 | rhickey | danlarkin: (dorun (map f items)) |
| 20:54 | danlarkin | rhickey: ah of course. thanks :) |
| 21:25 | danlarkin | heh, I wish jswat would work for me... I want to know what's causing my java.lang.OutOfMemoryError: Java heap space |