biwascheme / biwascheme

Scheme interpreter written in JavaScript
http://www.biwascheme.org/
MIT License
742 stars 128 forks source link

syntax-rules #108

Open zaoqi-unsafe opened 7 years ago

jcubic commented 4 years ago

This may be of use http://www.ccs.neu.edu/~dorai/mbe/mbe-lsp.html

Implementation of R5RS-style define-syntax, let-syntax and letrec-syntax for Common Lisp.

it will require some changes to work in scheme.

okuoku commented 4 years ago

But, it doesn't provide hygiene

This Common Lisp implementation does not provide hygiene.

FWIW, my library has sort-of same thing which works on s7/biwascheme(port of chibi-scheme syntax-rules on define-macro without any hygine)

https://github.com/okuoku/yuni/blob/f9f54b09b066c17d02c9a6d634ce08be2ec0e802/lib-runtime/generic/synrules.scm#L159

Personally I'm happy with this(as portability layer so I can re-use existing my scripts on biwascheme, with extreme care) but in general, IMHO, considerable portions of syntax-rules use assume hygiene.

jcubic commented 4 years ago

@okuoku interesting project, I'm thinking about adding R5RS functions to my lips in JS (https://jcubic.github.io/lips/), it may be helpful.