Fuel and Tanker

Max Leske has a Fuel and Tanker demo, from a year ago, it has some interesting uses of fuel which are new to me. From before, I had done Pier Kernel Export Using Fuel, a few things were new to me:

  • Dragging and dropping a fuel file into Smalltalk image is supported (at least for Pharo)
  • If one imports a stack trace into an image that doesn't have all of the same classes loaded, then a FLClassNotFound exception is raised, so it is important to include what is loaded in an image when requesting debugging assistance. The exception includes the first class identified to be missing, but resolving this could take time
  • Around 19 minutes in is an example of setting up a substitution:

    | analyzer |
    (FileSystem disk workingDirectory / 'bar.fuel') writeStreamDo: [ :stream |
    	analyzer := FLAnalyzer newDefault
    		when: [ :object | object = 2 ]
    		substituteBy: [ :object | 3 ];
    		yourself.
    	FLSerializer newDefault
    		analyzer: analyzer;
    		serialize: 'string' -> 2 on: stream binary ].
    (FLMaterializer materializeFromFileNamed: 'bar.fuel')

    This could be very valuable for upgrades.

  • The links at the end have moved to:

Posted by John Borden at 1 April 2015, 11:22 am link