-
Notifications
You must be signed in to change notification settings - Fork 7
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
How to load a band like "mechanics.com" inside the Kernel environment? #21
Comments
I think what you'll need to do is mess around in src/shared.scm - there's a structure called "session" defined there that holds session-specific data including the session environment, which is what gets passed into eval in src/kernel/execute.scm. So theoretically this line is the one you care about - it's the initialization expression for the environment field of the session structure. I'm not sure how and where all the scmutils bindings are actually held (they're probably not in the top-level environment, and IIRC the whole way environments are nested in scmutils is kind of weird) but you can maybe poke around with the environment functions and see what you find. Or maybe you can use Hope this helps - and I wish I had more time to keep this in better shape! |
And let me know if you get scmutils working! I'd love to post a little help section to the readme in case other people end up trying the same thing. |
Thanks for the response, @joeltg ! I will for sure, probably once I absorb more of the language, and figure out how the band thing interacts with environments. I did just finish dockerizing on the road to getting a nice up-to-date Dockerfile published for your work here. I'm still down to do that with Thanks for this excellent work! Hopefully we can get this up and running at some point. |
Hi!
I'm attempting to modify the kernel so that it's possible to get it running with all of the code from "SCMUtils" available to the user. At the repl, I can run a
mechanics
script like this:Or call
I've tried modifying
kernel.json
to use these commands, and I've verified that on kernel startup, I can access functions from the mechanics.com band... but of course the code sent to the kernel for evaluation can't see this.I'm not asking you to add support for this, of course! That is a major ask. But would you mind sending me any tips you have on where in the code I'd want to look to try and get the environment we use for kernel evaluation to know about some other library of functions?
Thank you so much!
The text was updated successfully, but these errors were encountered: