-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement bquote macro in Bel itself #175
Conversation
Making this work has to count as the most mysterious experience in the development of Bel so far.
Prior to installing all those globals (and regenerating), After installing the globals (and regenerating), here's what I think ought to happen, in sequence:
I see now. Let me lay it out clearly. Here's the definition of (mac let (parms val . body)
`((fn (,parms) ,@body) ,val)) ...yeah. The first thing the This is very interesting! I have no idea how to fix this. I also have no sense how serious this problem is. |
Here's one way to solve the bootstrapping problem: make sure that
With my current understanding, I definitely think that this is a "bug" in the spec. I'm pretty sure pg did not intend for the unmodified execution of In light of this, we have to implement something slightly different from what the spec says. |
At a rough count, it's these:
|
c044c09
to
5950037
Compare
We do this by employing a terrible lookup hack; hoping to remove that one really, really soon.
This costs us a little bit of performance in the test suite (and I think we can often do this early in the long run), but for now, it's more correct to do it this way.
Just a quick status report: it was possible to add the definitions of Oh! It's possible I pasted in Going to try again tonight. |
I _think_ everything works, but it's just very slow.
Something is still a bit off, and I don't know why. I'm guessing I'm still causing an infinite recursion somewhere. I just tried running the tests after rebasing on top of #194, under the hypothesis that if the tests are just running a bit slow, they would at least run faster on top of that branch. But no, they definitely stall as soon as we're doing nontrivial backquoting. Interestingly, |
Superseded by (the already-merged) #277. Closing. |
Note: Builds off of #173, which I expect will merge first; please rebase this one onRebased.master
after that. Thanks.Work in progress — so far, managed to late-bind the
bquote
call, but it still calls into a Perl version of the expander. Next step: define it among the globals.Closes #174.