metaeducation / ren-c

Library for embedding a Rebol interpreter into C codebases
GNU Lesser General Public License v3.0
126 stars 27 forks source link

%src/mezz/mezz-help.r fix unintended application forms in source #1158

Closed jjsullivan5196 closed 3 months ago

jjsullivan5196 commented 3 months ago

I was playing around with the interpreter built from master and noticed source wasn't working correctly, where it was trying to apply/eval the frame! objects it was retrieving from the environment. Seems the code wasn't updated for the new evaluation semantics of frame!s, so I added the appropriate get-word forms and wrapped the actual frame in unrun so frame? works as intended. It now prints source code again.

hostilefork commented 3 months ago

Thanks for this! The SOURCE function has been neglected, in part because abstraction breaks the notion of getting "source"... you're getting sort of the result after all the constructs have expanded.

https://forum.rebol.info/t/use-the-source/1212

Certainly all the function compositional tools (ADAPT, SPECIALIZE, ENCLOSE, CHAIN, HIJACK, etc.) give real challenges to having a meaningful answer.

I've punted on it...so even when it works, the answer you get is sort of gibberish. It definitely needs work.