Re: Macros, namespaces, and lexical scope

2009-09-26 Thread Meikel Brandmeyer
Hi, Am 26.09.2009 um 17:06 schrieb Constantine Vetoshev: This seems indeed useless at a first glance, but looking down the cause trace usually shows the real problem. Full stack trace follows, although I still don't know what it means. No message. [Thrown class

Re: Macros, namespaces, and lexical scope

2009-09-26 Thread Meikel Brandmeyer
Hi, Am 25.09.2009 um 22:49 schrieb Constantine Vetoshev: (defmacro def-with-db-macro [macro-name open-fn close-fn] `(defmacro ~macro-name [[var# open-args#] body#] `(let [~var# (apply ~'~open-fn [...@open-args#])] (try ~...@body# (finally (~'~close-fn ~var#))

Re: Getting REPL transcript

2009-09-26 Thread Emeka
Thank you all. Chris Grand has figured it out for me. However, I invite you to look at it and comment. Regards, Emeka On Sat, Sep 26, 2009 at 12:15 PM, Daniel Werner daniel.d.wer...@googlemail.com wrote: On Sep 23, 6:20 pm, Emeka emekami...@gmail.com wrote: Hello All, I would like to

Re: Schema for data structures

2009-09-26 Thread Daniel Werner
On Sep 24, 10:14 am, Miron Brezuleanu mbr...@gmail.com wrote: about). The degree of typing can be varied (i.e. a person is any map with a :name key, or any map with only a :name key, or any map with a :name key which is nil or string etc.) You may be interested in Konrad Hinsen's (algebraic)

Re: Macros, namespaces, and lexical scope

2009-09-26 Thread Constantine Vetoshev
On Sep 26, 7:35 am, Meikel Brandmeyer m...@kotka.de wrote: The problem is, that you quote the symbol you inject into the inner defmacro. Hence it does not get resolved. The solution in this case seems to be to syntax-quote the symbol correctly before injection. Replace the two ~'~ with ~~ and

Fwd: Re: Schema for data structures

2009-09-26 Thread Artyom Shalkhakov
Ooops, sent it to the wrong address. -- Forwarded message -- From: Artyom Shalkhakov artyom.shalkha...@gmail.com Date: 2009/9/25 Subject: Re: Schema for data structures To: clojure group nore...@googlegroups.com Hello Miron, is there a way to check if a data structure

Authers needed for Apress book: Definitive Guide to Clojure

2009-09-26 Thread Luke VanderHart
Hello all, I am writing a book on Clojure for Apress - you can read about it at http://www.apress.com/book/view/1430272317 (be aware, before you consider buying it, that it's still VERY rough and less than half done) It's coming along well. I am enjoying the writing, and I feel it will be a

Re: Macros, namespaces, and lexical scope

2009-09-26 Thread Chouser
On Fri, Sep 25, 2009 at 4:49 PM, Constantine Vetoshev gepar...@gmail.com wrote: Chris Houser has summarized the problem here more succinctly than I can: http://paste.lisp.org/display/87734 This is a syntax-quote expansion-timing issue, which is why Meikel's solutions works. I think it would

Re: Getting REPL transcript

2009-09-26 Thread Daniel Werner
On Sep 23, 6:20 pm, Emeka emekami...@gmail.com wrote: Hello All, I would like to have a transcript of Repl. Could someone help me out here? Regards, Emeka If you use rlwrap, you can give it the --log-file (-l) argument: $ rlwrap -l repl.log java -cp ...

Re: Getting REPL transcript

2009-09-26 Thread Emeka
Sorry, here is the link. http://gist.github.com/193550 On Sat, Sep 26, 2009 at 2:03 PM, Emeka emekami...@gmail.com wrote: Thank you all. Chris Grand has figured it out for me. However, I invite you to look at it and comment. Regards, Emeka On Sat, Sep 26, 2009 at 12:15 PM, Daniel

Re: VimClojure on Windows (problem + solution)

2009-09-26 Thread Meikel Brandmeyer
Hi, Am 07.09.2009 um 22:28 schrieb Niels Aan de Brugh: The problem is probably that you have 'shellslash' set. This influences the behavior of the function shellescape(), which is used by VimClojure. Resetting this options fixes the problem. Thank you for reporting that. I will reset the

Re: VimClojure - OpenSolaris - What am I doing wrong?

2009-09-26 Thread Meikel Brandmeyer
Hi, Am 08.09.2009 um 15:31 schrieb Michael Aldred: The NailGun client assumes that the strlen function will handle a null pointer for the argument. Under Solaris this is not the case (http://technopark02.blogspot.com/ 2006/04/solaris-null-pointer-bugs-usrlib00so1.html) Thank you for the fix.

Re: How to use vimClojure?

2009-09-26 Thread Meikel Brandmeyer
Hi, Am 10.09.2009 um 06:41 schrieb MarkSwanson: 8. A new window should open, containing #'user/greet. Type \p to close the window. It's all good up to this point. 9. Go to the Repl window, eg. with C-wC-w. 11. At the prompt type (gr and hit C-xC-o to complete the function name. 10.

Re: Schema for data structures

2009-09-26 Thread Daniel Renfer
One of the things I'm doing in my application is I modified clj-record to attach metadata about the record's type to each record when find- records is used. I am then able to have a function that checks that metadata which can be used as a predicate. It gets even better because I can then

Mocking?

2009-09-26 Thread Mark Derricutt
'lo all, How are people handling mocking/stubbing in clojure? Google finds me some old posts about a called? function/macro as part of test-is which looks like it'd do what I need but I can't seem to find any trace of it under clojure/clojure-contrib trunk. Any pointers? -- Pull me down