Re: Embedding a REPL

2009-12-08 Thread Oliver Kaiser
Have you seen this post: http://ianp.org/2009/04/embedding-clojure-part-2/ ? I haven't tried this, but it looks like what you are asking. Regards, tok -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to

Re: Multiple dispatch with Multimethods

2009-12-08 Thread Meikel Brandmeyer
Hi, On Dec 8, 8:36 am, Tzach tzach.livya...@gmail.com wrote: I didn't know the costume hierarchy at all, it seems to be very useful. I understand it is coupled to the Java object hierarchy. Not at all. Have a look at the docstrings, eg. of derive and isa?. Even in my example ::Asteroid and

Re: master Clojure API doc now live

2009-12-08 Thread Timothy Pratley
On Dec 4, 6:31 am, Tom Faulhaber tomfaulha...@gmail.com wrote: We now have an official site forAPIdocumentation on the latest master branch of Clojure, for those who aren't content to stay with the release version. Hi Tom, May I ask where the code that generates the docs lives? (I'm sure it

Re: new API webpage format

2009-12-08 Thread Sean Devlin
(inc apply-219-to-1_1) On Dec 8, 1:57 am, Tom Faulhaber tomfaulha...@gmail.com wrote: It turns out the doc string for filter was dropped during a checkin earlier this year. I surprised no one noticed sooner (I guess everyone just knows how filter works). I have filed ticket 219 with a patch

Re: master Clojure API doc now live

2009-12-08 Thread Tom Hickey
Hi Tom I was looking for this code as well. Thanks, Tom On Dec 8, 7:38 am, Timothy Pratley timothyprat...@gmail.com wrote: On Dec 4, 6:31 am, Tom Faulhaber tomfaulha...@gmail.com wrote: We now have an official site forAPIdocumentation on the latest master branch of Clojure, for those who

Re: master Clojure API doc now live

2009-12-08 Thread Tom Faulhaber
github.com/tomfaulhaber/contrib-autodoc Have fun with it! On Dec 8, 6:38 am, Tom Hickey thic...@gmail.com wrote: Hi Tom I was looking for this code as well. Thanks, Tom On Dec 8, 7:38 am, Timothy Pratley timothyprat...@gmail.com wrote: On Dec 4, 6:31 am, Tom Faulhaber

Re: new API webpage format

2009-12-08 Thread Tom Faulhaber
Rich applied the patch this morning. Let me know if there are any other problems. On Dec 8, 6:13 am, Sean Devlin francoisdev...@gmail.com wrote: (inc apply-219-to-1_1) On Dec 8, 1:57 am, Tom Faulhaber tomfaulha...@gmail.com wrote: It turns out the doc string for filter was dropped during a

Help recreating OS X Leiningen 1.0 +Swank bug

2009-12-08 Thread David Nolen
Just want to make sure other people are seeing this on OS X. When starting up lein swank from the project directory and attempting to connect from Emacs with slime-connect with this simple clojure project http://github.com/swannodette/lein-macosx-bug (just creates a JPanel and draws a small line)

Re: new API webpage format

2009-12-08 Thread Howard Lewis Ship
I'd love to help out, but I'm overtaxed (Tapestry 5, Cascade, two clients, upcoming speaking training sessions). My plate is full. Still its great to see the docs broken up by namespace and accurate against the meta doc (the old process was manual, right?). I appreciate the work you've put into

Re: Trouble implementing Dijkstra algorithm in Clojure

2009-12-08 Thread Mark Tomko
A priority queue implemented over a heap would be more efficient than a sorted set, in general. With a heap, you have constant time access to the smallest (WLOG) element in the heap at all times. Removing it costs a fixed O(lg n). A sorted set (especially one that's being modified) isn't

Apply performance and logging JIT compilation

2009-12-08 Thread Krukow
I am writing a function that has to wrap other code. One simple approach is to do user (defn wrap-fun [f] (fn [ args] (println pre-processing) (let [res (apply f args)] (println post-processing) res))) #'user/wrap-fun user (def w (wrap-fun (fn

Re: Embedding a REPL

2009-12-08 Thread Mike
I tried this approach, and it works great. I had to spin the call to main.main() in another thread, but that's expected. What I didn't expect is that when I try to close the LineNumberingPushbackReader (to end the repl), I get infinite exceptions: java.io.IOException: Stream closed

Re: Embedding a REPL

2009-12-08 Thread Albert Cardona
On Mon, Dec 7, 2009 at 11:19 AM, Mike cki...@gmail.com wrote: My app has its own JPanel for display results, and a text area for input, so I'll need to start repl with some replacement callback functions (read, print, prompt, need-prompt).  I'd like to code as much as possible in Clojure, but

Re: Trouble implementing Dijkstra algorithm in Clojure

2009-12-08 Thread ataggart
On Dec 8, 11:38 am, Mark Tomko mjt0...@gmail.com wrote: A priority queue implemented over a heap would be more efficient than a sorted set, in general.  With a heap, you have constant time access to the smallest (WLOG) element in the heap at all times.  Removing it costs a fixed O(lg n).  A

Re: Embedding a REPL

2009-12-08 Thread Liam
Close the *out* stream, not the *in*. That should do it. (. *out* close) It was fun watching that the first time it happend to me. ;-) On Dec 8, 11:26 am, Mike cki...@gmail.com wrote: I tried this approach, and it works great.  I had to spin the call to main.main() in another thread, but

Re: Trouble implementing Dijkstra algorithm in Clojure

2009-12-08 Thread ajay gopalakrishnan
It might not be if the sorted set is internally represented as a tree. Then the smallest element with the leaf of the tree (if tree is balanced) and that is not accessible in O(1) time. -- Forwarded message -- From: ataggart alex.tagg...@gmail.com Date: Tue, Dec 8, 2009 at 6:22 PM

Re: Leiningen in Python

2009-12-08 Thread Phil Hagelberg
Jonghyouk, Yun ageld...@gmail.com writes: I've write some python script for leiningen for Windows machines without wget/curl. I expect it is nicer than as-is bourne-shell-script version of 'lein'. here is my little script: http://github.com/ageldama/configs/blob/master/lein/lein.py It'd

Re: Trouble implementing Dijkstra algorithm in Clojure

2009-12-08 Thread ataggart
On Dec 8, 4:38 pm, ajay gopalakrishnan ajgop...@gmail.com wrote: It might not be if the sorted set is internally represented as a tree. Then the smallest element with the leaf of the tree (if tree is balanced) and that is not accessible in O(1) time. -- Forwarded message

Re: Trouble implementing Dijkstra algorithm in Clojure

2009-12-08 Thread David Brown
On Tue, Dec 08, 2009 at 03:22:47PM -0800, ataggart wrote: I would be very surprised if getting the first element from a sorted- set wasn't ~O(1). As has been mentioned, it probably isn't if the set is a tree. But, also, usually, in addition to getting the first element, we also are going to

Re: how 'bout a debug-repl?

2009-12-08 Thread Mike Douglas
Very cool. Any chance we'd see this get merged into 'new'? -- You received this message because you are subscribed to the Google Groups Clojure group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first

leiningen javac plugin

2009-12-08 Thread antoniogarrote
A quick and dirty hack to compile java files in clojure projects using leiningen. The clojar is at http://clojars.org/, the source code at: http://github.com/antoniogarrote/lein-javac Just run $lein compile-java to transforms 'src/**.java' into 'classes/ **.class' I hope someone find it useful.