Re: Fwd: Dylan stuff

mikel evins <[email protected]>
Newsgroups gmane.comp.lang.dylan.gwydion.devel
Message-ID <[email protected]>
On Jan 11, 2013, at 3:38 AM, Hannes Mehnert wrote:

> Hi Mikel,
> 
> 
> On 11/01/2013 09:09, Bruce Mitchener wrote:
>> ---------- Forwarded message ----------
>> From: mikel evins <[email protected]>
>> Date: Fri, Jan 11, 2013 at 2:30 PM
>> Subject: Re: Dylan stuff
>> To: Bruce Mitchener <[email protected]>
>> Cc: mikel evins <[email protected]>
>> 
>> So the question is, what should I use as a standard for the S-expression
>> syntax? I'm guessing the process is something like: start by looking for a
>> syntax in Andrew's 1992 reference manual that corresponds to the current
>> infix syntax; if I find one, and it suitably matches the current semantics
>> without problems, use that. If there are new features to take into account,
>> or if there's a mismatch for some other reason, attempt to find a
>> minimally-disruptive modification to the syntax that reconciles with the
>> current language; if that fails, ask you and the other maintainers and
>> users of the language what seems to you to be the right solution.
>> 
>> If we're lucky, an obvious or at least uncontroversial s-expression version
>> of the current syntax will be clear. Failing that, we can hope that a lot
>> of the corner cases can be easily resolved by a little discussion.
>> 
>> That leaves places where we'll have to do actual design work for the
>> S-expression syntax. I don't mind doing that work, but I don't want to
>> unilaterally impose any of my idiosyncracies on the language without
>> running them by the current users.
>> 
>> So if you or others have input about how to decide what the revived
>> s-expression syntax looks like, either now or later, I'd be very interested
>> to hear it.
> 
> The DIRM did not consider macros at all - I'm not sure (since I never
> used it) what the state of Apple Dylan and macros is/was.

The version of Dylan I worked with day-to-day for several years was the immediate ancestor of Apple Dylan, but was not the same. Most importantly, its target platform was the Newton (there may still be an ancient "Caddillac" prototype lying around my storage shed somewhere).

The development system, called "Leibniz", was Macintosh Common Lisp with the Dylan compiler loaded into it. It had two of everything: two Listeners (one for Lisp running on the Mac and one for Dylan running on the Newton board ribbon-cabled to the Mac); two flavors of editor windows, and so on.

We wrote macros and reader macros in Common Lisp, and they were expanded and compiled into the Dylan runtime. So we had macros, but the way we had them doesn't particularly recommend any good solutions for OpenDylan.

> I found a draft from Moon about macros
> (https://www.cs.cmu.edu/afs/cs/project/clisp/hackers/wlott/dylan/moon/Dylan-Macros.RTF)
> [based on Scheme macros by Dybvig and Hieb], which might be interesting
> to discuss in the design process.
> 
> Not sure if you've a DIRM at hand - I found an online version somewhere
> and put a copy at
> http://opendylan.org/~hannes/XXX/prefix-dylan/book.annotated/contents.html

I have it. I used to have a box of about 50 copies, but I'm not sure I have that anymore. I do work with its author, Andrew Shalit, every day (albeit remotely). Other colleagues at Clozure include several people whose names can be found in the OpenDylan sources--Gail Zacharias, Gary Palter, Jeremy Jones. Greg Sullivan isn't at Clozure, but he is working on the same project I am, and I talk to him every few days.

> The question I have since several years in my mind is whether it is
> possible to design an abstract syntax which is used by the macro system.
> This would allow shared macros between infix and prefix syntax.

Anything's possible. Is it easy and valuable enough to do? That's the question. I don't see any harm in talking about it.

> Another question is how that integrates with D-Expressions (procedural
> macros, used inside of the compiler
> https://people.csail.mit.edu/jrb/Projects/dexprs.pdf).

I have no idea.

> I'm really looking forward to this project/discussion. If you've
> questions about the compiler internals, please ask them - there might be
> people around which are able to answer these (myself included).

My immediate goals are very modest: write some code that enables me to write s-expression-based Dylan again, then get a good repl going that uses that syntax. If we get that far, I'll be pretty happy. Past that point, the sky's the limit, as long as we all like working on it.

As I said, if it was up to me, I'd write a Lisp-style reader with support for reader macros, rather than writing another grammar like the one currently in OpenDylan. The Lisp reader is a very useful tool.
_______________________________________________
hackers mailing list
[email protected]
https://lists.opendylan.org/mailman/listinfo/hackers
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.