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.html [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 <[hidden email]> 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.html > [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 > > |
In reply to this post by Torsten Bergmann
On Sep 21, 2011, at 12:59 PM, Frank Shearar wrote: > On 21 September 2011 11:48, Torsten Bergmann <[hidden email]> 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. > Using the MethodWrapper version that is based on Object-As-Methods, as far as I know. Marcus -- Marcus Denker -- http://marcusdenker.de |
On 21 September 2011 12:26, Marcus Denker <[hidden email]> wrote:
> > On Sep 21, 2011, at 12:59 PM, Frank Shearar wrote: > >> On 21 September 2011 11:48, Torsten Bergmann <[hidden email]> 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. >> > But that is working in Pharo already, isn't it? > > Using the MethodWrapper version that is based on Object-As-Methods, > as far as I know. Indeed - I didn't mean to suggest that TestCoverage uses MethodWrappers the library, just that it uses the concept of method wrappers. (What it does is replace the existing CompiledMethods in a class' method dictionary with a TestCoverage instance proxying the CompiledMethod. When you run that method, you set a flag in the TestCoverage instance. After you've calculated the package tests' coverage, it uninstalls itself by replacing itself with the original CompiledMethod in the class' method dictionary.) frank > Marcus > > > > -- > Marcus Denker -- http://marcusdenker.de > > > |
In reply to this post by Torsten Bergmann
Hi
at [1] you mentioned a port of MethodWrappers to Squeak 4.2. 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 |
In reply to this post by Torsten Bergmann
On Wed, Sep 21, 2011 at 3:48 AM, Torsten Bergmann <[hidden email]> wrote: Hi Eliot, 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.
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.
best, Eliot Compiler-213-214.st (4K) Download Attachment Compiler-214-215.st (1K) Download Attachment Kernel-618-619.st (1K) Download Attachment Kernel-619-623.st (9K) Download Attachment |
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 <[hidden email]> 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.html > [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> |
In reply to this post by Eliot Miranda-2
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
|
In reply to this post by Eliot Miranda-2
On Apr 20, 2012, at 7:30 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.623 > I integrated all the changes of eliot that he did for MethodWrappers. But why not use the MethodWrappers that use run:with:in:? (the package that was loaded in 1.3 Full)? > or use the latest from Squeak trunk? No chance. The systems are too different by now. -- Marcus Denker -- http://marcusdenker.de |
In reply to this post by Paul DeBruicker
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.html >>> [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. > |
In reply to this post by Paul DeBruicker
On Apr 21, 2012, at 1:48 PM, Stéphane Ducasse wrote: > > 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? This was this report: http://code.google.com/p/pharo/issues/detail?id=4813 All integrated. Marcus -- Marcus Denker -- http://marcusdenker.de |
In reply to this post by Paul DeBruicker
On Fri, Apr 20, 2012 at 7:29 PM, Paul DeBruicker <[hidden email]> wrote: If you were to integrate MethodWrappers into Pharo today would you still 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
-- Mariano http://marianopeck.wordpress.com |
Administrator
|
In reply to this post by Marcus Denker-4
Most of the tests pass in both 1.4 and 2.0. The only failure, #testNoProtoInstanceCount, is a test that does not make sense to me (I think it should fail) and the ~6 errors are due to a missing MethodNode>>ensureNotQuick, which doesn't exist in Squeak 4.2 either Also, Gofer does not like packages with dots in the name, so one has to write "MethodWrappers4.2-eem.25" "MethodWrappers4", not "MethodWrappers4.2". I'm guessing this will fall apart when "MethodWrappers4.3" is released... Gofer it squeaksource: 'MethodWrappers'; package: 'MethodWrappers4'; load. Sean
Cheers,
Sean |
Free forum by Nabble | Edit this page |