Just a reminder that the next Squeak Chat will take place between
20:00 (8 PM) GMT Saturday June 3rd and 00:00 (Midnight) GMT Sunday
June 4th, 2006.
As usual we will meet in #squeak on irc.freenode.net. More information
about the #squeak IRC channel can be found at
http://people.squeakfoundation.org/article/7.html
This is a good time to contribute to the development of Squeak
by participating in the Harvesting Process. One of the main
ways to contribute is by Reviewing submitted fixes and
enhancements. For information about the Harvesting Process
see
http://minnow.cc.gatech.edu/squeak/3152
If you have the time please attend and work toward the future of Squeak.
The next seven chats are scheduled for
00:00 (12:00 AM) GMT Thursday June 08, 2006
04:00 (04:00 AM) GMT Monday June 12, 2006
08:00 (08:00 AM) GMT Friday June 16, 2006
12:00 (12:00 PM) GMT Tuesday June 20, 2006
16:00 (04:00 PM) GMT Saturday June 24, 2006
20:00 (08:00 PM) GMT Wednesday June 28, 2006
00:00 (12:00 AM) GMT Monday July 03, 2006
Dear Squeakers,
When writing papers with Smalltalk code, or even sometimes when
programming, I noticed that we need some way to express method
definitions in a simple text file while still showing the class where
they are defined. The current (legacy) file in/out format proves
inappropriate. I wanted to get ride of exclamation mark and ease
linking methods to classes. So, I started thinking of something else,
and started a new project on this topic on SqueakSource:
http://www.squeaksource.com/NewFileInOutFormat.html
My target is to have .st files as a squence of any valid Smalltalk
expression and to provide a simple protocol for defining methods. For
now, method definitions are possible using, two messages.
-The first one is short and allows adding a method to a class without
taking care of the category (the method appears in the browser 'as yet
unclassified'). Example :
MyClass << #(myMethod "Body of myMethod" )
-The second message to add a method under some particular category.
Example :
MyClass inCategory: #someCategory addMethod: #(myMethod "Body of
myMethod" )
For comparison, here is the same example in the file In/Out format
currently used in Squeak
!MyClass methodsFor: 'someCategory' stamp: 'nbo 5/23/2006 12:08'!
myMethod
"Body of myMethod"! !
Note that the current version is still uncomplete. It does lose
comments, author info, timestamps, and formatting (though the installed
code is formatted using the pretty printer).
Noury
--------------------------------------------------------------
Dr. Noury Bouraqadi - Enseignant/Chercheur
Ecole des Mines de Douai - Dept. G.I.P
http://csl.ensm-douai.fr/noury
European Smalltalk Users Group Board
http://www.esug.org
Squeak: an Open Source Smalltalk
http://www.squeak.org
--------------------------------------------------------------
Hi Noury,
I would not use the "<<" message for two reasons:
- in other languages this is an operator for streaming (C++)
- if you describle a method you write class>>#method instead of class<<#method
I personally like the format that is used in Smallscript/S# called
AML (AOS Meta Language).
A small example for a class:
============================
Class name: Person
extends: Object
fields: firstName sureName [
...
]
You can use []-notation as well as {}-notation and since the default superclass is Object you can also write:
Class name: Person
fields: firstName sureName {
...
}
You can also pass it directly to the compiler as XML
<class name="Person" extends="Object" fields="firstName sureName">
<method ...
</class>
Since you can map it to XML you can also provide an XSD where the defaults for attributes (like the default "Object" for the "extends" attribute can be defined).
In XML/AML there is no order for attributes - so you can also write:
Class fields: firstName surname name: Person [
...
]
A small example for a method:
============================
This also allows for easier extension - just add attributes or subnodes.
Either nest it into a class definition
Class name: Person [
Method [
foo
^self
]
}
or create the Method on an existing class (extension)
Method class: String category: conversion {
asFoo
^Foo from: self
}
You can also have class-less or global Methods (Functions)
Function [
foo
^self
]
A small example for evaluation:
===============================
use "Eval", here is a simple HelloWorld example:
Eval [stdout << 'HelloWorld' ]
where stdout is a global variable like Transcript and << is a binary message.
You can also advice the compiler in a script:
Compiler cmds: '-rdb:off -target:console'.
or load other modules:
Load module: ANSISmalltalk.
Load module: AOSUnit.
Load module: PointExt.
or combine the format with annotations:
Function [<$entrypoint>
main
Transcript show: 'HelloWorld';
]
Method class: Point [
+ <Point> anotherPoint
"Adds the arguments coordinates to the receiver."
^(self x + anotherPoint x) @ (self y + anotherPoint y)
].
The main AML elements are: Class, Module, Library, Method, Function, Compiler, Eval, Enum, Namespace, ...
There is some more syntactic sugar in the ST parser to help people coming from a different language background. So you can also write
Transcript.show('HelloWorld');
or
Transcript.show: 'HelloWorld';
This may be ugly for a Smalltalker and confuse people since you can mix styles. Think of
But XML based AML as file in/file out format is worth a look!!!
Some pointers to examples:
http://www.edwin-buehler.net/smallscript.shtmlhttp://www.double.co.nz/smallscript/index.htmhttp://www.metaprog.com/SmallScript/download.htm
Bye
Torsten
BTW: Smallscript/S# are separate systems: Smallscript is free, running
on the free AOS (Agent Object System)VM which is downloadable
from smallscript.org. David made all of that completely free to use!
The S# part running on .NET is not public. Unfortunately the ST
community was/is not so interested in the Smallscript part - but
especially this one really rocks. Write a small script - pass it
to the command line compiler and build fast DLL's, small executables,
modules or full applications ...
--
Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer!
Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer
Hi Colin,
One thing that I missed with OB was the displaying of comment when I
select a class.
What do you think about a method:
OBClassDefinition>>comment
^ self selectedClass notNil
ifTrue: [
String cr, String cr, String cr,'"',
self selectedClass theNonMetaClass comment,
String cr, '"']
ifFalse: ['']
and
OBClassDefinition>>text
^ template, self comment
It is a hack, but this is terribly useful...
I feel that it is currently not possible in OB to have a second pane
when I select a class. The model needs to be extended I guess. This
might be a very interesting feature. We might want to have a method
OBMetaNode>>wantsSecondPane
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel http://www.cs.tcd.ie/Alexandre.Bergel
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
Simply fantastic!
------ Mensaje reenviado
De: Peter Howell <peter.howell(a)gmail.com>
Responder a: The general-purpose Squeak developers list
<squeak-dev(a)lists.squeakfoundation.org>
Fecha: Mon, 29 May 2006 16:20:00 -0700
Para: <squeak-dev(a)lists.squeakfoundation.org>
Asunto: Using Squeak for my thesis project
Hi folks - I just wanted to let you know that I've been lurking here
and have been using Squeak and Seaside for my thesis project.
Its finally up online, with some flash movie demos at
http://www.u3engage.org/thesis .
My project is a visual programming language geared towards building
collaborative web applications. It aims to support a new class of
designers--community designers: those who are more interested in
fostering and nurturing a productive enjoyable community than in any
specifics of HTML or databases. I did it at SDSU, my chair was Roger
Whitney.
Squeak and Seaside and Connectors made it possible, for sure. Its been
a pleasure to work with, and I'm looking forward to continuing with
smalltalk and squeak and this community!
Thanks,
Peter Howell
Hello all,
What a lovely weekend! I have spent the majority of it indoors,
porting Squeak 2.3 to the Amiga!
: \
I have put up a screenshot at:
http://metaphorse.com/amiga/squeak/
I am obviously having some trouble with graphics (specifically,
ioShowDisplay), but the screenshot is recognizably showing Squeak
asking for its .changes file. To an outsider, though, it may look as
if something is *broken*... ;)
You may wonder why I used 2.3 ... It seemed to be the best choice for a
simple, well-documented, starting-from-scratch VM-building scheme, with
little-to-no dependence on plug-ins. I am scared of VMMaker (it seems
to be designed to create/tweak a VM for an already-existing platform,
versus a new one?), plus there is already much documentation on
Interpreter>>translate. Of course, I am ignorant.
Overall, this has been a pretty fun pastime. I can continue posting
progress reports to the list if anyone is interested. I have to figure
out this PixMap -> BitMap thing, but I also have to get to work in the
morning... ;)
Thanks, and Cheers,
Tim J.
Central IL, USA
On Sun, May 28, 2006 at 01:04:07AM +0100, Natalie Threadingham wrote:
> Hi
> Hoping someone can help me. I have been looking at the SqueakE Vat to E Vat Negotiation Trace as the entire paragraph of code has been given to me as a puzzle to solve and it has only been through endless searching on the web that I have discovered this title fits to this page of code. I not mathematically inclined and do not understand programming or anything like that which is why I need some help. What does it all mean? What does it create? Can anyone please help me?
> Many thanks
> Natalie
Hi Natalie,
I'm afraid that I don't know enough to answer your question. I am copying
your message to the Squeak Developers' mailing list in hopes that some
of the more technically oriented folks there may have an answer.
You may also get a few more clues from this web link:
http://www.erights.org/history/squeak-e.html
Dave
Date readFromString: Date today storeString
raises an exception...
testReadFrom works so it is the idiom readFrom:/storeOn: that does
not work anymore?
Stef
Are you a student, and do you want to attend ESUG (the premier
European Conference on Smalltalk)? This year, ESUG again has a
student volunteer program you can apply for. Your duties will be few,
and you will have to help the local organizers. ESUG does not pay
travel costs, but the conference will be free. Depending on the
number of students the hosting will possibly also be free.
http://www.esug.org/conferences/
14thinternationalsmalltalkconference2006/
esug2006studentvolunteersprogram/
The program is now available at: http://www.esug.org/conferences/
14thinternationalsmalltalkconference2006/conferenceprogram/
Do not
Stef
Hi folks - I just wanted to let you know that I've been lurking here
and have been using Squeak and Seaside for my thesis project.
Its finally up online, with some flash movie demos at
http://www.u3engage.org/thesis .
My project is a visual programming language geared towards building
collaborative web applications. It aims to support a new class of
designers--community designers: those who are more interested in
fostering and nurturing a productive enjoyable community than in any
specifics of HTML or databases. I did it at SDSU, my chair was Roger
Whitney.
Squeak and Seaside and Connectors made it possible, for sure. Its been
a pleasure to work with, and I'm looking forward to continuing with
smalltalk and squeak and this community!
Thanks,
Peter Howell