I like this idea a lot. I've been thinking a lot lately how great it would be to have something like Flowsheets where you have a spreadsheet and language working together. This REPlugger closely matches a lot of how I end up writing code, with putting things over and over again into the REPL and seeing how they worked. I always wanted a REPL that could edit better. This is very cool and I think could be amazingly useful.
As noted in another post, this is how some languages were basically designed to be used. I'll challenge that you can't just claim it is lisp. Common lisp, though, is a solid model for this method of development.
Yes it does feel like Smalltalk and Scheme. I never really liked Lisp (I feel like a heretic saying that on HN) but having this for Python of JavaScript would be infinitely more useful to me.
I would be curious to hear why. Where I work currently is full stack Clojure and I love it but have a few gripes (refactoring can be a pain) but overall it feels like a huge boon.
This is basically how Lisp and Smalltalk work. You write the function you want to use. The system puts you into a debugger. You debug your program until it starts running. I wish I had this environment in more languages like Haskell.
Except it isn't really a debugger. It is just a repl in the environment you have constructed. The difference is most debuggers don't let you do as much as these would let you do.
Kind of hard to fully explain. With a debugger, you can typically only analyze variables on the stack. You can, of course, step over lines and such. However, with the live coding languages, you can literally redefine the function that is causing grief. More, you can, on the fly, define a new helper function that it should call to handle the current input causing trouble and redefine the method to call over to that.
People have come closer than I give credit in Java land doing this. I've never seen anyone else come close, though.
I think most any dynamic language should be able to do this. Most can't, though, due to serious limitations on what can be redefined and what cannot.
> However, with the live coding languages, you can literally redefine the function that is causing grief. More, you can, on the fly, define a new helper function that it should call to handle the current input causing trouble and redefine the method to call over to that.
"This is basically how Lisp and Smalltalk work.", as agentultra commented further up in this thread.
This is exactly why like programming with clojure, the REPL and the editor are the same thing, so you can send + execute code in the REPL from the editor. In practice, I'm never typing anything directly into the REPL, which is in contrast to say something like rails' console.
This is a really cool project, and reminds me of Bret Victor's Inventing On Principle[0] talk--which makes sense, because Glen has worked with Bret on Dynamicland.
These tools are made for beginners, but even though I'm not a beginner, I wish I could use these kinds of tools within my existing coding workflow. But I just can't use an editor/debugger that requires a mouse anymore.
Sounds intriguing, though I'd appreciate a summary that's not a 10-minute video. This post describes the problem and context but not a lot about the solution.
It would have been nice for it to say "JavaScript" in the title of the blog post, anywhere in the blog post, or in the title of the video. That's what I suspected, but I had to scrub through the video just to confirm, which is probably more effort than most people would be willing to put in.
As I said near the end of the video, this is a research project meant to demonstrate the concept and a lot of engineering would need to be done to make it work generically. If a small team were to tackle the project, I estimate it would take about 2-3 years of effort.
That said, I prefer Python and only used JavaScript in the video because I had a large project done in JS that I wanted to validate the idea against to make sure it wouldn't just work for toy programs.
Great idea. Would love a small writeup explaining the stuff happening under the hood and the challenges faced by you and the workarounds you came up with to make it work.
Edit: Found the github link in the video description: https://github.com/Glench/REPLugger