Loved the post. I too am an avid Emacs and Org user but just starting to play with org-babel. I wonder how well this workflow could be replicated in org-babel.
I am dealing with an old esoteric proprietary language
to save the program one must have the program loaded. Programs are tokenized then saved in a proprietary binary format similar to bytecode.
to load a program, it reverse the bytecode into human readable code.
however, you can ask it to load ASCII for you.
now - you can only run load and save inside the enviroment.
to get a Makefile to work, i had to write a program to compile the code
but when you do LOAD, it also overwrites your entire call stack, so you cannot do
LOAD my_file.txt
SAVE my_file.proprietaryformat
if(err) then {
"dump compilation error"
}
it will never get there
instead you have to do
LOAD my file; SAVE my file; LOAD $0; goto SOMELABEL;
because they're separated by semicolons they run somehow back to back, and the trick it to load yourself back up and jump to a label that handles the error reporting.
https://ianthehenry.com/posts/janet-game/putting-judge-to-th... also showcases the same library.
The same author wrote this textbook for Janet: https://janet.guide/
There's also this example website: https://janetdocs.org/
Loved the post. I too am an avid Emacs and Org user but just starting to play with org-babel. I wonder how well this workflow could be replicated in org-babel.
2023
Also https://news.ycombinator.com/item?id=36600639
Thanks! Macroexpanded:
My Kind of REPL - https://news.ycombinator.com/item?id=36600639 - July 2023 (12 comments)
I am dealing with an old esoteric proprietary language
to save the program one must have the program loaded. Programs are tokenized then saved in a proprietary binary format similar to bytecode.
to load a program, it reverse the bytecode into human readable code.
however, you can ask it to load ASCII for you.
now - you can only run load and save inside the enviroment.
to get a Makefile to work, i had to write a program to compile the code
but when you do LOAD, it also overwrites your entire call stack, so you cannot do
LOAD my_file.txt
SAVE my_file.proprietaryformat
if(err) then { "dump compilation error" }
it will never get there
instead you have to do
LOAD my file; SAVE my file; LOAD $0; goto SOMELABEL;
because they're separated by semicolons they run somehow back to back, and the trick it to load yourself back up and jump to a label that handles the error reporting.
i think i prefer, code that is fairly immutable.