Ask HN: Why aren't live programming environments more popular?

7 points by bbotond ↗ HN
I have recently started using Observable notebooks for prototyping JavaScript code. The development experience is amazing - it's like a REPL on steroids. I can even write unit tests that are updated live. Now I write whatever I can inside Observable and then copy the code and test cases to the project I'm working on. (You can see an example of such a notebook here: [1])

I'm certainly not the first person to discover how productive a live environment like this can be. Yet I can't think of any other implementation of this idea except maybe live evaluation when editing Clojure. Why isn't this more widespread? Why aren't we all writing our code like this? Are there any other tools like Observable but less focused on presentation and more on development?

[1]: https://observablehq.com/@balazsbotond/js-url-library-draft

7 comments

[ 2.8 ms ] story [ 24.8 ms ] thread
My initial thoughts

1. You can setup similar experiences in a pure terminal mode

2. Am I shipping private code to yet another 3rd party server?

3. Having to copy/paste seems annoying, would want it on top of my VCS code directly

(3) is only because Observable isn't a tool designed for this workflow. I can imagine something that works on regular text files locally on your machine. This would also solve (2).

As for (1) - this sounds great! Can you tell me how?

It depends on the languages and tools you use. In the JS world, there are many options to watch for code changes and refresh browser, recompile node, run tests. Webpack is usually where this happens. Tutorials are probably just a Google away
I create makeshift live code editing experiences primarily with scripts and fswatch. Fswatch will trigger on changes to files you’ve told it to monitor and execute some command (I usually have it run the compiler/test runner for this setup). It’s become my go to way of writing C and C++ code since I’m not a fan of most IDEs and would rather stay in emacs.
Jupyter and Version Control do not play nicely together. Lots of active research into making it work though.
> Why aren't

Because lisp and smalltalk lost the language wars. Interaction with dead text files won. No one misses what they never experienced.

Scala Metals has this feature, it's very cool.