-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Relevance of conj for self-hosting #182
Comments
It's a little bit tricky: if conj isn't defined in an implementation, the the mal implementation will fail to load (step4 and later) because mal/core.mal has a reference to conj. However, I don't want to just drop conj from the mal implementation because then the self-hosting tests won't completely pass even if the underlying implementation does provide conj because it's not referenced in the mal impl core namespace list. So while an implementation of conj isn't necessary for self-hosting, a stub definition of conj is necessary to run tests for steps 4-9. That could be clarified in the guide. Want to add that to the list you're making for the guide? |
I've read this like three times and still don't understand why But yeah, I guess I'll add that to my list. |
Heh, yeah that was pretty confusing. Let me try a different approach:
So if the guide is changed to mention that while "conj" is optional, something trivial needs to at least be defined in the environment so that most of the self-host tests can run. The same is true of "string?" and "seq". Basically, all the symbols (list in mal/mal/core.mal) at least need stubs (even if the value is just nil) for self-host tests to be able to run from step4 onwards. |
Thanks, this is indeed much clearer. |
guide.md
speaks ofconj
being optional and not required for self-hosting. However the Mal implementation that is run in this step does containconj
in itscore.mal
. I cannot find any other usage ofconj
in its sources, so I suspect it's either been added with the intention of making use of it (and makingconj
mandatory to implement for self-hosting) or in error.The text was updated successfully, but these errors were encountered: