including Traits in Squeak 3.9g ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

including Traits in Squeak 3.9g ?

Warakorn Paphrawat
Hi !

I would like to work with Traits in Squeak 3.9g, too.
The current VM and Image run very stabble.

The Traits researcher form Bern provide an image 3.9a where Traits are included. But this image is terribly unstable and I am accustomed now to 3.9g.
I want to port the Traits functionality to Squeal 3.9g.
How can I do that ?

The thing is, I read that Traits are included in Squeak 3.9g. I can find the Trait classes and categories. But I cannot create Traits...the Browser doesn't recognize the term Trait oder named or fromClass
e.g.
Trait named: #TsomeTrait
    fromClass: someClass
    uses: {something}
    category: 'some_category'

SqueakMap always complains when I want to install Traits.
I read sth. about loading .mcz files, but the FileList Browser doesn't let me to load.

What can I do to make it work ?


Sponsored Link

$200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home equity - Click now for info
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: including Traits in Squeak 3.9g ?

stephane ducasse
Traits are in 3.9 final.

Stef

On 18 nov. 06, at 01:25, Warakorn Paphrawat wrote:

> Hi !
>
> I would like to work with Traits in Squeak 3.9g, too.
> The current VM and Image run very stabble.
>
> The Traits researcher form Bern provide an image 3.9a where Traits  
> are included. But this image is terribly unstable and I am  
> accustomed now to 3.9g.
> I want to port the Traits functionality to Squeal 3.9g.
> How can I do that ?
>
> The thing is, I read that Traits are included in Squeak 3.9g. I can  
> find the Trait classes and categories. But I cannot create  
> Traits...the Browser doesn't recognize the term Trait oder named or  
> fromClass
> e.g.
> Trait named: #TsomeTrait
>     fromClass: someClass
>     uses: {something}
>     category: 'some_category'
>
> SqueakMap always complains when I want to install Traits.
> I read sth. about loading .mcz files, but the FileList Browser  
> doesn't let me to load.
>
> What can I do to make it work ?
> Sponsored Link
>
> $200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home  
> equity - Click now for info
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: including Traits in Squeak 3.9g ?

Warakorn Paphrawat
How can I create a trait from a class in Squeak 3.9 final ?
In previous version I could use e.g. "fromClass: Class1".
(http://www.iam.unibe.ch/~schaerli/smalltalk/traits/traitsPrototype.htm)
In 3.9 final this message is not recognized anymore.

Best regards,
Warakorn

stephane ducasse <[hidden email]> wrote:
Traits are in 3.9 final.

Stef

On 18 nov. 06, at 01:25, Warakorn Paphrawat wrote:

> Hi !
>
> I would like to work with Traits in Squeak 3.9g, too.
> The current VM and Image run very stabble.
>
> The Traits researcher form Bern provide an image 3.9a where Traits
> are included. But this image is terribly unstable and I am
> accustomed now to 3.9g.
> I want to port the Traits functionality to Squeal 3.9g.
> How can I do that ?
>
> The thing is, I read that Traits are included in Squeak 3.9g. I can
> find the Trait classes and categories. But I cannot create
> Traits...the Browser doesn't recognize the term Trait oder named or
> fromClass
> e.g.
> Trait named: #TsomeTrait
> fromClass: someClass
> uses: {something}
> category: 'some_category'
>
> SqueakMap always complains when I want to install Traits.
> I read sth. about loading .mcz files, but the FileList Browser
> doesn't let me to load.
>
> What can I do to make it work ?
> Sponsored Link
>
> $200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home
> equity - Click now for info
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Sponsored Link

Mortgage rates near 39yr lows. $310,000 Mortgage for $999/mo - Calculate new house payment
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: including Traits in Squeak 3.9g ?

stephane ducasse

> How can I create a trait from a class in Squeak 3.9 final ?
What do you mean?

If this is taking a class and turning it into a trait. Basically you  
cannot. It was never the case or I do not understand what
you mean.

> In previous version I could use e.g. "fromClass: Class1".
> (http://www.iam.unibe.ch/~schaerli/smalltalk/traits/ 
> traitsPrototype.htm)
> In 3.9 final this message is not recognized anymore.



>
> Best regards,
> Warakorn
>
> stephane ducasse <[hidden email]> wrote: Traits are in  
> 3.9 final.
>
> Stef
>
> On 18 nov. 06, at 01:25, Warakorn Paphrawat wrote:
>
> > Hi !
> >
> > I would like to work with Traits in Squeak 3.9g, too.
> > The current VM and Image run very stabble.
> >
> > The Traits researcher form Bern provide an image 3.9a where Traits
> > are included. But this image is terribly unstable and I am
> > accustomed now to 3.9g.
> > I want to port the Traits functionality to Squeal 3.9g.
> > How can I do that ?
> >
> > The thing is, I read that Traits are included in Squeak 3.9g. I can
> > find the Trait classes and categories. But I cannot create
> > Traits...the Browser doesn't recognize the term Trait oder named or
> > fromClass
> > e.g.
> > Trait named: #TsomeTrait
> > fromClass: someClass
> > uses: {something}
> > category: 'some_category'
> >
> > SqueakMap always complains when I want to install Traits.
> > I read sth. about loading .mcz files, but the FileList Browser
> > doesn't let me to load.
> >
> > What can I do to make it work ?
> > Sponsored Link
> >
> > $200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home
> > equity - Click now for info
> >
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> Sponsored Link
>
> Mortgage rates near 39yr lows. $310,000 Mortgage for $999/mo -  
> Calculate new house payment
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

fromClass: including Traits in Squeak 3.9g ?

Warakorn Paphrawat
In the example of this site, there is a point 3) Generating a trait from a class.
http://www.iam.unibe.ch/~schaerli/smalltalk/traits/ traitsPrototype.htm

TTrait named: #TPoint
fromClass: Point
includeSuperUnit: nil
uses: {}
category: 'Traits-Temp'

The authors say "When generating a trait from an existing class, the system automatically replaces instance variable accesses through accessor methods."
Moreover they say the class serves as a source.


Exactly the same thing I would like to do in Squeak 3.9final, too.
But I don't know how to do it.
If the people, who are doing the research on Traits, included this functionality in March 2003, why isn't there in 2006 ?

stephane ducasse <[hidden email]> wrote:

> How can I create a trait from a class in Squeak 3.9 final ?
What do you mean?

If this is taking a class and turning it into a trait. Basically you
cannot. It was never the case or I do not understand what
you mean.

> In previous version I could use e.g. "fromClass: Class1".
> (http://www.iam.unibe.ch/~schaerli/smalltalk/traits/
> traitsPrototype.htm)
> In 3.9 final this message is not recognized anymore.



>
> Best regards,
> Warakorn
>
> stephane ducasse wrote: Traits are in
> 3.9 final.
>
> Stef
>
> On 18 nov. 06, at 01:25, Warakorn Paphrawat wrote:
>
> > Hi !
> >
> > I would like to work with Traits in Squeak 3.9g, too.
> > The current VM and Image run very stabble.
> >
> > The Traits researcher form Bern provide an image 3.9a where Traits
> > are included. But this image is terribly unstable and I am
> > accustomed now to 3.9g.
> > I want to port the Traits functionality to Squeal 3.9g.
> > How can I do that ?
> >
> > The thing is, I read that Traits are included in Squeak 3.9g. I can
> > find the Trait classes and categories. But I cannot create
> > Traits...the Browser doesn't recognize the term Trait oder named or
> > fromClass
> > e.g.
> > Trait named: #TsomeTrait
> > fromClass: someClass
> > uses: {something}
> > category: 'some_category'
> >
> > SqueakMap always complains when I want to install Traits.
> > I read sth. about loading .mcz files, but the FileList Browser
> > doesn't let me to load.
> >
> > What can I do to make it work ?
> > Sponsored Link
> >
> > $200,000 mortgage for $660/mo - 30/15 yr fixed, reduce debt, home
> > equity - Click now for info
> >
> > _______________________________________________
> > Beginners mailing list
> > [hidden email]
> > http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners
>
> Sponsored Link
>
> Mortgage rates near 39yr lows. $310,000 Mortgage for $999/mo -
> Calculate new house payment
>
> _______________________________________________
> Beginners mailing list
> [hidden email]
> http://lists.squeakfoundation.org/mailman/listinfo/beginners

_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners


Sponsored Link

Mortgage rates near 39yr lows. $310,000 Mortgage for $999/mo - Calculate new house payment
_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners
Reply | Threaded
Open this post in threaded view
|

Re: fromClass: including Traits in Squeak 3.9g ?

stephane ducasse
> TTrait named: #TPoint
> fromClass: Point
> includeSuperUnit: nil
> uses: {}
> category: 'Traits-Temp'
>
> The authors say "When generating a trait from an existing class,  
> the system automatically replaces instance variable accesses  
> through accessor methods."
> Moreover they say the class serves as a source.

I'm one of the authors and this features was experimental and since  
adrian rewrote entirely traits to have them
much better implemented we did not provide that functionality but it  
should be easy to reimplement with a bit of metaprog magic.
But we will not do it because too busy.

> Exactly the same thing I would like to do in Squeak 3.9final, too.
> But I don't know how to do it.
> If the people, who are doing the research on Traits, included this  
> functionality in March 2003, why isn't there in 2006 ?

Because in march 2003 we were brainstorming and nathanael hacked and  
pacthed squeak to make traits worked. and in 2006
everything was reimplemented and this is much better. :)

Stef


_______________________________________________
Beginners mailing list
[hidden email]
http://lists.squeakfoundation.org/mailman/listinfo/beginners