[Reflectivity] Tiny progress of the day: MetaLink
Hi, The tiny progress of today: I reviewed the code for the MetaLink from Claraâs Breakpoints and added it to Pharo4. I has as state: metaObject the target selector what to call arguments which args? condition true, false or [block evaluating to a boolean] control before, after, replace⦠level active at base or meta level? (to stop meta-recursion) nodes where it is installed. ------ Examples ----- MetaLink new metaObject: Halt; selector: #now. MetaLink new metaObject: [ self halt ]; selector: #value. MetaLink new metaObject: #node; selector: tagExecuted or one that can only be installed on Message send: MetaLink metaObject: #object; selector: perform:withArguments; arguments: #(selector arguments); control: #replace Of course, the real core of the whole things is next: An AST transforming compiler plugin that takes these links into account. Of course, exact details might change (e.g. control using symbols or classes (ControlBefore)â, do we call it instead, replace or even AOP-style âaroundâ? The first will be just a #before with no arguments, as this is what we need for simple breakpoints. Marcus
Yes, a good breakpoint facility, even a simple one, is really needed.
On 02 Mar 2015, at 09:38, Marcus Denker <marcus.denker@inria.fr> wrote:
Hi,
The tiny progress of today: I reviewed the code for the MetaLink from Claraâs Breakpoints and added it to Pharo4. I has as state:
metaObject the target selector what to call arguments which args? condition true, false or [block evaluating to a boolean] control before, after, replace⦠level active at base or meta level? (to stop meta-recursion) nodes where it is installed.
------ Examples -----
MetaLink new metaObject: Halt; selector: #now.
MetaLink new metaObject: [ self halt ]; selector: #value.
MetaLink new metaObject: #node; selector: tagExecuted
or one that can only be installed on Message send:
MetaLink metaObject: #object; selector: perform:withArguments; arguments: #(selector arguments); control: #replace
Of course, the real core of the whole things is next: An AST transforming compiler plugin that takes these links into account. Of course, exact details might change (e.g. control using symbols or classes (ControlBefore)â, do we call it instead, replace or even AOP-style âaroundâ?
The first will be just a #before with no arguments, as this is what we need for simple breakpoints.
Marcus
Is there any background material one can read about these things? TIA Phil On Mon, Mar 2, 2015 at 9:38 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
Hi,
The tiny progress of today: I reviewed the code for the MetaLink from Claraâs Breakpoints and added it to Pharo4. I has as state:
metaObject the target selector what to call arguments which args? condition true, false or [block evaluating to a boolean] control before, after, replace⦠level active at base or meta level? (to stop meta-recursion) nodes where it is installed.
------ Examples -----
MetaLink new metaObject: Halt; selector: #now.
MetaLink new metaObject: [ self halt ]; selector: #value.
MetaLink new metaObject: #node; selector: tagExecuted
or one that can only be installed on Message send:
MetaLink metaObject: #object; selector: perform:withArguments; arguments: #(selector arguments); control: #replace
Of course, the real core of the whole things is next: An AST transforming compiler plugin that takes these links into account. Of course, exact details might change (e.g. control using symbols or classes (ControlBefore)â, do we call it instead, replace or even AOP-style âaroundâ?
The first will be just a #before with no arguments, as this is what we need for simple breakpoints.
Marcus
On 02 Mar 2015, at 09:51, phil@highoctane.be wrote:
Is there any background material one can read about these things?
I fear only my PhD⦠I never published a paper about the whole thing (huge mistakeâ¦). http://scg.unibe.ch/archive/phd/denker-phd.pdf The problem is that this tells the story including the first steps that where wrong (based on byte code and too complex). Chapter 5 is about the final model, chapter 6 discusses meta-recursion. So one could read 2, the intro of 3 + 4, and then 5. I will write a real paper about the version in Pharo when it is done. Marcus
Could this be used in stead of Spec Adapters? That would probably require MetaLinkCollection. Peter On Mon, Mar 2, 2015 at 9:58 AM, Marcus Denker <marcus.denker@inria.fr> wrote:
On 02 Mar 2015, at 09:51, phil@highoctane.be wrote:
Is there any background material one can read about these things?
I fear only my PhD⦠I never published a paper about the whole thing (huge mistakeâ¦).
http://scg.unibe.ch/archive/phd/denker-phd.pdf
The problem is that this tells the story including the first steps that where wrong (based on byte code and too complex). Chapter 5 is about the final model, chapter 6 discusses meta-recursion. So one could read 2, the intro of 3 + 4, and then 5.
I will write a real paper about the version in Pharo when it is done.
Marcus
On 02 Mar 2015, at 11:04, Peter Uhnák <i.uhnak@gmail.com> wrote:
Could this be used in stead of Spec Adapters? That would probably require MetaLinkCollection.
We need to be careful using these mechanisms⦠it is powerful but you can build very hard to understand systems when using it too much...
Peter
On Mon, Mar 2, 2015 at 9:58 AM, Marcus Denker <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> wrote:
On 02 Mar 2015, at 09:51, phil@highoctane.be <mailto:phil@highoctane.be> wrote:
Is there any background material one can read about these things?
I fear only my PhD⦠I never published a paper about the whole thing (huge mistakeâ¦).
http://scg.unibe.ch/archive/phd/denker-phd.pdf <http://scg.unibe.ch/archive/phd/denker-phd.pdf>
The problem is that this tells the story including the first steps that where wrong (based on byte code and too complex). Chapter 5 is about the final model, chapter 6 discusses meta-recursion. So one could read 2, the intro of 3 + 4, and then 5.
I will write a real paper about the version in Pharo when it is done.
Marcus
Marcus Denker-4 wrote
Could this be used in stead of Spec Adapters? That would probably require MetaLinkCollection.
We need to be careful using these mechanisms⦠it is powerful but you can build very hard to understand systems when using it too much...
Yes, IMHO opinion, this feature should be thought of like #instVarNamed:put: - awesome & powerful when you /really/ need it (usually deep within the IDE itself), but an anti-pattern for general use ----- Cheers, Sean -- View this message in context: http://forum.world.st/Reflectivity-Tiny-progress-of-the-day-MetaLink-tp48087... Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
On 02 Mar 2015, at 13:18, Sean P. DeNigris <sean@clipperadams.com> wrote:
Marcus Denker-4 wrote
Could this be used in stead of Spec Adapters? That would probably require MetaLinkCollection.
We need to be careful using these mechanisms⦠it is powerful but you can build very hard to understand systems when using it too much...
Yes, IMHO opinion, this feature should be thought of like #instVarNamed:put: - awesome & powerful when you /really/ need it (usually deep within the IDE itself), but an anti-pattern for general use
yes, the idea is that one can use this magic to build abstractions an then use *those*. Like seaside: call/answer uses magic that you should never use in a application code. Marcus
+ 1 :) >>> Could this be used in stead of Spec Adapters? That would probably require >>> MetaLinkCollection. >> We need to be careful using these mechanisms⦠it is powerful but you can >> build very hard >> to understand systems when using it too much... > Yes, IMHO opinion, this feature should be thought of like #instVarNamed:put: > - awesome & powerful when you /really/ need it (usually deep within the IDE > itself), but an anti-pattern for general use > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/Reflectivity-Tiny-progress-of-the-day-MetaLink-tp4808781p4808828.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > >
Le 2 mars 2015 05:58, "Marcus Denker" <marcus.denker@inria.fr> a écrit :
On 02 Mar 2015, at 09:51, phil@highoctane.be wrote:
Is there any background material one can read about these things?
I fear only my PhD⦠I never published a paper about the whole thing (huge
mistakeâ¦).
http://scg.unibe.ch/archive/phd/denker-phd.pdf
The problem is that this tells the story including the first steps that
where wrong (based on byte code
and too complex). Chapter 5 is about the final model, chapter 6 discusses meta-recursion. So one could read 2, the intro of 3 + 4, and then 5.
I will write a real paper about the version in Pharo when it is done.
Specifically for the breakpoints there is my paper, and my blog (which I should update at some point): clariallende@wordpress.com In both I do a small introduction to Reflectivity, and explain how we use it for the breakpoints. Maybe you can start from there and then follow up with Marcus' thesis.
Marcus
Le 2 mars 2015 05:38, "Marcus Denker" <marcus.denker@inria.fr> a écrit :
Hi,
The tiny progress of today: I reviewed the code for the MetaLink from
Claraâs Breakpoints
and added it to Pharo4.
Yay! There was also one extension method in Slot to make work with those, have you seen it? I has as state:
metaObject the target selector what to call arguments which args? condition true, false or [block evaluating to a boolean] control before, after, replace⦠level active at base or meta level? (to stop meta-recursion) nodes where it is installed.
------ Examples -----
MetaLink new metaObject: Halt; selector: #now.
MetaLink new metaObject: [ self halt ]; selector: #value.
MetaLink new metaObject: #node; selector: tagExecuted
or one that can only be installed on Message send:
MetaLink metaObject: #object; selector: perform:withArguments; arguments: #(selector arguments); control: #replace
Of course, the real core of the whole things is next: An AST transforming
compiler plugin
that takes these links into account. Of course, exact details might change (e.g. control using symbols or classes (ControlBefore)â, do we call it instead, replace or even AOP-style âaroundâ?
The first will be just a #before with no arguments, as this is what we need for simple breakpoints.
Marcus
On 02 Mar 2015, at 13:10, Clara Allende <clari.allende@gmail.com> wrote:
Le 2 mars 2015 05:38, "Marcus Denker" <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> a écrit :
Hi,
The tiny progress of today: I reviewed the code for the MetaLink from Claraâs Breakpoints and added it to Pharo4.
Yay! There was also one extension method in Slot to make work with those, have you seen it?
Ah, the uninstall⦠I will add it. Marcus
On 02 Mar 2015, at 15:39, Marcus Denker <marcus.denker@inria.fr> wrote:
On 02 Mar 2015, at 13:10, Clara Allende <clari.allende@gmail.com <mailto:clari.allende@gmail.com>> wrote:
Le 2 mars 2015 05:38, "Marcus Denker" <marcus.denker@inria.fr <mailto:marcus.denker@inria.fr>> a écrit :
Hi,
The tiny progress of today: I reviewed the code for the MetaLink from Claraâs Breakpoints and added it to Pharo4.
Yay! There was also one extension method in Slot to make work with those, have you seen it?
Ah, the uninstall⦠I will add it.
Part of my tiny step forward of today: https://pharo.fogbugz.com/f/cases/15039/Move-Reflectivity-related-methods-an... <https://pharo.fogbugz.com/f/cases/15039/Move-Reflectivity-related-methods-an...> - Move Reflectivity related methods and classes to Reflectivity - LinkWrapper>>#uninstall from breakpoints prototype Marcus
participants (7)
-
Clara Allende -
Marcus Denker -
Peter Uhnák -
phil@highoctane.be -
Sean P. DeNigris -
stepharo -
Sven Van Caekenberghe