From: Harry
Subject: Lisp as an *external* DSL for a J2EE app?
Date: 
Message-ID: <1bbb7f37-145d-45bb-a310-cea71aa0c193@w35g2000yqm.googlegroups.com>
Hello,

Has anybody done this before: Designing & Implementing an *external*,
Lisp-based DSL for a J2EE app? If so,
  1  with what vendor implementations and tools?
  2. with how much success (or, pain)?

Even though I'm not a Lisp expert (know only the basics so far), I can
clearly see the potential of Lisp as an *internal* DSL of a large
system being written from scratch. What I'm not sure of though is the
payoffs...
  1. in the use of Lisp as an *external* DSL (assuming Java byte-code
is callable from a Lisp REPL)?
  2. in the context of a large (enough), legacy J2EE codebase that can
no way be rewritten?

Would Scheme (due to its lightweightedness relative to Lisp) be a
better choice for designing a simple, external DSL especially one that
does not need the sophistication of Lisp macros? Could I start with
Scheme (assuming I won't need macros) and then later *quickly* migrate
(from Scheme) to Common Lisp (if I see macros becoming necessary).

Would greatly appreciate your insights and thoughts on this.

Regards,
/HS

From: D Herring
Subject: Re: Lisp as an *external* DSL for a J2EE app?
Date: 
Message-ID: <498296f9$0$3338$6e1ede2f@read.cnntp.org>
Harry wrote:
>   1. in the use of Lisp as an *external* DSL (assuming Java byte-code
> is callable from a Lisp REPL)?
>   2. in the context of a large (enough), legacy J2EE codebase that can
> no way be rewritten?

There are many lisps which target the JVM.

http://clojure.org/
http://common-lisp.net/project/armedbear/
...

- Daniel
From: Thomas Munro
Subject: Re: Lisp as an *external* DSL for a J2EE app?
Date: 
Message-ID: <57c5b5fe-b182-4e77-bde8-f0c1879b18e4@e18g2000vbe.googlegroups.com>
On Jan 30, 4:34 am, Harry <···········@gmail.com> wrote:
> Would Scheme (due to its lightweightedness relative to Lisp) be a
> better choice for designing a simple, external DSL especially one that
> does not need the sophistication of Lisp macros? Could I start with
> Scheme (assuming I won't need macros) and then later *quickly* migrate
> (from Scheme) to Common Lisp (if I see macros becoming necessary).

I would recommend Scheme as an embedded/extension language, it's
simpler and less frightening for people like your colleagues for whom
Lisp may not be a core preoccupation (it uses proper English words for
for names, there is not much to learn, and it generally has more
newbie-friendly conventions).  But that is a matter of taste and
politics -- CL and Clojure are also good (and might be more
appropriate in other settings).  You imply that Scheme doesn't have
macros -- but all serious Schemes support define-syntax (standardised
hygienic macros) and define-macro (contraband but ubiquitous
unhygienic macros in the style of CL's defmacro).  I just checked the
documentation for SISC and JScheme (two embeddable Java
implementations) and they both provide define-macro.
From: Jochen Schmidt
Subject: Re: Lisp as an *external* DSL for a J2EE app?
Date: 
Message-ID: <39aa1cce-b101-4abd-b7a0-7fdd611d40da@17g2000vbf.googlegroups.com>
On 30 Jan., 13:58, Thomas Munro <············@gmail.com> wrote:
> On Jan 30, 4:34 am, Harry <···········@gmail.com> wrote:
>
> > Would Scheme (due to its lightweightedness relative to Lisp) be a
> > better choice for designing a simple, external DSL especially one that
> > does not need the sophistication of Lisp macros? Could I start with
> > Scheme (assuming I won't need macros) and then later *quickly* migrate
> > (from Scheme) to Common Lisp (if I see macros becoming necessary).
>
> I would recommend Scheme as an embedded/extension language, it's
> simpler and less frightening for people like your colleagues for whom
> Lisp may not be a core preoccupation (it uses proper English words for
> for names, there is not much to learn, and it generally has more
> newbie-friendly conventions).  But that is a matter of taste and
> politics -- CL and Clojure are also good (and might be more
> appropriate in other settings).  You imply that Scheme doesn't have
> macros -- but all serious Schemes support define-syntax (standardised
> hygienic macros) and define-macro (contraband but ubiquitous
> unhygienic macros in the style of CL's defmacro).  I just checked the
> documentation for SISC and JScheme (two embeddable Java
> implementations) and they both provide define-macro.

Less frightening? Thats not quite my experience. Scheme frightens
people by not having any of those things they know and by offering
arcane (to them) stuff like continuations or iteration by tail-calling
recursion. If you reduce Scheme to its simple unfrightening core you
could equally well offer them PHP or Basic.

That doesn't mean that its a bad idea to embed Scheme, CL or Clojure -
I think its actually a good idea - but none of those choices makes
much of a difference to those people which don't know them.

ciao,
Jochen
From: Pascal J. Bourguignon
Subject: Re: Lisp as an *external* DSL for a J2EE app?
Date: 
Message-ID: <7cr62lgmky.fsf@pbourguignon.anevia.com>
Harry <···········@gmail.com> writes:

> Hello,
>
> Has anybody done this before: Designing & Implementing an *external*,
> Lisp-based DSL for a J2EE app? If so,
>   1  with what vendor implementations and tools?
>   2. with how much success (or, pain)?

http://common-lisp.net/project/armedbear/
http://clforjava.cs.cofc.edu/twiki/bin/view/CLJproject/WebHome


> Even though I'm not a Lisp expert (know only the basics so far), I can
> clearly see the potential of Lisp as an *internal* DSL of a large
> system being written from scratch. What I'm not sure of though is the
> payoffs...
>   1. in the use of Lisp as an *external* DSL (assuming Java byte-code
> is callable from a Lisp REPL)?
>   2. in the context of a large (enough), legacy J2EE codebase that can
> no way be rewritten?


> Would Scheme (due to its lightweightedness relative to Lisp) be a
> better choice for designing a simple, external DSL especially one that
> does not need the sophistication of Lisp macros? Could I start with
> Scheme (assuming I won't need macros) and then later *quickly* migrate
> (from Scheme) to Common Lisp (if I see macros becoming necessary).

http://norvig.com/jscheme.html


> Would greatly appreciate your insights and thoughts on this.

http://www.google.com/

-- 
__Pascal Bourguignon__