[racket-dev] toward a new Racket macro expander

2015-02-26 Thread Matthew Flatt
I've been working on a new macro expander for Racket, and I'm starting
to think that it will work. The new expander is not completely
compatible with the current expander --- and that will be an issue if
we eventually go forward with the change --- but most existing code
still works.

Here's a report on my current experiment:

 http://www.cs.utah.edu/~mflatt/scope-sets/


The goals for a new expander are

 1. to replace a complicated representation of syntax objects with a
simpler one (and, as a result, avoid some performance and
submodule-re-expansion problems that have been too difficult to fix
with the current expander);

 2. to find a simpler model of binding than the current one, so that
it's easier to explain and reason about scope and macros; and

 3. to implement the new expander in Racket instead of C.

I have possibly succeeded on 1, possibly succeeded to some degree on 2,
and temporarily given up on 3.

(I know it sounds crazy to continue with a C implementation of macro
expansion. Goals 1 and 2 were impossible for me without being able to
try ideas at scale, though, and it was too daunting to tackle a full
reimplementation of the expander and a restructuring of the VM at the
same time. Continuing in the comfortable-for-only-me C environment was
the way to make progress for now, and I look forward to tackling 3 as a
next step.)


I've pushed my current implementation to the scope branches of

 https://github.com/mflatt/racket
 https://github.com/mflatt/compiler [for `raco decompile` updates]

I don't recommend bothering with the implementation, for now, unless
you're especially interested in trying some examples. The current
version builds well enough to run DrRacket, but there some build
errors. I have a lot of work to do, still.

-- 
You received this message because you are subscribed to the Google Groups 
Racket Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/20150226172633.2725A6501AA%40mail-svr1.cs.utah.edu.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-dev] toward a new Racket macro expander

2015-02-26 Thread Anthony Carrico
On 02/26/2015 12:26 PM, Matthew Flatt wrote:
 Here's a report on my current experiment:
 
  http://www.cs.utah.edu/~mflatt/scope-sets/

The utah.edu admins start to panic, suspecting an in progress dos
attack, but it is just ~mflatt getting slashdoted...

-- 
Anthony Carrico


-- 
You received this message because you are subscribed to the Google Groups 
Racket Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/54EF8C79.104%40memebeam.org.
For more options, visit https://groups.google.com/d/optout.


signature.asc
Description: OpenPGP digital signature


Re: [racket-dev] toward a new Racket macro expander

2015-02-26 Thread David Vanderson


On 02/26/2015 12:26 PM, Matthew Flatt wrote:

I've been working on a new macro expander for Racket, and I'm starting
to think that it will work. The new expander is not completely
compatible with the current expander --- and that will be an issue if
we eventually go forward with the change --- but most existing code
still works.

Here's a report on my current experiment:

  http://www.cs.utah.edu/~mflatt/scope-sets/


The goals for a new expander are

  1. to replace a complicated representation of syntax objects with a
 simpler one (and, as a result, avoid some performance and
 submodule-re-expansion problems that have been too difficult to fix
 with the current expander);

  2. to find a simpler model of binding than the current one, so that
 it's easier to explain and reason about scope and macros; and

  3. to implement the new expander in Racket instead of C.

I have possibly succeeded on 1, possibly succeeded to some degree on 2,
and temporarily given up on 3.

Thank you!  I'm still trying to understand how the current expansion 
process works.  This seems easier to reason about, so for me you're 
hitting goal 2.  And the comparison is helping me understand the current 
process as well.


Thanks,
Dave

--
You received this message because you are subscribed to the Google Groups Racket 
Developers group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-dev+unsubscr...@googlegroups.com.
To post to this group, send email to racket-...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-dev/54EFEA63.6040900%40gmail.com.
For more options, visit https://groups.google.com/d/optout.