Hi,
the slides for my ESUG talk are online: Marcus
|
There is a typo: ESUG 3015, Brescia, Italy. Great talk btw. Mark 2015-07-15 10:15 GMT+02:00 Marcus Denker <[hidden email]>:
|
Thanks, fixed… (my brain is melting… too warm…) Marcus |
In reply to this post by Marcus Denker-4
Video is online, too: Marcus |
Very good talk Marcus.
In the next weeks I will finally have some time to try Reflectivity out! Thanks a lot for all your effort! Cheers, Roberto > On 31 Jul 2015, at 13:23, Marcus Denker <[hidden email]> wrote: > > >> On 15 Jul 2015, at 10:15, Marcus Denker <[hidden email]> wrote: >> >> Hi, >> >> the slides for my ESUG talk are online: >> >> http://www.slideshare.net/MarcusDenker/reflection-in-pharo5 >> >> > > Video is online, too: > > https://www.youtube.com/watch?v=Ik539CtjtTI > > > > Marcus > |
Hi Roberto, Very good! I am now working on #after for methods+sequence. *And* primitives... this should all be committed early next week. After that, I need to actually use it to find remaining problems, so this is very good that you will start now. Marcus On Thu, Sep 3, 2015 at 2:50 PM, [hidden email] <[hidden email]> wrote: Very good talk Marcus. |
Hi Marcus,
I am finally playing with Reflectivity. In the first place, thanks a lot for this contribution! I am wondering what is the ‘correct’ way to ‘remove’ a MetaLink. Is it enough to call #uninstall on the MetaLink or should I also recompile the class/method where the link is installed? I spotted a problem with the control #after. If you try to pass #arguments to the meta, an error is returned. To reproduce: http://ws.stfx.eu/ONC4K9KQRTNQ Is this behavior somewhat desired, or is a bug? Dictionary>>errorKeyNotFound: [ self errorKeyNotFound: key ] in Dictionary>>at: in Block: [ self errorKeyNotFound: key ] Dictionary>>at:ifAbsent: Dictionary>>at: IRPushClosureCopy>>indexForVarNamed: IRTranslatorV2>>visitPushTemp: IRPushTemp>>accept: IRTranslatorV2(IRVisitor)>>visitNode: IRTranslatorV2>>visitInstruction: [ :instr | self visitInstruction: instr ] in IRTranslatorV2(IRVisitor)>>visitSequence: in Block: [ :instr | self visitInstruction: instr ] OrderedCollection>>do: IRSequence>>do: IRTranslatorV2(IRVisitor)>>visitSequence: IRTranslatorV2>>visitSequence: IRSequence>>accept: IRTranslatorV2(IRVisitor)>>visitNode: [ :each | self visitNode: each ] in IRTranslatorV2(IRVisitor)>>visitNodes: in Block: [ :each | self visitNode: each ] SortedCollection(OrderedCollection)>>do: IRTranslatorV2(IRVisitor)>>visitNodes: IRTranslatorV2>>visitSequences: IRTranslatorV2>>visitMethod: IRMethod>>accept: IRTranslatorV2(IRVisitor)>>visitNode: IRMethod>>generate: IRMethod>>compiledMethodWith: RBMethodNode>>generate: ReflectiveMethod>>recompileAST ReflectiveMethod>>compileAndInstallCompiledMethod ReflectiveMethod>>run:with:in: UndefinedObject>>DoIt Cheers, Roberto > On 04 Sep 2015, at 14:16, Marcus Denker <[hidden email]> wrote: > > Hi Roberto, > > Very good! I am now working on #after for methods+sequence. *And* primitives... this should all be committed early next week. > > After that, I need to actually use it to find remaining problems, so this is very good that you will start now. > > Marcus > > On Thu, Sep 3, 2015 at 2:50 PM, [hidden email] <[hidden email]> wrote: > Very good talk Marcus. > > In the next weeks I will finally have some time to try Reflectivity out! > > Thanks a lot for all your effort! > > Cheers, > Roberto > > > On 31 Jul 2015, at 13:23, Marcus Denker <[hidden email]> wrote: > > > > > >> On 15 Jul 2015, at 10:15, Marcus Denker <[hidden email]> wrote: > >> > >> Hi, > >> > >> the slides for my ESUG talk are online: > >> > >> http://www.slideshare.net/MarcusDenker/reflection-in-pharo5 > >> > >> > > > > Video is online, too: > > > > https://www.youtube.com/watch?v=Ik539CtjtTI > > > > > > > > Marcus > > > > > > > -- > -- > Marcus Denker -- [hidden email] > http://www.marcusdenker.de |
> On 22 Sep 2015, at 17:23, [hidden email] wrote: > > Hi Marcus, > > I am finally playing with Reflectivity. In the first place, thanks a lot for this contribution! > > I am wondering what is the ‘correct’ way to ‘remove’ a MetaLink. Is it enough to call #uninstall on the MetaLink Yes! > or should I also recompile the class/method where the link is installed? If you recompile, you remove all links. (even the ones others installed). In the tests I do that often to be sure everything is clean. > I spotted a problem with the control #after. If you try to pass #arguments to the meta, an error is returned. To reproduce: http://ws.stfx.eu/ONC4K9KQRTNQ > > Is this behavior somewhat desired, or is a bug? > Bug, I will fix it... > Dictionary>>errorKeyNotFound: > [ self errorKeyNotFound: key ] in Dictionary>>at: in Block: [ self errorKeyNotFound: key ] > Dictionary>>at:ifAbsent: > Dictionary>>at: > IRPushClosureCopy>>indexForVarNamed: > IRTranslatorV2>>visitPushTemp: > IRPushTemp>>accept: > IRTranslatorV2(IRVisitor)>>visitNode: > IRTranslatorV2>>visitInstruction: > [ :instr | self visitInstruction: instr ] in IRTranslatorV2(IRVisitor)>>visitSequence: in Block: [ :instr | self visitInstruction: instr ] > OrderedCollection>>do: > IRSequence>>do: > IRTranslatorV2(IRVisitor)>>visitSequence: > IRTranslatorV2>>visitSequence: > IRSequence>>accept: > IRTranslatorV2(IRVisitor)>>visitNode: > [ :each | self visitNode: each ] in IRTranslatorV2(IRVisitor)>>visitNodes: in Block: [ :each | self visitNode: each ] > SortedCollection(OrderedCollection)>>do: > IRTranslatorV2(IRVisitor)>>visitNodes: > IRTranslatorV2>>visitSequences: > IRTranslatorV2>>visitMethod: > IRMethod>>accept: > IRTranslatorV2(IRVisitor)>>visitNode: > IRMethod>>generate: > IRMethod>>compiledMethodWith: > RBMethodNode>>generate: > ReflectiveMethod>>recompileAST > ReflectiveMethod>>compileAndInstallCompiledMethod > ReflectiveMethod>>run:with:in: > UndefinedObject>>DoIt > > Cheers, > Roberto > >> On 04 Sep 2015, at 14:16, Marcus Denker <[hidden email]> wrote: >> >> Hi Roberto, >> >> Very good! I am now working on #after for methods+sequence. *And* primitives... this should all be committed early next week. >> >> After that, I need to actually use it to find remaining problems, so this is very good that you will start now. >> >> Marcus >> >> On Thu, Sep 3, 2015 at 2:50 PM, [hidden email] <[hidden email]> wrote: >> Very good talk Marcus. >> >> In the next weeks I will finally have some time to try Reflectivity out! >> >> Thanks a lot for all your effort! >> >> Cheers, >> Roberto >> >>> On 31 Jul 2015, at 13:23, Marcus Denker <[hidden email]> wrote: >>> >>> >>>> On 15 Jul 2015, at 10:15, Marcus Denker <[hidden email]> wrote: >>>> >>>> Hi, >>>> >>>> the slides for my ESUG talk are online: >>>> >>>> http://www.slideshare.net/MarcusDenker/reflection-in-pharo5 >>>> >>>> >>> >>> Video is online, too: >>> >>> https://www.youtube.com/watch?v=Ik539CtjtTI >>> >>> >>> >>> Marcus >>> >> >> >> >> >> -- >> -- >> Marcus Denker -- [hidden email] >> http://www.marcusdenker.de > |
In reply to this post by roberto.minelli@usi.ch
Hello, I fixed it: You example is now working, I added it as this test: testReifyMethodArgsAfter | methodNode link instance| methodNode := (ReflectivityExamples>>#exampleWithArg:) ast. link := MetaLink new metaObject: self; selector: #tagExec:; control: #after; arguments: #(arguments). methodNode link: link. self assert: methodNode hasMetalink. self assert: (ReflectivityExamples>>#exampleWithArg:) class = ReflectiveMethod. self assert: (tag isNil). instance := ReflectivityExamples new . self assert: ((instance exampleWithArg: 3) = 5). self assert: (tag = #(3)). link uninstall. I will integrate this fix and then write more tests (e.g. I think there are still problems with an #after on a method that defines temps, but it will be easy to fix). Marcus |
Lovely Marcus, thank you.
> On 24 Sep 2015, at 09:59, Marcus Denker <[hidden email]> wrote: > >> >> On 22 Sep 2015, at 17:23, [hidden email] wrote: >> >> Hi Marcus, >> >> I am finally playing with Reflectivity. In the first place, thanks a lot for this contribution! >> >> I am wondering what is the ‘correct’ way to ‘remove’ a MetaLink. Is it enough to call #uninstall on the MetaLink or should I also recompile the class/method where the link is installed? >> >> I spotted a problem with the control #after. If you try to pass #arguments to the meta, an error is returned. To reproduce: http://ws.stfx.eu/ONC4K9KQRTNQ >> >> Is this behavior somewhat desired, or is a bug? >> > Hello, I fixed it: > > https://pharo.fogbugz.com/f/cases/16629/fix-after-on-method-with-arguments > > You example is now working, I added it as this test: > > testReifyMethodArgsAfter > | methodNode link instance| > methodNode := (ReflectivityExamples>>#exampleWithArg:) ast. > link := MetaLink new > metaObject: self; > selector: #tagExec:; > control: #after; > arguments: #(arguments). > methodNode link: link. > self assert: methodNode hasMetalink. > self assert: (ReflectivityExamples>>#exampleWithArg:) class = ReflectiveMethod. > self assert: (tag isNil). > instance := ReflectivityExamples new . > self assert: ((instance exampleWithArg: 3) = 5). > self assert: (tag = #(3)). > link uninstall. > > > I will integrate this fix and then write more tests (e.g. I think there are still problems with an #after on a method that defines temps, > but it will be easy to fix). > > Marcus |
In reply to this post by Marcus Denker-4
This is now in 5.0 340. Marcus |
In reply to this post by Marcus Denker-4
> On 24 Sep 2015, at 09:59, Marcus Denker <[hidden email]> wrote: > > >> On 22 Sep 2015, at 17:23, [hidden email] wrote: >> >> Hi Marcus, >> >> I am finally playing with Reflectivity. In the first place, thanks a lot for this contribution! >> >> I am wondering what is the ‘correct’ way to ‘remove’ a MetaLink. Is it enough to call #uninstall on the MetaLink or should I also recompile the class/method where the link is installed? >> >> I spotted a problem with the control #after. If you try to pass #arguments to the meta, an error is returned. To reproduce: http://ws.stfx.eu/ONC4K9KQRTNQ >> >> Is this behavior somewhat desired, or is a bug? >> > Hello, I fixed it: > > https://pharo.fogbugz.com/f/cases/16629/fix-after-on-method-with-arguments > > > > I will integrate this fix and then write more tests (e.g. I think there are still problems with an #after on a method that defines temps, > but it will be easy to fix). > As suspected… I added a test + fix in 50343. This update contains the #availableReifications method, too. Marcus |
Free forum by Nabble | Edit this page |