Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-26 Thread Alexey Petrushin
Not yet, but it definitely in my todo list :)

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-26 Thread David Nolen
On Mon, Sep 26, 2011 at 1:35 AM, Alexey Petrushin 
alexey.petrus...@gmail.com wrote:

 1. No compilation step, quick live prototyping in browser.


Already possible, and IMO better experience than pretty much anything else
out there - Browser REPL


 2. Pure browser environment, no need to install anything.


Not sure what the benefit is here. Even CoffeeScript requires an install to
be useful for real development. w/o Google Closure, ClojureScript's
footprint would be unwieldy.

David

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-26 Thread Michael Jaaka
While the statement that creating any syntax is true for LISP, so for
Clojure its not because of missing reader macro (The read table is
currently not accessible to user programs. from http://clojure.org/reader).

Nevertheless I found homoiconicity very useful. I turned my XML
document (with my imagined syntax) into Clojure code which was just
bunch of functions and macros (for changing the execution the control
flow). It was made for my custom forms, context validations and
transformations into Java objects in GWT project (unfortunately the
client side still had to interpret the data structures to create
froms, but the rest could be executed with Clojure on the server
side).

Above example resembles the ANT with the difference that I hadn't to
write complicated interpreter and class hierarchy (one module less)
and still gained better flexibility and maintenance in future.


On Sep 24, 11:17 pm, alexey.petrushin alexey.petrus...@gmail.com
wrote:
 Hello, I'm learning Clojure (work mainly with Java and Ruby),
 interested in it after reading Paul Graham and watched very
 interesting presentation about persistent data structures by Rich
 Hickey.

 So, one of the cornerstones of Paul Graham articles is - Lisp has no
 syntax, so You can create any syntax that suits You best, and because
 code is just a data it's very easy to do.

 You can model any concept - create DSL best suited for Your problem or
 model Object Oriented approach, Inheritance, and so on.

 But I believe, it's very hard to demonstrate this advantages on the
 simple samples. You has to do something real and complex to see
 advantages of this approach.

 So, maybe there's an interesting Open Source Project that uses this
 approach? With clean code that can be seen as showcase of such
 techniks, and You can dig in it and see all this in action by
 Yourself? It would be really interesting.

 Thanks.

 P.S. One more small question - as far as I know right now
 ClojureScript doesn't support eval and requires Java for compiling,
 any plans to support this in future?
 ClojureScript compiler written in ClojureScript / JavaScript without
 Java requirement?

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-26 Thread Tarantoga
Hello Alexey,

Probably, russian is your primary language? Then look here for the
examples of the DSL:
1. http://my-clojure.blogspot.com/search/label/DSL  -- a simple
embedded DSL for the application configuration;
2. Here (http://scala.by/meetups/2011/09/10/4.html) you may get the
slides of my presentation and my speech in MS Word format. It is about
DSLs construction.

Regards,
  Dmitry

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-25 Thread alexey.petrushin
Hello, I'm learning Clojure (work mainly with Java and Ruby),
interested in it after reading Paul Graham and watched very
interesting presentation about persistent data structures by Rich
Hickey.

So, one of the cornerstones of Paul Graham articles is - Lisp has no
syntax, so You can create any syntax that suits You best, and because
code is just a data it's very easy to do.

You can model any concept - create DSL best suited for Your problem or
model Object Oriented approach, Inheritance, and so on.

But I believe, it's very hard to demonstrate this advantages on the
simple samples. You has to do something real and complex to see
advantages of this approach.

So, maybe there's an interesting Open Source Project that uses this
approach? With clean code that can be seen as showcase of such
techniks, and You can dig in it and see all this in action by
Yourself? It would be really interesting.

Thanks.

P.S. One more small question - as far as I know right now
ClojureScript doesn't support eval and requires Java for compiling,
any plans to support this in future?
ClojureScript compiler written in ClojureScript / JavaScript without
Java requirement?

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en


Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-25 Thread David Nolen
On Sat, Sep 24, 2011 at 5:17 PM, alexey.petrushin 
alexey.petrus...@gmail.com wrote:

 P.S. One more small question - as far as I know right now
 ClojureScript doesn't support eval and requires Java for compiling,
 any plans to support this in future?
 ClojureScript compiler written in ClojureScript / JavaScript without
 Java requirement?


It's a possibility. But what's the tangible advantage?

David

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-25 Thread Ambrose Bonnaire-Sergeant
You might find my article useful:
http://pragprog.com/magazines/2011-07/growing-a-dsl-with-clojure

(Errata: http://forums.pragprog.com/forums/134/topics/9318)

You can then dig into the code of stevedore:
https://github.com/pallet/stevedore

It's basically building an interpreter, but all of the same concepts as
building a DSL.

Thanks,
Ambrose

On Sun, Sep 25, 2011 at 5:17 AM, alexey.petrushin 
alexey.petrus...@gmail.com wrote:

 Hello, I'm learning Clojure (work mainly with Java and Ruby),
 interested in it after reading Paul Graham and watched very
 interesting presentation about persistent data structures by Rich
 Hickey.

 So, one of the cornerstones of Paul Graham articles is - Lisp has no
 syntax, so You can create any syntax that suits You best, and because
 code is just a data it's very easy to do.

 You can model any concept - create DSL best suited for Your problem or
 model Object Oriented approach, Inheritance, and so on.

 But I believe, it's very hard to demonstrate this advantages on the
 simple samples. You has to do something real and complex to see
 advantages of this approach.

 So, maybe there's an interesting Open Source Project that uses this
 approach? With clean code that can be seen as showcase of such
 techniks, and You can dig in it and see all this in action by
 Yourself? It would be really interesting.

 Thanks.

 P.S. One more small question - as far as I know right now
 ClojureScript doesn't support eval and requires Java for compiling,
 any plans to support this in future?
 ClojureScript compiler written in ClojureScript / JavaScript without
 Java requirement?

 --
 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 post.
 To unsubscribe from this group, send email to
 clojure+unsubscr...@googlegroups.com
 For more options, visit this group at
 http://groups.google.com/group/clojure?hl=en

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-25 Thread Alexey Petrushin
1. No compilation step, quick live prototyping in browser.
2. Pure browser environment, no need to install anything.

-- 
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Re: Sample application as showcase of Clojure DSL / Metaprogramming?

2011-09-25 Thread Denis Washington

Am 24.09.2011 23:17, schrieb alexey.petrushin:

Hello, I'm learning Clojure (work mainly with Java and Ruby),
interested in it after reading Paul Graham and watched very
interesting presentation about persistent data structures by Rich
Hickey.


Speaking of Paul Graham, have you read On Lisp? It's code samples are 
based on pre-ANSI Common Lisp, but are very impressive and show nicely 
what Lisp macros can do. The book is available for download on Graham's 
homepage:


http://www.paulgraham.com/onlisp.html

Regards,
Denis

--
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 post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en