Home

Awesome

TinyTools

Some tools for use with TinyBootstrap.

Currently only 2 tools are provided:

The TtInspector currently allows to display the classes and optionally methods installed in a dynamic image.

Load TinyTools

To load the TinyTools execute the following (in a regular Pharo 10 image).

Metacello new
  repository: 'github://ErikOnBike/TinyTools:main';
  baseline: 'TinyTools';
  load.

TtObjectEncoder

The TtObjectEncoder which should be executed from a regular Pharo 10 image, allows code (either a Class or a single CompiledMethod) to be exported as an encoded file. This encoded file can be read in by the 'dynamic' tiny image of TinyBootstrap. This allows executing and installing code into this image dynamically. See some examples below.

To create installable code use one of the following class methods to create or append code to a file:

The append methods allow multiple pieces of code to be written to the same file. This allows a sort of code bundle to be created. The order is not important.

Examples

To create a code file to load the TtInspector into the dynamic image, the following code can be executed (in the regular Pharo 10 image).

TtObjectEncoder writeClass: TtInspector to: 'inspector.code'.

To load the test1 class method of TtDynamic into the dynamic image, the following code can be executed (in the regular Pharo 10 image).

TtObjectEncoder writeMethod: (TtDynamic class >> #test1) to: 'test1.code'.

Now loading these pieces of code into a dynamic image, perform the following steps (see also Dynamic image creation).