[Pharo-project] MethodWrappers
Hi Eliot, at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it? For those who dont know about MethodWrappers: look at [2] Thanks Torsten [1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
On 21 September 2011 11:48, Torsten Bergmann <astares@gmx.de> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
For those who dont know about MethodWrappers: look at [2]
And if you're wondering why on Earth you'd want them, take a look at SUnit's TestCoverage class for a use case. frank
Thanks Torsten
[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
Hi at [1] you mentioned a port of MethodWrappers to Squeak 4.2.
Is there also a port for Pharo available or do you plan to port it?
I'm successfully using ObjectAsMethodWrapper class>>#installOn:selector: in a recent Pharo image, which if it isn't in your image you can load through ConfigurationOfObjectMetaTools Nick
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <astares@gmx.de> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
I was hoping someone with focus on Pharo would integrate the necessary compiler and kernel changes into Pharo. The Squeak trunk packages are Compiler-eem.214 & Compiler-eem.215, and Kernel-619 to Kernel-eem.623. I've attached the diffs. Notionally file in Compiler-213-214.st & Kernel-618-619.st, then file-in Compiler-214-215.st & Kernel-619-623.st. These are generally useful, a) restoring the ability to create subclasses of CompiledMethod, and b) fixing various subtle copying-related state-sharing bugs with AdditionalMethodState (the objects that add additional state to compiled methods, pragmas, properties and "extra inst vars"). The MethodWrappers4.2 package should then just load. It serves as a model for adding inst vars to CompiledMethod.
For those who dont know about MethodWrappers: look at [2]
Indeed. Yes, there's an alternative implementation above objects-as-methods, but that implementation is far from complete. It would be good to see he same kind of completeness. e.g. with MethodWrappers you can write | indent wrapper | indent := 0. wrapper := MwBlockMethodWrapper on: #benchFib inClass: Integer. wrapper beforeBlock: [:rcvr :args| Transcript crtab: indent; print: rcvr; space; nextPutAll: #benchFib; flush. indent := indent + 1]; afterBlock: [:rcvr :args| indent := indent - 1]. [wrapper install. 7 benchFib] ensure: [wrapper uninstall] whereas there are few if any examples with the objects-as-methods AFAICS.
Thanks Torsten
[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
-- best, Eliot
Hi guys this is not that we are not interested but let me explain you my day today: - discussion with mariano about fuel paper next version - contact with a company to talk business - budget to make sure that everybody gets a nice machine for next year - budget to make sure that everybody gets a nice salary next year - sync with student about open gl probject - sync with andre for the next 3 months - discussion with ussman about scenario to sell moose - discussed with Human Ressources to be sure that we can hire the people we want - read tons of mails - schedule travels - fill up phd topic for national security agency so that we can hire andre for his phd - talk with mariano and marcus about unused object garbage collection - discussed abotu zinc and books with olivier - ... And everyday is more or less like that. So do not believe that we are doing nothing, we are doing a lot and most of the time this is not on pharo unfortunately. So there is an entry in the bug tracker and if somebody wants these changes On Sep 21, 2011, at 6:53 PM, Eliot Miranda wrote:
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <astares@gmx.de> wrote: Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
I was hoping someone with focus on Pharo would integrate the necessary compiler and kernel changes into Pharo. The Squeak trunk packages are Compiler-eem.214 & Compiler-eem.215, and Kernel-619 to Kernel-eem.623. I've attached the diffs. Notionally file in Compiler-213-214.st & Kernel-618-619.st, then file-in Compiler-214-215.st & Kernel-619-623.st. These are generally useful, a) restoring the ability to create subclasses of CompiledMethod, and b) fixing various subtle copying-related state-sharing bugs with AdditionalMethodState (the objects that add additional state to compiled methods, pragmas, properties and "extra inst vars").
The MethodWrappers4.2 package should then just load. It serves as a model for adding inst vars to CompiledMethod.
For those who dont know about MethodWrappers: look at [2]
Indeed. Yes, there's an alternative implementation above objects-as-methods, but that implementation is far from complete. It would be good to see he same kind of completeness. e.g. with MethodWrappers you can write
| indent wrapper | indent := 0. wrapper := MwBlockMethodWrapper on: #benchFib inClass: Integer. wrapper beforeBlock: [:rcvr :args| Transcript crtab: indent; print: rcvr; space; nextPutAll: #benchFib; flush. indent := indent + 1]; afterBlock: [:rcvr :args| indent := indent - 1]. [wrapper install. 7 benchFib] ensure: [wrapper uninstall]
whereas there are few if any examples with the objects-as-methods AFAICS.
Thanks Torsten
[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
-- best, Eliot
<Compiler-213-214.st><Compiler-214-215.st><Kernel-618-619.st><Kernel-619-623.st>
If you were to integrate MethodWrappers into Pharo today would you still use these packages: Compiler-eem.214 & Compiler-eem.215, Kernel-619 to Kernel-eem.623 or use the latest from Squeak trunk? I'm also trying to build a DTrace enabled unix VM based on Adrian Lienhards work here: http://www.adrian-lienhard.ch/blog?dialog=smalltak-meets-dtrace. Has anyone already made one for linux that I could just use? Thanks Eliot Miranda-2 wrote
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <astares@> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
I was hoping someone with focus on Pharo would integrate the necessary compiler and kernel changes into Pharo. The Squeak trunk packages are Compiler-eem.214 & Compiler-eem.215, and Kernel-619 to Kernel-eem.623. I've attached the diffs. Notionally file in Compiler-213-214.st & Kernel-618-619.st, then file-in Compiler-214-215.st & Kernel-619-623.st. These are generally useful, a) restoring the ability to create subclasses of CompiledMethod, and b) fixing various subtle copying-related state-sharing bugs with AdditionalMethodState (the objects that add additional state to compiled methods, pragmas, properties and "extra inst vars").
The MethodWrappers4.2 package should then just load. It serves as a model for adding inst vars to CompiledMethod.
For those who dont know about MethodWrappers: look at [2]
Indeed. Yes, there's an alternative implementation above objects-as-methods, but that implementation is far from complete. It would be good to see he same kind of completeness. e.g. with MethodWrappers you can write
| indent wrapper | indent := 0. wrapper := MwBlockMethodWrapper on: #benchFib inClass: Integer. wrapper beforeBlock: [:rcvr :args| Transcript crtab: indent; print: rcvr; space; nextPutAll: #benchFib; flush. indent := indent + 1]; afterBlock: [:rcvr :args| indent := indent - 1]. [wrapper install. 7 benchFib] ensure: [wrapper uninstall]
whereas there are few if any examples with the objects-as-methods AFAICS.
Thanks Torsten
[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
-- best, Eliot
-- View this message in context: http://forum.world.st/MethodWrappers-tp3829576p4574768.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Apr 20, 2012, at 7:29 PM, Paul DeBruicker wrote:
If you were to integrate MethodWrappers into Pharo today would you still use these packages:
Compiler-eem.214 & Compiler-eem.215, Kernel-619 to Kernel-eem.6
what are the changes these packages introduce?
or use the latest from Squeak trunk?
I'm also trying to build a DTrace enabled unix VM based on Adrian Lienhards work here: http://www.adrian-lienhard.ch/blog?dialog=smalltak-meets-dtrace. Has anyone already made one for linux that I could just use?
Thanks
Eliot Miranda-2 wrote
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <astares@> wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
I was hoping someone with focus on Pharo would integrate the necessary compiler and kernel changes into Pharo. The Squeak trunk packages are Compiler-eem.214 & Compiler-eem.215, and Kernel-619 to Kernel-eem.623. I've attached the diffs. Notionally file in Compiler-213-214.st & Kernel-618-619.st, then file-in Compiler-214-215.st & Kernel-619-623.st. These are generally useful, a) restoring the ability to create subclasses of CompiledMethod, and b) fixing various subtle copying-related state-sharing bugs with AdditionalMethodState (the objects that add additional state to compiled methods, pragmas, properties and "extra inst vars").
The MethodWrappers4.2 package should then just load. It serves as a model for adding inst vars to CompiledMethod.
For those who dont know about MethodWrappers: look at [2]
Indeed. Yes, there's an alternative implementation above objects-as-methods, but that implementation is far from complete. It would be good to see he same kind of completeness. e.g. with MethodWrappers you can write
| indent wrapper | indent := 0. wrapper := MwBlockMethodWrapper on: #benchFib inClass: Integer. wrapper beforeBlock: [:rcvr :args| Transcript crtab: indent; print: rcvr; space; nextPutAll: #benchFib; flush. indent := indent + 1]; afterBlock: [:rcvr :args| indent := indent - 1]. [wrapper install. 7 benchFib] ensure: [wrapper uninstall]
whereas there are few if any examples with the objects-as-methods AFAICS.
Thanks Torsten
[1] http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567... [2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
-- best, Eliot
-- View this message in context: http://forum.world.st/MethodWrappers-tp3829576p4574768.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On Fri, Apr 20, 2012 at 7:29 PM, Paul DeBruicker <pdebruic@gmail.com> wrote:
If you were to integrate MethodWrappers into Pharo today would you still use these packages:
Compiler-eem.214 & Compiler-eem.215, Kernel-619 to Kernel-eem.623
or use the latest from Squeak trunk?
I'm also trying to build a DTrace enabled unix VM based on Adrian Lienhards work here: http://www.adrian-lienhard.ch/blog?dialog=smalltak-meets-dtrace . Has anyone already made one for linux that I could just use?
I do have a working vm with its source code and an example that Adrian sent me some time ago. I was able to run the example without problems. But it was a long time ago ;) I am sending you privatly the file (it is 13.mb). Cheers
Thanks
Eliot Miranda-2 wrote
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <astares@>
wrote:
Hi Eliot,
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. Is there also a port for Pharo available or do you plan to port it?
I was hoping someone with focus on Pharo would integrate the necessary compiler and kernel changes into Pharo. The Squeak trunk packages are Compiler-eem.214 & Compiler-eem.215, and Kernel-619 to Kernel-eem.623. I've attached the diffs. Notionally file in Compiler-213-214.st & Kernel-618-619.st, then file-in Compiler-214-215.st & Kernel-619-623.st. These are generally useful, a) restoring the ability to create
subclasses
of CompiledMethod, and b) fixing various subtle copying-related state-sharing bugs with AdditionalMethodState (the objects that add additional state to compiled methods, pragmas, properties and "extra inst vars").
The MethodWrappers4.2 package should then just load. It serves as a model for adding inst vars to CompiledMethod.
For those who dont know about MethodWrappers: look at [2]
Indeed. Yes, there's an alternative implementation above objects-as-methods, but that implementation is far from complete. It would be good to see he same kind of completeness. e.g. with MethodWrappers you can write
| indent wrapper | indent := 0. wrapper := MwBlockMethodWrapper on: #benchFib inClass: Integer. wrapper beforeBlock: [:rcvr :args| Transcript crtab: indent; print: rcvr; space; nextPutAll: #benchFib; flush. indent := indent + 1]; afterBlock: [:rcvr :args| indent := indent - 1]. [wrapper install. 7 benchFib] ensure: [wrapper uninstall]
whereas there are few if any examples with the objects-as-methods AFAICS.
Thanks Torsten
[1]
http://lists.squeakfoundation.org/pipermail/squeak-dev/2011-September/161567...
[2] http://www.refactory.com/Software/MethodWrappers/ -- NEU: FreePhone - 0ct/min Handyspartarif mit Geld-zurück-Garantie! Jetzt informieren: http://www.gmx.net/de/go/freephone
-- best, Eliot
-- View this message in context: http://forum.world.st/MethodWrappers-tp3829576p4574768.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Mariano http://marianopeck.wordpress.com
participants (7)
-
Eliot Miranda -
Frank Shearar -
Mariano Martinez Peck -
Nick Ager -
Paul DeBruicker -
Stéphane Ducasse -
Torsten Bergmann