Hello. Do we have way to traverse object graph? I want stream which iterate object graph through instance variables with knowledge about path at every step. Maybe Fuel has classes for this ? Best regards, Denis
I managed to get per object substitution callbacks working in Mushroom. Please take a look in http://www.squeaksource.com/Mushroom and load Mushr00m-Pharo on top of MushrOOm (after installing Cryptography and SecureSession from http://www.squeaksource.com/Cryptography). Then look at the classes in the Utility category. HTH, Robert On 12/22/2015 03:46 AM, Denis Kudriashov wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
Best regards, Denis
-- . .. ... ^,^ robert Go Panthers!
I'm sorry, this is with Fuel loaded. These are extensions to Fuel serialization and materialization. b, robert On 12/22/2015 03:55 AM, Robert Withers wrote:
I managed to get per object substitution callbacks working in Mushroom. Please take a look in http://www.squeaksource.com/Mushroom and load Mushr00m-Pharo on top of MushrOOm (after installing Cryptography and SecureSession from http://www.squeaksource.com/Cryptography).
Then look at the classes in the Utility category.
HTH,
Robert
On 12/22/2015 03:46 AM, Denis Kudriashov wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
Best regards, Denis
-- . .. ... ^,^ robert Go Panthers!
On 22 Dec 2015, at 09:46, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
yes, I think so.. there is #fuelAccept:, but I am not sure how general it is. I remember that Doru did some object graph iteration experiments, too? (I canât find it). But I think we should actually add a general âobject graph iteratorâ to the reflective features of the language. It seems very useful to have, and for sure Fuel could just use it. Marcus
I found this: http://smalltalkhub.com/#!/~Moose/DeepTraverser 2015-12-22 10:05 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 22 Dec 2015, at 09:46, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
yes, I think so.. there is #fuelAccept:, but I am not sure how general it is.
I remember that Doru did some object graph iteration experiments, too? (I canât find it).
But I think we should actually add a general âobject graph iteratorâ to the reflective features of the language. It seems very useful to have, and for sure Fuel could just use it.
Marcus
Denis, The DeepTraverser was a little easy hack I shared years ago to Tudor Girba which he then (improved it?) put it in Moose. While it works is still very limited. You can give it a try. And if not, please spend some time checking the graph traverser we have in Fuel. I suspect it could be easily adapted for custom code, but I am not sure ;) Basically, check FLAnalysis >> run, which has a stack and starts the trace via #mapAndTrace: Cheers, On Tue, Dec 22, 2015 at 6:20 AM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
I found this: http://smalltalkhub.com/#!/~Moose/DeepTraverser
2015-12-22 10:05 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 22 Dec 2015, at 09:46, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
yes, I think so.. there is #fuelAccept:, but I am not sure how general it is.
I remember that Doru did some object graph iteration experiments, too? (I canât find it).
But I think we should actually add a general âobject graph iteratorâ to the reflective features of the language. It seems very useful to have, and for sure Fuel could just use it.
Marcus
-- Mariano http://marianopeck.wordpress.com
Hi, Indeed, DeepTraverser is the project to look at. I started it from the code of Mariano, and then Stefan Rechhart reimplemented it from scratch to make it very fast (e.g. traversing subclasses of a class is only 10% slower than the hard coded withAllSubclassesDo:) and to make it work like a stream. It's really beautiful. Cheers, Doru -- www.tudorgirba.com "Every thing has its own flow"
On 22 Dec 2015, at 14:06, Mariano Martinez Peck <marianopeck@gmail.com> wrote:
Denis,
The DeepTraverser was a little easy hack I shared years ago to Tudor Girba which he then (improved it?) put it in Moose. While it works is still very limited. You can give it a try. And if not, please spend some time checking the graph traverser we have in Fuel. I suspect it could be easily adapted for custom code, but I am not sure ;)
Basically, check FLAnalysis >> run, which has a stack and starts the trace via #mapAndTrace:
Cheers,
On Tue, Dec 22, 2015 at 6:20 AM, Denis Kudriashov <dionisiydk@gmail.com> wrote: I found this: http://smalltalkhub.com/#!/~Moose/DeepTraverser
2015-12-22 10:05 GMT+01:00 Marcus Denker <marcus.denker@inria.fr>:
On 22 Dec 2015, at 09:46, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hello.
Do we have way to traverse object graph?
I want stream which iterate object graph through instance variables with knowledge about path at every step.
Maybe Fuel has classes for this ?
yes, I think so.. there is #fuelAccept:, but I am not sure how general it is.
I remember that Doru did some object graph iteration experiments, too? (I canât find it).
But I think we should actually add a general âobject graph iteratorâ to the reflective features of the language. It seems very useful to have, and for sure Fuel could just use it.
Marcus
-- Mariano http://marianopeck.wordpress.com
participants (5)
-
Denis Kudriashov -
Marcus Denker -
Mariano Martinez Peck -
Robert Withers -
Tudor Girba