[squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

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

[squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

Kjell Godo
Hello Squeak developers
 
Is it true that you cannot include loose methods in
a Squeak or Croquet Package?
 
I can see where you can include Classes in a Package
but can you include loose Methods?
 
In Dolphin Smalltalk a Package can include loose
Methods and it is essential for my large Generator
Package to be able to do so.  I need to be able to
put the method:
 
Object>>asGenerator
 
into the Package etc. etc.
 
I have been thinking about beginning to port this
Generator Package over to Squeak since there is such
a well defined way of publishing Squeak software into
the web.  But if there are no loose Methods in Squeak
Packages then I would have to forget about it.
 
-Kjell


Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

Rob Rothwell
Kjell,

If your Package name is 
     APackage, 

and you extend Object with
     Object>>asGenerator,

simply put asGenerator in a category named:

*apackage (same name as your package, with an * in front)

and Monticello will include the Object extension in the APackage package.

You can read more in the "Squeak By Example book, which you can download at:


Is this what you meant?

Rob Rothwell

On Thu, Mar 27, 2008 at 10:58 AM, Kjell Godo <[hidden email]> wrote:
Hello Squeak developers
 
Is it true that you cannot include loose methods in
a Squeak or Croquet Package?
 
I can see where you can include Classes in a Package
but can you include loose Methods?
 
In Dolphin Smalltalk a Package can include loose
Methods and it is essential for my large Generator
Package to be able to do so.  I need to be able to
put the method:
 
Object>>asGenerator
 
into the Package etc. etc.
 
I have been thinking about beginning to port this
Generator Package over to Squeak since there is such
a well defined way of publishing Squeak software into
the web.  But if there are no loose Methods in Squeak
Packages then I would have to forget about it.
 
-Kjell






Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

David Mitchell-10
In reply to this post by Kjell Godo
"Loose methods" are what Monticello calls Extensions. Very easy to do
version control on in Monticello by following the naming conventions.

Just make sure the name of the protocol for the method begins with a
star and matches the name of your package.

If your package is named YourPackageName, then you have to use the
*YourPackageName protocol for the loose method.

In the fileout, your example would look like:

Object methodsFor: '*YourPackageName' stamp: 'yourInitials 1/1/2008 15:05'!
asGenerator

Monticello integrates so closely with the browser through naming
conventions that it doesn't feel like a separate tool.
       

On Thu, Mar 27, 2008 at 9:58 AM, Kjell Godo <[hidden email]> wrote:

> Hello Squeak developers
>
> Is it true that you cannot include loose methods in
> a Squeak or Croquet Package?
>
> I can see where you can include Classes in a Package
> but can you include loose Methods?
>
> In Dolphin Smalltalk a Package can include loose
> Methods and it is essential for my large Generator
> Package to be able to do so.  I need to be able to
> put the method:
>
> Object>>asGenerator
>
> into the Package etc. etc.
>
> I have been thinking about beginning to port this
> Generator Package over to Squeak since there is such
> a well defined way of publishing Squeak software into
> the web.  But if there are no loose Methods in Squeak
> Packages then I would have to forget about it.
>
> -Kjell
>
>
>

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

Kjell Godo
In reply to this post by Rob Rothwell
Yes this is what I meant.
I am reading Squeak by Example.
But I guess I didn't get that far yet.

Are there any books about the Squeak Compilers?  About the Foreign
Function Interface?  I would like to know how these things work but
they seem pretty opaque.  I have made picoLARC LambaLisp on
sourceforge.net and tried not to make it opaque.  Any suggestions
about how i might go about understanding the Squeak compilers and the
VM maker and the FFI interface thing?  I am curious.  I would like to
step through them.  Test cases.  I would like to step through test
cases.  And just where is the information that allows the FFI to be
made?

Thanks.

On 3/27/08, Rob Rothwell <[hidden email]> wrote:

> Kjell,
> If your Package name is
> APackage,
>
> and you extend Object with
> Object>>asGenerator,
>
> simply put asGenerator in a category named:
>
> *apackage (same name as your package, with an * in front)
>
> and Monticello will include the Object extension in the APackage package.
>
> You can read more in the "Squeak By Example book, which you can download at:
>
> http://squeakbyexample.org/
>
> Is this what you meant?
>
> Rob Rothwell

Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev]( picoVerse-:( ? No loose methods in Squeak Packages/Projects/Maps/Montecello ? ) )

David Mitchell-10
For the compiler, start with class Compiler. You could go to chapter
from the classic Blue Book:
http://users.ipa.net/~dwighth/smalltalk/bluebook/bluebook_chapter26.html#TheCompiler26

For the VM, take a look at some of the chapters in Mark Guzdial's blue
book on Squeak, Open Personal Computing and Multimedia.
Drafts are posted online:
Andrew Greenberg's chapter on slang and calling out of Smalltalk would
probably be helpful.
http://www.iam.unibe.ch/~ducasse/FreeBooks/CollectiveNBlueBook/greenberg.pdf

I found the above links starting with Stef's free books list:
http://www.iam.unibe.ch/~ducasse/FreeBooks.html


On Fri, Mar 28, 2008 at 12:23 AM, Kjell Godo <[hidden email]> wrote:

> Yes this is what I meant.
>  I am reading Squeak by Example.
>  But I guess I didn't get that far yet.
>
>  Are there any books about the Squeak Compilers?  About the Foreign
>  Function Interface?  I would like to know how these things work but
>  they seem pretty opaque.  I have made picoLARC LambaLisp on
>  sourceforge.net and tried not to make it opaque.  Any suggestions
>  about how i might go about understanding the Squeak compilers and the
>  VM maker and the FFI interface thing?  I am curious.  I would like to
>  step through them.  Test cases.  I would like to step through test
>  cases.  And just where is the information that allows the FFI to be
>  made?
>
>  Thanks.
>
>
>
>  On 3/27/08, Rob Rothwell <[hidden email]> wrote:
>  > Kjell,
>  > If your Package name is
>  > APackage,
>  >
>  > and you extend Object with
>  > Object>>asGenerator,
>  >
>  > simply put asGenerator in a category named:
>  >
>  > *apackage (same name as your package, with an * in front)
>  >
>  > and Monticello will include the Object extension in the APackage package.
>  >
>  > You can read more in the "Squeak By Example book, which you can download at:
>  >
>  > http://squeakbyexample.org/
>  >
>  > Is this what you meant?
>  >
>  > Rob Rothwell
>
>