Hi,
yes this is cool :)
There is also a new smart student that will work on this infrastructure a bit to make it "normal developer friendly", you know, hiding some implementation details, making maybe a UI for the process and so on.
Now, about the questions:
��
-��And how much smaller could the image get if the class builder was removed?
�� ��
�� ��Well, as Pavel says, you can get for example 10K. You can get even less if you tweak it manually. Around 10k is the minimal required by the VM to run a full featured image (at least in cog 32 bits, I did not measure it in Spur).��Imagine that the VM requires at least:
�� �� ��* one process scheduler
�� �� ��* one process in that scheduler
�� �� ��* one context on that process
�� �� ��* one method on that context
�� ��Then, the VM requires some information to interact with the runtime, e.g.,
�� �� ��* what is the selector used for doesNotUnderstand: (yes, we can change it!)
�� �� ��* what are the first 256 character objects in the Character flyweight
�� �� ��* what is the class of SmallInteger immediate instances
�� �� ��* some special/optimized selectors
�� My automatic process generated a somewhat 10k of objects required for this VM/image interaction.
�� Of course this list changes a bit with Spur, and could be reduced (for example, if you don't use characters, you wouldn't need the character flyweight and so on...)
-��Is it future approach for bootstrap? (with respect to the 10k image)
����
�� Well, if you read my thesis, what I'm doing there is to lazily pick what classes and methods will go inside an image. While this is nice to experiment, I do not think It's a good approach for bootstrapping:
�� ��* you need to exercise/execute all possible cases your image needs to support
�� ��* and that means you need to know all those cases in advance
�� ��* and that you have to be careful with side effects
�� ��Otherwise, code not executed is not taken in the resulting image.
�� Also take the fact that changing a little line of code may result in bootstrapping an image a couple of times bigger because of a wrong dependency.
�� All these points make this approach less reproducible and a bit more complicated. I prefer an explicit list of packages to bootstrap, that we can control and really test the output :)
BTW Pavel, this approach may need to be updated but I think we could make it run on top of the simulator also ;).