5 ms·
It is true, that there is uncollected garbage in the original Xerox ST80 image. I've built some tools to analyze the image and also a VM which can be interrupte
by Rochus 4y ago
It is true, that there is uncollected garbage in the original Xerox ST80 image. I've built some tools to analyze the image and also a VM which can be interrupted at any time to analyze the current state of the image (see https://github.com/rochus-keller/Smalltalk https://github.com/rochus-keller/Smalltalk).
There are two zombie processes (OID 6662 and 19ba). There are also a couple of BlockContext and MethodContext which have a nil sender and a reference to an unknown method, but which are still referenced from somewhere (i.e. the collection is prevented, even with mark & sweep). E.g. OID 79a2 of class BinaryChoice. I have a full list if anybody is interested.
- floren 4y agoIt's things like this that always made me look a bit askance at Smalltalk. It feels a little like "Document_Final_FINAL_v3_(2).docx", a little like a dirty old whiteboard where you can still see outlines of notes from last year. Might not be a fair assessment, but as an outsider I've always felt this way about image-based systems.
- Rochus 4y agoDeploying an application was always an adventure. You could never be completely sure that it didn't contain things it shouldn't.
- igouy 4y agoFor some meaning of "contain things it shouldn't": Given that the base image we started working with didn't "contain things it shouldn't" why could we not be completely sure that base image + source code fileIn didn't "contain things it shouldn't" ?
- Rochus 4y agoFirst, as most other companies using ST we were not working on the original image, but on a company-specific one that had been in use for a long time and contained a lot of company-specific stuff. On the other hand, there were also things in the original images of the commercial STs that one would or should not ship with the product.
- pjmlp 4y agoWhich is why image trimming tools did exist.
- Rochus 4y agoI had Envy in later projects, which was very useful, but you simply had to trust it, which is not the same as to be completely sure.
- igouy 4y agoRather than simply trust, wouldn't we test? (At some point, we might question whether we're putting similar effort into testing other software tools.)
- Rochus 4y agoWe tested until our ears fell off; in particular, we had also to test all the stuff that the compiler (or linker) would otherwise have told us in a statically typed language; there was no other way; might explain why I directly switched to Ada for some time after ST; but how do you test for dead code (i.e. things in the image not used but still there for some reason)? It is not for nothing that people speak of a "Big ball of Mud" in the context of image based languages.
- igouy 4y ago> We tested until our ears fell off… And did you discover stuff that was reported to have been removed but your tests showed was not removed? In other words, examples where "trust it" would be a demonstrable mistake. > It is not for nothing that people speak of a "Big ball of Mud" in the context of image based languages. What process was used to manage source code? "At the outset of a project involving two or more programmers: Do assign a member of the team to be the version manager. … The responsibilities of the version manager consist of collecting and cataloging code files submitted by all members of the team, periodically building a new system image incorporating all submitted code files, and releasing the image for use by the team. The version manager stores the current release and all code files for that release in a central place, allowing team members read access, and disallowing write access for anyone except the version manager." (page 500) 1984 "Smalltalk-80 The Interactive Programming Environment" https://rmod-files.lille.inria.fr/FreeBooks/TheInteractiveProgrammingEnv/TheInteractiveProgrammingEnv.pdf https://rmod-files.lille.inria.fr/FreeBooks/TheInteractivePr...
- igouy 4y ago( cont. from https://news.ycombinator.com/item?id=31999774 https://news.ycombinator.com/item?id=31999774 ) > … no algorithm that can identify all dead code reliably… Why were you so concerned with the removal of all dead code? Compared to "… nobody had the source code…" it seems like a minor issue.
- igouy 4y ago( cont. ) imo the more usual concern would be mistakenly removing code that was not dead. Without a design document, we might think there would be no senders of #factorial without understanding that the intention was to invoke that method on the command line. For example, $ cat fact.st Stdio stdout nextPutAll: 100 factorial printString; nextPut: Character lf.! SmalltalkImage current snapshot: false andQuit: true! $ bin/pharo --headless Pharo10-SNAPSHOT-64bit-502addc.image fact.st 93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000 So instrumenting methods and logging — https://stackoverflow.com/a/162719 https://stackoverflow.com/a/162719
- igouy 4y agoIs there uncollected garbage in the Smalltalk Squeak 6.0 image?
- Rochus 4y agoI have no information about this. Squeak uses a different image format, incompatible with my tools.