A naive question:

I have spent very little time in REPLs, beyond the toy-project step. I hear they're nice once you get to know them, but basically my whole life is per-file imperative, functional or whatever the Unix shell is.

Does there exist a construct in modern computing such that:
- I can run a binary
- I can invoke the same binary in a way that gives me a REPL full of that program's initial state, and
- I can pause a running program and open its own REPL full of its current state?

(I know I can do this while bringing a bunch of other tools to bear, that's not what I'm asking.)

@mhoye

Smalltalk. Your binary is the entire state of the program and includes development tools (assuming they haven't been stripped out).

So you can do stuff like (e.g.) handle the error by bringing up a debugger mid-transaction, fix the code in place and resume the transaction.

@mhoye

(Details vary between implementations, of course. But Squeak and (I assume) Pharos can behave like this and I've heard people talk about fixing production problems this way.)

@suetanvil @mhoye That’s exactly right. This is our primary workflow for fixing bugs and understanding the codebase in #Smalltalk. You launch a debugger and dev tool within the running system (the system and the IDE are the same thing). You run your stuff step by step, inspecting the system state as you go while changing the code or the state on the fly to see what happens.

Follow

@flooper I wonder about how stability and responsiveness is maintained in such live systems (other than , which has pre-emptive scheduling).
@suetanvil @mhoye

Sign in to participate in the conversation
CleverLibre Social

CleverLibre Social is an inclusive social instance for open discussion, learning, and community.
All cultures welcome.
Hate speech and harassment strictly forbidden.