Hacker News new | ask | show | jobs
by bloat 4261 days ago
Is it possible that when you try and recreate your image from scratch, the code you have pasted into your editor is not sufficient to recreate the image?

Maybe you pasted some things in the wrong order, or maybe you redefined a function, but some data that was created using the old version of the function is still in the image.

If this is possible in your programming environment, then maybe the dead code is not worth keeping around, and we should only retain the live image.

In which case we need tools to version and diff and branch a live image.

Does a programming environment like that exist I wonder? Or do image based environments like Smalltalk let you export an image as text, like a DB can dump all the SQL required to recreate it?

2 comments

The creators of Smalltalk encountered the difficulties you're thinking about while they were using Smalltalk for different projects at Xerox PARC in the '70s -- and addressed them.

Simple Smalltalk implementations are in 4 parts: the Smalltalk VM, the Smalltalk image file, the sources file and the changes file.

The image contains compiled code and objects, the sources file contains source code for some of the compiled code in the image (at least the source code provided by the vendor), and the changes file contains a log of changes made using the IDE.

Re-doing the changes recorded in the changes file should be sufficient to recreate the image up-to the last change.

In the late '80s multi person configuration management systems were developed for Smalltalk, see --

http://books.google.com/books?id=odx8WIDOcyIC&lpg=PA136&ots=...

Yes. Smalltalk environments export an image that's a snapshot of the entire state of the VM. It's like a reloadable core dump of the VM. It's a binary though, not plaintext. But there is also a sophisticated distributed versioning system for Smalltalk code, which can save versioned snapshots of slices of your code and state that can be imported into different images: http://wiresong.ca/monticello/