Re: ANN: scriptjure, a library for generating javascript

2009-10-09 Thread Meikel Brandmeyer
Hi, On Oct 9, 5:37 am, Allen Rohner wrote: > It was a minor thing actually, I didn't like having to quote "user" > code, and AFAIK, it's not possible to add a quasiquote as part of a > macro. i.e. in my code, there is a function (_js) that does the heavy > lifting, and the macro (js). I couldn'

Re: ANN: scriptjure, a library for generating javascript

2009-10-09 Thread Meikel Brandmeyer
Hi, On Oct 9, 5:38 am, Allen Rohner wrote: > That is a good point. I'm actually not sure why I used type there. > It's probably a bug. Thanks for pointing it out. I would leave type here. Then the user can override the emit-function if he has self-defined types which need special handling for

Re: ANN: scriptjure, a library for generating javascript

2009-10-08 Thread Allen Rohner
> Did you try > (defmulti emit class) ? That is a good point. I'm actually not sure why I used type there. It's probably a bug. Thanks for pointing it out. Allen On Oct 8, 4:38 am, Emeka wrote: > Allen, > Great job! > > > Regards, > Emeka > > > > On Thu, Oct 8, 2009 at 7:18 AM, Meikel Brandmey

Re: ANN: scriptjure, a library for generating javascript

2009-10-08 Thread Allen Rohner
It was a minor thing actually, I didn't like having to quote "user" code, and AFAIK, it's not possible to add a quasiquote as part of a macro. i.e. in my code, there is a function (_js) that does the heavy lifting, and the macro (js). I couldn't write: (defmacro js [forms] (quasiquote (_js for

Re: ANN: scriptjure, a library for generating javascript

2009-10-08 Thread Emeka
Allen, Great job! Did you try (defmulti emit class) ? Regards, Emeka On Thu, Oct 8, 2009 at 7:18 AM, Meikel Brandmeyer wrote: > > Hi, > > On Oct 8, 7:50 am, Jarkko Oranen wrote: > > > I took a quick look, and that looks really neat. One thing though: > > Instead of the "clj" form to escape ba

Re: ANN: scriptjure, a library for generating javascript

2009-10-07 Thread Meikel Brandmeyer
Hi, On Oct 8, 7:50 am, Jarkko Oranen wrote: > I took a quick look, and that looks really neat. One thing though: > Instead of the "clj" form to escape back to clojure, why not just use > "unquote" (and possibly unquote-splicing)? that would allow you to use > the ~ reader macro as a shortcut, j

Re: ANN: scriptjure, a library for generating javascript

2009-10-07 Thread Jarkko Oranen
On Oct 8, 5:01 am, Allen Rohner wrote: > Hello, I'd like to announce the availability of a new library, called > Scriptjure. It's a macro that generates javascript strings from > Clojure s-exprs. My initial use for it is in glue code for Clojure > webapps. For example: > >  (js (fn foo [x] >