4 ms·
Isn't this already achieved with a REPL? I mean other than GUI programming, which something like this would be useful in the same spirit as a REPL.
by adamwk 13y ago
Isn't this already achieved with a REPL? I mean other than GUI programming, which something like this would be useful in the same spirit as a REPL.
- seanmcdirmid 13y agoA REPL provides no code editing experience, you can at best just add code progressively one line at time and advance (never rewind) execution.
- markus2012 13y agoI edit and re-edit code in my vim Clojure REPL all the time.
- seanmcdirmid 13y agoSure, ed supports editing also. The question is what kind of execution feedback are you getting? And for REPLs it's line by line.
- yaxu 13y agoThat's not true for REPLs which allow interaction with running processes, which is probably most of them.
- seanmcdirmid 13y agoREPLs allow for interaction with programs (running processes), not code. With direct manipulation, you get a very different kind of liveness: sure you can change the program but their is no repeatable record of doing so (unless Smalltalk style images are used). For code, you just get feedback on the line you just entered and executed. Live programming allows one to change code to change fate; the running program isn't so much changed as remade, and is completely repeatable.
- yaxu 13y agoI think you're mixing up different kinds of feedback, then.. In a REPL, execution feedback can be continuous, not only line-by-line as you said earlier. If we're talking about 'code feedback', in general yes you do just get feedback on the line you entered. There's complexity here though. I think of any editor where you execute lines or blocks of code at a time as a REPL, mainly because they're often implemented by piping said blocks to a commandline.. I'd include IXI Lang in this category, and it certainly does have code feedback. You might 'execute' one line, which could set a process going which periodically changes another line of code (and therefore its associated running process). Perhaps at this point IXI Lang stops being a REPL, and starts just being a live programming language, but I'm not sure at what point that happens. Or maybe REPL is just an outdated term, as they do tend to do a lot more than a linear read-eval-print loop.
- seanmcdirmid 13y ago> There's complexity here though. I think of any editor where you execute lines or blocks of code at a time as a REPL, mainly because they're often implemented by piping said blocks to a commandline.. This is the crux of a REPL: what would you execute a line of code in the editor though? What does it mean to execute a line of code in a method? Or even an entire method? Development via REPL requires a certain program structure and an aversion away from abstraction (at least in code being developed), and even then the programmer must be manually involved in decided what to re-execute, performing dependency tracking in their head. Smalltalk too actually, where "liveness" often comes from manipulating objects directly. > Perhaps at this point IXI Lang stops being a REPL, and starts just being a live programming language, but I'm not sure at what point that happens. Or maybe REPL is just an outdated term, as they do tend to do a lot more than a linear read-eval-print loop. Ya, the concept of a REPL is kind of outdated, but its the term people prefer to start from (e.g. LightTable has an Insta-repl) if they are coming from LISP. I've even heard Smalltalk environments described as a REPL before, even though the metaphors that they depend on are completely different (there is an explicit line-based re-eval though...so maybe they are similar?).
- 13y ago
- fsck--off 13y agoI'm not quite sure what you mean. By "rewind execution" do you mean something similar to Interlisp's "undo" function? http://www.softwarepreservation.org/projects/LISP/interlisp-d/3100186-Interlisp_Oct83.pdf http://www.softwarepreservation.org/projects/LISP/interlisp-...
- seanmcdirmid 13y agoSort of. But if my reading of the manual is correct, interlisp only allows for manual undo and replay; YinYang traces dependencies and repairs program executions automatically after every keystroke. Not sure what is limiting the interlisp environment from doing the same thing.