[squeak-dev] Re: [ANN] The Squeak Shell
Marcel.Taeumel at hpi.de
Tue Jul 12 13:21:09 UTC 2016
Dale Henrichs-3 wrote
> Very Cool!
> 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 --help
> bug --install
> 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
> script ...
> 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 ...
>  https://gist.github.com/dalehenrich/97f2befe07ad7bf928165a3fc64a2118
>  https://github.com/svenvc/ston#ston---smalltalk-object-notation
>  https://gist.github.com/dalehenrich/be9e7cd439eb5a5a0d9e937cc0a04f86
> 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
>> 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
>> partially, a mixture of both. :-D I wanted to keep it as simple as
>> while avoiding global state as much as possible.
>> My goal is to add it to trunk to simplify modularization of MVC and
>> For example, we have to extract UserInputEvent and Canvas from Morphic
>> 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
>> 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.
>> 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
>> There are already two applications in this project: (1) a command line
>> (2) a text editor (see "SqueakShell-Tools").
>> You can use the Squeak Shell to explore all our tool extension points,
>> we use for browsing classes, inspecting objects, debugging unhandled
>> 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
>> not so sure about the usefulness of such a project. :-)
>> Have fun!
>> View this message in context:
>> Sent from the Squeak - Dev mailing list archive at Nabble.com.
thanks. Yeah, right now, the Squeak Shell is no scripting environment. There
is accessible concept of object streams. This, however, was not the goal
If I would want to introduce object streams and improve Squeak's scripting
capabilities (wrt. to the Squeak Shell), I would subclass SqshCommandLine
and add simple ways to connect blocks or do other things as you suggested.
The SqshCommandLine right now only evaluates code, supports bindings, and
has some shortcuts (beginning with !). And there is some navigation in the
object space with ! and !!.
View this message in context: http://forum.world.st/ANN-The-Squeak-Shell-tp4905613p4906232.html
Sent from the Squeak - Dev mailing list archive at Nabble.com.
More information about the Squeak-dev