[squeak-dev] The Inbox: Monticello-topa.490.mcz

Tobias Pape Das.Linux at gmx.de
Fri Dec 2 19:32:03 UTC 2011


Am 2011-12-02 um 18:54 schrieb Frank Shearar:

> On 2 December 2011 15:44,  <commits at source.squeak.org> wrote:
>> A new version of Monticello was added to project The Inbox:
>> http://source.squeak.org/inbox/Monticello-topa.490.mcz
> 
> Excellent! I've been hoping someone would do just this - it should
> drastically reduce the time take to build a custom image.
> 
>> ==================== Summary ====================
>> 
>> Item was added:
>> + ----- Method: MCMcdReader class>>loaderDiff (in category 'as yet unclassified') -----
>> + loaderDiff
>> +
>> +       ^ 9999 -> [:reader | reader loadDiff]!
>> 
>> Item was added:
>> + ----- Method: MCMcdReader class>>loaderDiffBinary (in category 'as yet unclassified') -----
>> + loaderDiffBinary
>> +
>> +       ^ 100 -> [:reader | reader loaderDiffBinary]!
> 
> What are the magic numbers?

Priority. 
I pulled them out of thin air.
These associations are put into a sorted collection (sorted by priority)
an then the blocks are tried in the order of the priorities until the 
first block does not yield nil.

Hence, loaderDiffBinary is tried first, and if it does not succeed, loaderDiff is
tried. 9999 is meant as last resort. I admit it is not that elaborated.

Extension goes like this (tied to that example)

>> + ----- Method: MCMcdReader class>>loaderDiffFuel (in category '*FuelMonticello') -----
>> + loaderDiffFuel
>> +
>> +       ^ 10 -> [:reader | reader loadDiffFuel]!


That way, Fuel is tried very first, then Binary (aka DataStream based), then loaderDiff (aka 
plain text definitions)

Best
	-Tobias 




More information about the Squeak-dev mailing list