My kind of REPL (2023)

(ianthehenry.com)

35 points | by ingve 6 days ago

4 comments

  • veqq 3 hours ago
    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/

  • sanjayjc 5 days ago
    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.
  • gabrielsroka 5 days ago
  • calvinmorrison 52 minutes ago
    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.