Hacker Read top | best | new | newcomments | leaders | about | bookmarklet login

Just like Smalltalk and SELF, which expose everything and can change the whole image at any execution step.


sort by: page size:

It covers some of the minimal syntax of Smalltalk but didn't touch on Smalltalk images, which is a major signature of Smalltalk.

A Smalltalk image contains every Smalltalk object. This includes classes (which are Smalltalk objects), instances of the classes, source code, the current running state, everything. You work within the image and interact with it.

Think of the image as a copy of your IDE, along with the compiler, your current project's source code, the compiled classes, methods, everything. You can save your image (state) at any time, not unlike the sleep feature of Windows and Mac. It's a live environment. During a programming session, you edit and save the code of class (it's automatically compiled) and every instance of that class is updated. This sounds like what you commonly have in many dynamic languages, but Smalltalk takes it to an extreme. You can re-configure your "IDE" as you go along since they are running in the same image, all the classes and objects are accessible. Or you can set breakpoints and step through code, changing code on the fly and resuming, all without stopping the "program" and starting again. Not unlike a graphical REPL.

Does anyone know if there's a similar tool utilizing the same concept other than Self?


Smalltalk is designed around this functionality. In fact the whole Smalltalk system is a live instance that has been modified like that since development started.

The Morphic framework in Squeak Smalltalk was an excellent example of this idea. Every object essentially had a little REPL+IDE attached to it. The more standard Smalltalks weren't far off from this either. In just one afternoon, one of my coworkers wrote a utility allowing him to command-click anything in the GUI of our app and open a browser and inspector on it. The reason why he did that, is because he sorely missed an even more powerful utility of this type from his Symbolics Lisp days.

Presumably he could write his own code- and data-munging tools in Smalltalk and invoke them straight from the running image -- kinda like what you can do with Emacs Lisp.

It isn't more dynamic than either Smalltalk or SELF, whose JIT research ended up on the JVM and JavaScript.

A a become: b message completely changes all instances of a to b, across the whole image, including code currently being executed.


Almost all Smalltalks, especially the image based ones support dynamic run-time patches.

That's basically a subset of image-based development, as seen in Smalltalk and Lisp since forever.

Smalltalk, SELF and Common Lisp are full of dynamic magic, you can in a single function call change the representation of all instances of a given object during program execution, at any given time break into the debugger and change whatever you feel like and resume execution, dynamically load code from the network with side effects on the running program, and many other crazy things.

Yet, not only are they in the genesis of JIT compiler research, their JITs are quite good, and their results went directly into JavaScript JITs research.


It’s not at all the same. In Smalltalk, you can modify your environment in real time.

I believe IO lets you do the same. Everything is a prototype with slots, communicating via messages.

I guess Self was the same way. Self & Smalltalk also give you access to the entire runtime.


Smalltalk tries to solve the problem of mutable state in a unique way. Where some languages say "mutable state is bad, minimize or isolate state changes," Smalltalk gives you amazing tools for monitoring the state of objects in the system. The level of control at every level of execution is unlike any other language. You can open up live inspectors on any object, edit a method in the debugger and restart the stack frame you are looking at, and persist all of it across programming sessions in the image.

It's much the same in Smalltalk. Often, one could create a domain-specific superset of Smalltalk, complete with its own control structures.

Smalltalk images are a clear demonstration that it doesn't have to be "all or none." Given a clean runtime model, one should be able to switch the execution engine on the fly, just as Smalltalk lets a Smalltalk app (debugger) act as a bytecode interpreter for the process being debugged, then switches back to JIT machine code when you hit "run".

Would this be a good fit for Smalltalk, as it is image based? It seems it can remove a level of complexity, if you can treat your image, and so all your objects, as constantly persisted?

Smalltalk images are somewhat similar: the whole machine state is persisted.

For some reason, people have missed out on one of the biggest avenues of potential in R&D originated environments like Self and Smalltalk -- every object basically has a CLI.

Yes, I'm serious. If you poke around in the Smalltalk environments, you will find not only that everything is an object, but also that every single object everything from complex libraries to the humble character has something like a CLI that you can write little scripts against.

Squeak Smalltalk not only has something like a CLI for directly manipulating objects on a low level, there is also a framework called Morphic which lets you directly manipulate every individual object with a little GUI. It's as if every object also had its own lightweight IDE attached to it.


Smalltalk can do all of that and Python doesn't even have something like become:.

I really would love to see this for clojure or smalltalk.

When I bring up Smalltalk, I get an all-in-one environment from the image I load. Its live and any code I add goes into that image. Now I can use code control and build specific images, but it pretty much is a one image at a time world.

What I'm talking about is loading up multiple images into the same IDE and run them like fully separate images with maybe some plumbing for communication and code loading between them. You can sorta pull that stunt by, as stcredzero mentioned, running Smalltalk in Smalltalk, ut I want separate images.

next

Legal | privacy