Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-21 Thread Naftoli Gugenheim
Inlined 2009/12/19 Marius marius.dan...@gmail.com If I may a few notes: Syntactically it doesn't seem to me that there are much differences between this and the initial proposal. Probably the most noticeable diffs are in algebraic expressions like Var(y) := (2:Expr) * x * 2 which

[Lift] Re: Scala to JavaScript DSL ...

2009-12-19 Thread Marius
If I may a few notes: Syntactically it doesn't seem to me that there are much differences between this and the initial proposal. Probably the most noticeable diffs are in algebraic expressions like Var(y) := (2:Expr) * x * 2 which probably looks more appealing than Var(y) := 2 __* x __* 2 The

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
I think I'm nearly there (that is a working equivalent of your sample) with G-d's help... - Mariusmarius.dan...@gmail.com wrote: Let me know when you have something. Br's, Marius On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote: I'm

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
Current state attached. 2009/12/17 Marius marius.dan...@gmail.com Let me know when you have something. Br's, Marius On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote: I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll try to put something

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
Okay! The following code: val jsFunc: JSFunc = Function(myFunc)(param1, param2) {case param1 :: param2 :: Nil = Var(someArray) := Array(1, 2, 3, 4, 5) If(param1 30) { val x = Var(x) // now we can use either x or 'x x := (234 - 3) / 2

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Ross Mellgren
I like the source for the DSL very much, I think it's very well written. Thanks for sharing it. -Ross On Dec 17, 2009, at 9:34 PM, Naftoli Gugenheim wrote: Okay! The following code: val jsFunc: JSFunc = Function(myFunc)(param1, param2) {case param1 :: param2 :: Nil =

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-17 Thread Naftoli Gugenheim
You're welcome. There's still some work to do; I would call it a proof of concept. But I'll let Marius finish it up. :) On Thu, Dec 17, 2009 at 10:18 PM, Ross Mellgren dri...@gmail.com wrote: I like the source for the DSL very much, I think it's very well written. Thanks for sharing it.

[Lift] Re: Scala to JavaScript DSL ...

2009-12-16 Thread Marius
Let me know when you have something. Br's, Marius On Dec 17, 8:58 am, Naftoli Gugenheim naftoli...@gmail.com wrote: I'm thinking of an approach to writing a DSL with a much cleaner syntax. I'll try to put something together. - Marius

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Naftoli Gugenheim
Other advantages of a DSL include type safety and typo safety. :) - Mariusmarius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Alex Boisvert
On Sat, Dec 12, 2009 at 11:06 AM, Marius marius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in XML support using XML as string literals Lift would probably loose

[Lift] Re: Scala to JavaScript DSL ...

2009-12-13 Thread Marius
On Dec 14, 4:54 am, Alex Boisvert alex.boisv...@gmail.com wrote: On Sat, Dec 12, 2009 at 11:06 AM, Marius marius.dan...@gmail.com wrote: That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in

[Lift] Re: Scala to JavaScript DSL ...

2009-12-12 Thread Marius
My notes inline. On Dec 12, 12:34 pm, Timothy Perrett timo...@getintheloop.eu wrote: Hey Marius, Within this DSL will you be using JsObj under the hood or lift-json? I was thinking to use lift-json in this case ... but I'd also of prefer having a lift-js project. I would be very reluctant

Re: [Lift] Re: Scala to JavaScript DSL ...

2009-12-12 Thread Indrajit Raychaudhuri
On 12/12/09 4:39 PM, Marius wrote: My notes inline. On Dec 12, 12:34 pm, Timothy Perretttimo...@getintheloop.eu wrote: Hey Marius, Within this DSL will you be using JsObj under the hood or lift-json? I was thinking to use lift-json in this case ... but I'd also of prefer having a

[Lift] Re: Scala to JavaScript DSL ...

2009-12-12 Thread Marius
I agree. Although to be more specific I guess my proposal can be split in 2: 1. The syntax style proposed that would probably evolve depending on the feedback. 2. The existence of lift-js project. Br's, Marius On Dec 12, 6:44 pm, Indrajit Raychaudhuri indraj...@gmail.com wrote: On 12/12/09

[Lift] Re: Scala to JavaScript DSL ...

2009-12-12 Thread Marius
That is certainly one way to go but personally I'm not at all a fan of this string literals approach,. For instance if Scala would not have had built in XML support using XML as string literals Lift would probably loose some of its attractions... but that's my opinion. Furthermore a DSL like