Re: command line options parser

2010-12-11 Thread Saul Hazledine
On Dec 11, 7:08 am, Alan a...@malloys.org wrote: Have you considered instead providing a clojure wrapper around a well- known java command-line parser? The only one I've used is apache- commons-cli, which I found to be pretty lackluster,

Re: command line options parser

2010-12-11 Thread Meikel Brandmeyer
Hi, Am 11.12.2010 um 09:53 schrieb Saul Hazledine: I saw this and thought the opposite! I think it is a good thing that somebody has done a higher level argument parsing library. As far as I know, getopt doesn't support type conversion, help text or field validation. Generally, higher

Re: Moderately off-topic: installing emacs on OSX

2010-12-11 Thread Philip Hudson
+1 to Andy Fingerhut's GNU-via-MacPorts instructions; WFM. I need an exact workalike across Mac, linux and cygwin, which is why I prefer it over the better-integrated Aqua/Carbon/Cocoa alternatives. A big +1 to Phil Hagelberg's make-the-wiki-authoritative call. I can attest to the

Implementing multimethods in pure Clojure

2010-12-11 Thread Alexander Yakushev
I am currently giving some lectures about Clojure to a group of students. One of the Lisp features I promote to them is the ability to write language in the language itself. So during the lecture when I talked about multimethods one student asked if one could write own multimethods implementation

Adding an interface with (proxy) produces NoClassDefFoundError

2010-12-11 Thread Joshua Eckroth
I'm having an issue using (proxy) to extend a class (JViewport) with an interface (Scrollable). The behavior is as follows: if I clean my code (lein clean) then try to run it (lein run), I get an exception. However, if I edit the file that has the proxy, then run the code again (lein run), it

Re: Adding an interface with (proxy) produces NoClassDefFoundError

2010-12-11 Thread Miki
I'm having an issue using (proxy) to extend a class (JViewport) with an interface (Scrollable). The behavior is as follows: if I clean my code (lein clean) then try to run it (lein run), I get an exception. However, if I edit the file that has the proxy, then run the code again (lein run), it

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Ken Wesson
On Sat, Dec 11, 2010 at 3:32 AM, Alexander Yakushev yakushev.a...@gmail.com wrote: I am currently giving some lectures about Clojure to a group of students. One of the Lisp features I promote to them is the ability to write language in the language itself. So during the lecture when I talked

Re: Getting strange behavior when stubbing

2010-12-11 Thread Alex Baranosky
You're right Ken. I had written a macro to wrap the clojure.test stuff, and wasn't able to put both the actual and expected inside the stubbing. If I had just been using Amit Rathore's stuff with standard clojure.test then I'd have had no problem! -- You received this message because you are

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Meikel Brandmeyer
Hi, I suppose you are Unlogic from IRC. I don't whether you saw it, but I posted some rough sketch: http://paste.pocoo.org/show/303462/ It just introduces the function binding, no other global objects are introduced. The methods are stored in a map in an atom in the metadata of the Var of the

Re: command line options parser

2010-12-11 Thread Alan
I confess I didn't notice the type-conversion stuff in clargon; my view is now basically the same as Miekel's: it's great to have these new features, but they should be on top of getopt, which parses excellently. In fact, I think I'll fork clargon and see if I can tweak it that way. On Dec 11,

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Alexander Yakushev
On Dec 11, 5:37 pm, Ken Wesson kwess...@gmail.com wrote: On Sat, Dec 11, 2010 at 3:32 AM, Alexander Yakushev Making the thing work with (name args ...) is not too too difficult. You'd have to have defmethod output both a def of an atom like above, but with a gensym for a name, and a defn

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Alexander Yakushev
On Dec 11, 6:56 pm, Meikel Brandmeyer m...@kotka.de wrote: Hi, I suppose you are Unlogic from IRC. I don't whether you saw it, but I posted some rough sketch:http://paste.pocoo.org/show/303462/ It just introduces the function binding, no other global objects are introduced. The methods

Re: OOM with Agents

2010-12-11 Thread Michael Ossareh
On Fri, Dec 10, 2010 at 23:36, Alex Osborne a...@meshy.org wrote: Michael Ossareh ossa...@gmail.com writes: There are 54874 companies in the companies var. The OOM tends to take place when there are 1000 or so companies to process. What is likely to be causing this issue? I replied on

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Meikel Brandmeyer
Hi, Am 11.12.2010 um 23:10 schrieb Alexander Yakushev: Thanks for your response! Your example is very useful, though I wanted to implement the multimethods without that multi-call layer, so it will look just like an ordinary function. Thanks to Ken Wesson I already have an idea how to do

Re: Implementing multimethods in pure Clojure

2010-12-11 Thread Ken Wesson
On Sat, Dec 11, 2010 at 5:24 PM, Meikel Brandmeyer m...@kotka.de wrote: Am 11.12.2010 um 23:10 schrieb Alexander Yakushev: Oh, that's my fault, I tried with-meta function on the atom and it wouldn't work. Still, after I defined an atom with some metadata in it, how can I change it thereafter?