gherkin
gherkin copied to clipboard
save-world/load-world
What do you want this to do? Can you describe the feature a bit more?
The basic idea is that you should be able to run (save-world "world.sh")
and gherkin will emit an executable shell script containing a complete dump of the interpreter state including the interpreter source itself.
One may either run the script directly, possibly with an argument of the function to run at boot, or load the environment back into a different interpreter instance with (load-world "world.sh")
.
I'll fill this issue out in detail this weekend. In the meantime, the idea and precedent come from Smalltalk and Lisp; if you want to learn more, see http://common-lisp.net/project/lispfaq/FAQ/programming.html#id2519343 to start.
Interesting. Would this also be used in the generation of a distributable interpreter?
On Nov 19, 2013, at 11:24 AM, Alan Dipert [email protected] wrote:
The basic idea is that you should be able to run (save-world "world.sh") and gherkin will emit an executable shell script containing a complete dump of the interpreter state including the interpreter source itself.
One may either run the script directly, possibly with an argument of the function to run at boot, or load the environment back into a different interpreter instance with (load-world "world.sh").
I'll fill this issue out in detail this weekend. In the meantime, the idea and precedent come from Smalltalk and Lisp; if you want to learn more; see http://common-lisp.net/project/lispfaq/FAQ/programming.html#id2519343 to start.
— Reply to this email directly or view it on GitHub.
This would be an awesome feature, and reiterates the point you made about wanting to keep the main program small.
OTOH, keeping the main program small may be tricky if macros are introduced... I haven't thought on it too much, so I don't know that their implementation would lead to much bloat, but they could. Macros might not be desirable for the project, but I'd like them :)
On Tue, Nov 19, 2013 at 11:28 AM, Joel McCracken [email protected]:
Interesting. Would this also be used in the generation of a distributable interpreter?
On Nov 19, 2013, at 11:24 AM, Alan Dipert [email protected] wrote:
The basic idea is that you should be able to run (save-world "world.sh") and gherkin will emit an executable shell script containing a complete dump of the interpreter state including the interpreter source itself.
One may either run the script directly, possibly with an argument of the function to run at boot, or load the environment back into a different interpreter instance with (load-world "world.sh").
I'll fill this issue out in detail this weekend. In the meantime, the idea and precedent come from Smalltalk and Lisp; if you want to learn more; see http://common-lisp.net/project/lispfaq/FAQ/programming.html#id2519343to start.
— Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHubhttps://github.com/alandipert/gherkin/issues/5#issuecomment-28804771 .
Using kernel as a base lisp would drastically help the problem of program size:
http://axisofeval.blogspot.com/2011/09/kernel-underground.html and http://axisofeval.blogspot.com/2011/08/praising-kernel.html