[Pharo-dev] Pharo bootstrap with Ring and Calypso

Ben Coman btc at openinworld.com
Fri Feb 24 11:32:08 EST 2017


On Fri, Feb 24, 2017 at 11:36 PM, Pavel Krivanek <pavel.krivanek at gmail.com>
wrote:

>
>
> 2017-02-24 15:58 GMT+01:00 Ben Coman <btc at openinworld.com>:
>
>>
>>
>> On Fri, Feb 24, 2017 at 8:36 PM, Pavel Krivanek <pavel.krivanek at gmail.com
>> > wrote:
>>
>>> Hi,
>>>
>>> I have published a short video of the Pharo bootstrapping from a Ring
>>> model that is browsed and modified by the Calypso browser.
>>>
>>> https://www.youtube.com/watch?v=QguZSPKo7-w
>>>
>>> No audio, please enable subtitles for the description.
>>>
>>>
>> Wow wow wow !! Super-cool !!
>> I had to watch it a few times.
>> 314k image is pretty impressive.
>>
>> Just to clarify, Calypso is not connected to a remote image but browses
>> the bootstrap source code loaded into a Ring Environment?
>>
>
>
> Yes, Calypso browses an off-line source code loaded into the Ring
> environment.
>
>
>
>>  (btw, should we call this a "guest environment"?)
>>
>
> It is possible to open Calypso on a Ring model that takes data from the
> current image so in that case it would be confusing:-)
>

I meant only for the purpose of discussing bootstrap, not Calypso in
general.  :)

The rest of your responses made things clear. Thx.
cheers -ben


>
>
>
>>
>> When you show the previously opened window "Methods with a string aText
>> 'Smalltalk run' ..."
>> showing PBImageBuilder50 >> initializeImage,
>> that was opened before you created the new Ring Environment and Calypso
>> was opened,
>> so can I presume it was opened on a similar Ring Environment created
>> earlier?
>>
>
> It is a standard Nautilus window on the code in the image that does the
> bootstrapping. For the standard bootstrap it does much more things. See:
> https://github.com/guillep/pharo-core/blob/dfbfb77844a31701da6e49691af2a0
> 5ad55b4bc6/bootstrap/src/Pharo30Bootstrap.package/PBImageBuilder50.class/
> instance/initializeImage.st
>
>
>>
>> There were no processes in the guest image prior to doing this...
>>     process := objectSpace
>>         createProcessWithPriority: 40
>>         doing: ('Smalltalk primitiveGarbageCollect. Smalltalk run').
>>     objectSpace installActiveProcess: process.
>> so this was a single process Image?
>>
>
> Yes, see the method above
>
>
>>
>> You say "The image must contain support for the class builder to be able
>> to be bootstrapped."
>> When you create the SmalltalkImage>>run method in the guest environment,
>> is that actually *running* to compiled as normal using its class builder?
>>
>
> No, when I create the method, only the source code is set in the Ring
> model. The model is "dead". The real installation of the method into the
> generated object memory is done during the bootstrapping.
>
>
>>
>> How difficult would it be for the guest image to invoke class builder via
>> seamless in the host image?
>>
>
> The "guest" object memory runs in a special virtual machine simulator
> during the bootstrapping. That simulator uses AST Interpreter to execute
> the code inside the guest environment before it is installed for real. It
> uses own special kind of proxies and tricks to do it. The current bootstrap
> cannot run without class builder in the guest environment, but...
>
>
>> And how much smaller could the image get if the class builder was removed.
>>
>
> ...Guille in his thesis tried different approaches and he was able to
> produce extremely small images  (~10 KiB) that did for example only a sum
> of two numbers.
>
> https://guillep.github.io/files/publications/Poli15Thesis.pdf
>
>
>>
>> It could be cool if this bootstrap creation process was integrated in
>> PharoLauncher as a GUI tool.  Then later the ability to download these
>> mini-image to an embedded controller could be added.
>>
>
>> cheers -ben
>>
>> P.S. Could you maybe blog this also, to make it easier to replicate and
>> copy-paste the Playground text.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.pharo.org/pipermail/pharo-dev_lists.pharo.org/attachments/20170225/dce2c827/attachment.html>


More information about the Pharo-dev mailing list