1. 10
  1. 2

    I didn’t find any canonical name for the workflow used in Squeak Smalltalk so I called it JIT programming here.

    I know of this as “live coding”: it’s when you modify the code while the program is running, and the screen updates with the results of the code changes as you type. I checked Wikipedia, and the editors have chosen this name as the page title for the article. https://en.wikipedia.org/wiki/Live_coding. That’s my suggestion for the “canonical name” you were looking for.

    1. 2

      I think the Smalltalk development pattern is live coding, but it’s a specific kind of live coding that also embodies top-down implementation and is related to test-driven development. The idea in Smalltalk is that you start writing a method assuming that every other method that you need exists. As soon as some code that isn’t implemented is reached, you are presented with a class browser and asked to implement it before the program can continue. This implementation may, in turn, invoke methods that don’t exist and so you may not make much progress when you return. It’s an interesting workflow and one that guarantees that all of your required code paths are implemented first.

      1. 1

        From the wikipedia page and example, it seems that you’d need a mostly working program that’s then updated live for live coding, whereas for what I’m describing, more most of the session, you have a program that cannot even run to completion (without error).

        1. 2

          I know! That’s the central problem of live coding: how do you continue to provide useful output or feedback about program execution when the program contains errors? Live programming environments are very diverse, and there are lots of different (mostly partial) solutions to this problem. Your solution is very cool, thanks for showing it to us.

          Just to illustrate some of the diversity in the field, here are two radically different live coding environments:

          • Orca, a 2 dimensional language for live coding of music: https://hundredrabbits.itch.io/orca. It’s too weird to explain, just watch the video: https://www.youtube.com/watch?v=RaI_TuISSJE.
          • Hazel, a traditional-looking text based functional language designed by academic type theorists. How do they keep the live coding session running when there are errors? They use a projective editor to make it impossible to create syntax errors. They introduce the concept of “typed holes” to keep the program running when there are compile time type errors. https://hazel.org/

          If you tag your project as “live coding” then the live coding community will be able to find it more easily.

          1. 1

            “Live coding” does seem to be the consensus here, but like the sibling comment, I’m looking for something more specific. In my case, the answer to what output to provide on error is to halt.

            These are most definitely very interesting example (at different extremes) I wasn’t aware of before. Thanks for sharing. But they are also not example of the thing I’m looking for.

      2. 2

        This live-coding environment is extremely cool, and has the brilliant idea of visualizing the instruction pointer and stack. The tendency toward small squares of text is interesting - was it designed for PICO-8, by any chance?

        1. 1

          Yes! I was thinking of writing it in PICO-8 at first but then noticed that a full keyboard is needed. Even though, it is possible, it didn’t seem like the best first project anymore.

          I was thinking of just having a drop-down or pop-up of commands to select from and maybe a virtual keyboard, but that would discourage writing non-existing functions.

          I ended up using Pyxel with the PICO-8 palette.