Main Page | Report this Page
Computers Forum Index  »  Computer Languages (Smalltalk)  »  What do you want in Redline Smalltalk?...
Page 1 of 1    

What do you want in Redline Smalltalk?...

Author Message
jamesl...
Posted: Sat Nov 07, 2009 12:00 am
Guest
Hi Smalltalkers,

Development is progressing well for SmalltalkJVM, a Smalltalk on top
of the Java Virtual Machine that compiles to bytecode. I now call
this Smalltalk - Redline Smalltalk.

What I'm wanting is your opinion on the format of a Smalltalk source
file?

Some of what follows is my thinking aloud.

The format could be the same as the current "chunk" format but I feel
there should be an easier/simple way to write the source file, since:

1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

2. People should be able to use whatever editor they want and these
editors wont always know about chunk formats, meaning that if the
chunk format is used, people will have to do it manually.

3. There are some additional requirements on the source file to define
namespaces and import other classes (there is no single image file).

4. There is a need to have a format that works for scripts as well as
class definitions.

Here is an example of the Squeak Stack source in chunk format:

Object subclass: #Stack

instanceVariableNames: 'linkedList'

classVariableNames: ''

poolDictionaries: ''

category: 'Collections-Stack'!


!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!

size

"How many objects in me ?"

^ self linkedList size! !

-- end squeak stack example --

Some Thoughts:

T1. A benefit of keeping the chunk format would be for compatibility
with other smalltalks, like filing out of Squeak or VW and directly
into Redline.

T2. The comment "!Stack methodsFor:" would not be mandatory but would
be parsed if present. So when not present the only way to know a
method definition has ended is "! !"
I guess putting "! !" after a method definition is no harder nor clean
nor ugly as similar things in other languages like Ruby (def/end) or
Java ({}). Would you mind typing "! !" to end a method ?

Other things:

It is proposed that the class definition message format be extended to
support namespaces and importing of classes referenced by the current
class. For example, the above Stack definition becomes:
(Using suggestions from Nik Boyd http://www.educery.com/papers/sttojava/)

Object subclass: #Stack
instanceVariableNames: 'linkedList'
classVariableNames: ''
poolDictionaries: ''
packageName: #com:companyName:productName:packageName:
importPackageNamed: #java:awt:
importClassNamed: #java:util:Vector:
category: 'Collections-Stack'!

-- end --
 
philippe.marschall at (no spam) gmail.com...
Posted: Sat Nov 07, 2009 11:33 am
Guest
On Nov 7, 1:00 am, jamesl <ladd.ja... at (no spam) gmail.com> wrote:
Quote:
Hi Smalltalkers,

Development is progressing well for SmalltalkJVM, a Smalltalk on top
of the Java Virtual Machine that compiles to bytecode.  I now call
this Smalltalk - Redline Smalltalk.

What I'm wanting is your opinion on the format of a Smalltalk source
file?

Some of what follows is my thinking aloud.

The format could be the same as the current "chunk" format but I feel
there should be an easier/simple way to write the source file, since:

1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

2. People should be able to use whatever editor they want and these
editors wont always know about chunk formats, meaning that if the
chunk format is used, people will have to do it manually.

3. There are some additional requirements on the source file to define
namespaces and import other classes (there is no single image file).

4. There is a need to have a format that works for scripts as well as
class definitions.

Here is an example of the Squeak Stack source in chunk format:

Object subclass: #Stack

        instanceVariableNames: 'linkedList'

        classVariableNames: ''

        poolDictionaries: ''

        category: 'Collections-Stack'!

!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!

size

        "How many objects in me ?"

        ^ self linkedList size! !

-- end squeak stack example --

Some Thoughts:

T1. A benefit of keeping the chunk format would be for compatibility
with other smalltalks, like filing out of Squeak or VW and directly
into Redline.

T2. The comment "!Stack methodsFor:" would not be mandatory but would
be parsed if present. So when not present the only way to know a
method definition has ended is "! !"
I guess putting "! !" after a method definition is no harder nor clean
nor ugly as similar things in other languages like Ruby (def/end) or
Java ({}).  Would you mind typing "! !" to end a method ?

Other things:

It is proposed that the class definition message format be extended to
support namespaces and importing of classes referenced by the current
class. For example, the above Stack definition becomes:
(Using suggestions from Nik Boydhttp://www.educery.com/papers/sttojava/)

Object subclass: #Stack
        instanceVariableNames: 'linkedList'
        classVariableNames: ''
        poolDictionaries: ''
        packageName: #com:companyName:productName:packageName:
        importPackageNamed: #java:awt:
        importClassNamed: #java:util:Vector:
        category: 'Collections-Stack'!

-- end --

Why don't you have a look at the GNU Smalltalk syntax?

Or use XML like Cincom?

Cheers
Philippe
 
jarober...
Posted: Mon Nov 09, 2009 4:53 pm
Guest
Don't Squeak and Pharo both use curly braces for Array constructors?


On Nov 9, 11:31 am, Thomas Gagne <TandGandGA... at (no spam) gmail.com> wrote:
Quote:
I don't mind using braces.  And it certainly makes using
syntax-highlighting editors easy--and increases the "comfort" factor for
new users to Smalltalk.  Luckily, Smalltalk hasn't already reserved
braces for anything else.

Would it then be possible to embed a smalltalk method into a Java class,
or a Java method inside a Smalltalk class?
 
Thomas Gagne...
Posted: Mon Nov 09, 2009 9:31 pm
Guest
I don't mind using braces. And it certainly makes using
syntax-highlighting editors easy--and increases the "comfort" factor for
new users to Smalltalk. Luckily, Smalltalk hasn't already reserved
braces for anything else.

Would it then be possible to embed a smalltalk method into a Java class,
or a Java method inside a Smalltalk class?
 
Conrad Taylor...
Posted: Tue Nov 10, 2009 2:19 pm
Guest
On Nov 6, 4:00 pm, jamesl <ladd.ja... at (no spam) gmail.com> wrote:
Quote:
Hi Smalltalkers,

Development is progressing well for SmalltalkJVM, a Smalltalk on top
of the Java Virtual Machine that compiles to bytecode.  I now call
this Smalltalk - Redline Smalltalk.

What I'm wanting is your opinion on the format of a Smalltalk source
file?

Some of what follows is my thinking aloud.

The format could be the same as the current "chunk" format but I feel
there should be an easier/simple way to write the source file, since:

1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

2. People should be able to use whatever editor they want and these
editors wont always know about chunk formats, meaning that if the
chunk format is used, people will have to do it manually.

3. There are some additional requirements on the source file to define
namespaces and import other classes (there is no single image file).

4. There is a need to have a format that works for scripts as well as
class definitions.

Here is an example of the Squeak Stack source in chunk format:

Object subclass: #Stack

        instanceVariableNames: 'linkedList'

        classVariableNames: ''

        poolDictionaries: ''

        category: 'Collections-Stack'!

!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!

size

        "How many objects in me ?"

        ^ self linkedList size! !

-- end squeak stack example --

Some Thoughts:

T1. A benefit of keeping the chunk format would be for compatibility
with other smalltalks, like filing out of Squeak or VW and directly
into Redline.

Yes, I agree with keeping the syntax compatible with the other
Smalltalk VMs.

Quote:

T2. The comment "!Stack methodsFor:" would not be mandatory but would
be parsed if present. So when not present the only way to know a
method definition has ended is "! !"
I guess putting "! !" after a method definition is no harder nor clean
nor ugly as similar things in other languages like Ruby (def/end) or
Java ({}).  Would you mind typing "! !" to end a method ?

Wouldn't it always be present if one was to export the package from
the
system? In general, I would keep the syntax consistent with the other
Smalltalk VMs.

Quote:

Other things:

It is proposed that the class definition message format be extended to
support namespaces and importing of classes referenced by the current
class. For example, the above Stack definition becomes:
(Using suggestions from Nik Boydhttp://www.educery.com/papers/sttojava/)

Object subclass: #Stack
        instanceVariableNames: 'linkedList'
        classVariableNames: ''
        poolDictionaries: ''
        packageName: #com:companyName:productName:packageName:
        importPackageNamed: #java:awt:
        importClassNamed: #java:util:Vector:
        category: 'Collections-Stack'!

What's the correct way to define a class? Does one use 'defineClass'
as in VW Smalltalk or 'subclass'? I would like to think about the
following:

packageName: #com:companyName:productName:packageName:
importPackageNamed: #java:awt:
importClassNamed: #java:util:Vector:

My initial thought would be to following something similar to VW
Smalltalk
but it might be necessary to include the namespace of a class within
its
definition. For example, how about something like the following:

nameSpace: #com:companyName:productName:packageName
imports: 'java.awt java.util.Vector'

The usage in regards to a class definition would look something like
the
following:

Object subclass: #Stack
nameSpace: #com.companyName.productName.packageName
instanceVariableNames: 'linkedList'
classVariableNames: ''
poolDictionaries: ''
imports: 'java.awt.* java.util.Vector'
category: 'Collections-Stack'

Quote:

-- end --

Next, I would be interested in seeing the following:

o support for traits/mixins as discussed in the following paper:

http://scg.unibe.ch/archive/papers/Scha02bTraits.pdf

o some type of code convention. For example, if I said that
all message sends would begin in column one as they would in
most code browsers, then the following syntax should be easy
to parse:

hello.st

Object subclass: #HelloExample
instanceVariableNames:''
classvariableNames:''
category:'examples'

HelloExample methodsFor:'greeting'

hello
^ 'Hello world'

array.st:

Array subclass: #MyArray
instanceVariableNames:''
classvariableNames:''
category:'examples'

MyArray class methodsFor:'instance creation'

new: size
^ (1/>super new:size) atAllPut:123.

This is just a thought because I really don't care too much for the
opening and closing square brackets.

Just my 2 cents,

-Conrad
 
jamesl...
Posted: Wed Nov 11, 2009 7:59 am
Guest
On Nov 10, 3:31 am, Thomas Gagne <TandGandGA... at (no spam) gmail.com> wrote:
Quote:
I don't mind using braces.  And it certainly makes using
syntax-highlighting editors easy--and increases the "comfort" factor for
new users to Smalltalk.  Luckily, Smalltalk hasn't already reserved
braces for anything else.

Would it then be possible to embed a smalltalk method into a Java class,
or a Java method inside a Smalltalk class?

It sure would be possible, this is one of the goals or Redline
Smalltalk.
 
jamesl...
Posted: Wed Nov 11, 2009 8:03 am
Guest
Hi Conrad,

Thank you for your comments, Ill take the onboard.
I'll also be sure to read about mixins etc.
I think GNU Smalltalk does these with the ExistingClass extention []
Syntax.

Rgs, James.
 
Charles A. Monteiro...
Posted: Tue Nov 17, 2009 3:44 pm
Guest
This was done already a while back by the people at MissionSoft who
had purchased Knowledge Systems Corporation (KSC), they were able to
subclass Java classes with Smalltalk classes and vice versa, support
for ST blocks all running on top of the JVM. Not that re-inventing the
wheel cannot be a good thing but it might be interesting to leverage
some of that work.

-Charles


On Nov 6, 7:00 pm, jamesl <ladd.ja... at (no spam) gmail.com> wrote:
Quote:
Hi Smalltalkers,

Development is progressing well for SmalltalkJVM, a Smalltalk on top
of the Java Virtual Machine that compiles to bytecode.  I now call
this Smalltalk - Redline Smalltalk.

What I'm wanting is your opinion on the format of a Smalltalk source
file?

Some of what follows is my thinking aloud.

The format could be the same as the current "chunk" format but I feel
there should be an easier/simple way to write the source file, since:

1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

2. People should be able to use whatever editor they want and these
editors wont always know about chunk formats, meaning that if the
chunk format is used, people will have to do it manually.

3. There are some additional requirements on the source file to define
namespaces and import other classes (there is no single image file).

4. There is a need to have a format that works for scripts as well as
class definitions.

Here is an example of the Squeak Stack source in chunk format:

Object subclass: #Stack

        instanceVariableNames: 'linkedList'

        classVariableNames: ''

        poolDictionaries: ''

        category: 'Collections-Stack'!

!Stack methodsFor: 'accessing' stamp: 'dc 7/25/2005 10:04'!

size

        "How many objects in me ?"

        ^ self linkedList size! !

-- end squeak stack example --

Some Thoughts:

T1. A benefit of keeping the chunk format would be for compatibility
with other smalltalks, like filing out of Squeak or VW and directly
into Redline.

T2. The comment "!Stack methodsFor:" would not be mandatory but would
be parsed if present. So when not present the only way to know a
method definition has ended is "! !"
I guess putting "! !" after a method definition is no harder nor clean
nor ugly as similar things in other languages like Ruby (def/end) or
Java ({}).  Would you mind typing "! !" to end a method ?

Other things:

It is proposed that the class definition message format be extended to
support namespaces and importing of classes referenced by the current
class. For example, the above Stack definition becomes:
(Using suggestions from Nik Boydhttp://www.educery.com/papers/sttojava/)

Object subclass: #Stack
        instanceVariableNames: 'linkedList'
        classVariableNames: ''
        poolDictionaries: ''
        packageName: #com:companyName:productName:packageName:
        importPackageNamed: #java:awt:
        importClassNamed: #java:util:Vector:
        category: 'Collections-Stack'!

-- end --
 
Carl Gundel...
Posted: Thu Nov 19, 2009 3:14 pm
Guest
On Nov 6, 7:00 pm, jamesl <ladd.ja... at (no spam) gmail.com> wrote:
Quote:
1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

What sort of debugger do you envision?

-Carl Gundel
http://www.runbasic.com
Easy Web Programming in BASIC
 
jamesl...
Posted: Sun Nov 29, 2009 12:50 am
Guest
On Nov 20, 2:14 am, Carl Gundel <ca... at (no spam) libertybasic.com> wrote:
Quote:
On Nov 6, 7:00 pm, jamesl <ladd.ja... at (no spam) gmail.com> wrote:

1. The source will most likely be written outside of a traditional
Smalltalk IDE, via an Eclipse and IntelliJ plug-ins.

What sort of debugger do you envision?

-Carl Gundelhttp://www.runbasic.com
Easy Web Programming in BASIC

Carl,

What sort of debugger would interest you most?
 
Guido Stepken...
Posted: Sun Nov 29, 2009 6:17 am
Guest
jamesl schrieb:
Quote:
Hi Smalltalkers,

Development is progressing well for SmalltalkJVM, a Smalltalk on top
of the Java Virtual Machine that compiles to bytecode. I now call
this Smalltalk - Redline Smalltalk.

Hmmm ... at the moment Java6 doesn't really support fully dynamic
languages, like Smalltalk ....

See here:

http://en.wikipedia.org/wiki/Java_version_history#Java_SE_7 :

Java 7 (codename Dolphin) is the next version of Java, currently in the
planning and development stages. The Dolphin Project began in August
2006 and is tentatively scheduled for release in early 2010. New builds
including enhancements and bug fixes are released approximately weekly.

New features that may be integrated in Java 7 include:

* JVM support for dynamic languages, following the prototyping work
currently done on the Multi Language Virtual Machine,
* A new library for parallel computing on Multi-core processors,
* Superpackages (JSR 294), which are a way to define explicitly in
a library or module which classes will be visible from outside of the
library,
* Replacing the existing concurrent low-pause garbage collector
(also called CMS or Concurrent Mark-Sweep collector) with the G1 garbage
collector.
* Various small language changes, grouped in a project called
Project Coin. These changes are still evaluated but could include:
Strings in switch, more concise calls to constructors with type
parameters, or multi-catch in exceptions.
* Built-in support for closures. There was an ongoing debate in the
Java community on whether closures support would be appropriate[44][45].
Sun later declared that closures would eventually be included in Java 7,
but that they asked for inputs from the community.

regards, Guido Stepken
 
 
Page 1 of 1    
All times are GMT
The time now is Wed Dec 02, 2009 10:15 am