Pharo scripting -- reborn as "Coral"

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

Pharo scripting -- reborn as "Coral"

Oscar Nierstrasz

Hi Folks,

I spent some time yesterday together with Stef to take a closer look  
at the Pharo scripting project.

We have repackaged and renamed the project as "Coral". It is available  
on SqueakSource at:

http://www.squeaksource.com/Coral

You can now load it simply into a fresh Pharo-dev image by evaluating:

ScriptLoader new installer ss project: 'Coral'; install: 'LoadCoral'.

This will load everything that is required and pop up a few Workspace  
windows with further instructions.  (You will need John McIntosh's  
latest VM to get this to work -- all is described in the image.)

There is also a window with TO-DO items.  I am interested in starting  
a student project to really make this fly, so I would be grateful for  
your suggestions and desiderata.  If you are a potential user, please  
try it out and let me know what you would expect from a real Smalltalk  
scripting environment.

Thanks again to Mathieu and Gwenaël for getting this to work!

Oscar
---
Prof. Dr. O. Nierstrasz    -- [hidden email]
Software Composition Group -- http://www.iam.unibe.ch/~scg
University of Bern         -- Tel/Fax +41 31 631.4618/3355
vcard:  http://www.iam.unibe.ch/~oscar/oscarNierstrasz.vcf


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
I just tried it. It works.

This is excellent!

By reading /dev/stdin, we should be able to have a prompt.

Cheers,
Alexandre

On 25 Feb 2009, at 13:55, Oscar Nierstrasz wrote:

>
> Hi Folks,
>
> I spent some time yesterday together with Stef to take a closer look
> at the Pharo scripting project.
>
> We have repackaged and renamed the project as "Coral". It is available
> on SqueakSource at:
>
> http://www.squeaksource.com/Coral
>
> You can now load it simply into a fresh Pharo-dev image by evaluating:
>
> ScriptLoader new installer ss project: 'Coral'; install: 'LoadCoral'.
>
> This will load everything that is required and pop up a few Workspace
> windows with further instructions.  (You will need John McIntosh's
> latest VM to get this to work -- all is described in the image.)
>
> There is also a window with TO-DO items.  I am interested in starting
> a student project to really make this fly, so I would be grateful for
> your suggestions and desiderata.  If you are a potential user, please
> try it out and let me know what you would expect from a real Smalltalk
> scripting environment.
>
> Thanks again to Mathieu and Gwenaël for getting this to work!
>
> Oscar
> ---
> Prof. Dr. O. Nierstrasz    -- [hidden email]
> Software Composition Group -- http://www.iam.unibe.ch/~scg
> University of Bern         -- Tel/Fax +41 31 631.4618/3355
> vcard:  http://www.iam.unibe.ch/~oscar/oscarNierstrasz.vcf
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

johnmci
In reply to this post by Oscar Nierstrasz

On 25-Feb-09, at 4:55 AM, Oscar Nierstrasz wrote:

> This will load everything that is required and pop up a few Workspace
> windows with further instructions.  (You will need John McIntosh's
> latest VM to get this to work -- all is described in the image.)

Well I'm curious why won't older VM's work?

--
=
=
=
========================================================================
John M. McIntosh <[hidden email]>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
=
=
=
========================================================================




_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

keith1y
In reply to this post by Oscar Nierstrasz
Oscar Nierstrasz wrote:

> Hi Folks,
>
> I spent some time yesterday together with Stef to take a closer look  
> at the Pharo scripting project.
>
> We have repackaged and renamed the project as "Coral". It is available  
> on SqueakSource at:
>
> http://www.squeaksource.com/Coral
>
>  
I really didnt understand what Coral Saphire was all about, in
InstallerLauncher you could ask squeak to execute a script and output to
stdout. When I looked at Saphir I could see all sorst of parsers etc.
Whats it all for?

Keith

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Marcus Denker

On 25.02.2009, at 19:59, Keith Hodges wrote:

> Oscar Nierstrasz wrote:
>> Hi Folks,
>>
>> I spent some time yesterday together with Stef to take a closer look
>> at the Pharo scripting project.
>>
>> We have repackaged and renamed the project as "Coral". It is  
>> available
>> on SqueakSource at:
>>
>> http://www.squeaksource.com/Coral
>>
>>
> I really didnt understand what Coral Saphire was all about, in
> InstallerLauncher you could ask squeak to execute a script and  
> output to
> stdout. When I looked at Saphir I could see all sorst of parsers etc.
> Whats it all for?


Having a grammar? Smalltalk has no language element to define classes  
and methods.
There is only "fileout" syntax. (expressions seperated by ! that get  
evaluated when
loaded).

Nobody wants to write scripts that way. And the proof is that nobody  
does it.

        Marcus

--
Marcus Denker  --  [hidden email]
http://www.marcusdenker.de


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
Coral combining with Rio looks promising. A prompt will be great  
although.

> There is only "fileout" syntax. (expressions seperated by ! that get
> evaluated when
> loaded).
>
> Nobody wants to write scripts that way. And the proof is that nobody
> does it.

GNUSmalltalk also adopted a proper syntax.

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
In reply to this post by Oscar Nierstrasz
> please
> try it out and let me know what you would expect from a real Smalltalk
> scripting environment.


Something that would really push me in using Coral is an intelligent  
prompt. A list of the things the prompt should do:
        - crawling into the history of typed commands using up and down key  
arrow
        - tab completion (classes and method name)
        - colored output
        - Ctl-D to quit
        - Keybinds:
                * Ctlr-A beginning of the line
                * Ctrl-E end of the line
                * Alt- -> / Alt- <- to jump words

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Marcus Denker

On 25.02.2009, at 21:26, Alexandre Bergel wrote:

>> please
>> try it out and let me know what you would expect from a real  
>> Smalltalk
>> scripting environment.
>
>
> Something that would really push me in using Coral is an intelligent
> prompt. A list of the things the prompt should do:
> - crawling into the history of typed commands using up and down key
> arrow
> - tab completion (classes and method name)
> - colored output
> - Ctl-D to quit
> - Keybinds:
> * Ctlr-A beginning of the line
> * Ctrl-E end of the line
> * Alt- -> / Alt- <- to jump words
>
>

Microsoft's OO shell (I forgot the name. And it changed multiple times)
is quite cool. It shows how typical Shell things fit into OO nicely.
e.g.

        dir | sort

would communicate via a pipe, but and OO one, that is, objects  
describing files, not text
would be exchanged.

And, they had a cool framework for making these commands. Your script  
inherits from
the general superclass all the cool stuff, e.g. command line parsing  
and things like that.

Smalltalk would be very powerfull as an OO shell...

        Marcus



--
Marcus Denker  --  [hidden email]
http://www.marcusdenker.de


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
> Microsoft's OO shell (I forgot the name. And it changed multiple  
> times)
> is quite cool. It shows how typical Shell things fit into OO nicely.
> e.g.
>
> dir | sort


You raise an interesting point. If we have a Smalltalk shell, does it  
make sense to have unix-like pipe (|) ? Maybe for efficiency.

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

David Mitchell-10
Others have mentioned looking at GNU Smalltalk (at least for a sane
interchange syntax).

I would also look at F-Script, particularly for Array Programming.

See also:
http://www.cincomsmalltalk.com/blog/blogView?showComments=true&entry=3272861927

http://www.smalltalk.org/articles/article_20040920_a1.html

http://www.fscript.org/download/OOPAL.pdf

http://www.fscript.org/download/FScriptGuide.pdf

On Wed, Feb 25, 2009 at 2:54 PM, Alexandre Bergel <[hidden email]> wrote:

>> Microsoft's OO shell (I forgot the name. And it changed multiple
>> times)
>> is quite cool. It shows how typical Shell things fit into OO nicely.
>> e.g.
>>
>>       dir | sort
>
>
> You raise an interesting point. If we have a Smalltalk shell, does it
> make sense to have unix-like pipe (|) ? Maybe for efficiency.
>
> Alexandre
> --
> _,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
> Alexandre Bergel  http://www.bergel.eu
> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>
>
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Michael van der Gulik-2
In reply to this post by Alexandre Bergel


On Thu, Feb 26, 2009 at 9:26 AM, Alexandre Bergel <[hidden email]> wrote:
> please
> try it out and let me know what you would expect from a real Smalltalk
> scripting environment.


Something that would really push me in using Coral is an intelligent
prompt. A list of the things the prompt should do:
       - crawling into the history of typed commands using up and down key
arrow
       - tab completion (classes and method name)
       - colored output
       - Ctl-D to quit
       - Keybinds:
               * Ctlr-A beginning of the line
               * Ctrl-E end of the line
               * Alt- -> / Alt- <- to jump words


I modified REPLServer to do all of the above except for CTRL-d, colour and Alt-word skipping. I originally made it so that I could do stuff that breaks Morphic then still be able to use and recover the image.

REPLServer uses telnet but can be modified to use other input/output mechanisms such as stdin/stdout or Display/EventSensor.

REPLServer is loadable in Squeak 3.9, 3.10 using the Packages Universe, or http://www.squeaksource.com/SecureSqueak (I should really put it in its own project at some stage). Its documentation is available as "online help" from the CLI.

Gulik.

--
http://gulik.pbwiki.com/

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
In reply to this post by Oscar Nierstrasz
My dream is to completely get rid of bash and other awful shells.

I remember to have seen a talk on a OO shell, where each command like  
'cat', 'ls', 'cd' where actually message sent to an instance of a  
class Shell. The receiver would then be implicit.
Imagine a prompt like:
        shell.

Each command will then be a message sent to the object referenced by  
the variable 'shell'.

entering 'ls' will then invoke 'shell.ls'...

Cheers,
Alexandre


On 25 Feb 2009, at 13:55, Oscar Nierstrasz wrote:

>
> Hi Folks,
>
> I spent some time yesterday together with Stef to take a closer look
> at the Pharo scripting project.
>
> We have repackaged and renamed the project as "Coral". It is available
> on SqueakSource at:
>
> http://www.squeaksource.com/Coral
>
> You can now load it simply into a fresh Pharo-dev image by evaluating:
>
> ScriptLoader new installer ss project: 'Coral'; install: 'LoadCoral'.
>
> This will load everything that is required and pop up a few Workspace
> windows with further instructions.  (You will need John McIntosh's
> latest VM to get this to work -- all is described in the image.)
>
> There is also a window with TO-DO items.  I am interested in starting
> a student project to really make this fly, so I would be grateful for
> your suggestions and desiderata.  If you are a potential user, please
> try it out and let me know what you would expect from a real Smalltalk
> scripting environment.
>
> Thanks again to Mathieu and Gwenaël for getting this to work!
>
> Oscar
> ---
> Prof. Dr. O. Nierstrasz    -- [hidden email]
> Software Composition Group -- http://www.iam.unibe.ch/~scg
> University of Bern         -- Tel/Fax +41 31 631.4618/3355
> vcard:  http://www.iam.unibe.ch/~oscar/oscarNierstrasz.vcf
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>

--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Tapple Gao
On Wed, Feb 25, 2009 at 10:14:30PM +0100, Alexandre Bergel wrote:

> My dream is to completely get rid of bash and other awful shells.
>
> I remember to have seen a talk on a OO shell, where each command like  
> 'cat', 'ls', 'cd' where actually message sent to an instance of a  
> class Shell. The receiver would then be implicit.
> Imagine a prompt like:
> shell.
>
> Each command will then be a message sent to the object referenced by  
> the variable 'shell'.
>
> entering 'ls' will then invoke 'shell.ls'...

At least in theory, quoth already does this

http://netjam.org/quoth/

--
Matthew Fulmer -- http://mtfulmer.wordpress.com/

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Marcus Denker

On 25.02.2009, at 22:27, Matthew Fulmer wrote:

>>
>> Each command will then be a message sent to the object referenced by
>> the variable 'shell'.
>>
>> entering 'ls' will then invoke 'shell.ls'...


I would say that a command like "ls" is not a method. It's an object
(instance of a sublass of "Script" or "Command").

You want, for example, inherit things like command line parsing,  
standard options
(e.g. --help) and things liket that. A command like ls is far too  
complex to be
just one method.

        Marcus

--
Marcus Denker  --  [hidden email]
http://www.marcusdenker.de


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Nicolas Cellier-3
In reply to this post by Michael van der Gulik-2
Michael van der Gulik <mikevdg@...> writes:

>
>
> On Thu, Feb 26, 2009 at 9:26 AM, Alexandre Bergel
<[hidden email]> wrote:

> > please
> > try it out and let me know what you would expect from a real Smalltalk
> > scripting environment.
> Something that would really push me in using Coral is an intelligent
> prompt. A list of the things the prompt should do:
>         - crawling into the history of typed commands using up and down key
> arrow
>         - tab completion (classes and method name)
>         - colored output
>         - Ctl-D to quit
>         - Keybinds:
>                 * Ctlr-A beginning of the line
>                 * Ctrl-E end of the line
>                 * Alt- -> / Alt- <- to jump words
>
>

Please, please, keep UI feel homogeneous !
Why not HOME, END, CTRL + -> like any other text editor in the world ?
Even squeak is following that convention in TextMorphs !
Also let SHIFT+CONTROL+-> select over words and typed characters overwrite
selection.
You don't have to imitate a poor man's shell!

Let history cycle when at beginning/end of list (with some form of advertising).
And let restrict history crawling among lines matching the first letters if you
typed some (like Matlab does).

Nicolas


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Nicolas Cellier-3
In reply to this post by Marcus Denker
Marcus Denker <denker@...> writes:

>
>
> On 25.02.2009, at 22:27, Matthew Fulmer wrote:
>
> >>
> >> Each command will then be a message sent to the object referenced by
> >> the variable 'shell'.
> >>
> >> entering 'ls' will then invoke 'shell.ls'...
>
> I would say that a command like "ls" is not a method. It's an object
> (instance of a sublass of "Script" or "Command").
>
> You want, for example, inherit things like command line parsing,  
> standard options
> (e.g. --help) and things liket that. A command like ls is far too  
> complex to be
> just one method.
>
> Marcus
>
> --
> Marcus Denker  --  denker@...
> http://www.marcusdenker.de
>

I would say ls is a message, and Shell ls answer with a LSCommand which is
kindOf: Command.
A Command use lazy evaluation: it does not evaluate until a end of line or pipe
message triggers evaluation (i mean send the message #value).

Before being evaluated, Command behaviour can be modified by sending all sort of
message, like -l --help etc...
Of course, apart options which are messages sent to the command (eventually with
arguments), a list of arguments can be passed to the Command itself (Command
valueWithArguments: aList).

Just have to invent the syntax now...

Nicolas


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
In reply to this post by Marcus Denker
> I would say that a command like "ls" is not a method. It's an object
> (instance of a sublass of "Script" or "Command").
>
> You want, for example, inherit things like command line parsing,
> standard options
> (e.g. --help) and things liket that. A command like ls is far too
> complex to be
> just one method.


could also be a trait. But I understand what you're saying. Entering  
'ls' will actually be translated into a 'ls executeInContext:  
currentContext' or something.
currentContext will then be aware of the current path.

Looks like to be an exciting project!

Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Alexandre Bergel
In reply to this post by Nicolas Cellier-3
> Please, please, keep UI feel homogeneous !
> Why not HOME, END, CTRL + -> like any other text editor in the world ?
> Even squeak is following that convention in TextMorphs !
> Also let SHIFT+CONTROL+-> select over words and typed characters  
> overwrite
> selection.
> You don't have to imitate a poor man's shell!

You could have several ways to get at the first character. Actually,  
not only "could", but "should".
Why not "home", "end" ? because there is no such keys on a mac.

> Let history cycle when at beginning/end of list (with some form of  
> advertising).
> And let restrict history crawling among lines matching the first  
> letters if you
> typed some (like Matlab does).


As most shell do as well.
Would be great to have, indeed.

Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel  http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.






_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

David T. Lewis
In reply to this post by Nicolas Cellier-3
On Wed, Feb 25, 2009 at 09:48:08PM +0000, Nicolas Cellier wrote:

> Marcus Denker <denker@...> writes:
>
> > On 25.02.2009, at 22:27, Matthew Fulmer wrote:
> >
> > >>
> > >> Each command will then be a message sent to the object referenced by
> > >> the variable 'shell'.
> > >>
> > >> entering 'ls' will then invoke 'shell.ls'...
> >
> > I would say that a command like "ls" is not a method. It's an object
> > (instance of a sublass of "Script" or "Command").
> >
> > You want, for example, inherit things like command line parsing,  
> > standard options
> > (e.g. --help) and things liket that. A command like ls is far too  
> > complex to be
> > just one method.
>
> I would say ls is a message, and Shell ls answer with a LSCommand which is
> kindOf: Command.
> A Command use lazy evaluation: it does not evaluate until a end of line or pipe
> message triggers evaluation (i mean send the message #value).
>
> Before being evaluated, Command behaviour can be modified by sending all sort of
> message, like -l --help etc...
> Of course, apart options which are messages sent to the command (eventually with
> arguments), a list of arguments can be passed to the Command itself (Command
> valueWithArguments: aList).
>
> Just have to invent the syntax now...

You may be interested in ExternalCommandShell which is part of the CommandShell
package (SqueakMap, SqueakSource, etc). This lets you use Squeak as a command
line shell replacing /bin/sh, and uses pipes to connect Smalltalk expressions,
command objects, and external OS programs.

        http://wiki.squeak.org/squeak/6023
        http://wiki.squeak.org/squeak/2153
        http://wiki.squeak.org/squeak/1914

The syntax is a mashup of Smalltalk and unix shell conventions. The pipes are
OS pipes where necessary to interact with external programs, or an object
that minics OS pipe behavior if the "commands" being connected are Smalltalk
expressions or command objects.

For example, if you enter "help | cat" at the command prompt, you will get
a Smalltalk command object that evaluates "help" and writes its output to
a Unix pipe connected to an OS process running the /bin/cat command, which
reads the output of the "help" command, and copies it to the shell output:

sqsh> help | cat
cd [path] - change default directory
help - help on sqsh commands
history - display command history list
pwd - print current working directory
sls [filepatterns] - list current directory contents
snapshot - save the Squeak image
exit - exit shell and quit Squeak without saving image
type [names...] - indicate how each name would be interpreted if used as a command
simple Smalltalk expression! evaluates a simple expression as a doIt
<ctl-C> to interrupt a running program
<ctl-D> to end input to a running program
sqsh>

Dave


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: Pharo scripting -- reborn as "Coral"

Oscar Nierstrasz
In reply to this post by johnmci

Hi John,

Apparently it has to do with support for relative paths.

Cheers,
- on

On Feb 26, 2009, at 11:50, Stéphane Ducasse wrote:

> because he changed the way the path of the vm is computed
> you can type
>
> squeak -image -file (relative path)
>
> before you had to
> squeak -image -file full path
>


On Feb 25, 2009, at 17:19, John M McIntosh wrote:

>
> On 25-Feb-09, at 4:55 AM, Oscar Nierstrasz wrote:
>
>> This will load everything that is required and pop up a few Workspace
>> windows with further instructions.  (You will need John McIntosh's
>> latest VM to get this to work -- all is described in the image.)
>
> Well I'm curious why won't older VM's work?
>
> --
> =
> =
> =
> =
> =
> ======================================================================
> John M. McIntosh <[hidden email]>
> Corporate Smalltalk Consulting Ltd.  http://
> www.smalltalkconsulting.com
> =
> =
> =
> =
> =
> ======================================================================
>
>
>
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project


_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
12