Hacker News new | ask | show | jobs
by Zak 4434 days ago
What I find really surprising is that other languages that have pretty decent REPL support have not embraced it so fully as Lisps have. Connecting to the live[0] instance a Rails or Django app, examining its internal state and making updates that don't involve more or less restarting the app is unusual at best.

Ruby and Python borrow a lot from Lisp, including the REPL, but some of the most popular applications of those languages barely take advantage of it. Why?

[0] I'll stipulate that you might want to be very conservative about doing this with a production system.

3 comments

The work done at Xerox PARC with Smalltalk and Interlisp was great.

Imagine having a REPL to your complete OS, not the just the basic CLI that most systems have.

There are a few videos of those days showing up the systems.

+1 I still think fondly of the InterLisp environment on the Xerox 1108 Lisp Machine my company bought me in 1982. You can find emulators for InterLisp, but the experience is not the same.
Everything I know is from the documents, papers and videos that I manage to scrap from the Internet.

My experience with Oberon, lead me to track down how Wirth learned about such systems.

Additionally, I got to learn Smalltalk in the form of VisualWorks before Java was known to the world.

So I extrapolate my experience to how it might have felt back then and find it sad we are still trying rediscover it.

I'll stipulate that you might want to be very conservative about doing this with a production system.

No kidding. I knew at least one guy who hosed a product launch by doing that. You even have to restart your development instance from time to time to make sure that your application state remains consistent. I've been scared to try, but I suspect that you could live-patch a server though if you were systematic about it and tested the patch ahead of time.

You even have to restart your development instance from time to time to make sure that your application state remains consistent.

There are ways around that. Stuart Sierra uses a scheme wherein the entire application is treated as a value, which can be re-generated on the fly. Of course, that's not terribly different in practice from restarting the whole environment, but it's faster and more convenient.

http://thinkrelevance.com/blog/2013/06/04/clojure-workflow-r...

Back in 2001, We had a corner case bug in our ORM that impacted a scheduled demo. So I connected with the live Smalltalk app server and changed the state of the DB locks during the demo.

There are technologies deigned to enable live updates. VisualWorks Smalltalk had one, though it was not widely used. There are real time OS that can update the kernel without going down.

You might like Flask. It has an interactive REPL on debug screens.
I have used Flask. I do like it.