[plt-scheme] What is all the fuss about how you can write DSLs in Lisp?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Thu Jun 7 10:07:09 EDT 2007

On Jun 7, 2007, at 8:42 AM, Grant Rettke wrote:

> Yes it is very open ended. I have read about macros and understand
> them in fact, but not in practice. In other words, I've read about
> them, written a very simple macro, but haven't got that real world
> experience where it is obvious to me how to take advantage of them.
> That gap is still present.
>
> That said, when I think of a DSL think about letting folks write
> "programs" like:
>
> "trade 100 shares(x) when (time < 20:00) and timingisright()"
>
> When I think about syntax transformation in Lisp I think primarily
> about language features.


DSL in Scheme means both. -- Matthias




>
> On 6/6/07, Matt Jadud <jadudm at gmail.com> wrote:
>> Hi Grant,
>>
>> That's kinda a large, open question.
>>
>> Bill Clementson posted a whole screencast that dances around this
>> question some time ago:
>>
>> http://bc.tech.coop/blog/050711.html
>>
>> Actually, Paul Graham's "Beating the Average" is another story about
>> LISP and DSLs (sorta, mostly, ish):
>>
>> http://www.paulgraham.com/avg.html
>>
>> If those don't start you on the road to answering your question, or
>> you want to know more, I recommend diving into places like
>> readscheme.org or the ACM Digital Library. Read about how the macro
>> systems work and the kinds of things you can do with them. Then,  
>> think
>> about how you'd do the same thing in Language X, and you're 90%  
>> there.
>> (There are people on this list who could point you to more specific
>> papers, but if you're completely at a loss as to why the Lisp family
>> of languages are so powerful for this kind of work, then those papers
>> won't help you at this stage, I suspect.)
>>
>> My apologies if you were asking a more subtle question. However, it
>> seems like you are new to  hygenic macro systems and the language
>> family in general.
>>
>> Cheers,
>> Matt
>>
>>
>>
>> On 6/7/07, Grant Rettke <grettke at acm.org> wrote:
>> > What is all the fuss about how you can write DSLs in Lisp?
>> >
>> > Everyone from thought-leaders to blog-posters to grandma's are  
>> talking
>> > about how Lisp is so great for DSLs.
>> >
>> > About what are these people talking about? Because no one of said
>> > people actually elaborate on any of this, of course, which leads  
>> me to
>> > question their claims.
>> > _________________________________________________
>> >   For list-related administrative tasks:
>> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>> >
>>
> _________________________________________________
>  For list-related administrative tasks:
>  http://list.cs.brown.edu/mailman/listinfo/plt-scheme



Posted on the users mailing list.