[Pharo-project] Now you can use Fuel with FileSystem
Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one small package 'FuelFileSystem' which has just 3 extension methods, and that's all ;) There is also 'FuelFileSystemTests' which let's you run all fuel tests using FS. If you want to do that, change FLSerializationTest >> setUp to send #useFileSystemFileStream rather than #useStandardFileStream and that's all. To install: Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfFuel'; load. (ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'. An example: | sourceArray loadedArray serializer stream materializer | sourceArray := Array with: 'a string' with: Transcript with: [ Transcript show: 'a string' ]. "Create a file and serialize on it" stream := (FSLocator imageDirectory / 'example.fuel') writeStream. serializer := FLSerializer newDefault. serializer serialize: sourceArray on: stream. stream close. "Load from the file" stream := (FSLocator imageDirectory / 'example.fuel') readStream. materializer := FLMaterializer newDefault. loadedArray := (materializer materializeFrom: stream) root. Cheers -- Mariano http://marianopeck.wordpress.com
Hi Mariano! Love it, great work! Love objects StOMPing, rSTing, Fueling around between images at runtime. Do you have examples how to realize realtime mirroring (HA) with it? tnx in advance, Guido Stepken Am 07.01.2012 23:25 schrieb "Mariano Martinez Peck" <marianopeck@gmail.com
:
Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one small package 'FuelFileSystem' which has just 3 extension methods, and that's all ;) There is also 'FuelFileSystemTests' which let's you run all fuel tests using FS. If you want to do that, change FLSerializationTest >> setUp to send #useFileSystemFileStream rather than #useStandardFileStream and that's all. To install:
Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfFuel'; load.
(ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'.
An example:
| sourceArray loadedArray serializer stream materializer | sourceArray := Array with: 'a string' with: Transcript with: [ Transcript show: 'a string' ]. "Create a file and serialize on it" stream := (FSLocator imageDirectory / 'example.fuel') writeStream. serializer := FLSerializer newDefault. serializer serialize: sourceArray on: stream. stream close. "Load from the file" stream := (FSLocator imageDirectory / 'example.fuel') readStream. materializer := FLMaterializer newDefault. loadedArray := (materializer materializeFrom: stream) root.
Cheers
-- Mariano http://marianopeck.wordpress.com
On Sun, Jan 8, 2012 at 11:15 AM, Guido Stepken <gstepken@googlemail.com>wrote:
Hi Mariano!
Love it, great work!
Love objects StOMPing, rSTing, Fueling around between images at runtime.
Do you have examples how to realize realtime mirroring (HA) with it?
No I don't. But I guess we have the bases/infrastructure for that. From what I can tell you with Fuel, you can export contexts, closures, classes, traits, compiled methods, etc. So at least from the serialization point of view, that should be working. Not exactly the same, but just to show you, in ESUG 2011 I showed how I could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context. Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/squeak/6176 Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :) Maybe someone has done something more. That's all I know. Cheers
tnx in advance, Guido Stepken Am 07.01.2012 23:25 schrieb "Mariano Martinez Peck" < marianopeck@gmail.com>:
Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one
small package 'FuelFileSystem' which has just 3 extension methods, and that's all ;) There is also 'FuelFileSystemTests' which let's you run all fuel tests using FS. If you want to do that, change FLSerializationTest >> setUp to send #useFileSystemFileStream rather than #useStandardFileStream and that's all. To install:
Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfFuel'; load.
(ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'.
An example:
| sourceArray loadedArray serializer stream materializer | sourceArray := Array with: 'a string' with: Transcript with: [ Transcript show: 'a string' ]. "Create a file and serialize on it" stream := (FSLocator imageDirectory / 'example.fuel') writeStream. serializer := FLSerializer newDefault. serializer serialize: sourceArray on: stream. stream close. "Load from the file" stream := (FSLocator imageDirectory / 'example.fuel') readStream. materializer := FLMaterializer newDefault. loadedArray := (materializer materializeFrom: stream) root.
Cheers
-- Mariano http://marianopeck.wordpress.com
-- Mariano http://marianopeck.wordpress.com
On Jan 8, 2012, at 2:55 PM, Mariano Martinez Peck wrote:
Not exactly the same, but just to show you, in ESUG 2011 I showed how I could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
gorgeous :) I want that :) Stef
That is awesome. Do you know where does Nick commit his code ?! Is it in usable state without too much preconditions (ie. no custom VM or other weirdies)?
Not exactly the same, but just to show you, in ESUG 2011 I showed how I could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/squeak/6176
Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)
Maybe someone has done something more. That's all I know.
On Sun, Jan 8, 2012 at 6:05 PM, Francois Stephany <tulipe.moutarde@gmail.com
wrote:
That is awesome. Do you know where does Nick commit his code ?! Is it in usable state without too much preconditions (ie. no custom VM or other weirdies)?
Hi Francois. For Nick I say "he may use Fuel as well for the serialization part" and "But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)" So...I am not sure if he already did something. And if the did it, I don't know where it is. Maybe you rether to Esteban code? what is what you exactly want? Cheers
Not exactly the same, but just to show you, in ESUG 2011 I showed how I
could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/**squeak/6176<http://wiki.squeak.org:8080/squeak/6176>
Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)
Maybe someone has done something more. That's all I know.
-- Mariano http://marianopeck.wordpress.com
Yep, Esteban's setup is a bit what I have now, rST and remote tools are what I want. If we had a bounty system I would even pay for this. =) On 08/01/12 09:26, Mariano Martinez Peck wrote:
On Sun, Jan 8, 2012 at 6:05 PM, Francois Stephany <tulipe.moutarde@gmail.com <mailto:tulipe.moutarde@gmail.com>> wrote:
That is awesome. Do you know where does Nick commit his code ?! Is it in usable state without too much preconditions (ie. no custom VM or other weirdies)?
Hi Francois. For Nick I say "he may use Fuel as well for the serialization part" and "But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)" So...I am not sure if he already did something. And if the did it, I don't know where it is. Maybe you rether to Esteban code? what is what you exactly want?
Cheers
Not exactly the same, but just to show you, in ESUG 2011 I showed how I could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/__squeak/6176 <http://wiki.squeak.org:8080/squeak/6176>
Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)
Maybe someone has done something more. That's all I know.
-- Mariano http://marianopeck.wordpress.com
-- http://tulipemoutarde.be BE: +32 (0)65 709 131 CA: +1 778 558 3225
On Sun, Jan 8, 2012 at 6:31 PM, Francois Stephany <tulipe.moutarde@gmail.com
wrote:
Yep, Esteban's setup is a bit what I have now, rST and remote tools are what I want.
Put it in the queue ;)
If we had a bounty system I would even pay for this. =)
On 08/01/12 09:26, Mariano Martinez Peck wrote:
On Sun, Jan 8, 2012 at 6:05 PM, Francois Stephany <tulipe.moutarde@gmail.com <mailto:tulipe.moutarde@gmail.**com<tulipe.moutarde@gmail.com>>> wrote:
That is awesome. Do you know where does Nick commit his code ?! Is it in usable state without too much preconditions (ie. no custom VM or other weirdies)?
Hi Francois. For Nick I say "he may use Fuel as well for the serialization part" and "But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)" So...I am not sure if he already did something. And if the did it, I don't know where it is. Maybe you rether to Esteban code? what is what you exactly want?
Cheers
Not exactly the same, but just to show you, in ESUG 2011 I showed how I could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/__**squeak/6176<http://wiki.squeak.org:8080/__squeak/6176>
<http://wiki.squeak.org:8080/**squeak/6176<http://wiki.squeak.org:8080/squeak/6176>
Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)
Maybe someone has done something more. That's all I know.
-- Mariano http://marianopeck.wordpress.**com <http://marianopeck.wordpress.com>
-- http://tulipemoutarde.be BE: +32 (0)65 709 131 CA: +1 778 558 3225
-- Mariano http://marianopeck.wordpress.com
Hi Francois--
Yep, Esteban's setup is a bit what I have now, rST and remote tools are what I want.
If we had a bounty system I would even pay for this. =)
I'm available! :) I've written remote browsers and debuggers. -C -- Craig Latta www.netjam.org/resume +31 6 2757 7177 + 1 415 287 3547
Hallo Francois, The most stable package for distributed (or "remote" if you prefer) computing is rST in http://squeaksource.org/rST/ at the moment this is your best bet. I had provided some fixes in the past, but decided to experiment with a smaller code base, because *rST could not handle our heavy scenario*: * Parametrize all programming tools in pharo with the notion of an 'environment' (local or remote) * Distribute environments at will ;) So I' ve been working on and off with rTalk in http://squeaksource.org/rTalk/ (no custom VM or weirdies, works on top of zinc) -- but it's still rough around the edges. Nick On Sun, Jan 8, 2012 at 6:05 PM, Francois Stephany <tulipe.moutarde@gmail.com
wrote:
That is awesome. Do you know where does Nick commit his code ?! Is it in usable state without too much preconditions (ie. no custom VM or other weirdies)?
Not exactly the same, but just to show you, in ESUG 2011 I showed how I
could serialize a living debugger from one image, open it in another one, and continue debugging from there...having the state and everything. Then I also showed how I can save the state when an error happens (PharoDebug.fuel in addition to PharoDebug.log) into a file and debug it later on in the same or another image. In fact, Esteban Lorenzano was trying that for a real app. Instead of sending logs the client send a .fuel of the serialized context.
Dave Lewis said Fuel could be used for RemoteTask: http://wiki.squeak.org:8080/**squeak/6176<http://wiki.squeak.org:8080/squeak/6176>
Nick Papoylias (PhD just next to my desk haha) is working with rST and he may use Fuel as well for the serialization part. But not sure what he will exactly do with rST. He have several things in mind like remote debugging :)
Maybe someone has done something more. That's all I know.
Mariano should not we get some fixes for FS? Stef On Jan 7, 2012, at 11:25 PM, Mariano Martinez Peck wrote:
Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one small package 'FuelFileSystem' which has just 3 extension methods, and that's all ;) There is also 'FuelFileSystemTests' which let's you run all fuel tests using FS. If you want to do that, change FLSerializationTest >> setUp to send #useFileSystemFileStream rather than #useStandardFileStream and that's all. To install:
Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfFuel'; load.
(ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'.
An example:
| sourceArray loadedArray serializer stream materializer | sourceArray := Array with: 'a string' with: Transcript with: [ Transcript show: 'a string' ]. "Create a file and serialize on it" stream := (FSLocator imageDirectory / 'example.fuel') writeStream. serializer := FLSerializer newDefault. serializer serialize: sourceArray on: stream. stream close. "Load from the file" stream := (FSLocator imageDirectory / 'example.fuel') readStream. materializer := FLMaterializer newDefault. loadedArray := (materializer materializeFrom: stream) root.
Cheers
-- Mariano http://marianopeck.wordpress.com
On Sun, Jan 8, 2012 at 1:30 PM, Stéphane Ducasse <stephane.ducasse@inria.fr>wrote:
Mariano
should not we get some fixes for FS?
fixes fixes fixes there is just only one, and it was the one of #next: I reported in http://forum.world.st/Bug-in-FileSystem-td4272729.html I can provide such fix. Then for Fuel I also needed #next:into: which is not implemented. I can added, but I am waiting our stream guru Henry/Nicolas approbal ;) As soon as they appear, I will submit them. Stef
On Jan 7, 2012, at 11:25 PM, Mariano Martinez Peck wrote:
Hi guys. Now you can use FileSystem streams for Fuel. Fuel only needs one small package 'FuelFileSystem' which has just 3 extension methods, and that's all ;) There is also 'FuelFileSystemTests' which let's you run all fuel tests using FS. If you want to do that, change FLSerializationTest >> setUp to send #useFileSystemFileStream rather than #useStandardFileStream and that's all. To install:
Gofer new squeaksource: 'MetacelloRepository'; package: 'ConfigurationOfFuel'; load.
(ConfigurationOfFuel project version: #bleedingEdge) load: 'withFS'.
An example:
| sourceArray loadedArray serializer stream materializer | sourceArray := Array with: 'a string' with: Transcript with: [ Transcript show: 'a string' ]. "Create a file and serialize on it" stream := (FSLocator imageDirectory / 'example.fuel') writeStream. serializer := FLSerializer newDefault. serializer serialize: sourceArray on: stream. stream close. "Load from the file" stream := (FSLocator imageDirectory / 'example.fuel') readStream. materializer := FLMaterializer newDefault. loadedArray := (materializer materializeFrom: stream) root.
Cheers
-- Mariano http://marianopeck.wordpress.com
-- Mariano http://marianopeck.wordpress.com
participants (6)
-
Craig Latta -
Francois Stephany -
Guido Stepken -
Mariano Martinez Peck -
Nick Papoylias -
Stéphane Ducasse