How does it compare to using python for live coding?
How does it compare to using python for live coding?
I've done professional Python coding for 2.5 years, Ruby and JS for 7. I always believed that the REPL combined with those languages being dynamically typed can yield big advantages.
With a Lisp you can evaluate your code in real time in your editor. Also your app will re-load your code live without losing it's state. I've done that with Backends, Web Frontends and Mobile Apps. It's pretty awesome, not just compared to everything else^^
Take it for a spin and enjoy the ride(;
A good friend of mine works for one of those big consultancies, however, and they are currently rewriting the backend of the second biggest online retailer of the world and they are using Clojure, too^^
So either I'm getting too old for the sexy Startup business or Clojure is at the same time stable and fancy(;
It sounds great to say "live coding" and whatnot, but it turns out that you very quickly get the repl into an unknown state where you aren't sure what version of what has been eval'd, and what temporary cruft is lying around changing how your program behaves.
A number of times I would find out that a bug I thought I squashed was actually still there, just hidden by some temporary "what-if" I had eval'd. The only way to know is to clean the workspace and reload everything.
This was recognized as problematic by the clojure community and "Component" methodologies were developed, along with namespace refreshing. It would be far less useable if not for this.
However, in a live production system, a blanket reload of anything kind of defeats the purpose of keeping it running. I don't think I'd ever try loading code on a live production system unless all the alternatives were worse than possibly messing up the state of the system.
It's nice to have the repl for investigating what's going on in production, for inspection. But I avoid any code reloading in a live system.
Technically there's nothing about Lisp that makes it uniquely suited for this; it's just that people developing tooling for most other languages have a tragic lack of imagination. Smalltalk, Forth, Factor, and to a degree Lua all support the same styles idiomatically, while Racket is a lisp, but it discourages this style.
How that compares to python, I'm not sure. But I don't think you can easily modify python code as easily as you can modify lisp programs.
When I was playing around with Franz Lisp some years ago, I saw this feature, and then soon after, I saw the Edit-and-Go feature in a new MS Visual Studio release. Think I read somewhere that it was ad{a|o}pted from Lisp.
Something like IPython was how the REPL from Lisp Machines and Interlisp-D used to work.
Plus Lisp is a compiled language.