Announcement
We have released the new version 1.7 of Fuel. The list of changes includes performance optimizations, design clean-ups, and new features.- The FLSerializer and FLMaterializer API has changed. They are no longer implementing the algorithms but are a kind of Façade.
- Developer guides with examples: Getting Started and Customizing the graph.
- Serialization substitutions: "Store this object instead of me."
- Global sends: "Restore me by sending this selector to this global"
- Versioning the stream: We prefix the stream with a version number that should match when loading.
- Performance optimizations on instances of:
- Word-like classes. (We thank a lot to Henrik Sperre Johansen for your help!)
- ByteString and Symbol.
- Date, Time, Duration and DateAndTime.
- Point and Rectangle.
- MethodDictionary. Now materialization is 2000x faster, thanks to its new rehash without become.
- Huge clean-up in Tests package.
Developer guides
- Getting Started
- Customizing the graph
- Fuel packages explanation
Install
Evaluate in a Pharo environment:Gofer it
squeaksource: 'MetacelloRepository';
package: 'ConfigurationOfFuel';
load.
((Smalltalk at: #ConfigurationOfFuel) project version: '1.7') load.
Try it
| sourceArray loadedArray |
sourceArray :=
Array
with: 'a string'
with: Transcript
with: [ Transcript show: 'a string' ].
"Store to the file"
FLSerializer serialize: sourceArray toFileNamed: 'example.FL'.
"Load from the file"
loadedArray := FLMaterializer materializeFromFileNamed: 'example.FL'.
"The arrays are not the same"
[ sourceArray ~~ loadedArray ] assert.
"The strings are not the same"
[ sourceArray first ~~ loadedArray first ] assert.
[ sourceArray first = loadedArray first ] assert.
"The global instance Transcript is the same"
[ sourceArray second == loadedArray second ] assert.
"Look at Transcript how the loaded block prints a string"
loadedArray third value.