Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SYMBOL-MACROLET missing from Medley Common Lisp #1645

Open
pamoroso opened this issue Apr 4, 2024 Discussed in #1643 · 2 comments
Open

SYMBOL-MACROLET missing from Medley Common Lisp #1645

pamoroso opened this issue Apr 4, 2024 Discussed in #1643 · 2 comments

Comments

@pamoroso
Copy link
Contributor

pamoroso commented Apr 4, 2024

Discussed in https://github.com/orgs/Interlisp/discussions/1643

Originally posted by pamoroso April 3, 2024
Does Medley Common Lisp support symbol-macrolet? The only relevant symbol I can find is internal in the LOOP package where the only references in sources/XCL-LOOP, here and here, don't define or implement it.

Here is a test session in an XCL Exec in Medley Online (19-Mar-2024 02:06:49). The code snippets are from the HyperSpec.

2/8> (apropos "SYMBOL-MACROLET")
LOOP::SYMBOL-MACROLET
SYMBOL-MACROLET
IL:|{DSK}<home>medley>il>demo>SYMBOL-MACROLET.DRIBBLE;1|
SYMBOL-MACROLET
2/9> (symbol-macrolet ((x 'foo)) 
   (list x (let ((x 'bar)) x)))
Undefined car of form
SYMBOL-MACROLET

2/10> 

2/10> (symbol-macrolet ((x '(foo x))) 
   (list x))
Undefined car of form
SYMBOL-MACROLET

2/11>

There's another symbol-macrolet reference (in XCL-USER?) with no definition. This is a fresh XCL-USER session where I haven't evaluated the symbol symbol-macrolet prior to the above snippets.

symbol-macrolet is indeed missing from Medley. The code in sources/XCL-LOOP is just a stub @masinter added to make Sacla loop work.

@MattHeffron
Copy link
Contributor

There is an implementation of symbol-macrolet (macro not special-form) in:
ftp.parc.xerox.com/pub/pcl/September-16-22-PCL-f.tar.Z, in the boot.lisp file.
It appears to use the code walker in walk.lisp.
I only found it. I haven't looked at it at any detail, nor tried to load it.
I don't know what would be involved with making it a special-form, let alone just getting it minimally working.

@masinter
Copy link
Member

In Common Lisp a special form is allowed to be implemented as a macro but isn't required to be.

Apparently there was a move to implement a general code walker with templates for handling Common Lisp special forms and macros. I'm not sure -- it looked like there was some progress in using some parts of the code walker for Masterscope.
_

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

No branches or pull requests

3 participants