[squeak-dev] [ANN] The Squeak Shell
dale.henrichs at gemtalksystems.com
Tue Jul 12 00:14:58 UTC 2016
However, whenever I see a Smalltalk shell where folks are typing
Smalltalk into the REPL I cringe, because Smalltalk is not really a
scripting language ... but I think that having scripts written in
Smalltalk and callable from a shell is a real interesting idea.
In tODE I allow folks to create scripts written Smalltalk that can be
called from a command line and it is a very simple idea ... The
Smalltalk script is simply a block.
Here's an example script that is callable from a command line that
looks like one of the following:
bug --clean --create--boom; edit
A command object is passed in from the command line parser and the
command options are turned into a `opts` Dictionary with option names as
keys and option values as values ...
Instead of stdin and stout being byte streams, the stdin and stdout for
Smalltalk scripts are objects (objIn and objOut) --- the objIn arg in
the block is the objIn for the script, basically the result of the last
The edit command above brings up an inspector on the result of the
For tODE the script object (block) can be registered in the Smalltalk
image itself or the script object can be written to disk in STON
format --- making the script easily callable from multiple images ...
I can share the command/option/argument code if you are interested ...
adding Smalltalk scripts to your REPL should be very straightforward ...
On 07/08/2016 07:17 AM, marcel.taeumel wrote:
> Hi, there!
> I am happy to announce a new kind of project for Squeak: "The Squeak Shell".
> You can install it into any trunk image via:
> Installer swa
> project: 'SqueakShell';
> install: 'SqueakShell'.
> Then you will find a new kind of project under Projects -> New Project ...
> The Squeak Shell is independent from Morphic and MVC. It's architecture is,
> partially, a mixture of both. :-D I wanted to keep it as simple as possible
> while avoiding global state as much as possible.
> My goal is to add it to trunk to simplify modularization of MVC and Morphic.
> For example, we have to extract UserInputEvent and Canvas from Morphic into
> the base system. These would form a splendid addition to other projects
> because object-oriented event processing and displaying is not something
> that only Morphic should have.
> The Squeak Shell helped me refactor Squeak's project mechanism. It also
> revealed potential improvements for our Debugger, which I am going to
> address later this year. One goal is to make Squeak more robust and mitigate
> the risk of getting locked out of the system.
> Here is the interesting part: It can be used to recover from
> serious/recursive errors in Morphic and MVC. When you open a new Morphic
> project from within a Squeak Shell project, the shell will appear then. Only
> recursive errors in the shell will then start our traditional emergency
> Some figures: 12 classes, 274 methods, 1454 LOC.
> You can open the Squeak Shell on top of the Morphic loop ("SqueakShell
> open") or as custom process inside the Morphic project ("SqueakShell
> openConcurrent"). You enter a SqueakShell project via: "SqueakShell
> The core of the Squeak Shell covers only 6 classes (see "SqueakShell-Core").
> There are already two applications in this project: (1) a command line and
> (2) a text editor (see "SqueakShell-Tools").
> You can use the Squeak Shell to explore all our tool extension points, which
> we use for browsing classes, inspecting objects, debugging unhandled errors
> in processes, etc. For this, take a look at SqshProject, SqshToolSet, and
> I am sure that there can be an even smaller kind of project. However, I am
> not so sure about the usefulness of such a project. :-)
> Have fun!
> View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev