[squeak-dev] Re: Minimal Squeak Project

David T. Lewis lewis at mail.msen.com
Sat Feb 13 15:50:02 UTC 2016


Hi Marcel,

The idea of using the current self as prompt and pwd seems intuitive
to me. It suggests a mental model of navigating around the objects in
the image.

If you have a Linux or OS X box handy (*), there are a couple of things
in OSProcess/CommandShell that may provide some ideas. If you run Squeak
from a console in the foreground (no '&' on the command line), and then
evaluate 'ExternalCommmandShell start', a "Squeak shell" will be running
in the console, and the prompt will be 'sqsh> '. In this case, pwd
refers to the shell working directory in the file system (like Unix).

>From the tool bar you also have Apps -> Squeak Shell, which opens a
Squeak shell in the image. Again, this is more of a unix model in
which the user navigates the file system and enters command on the
command line (which may be Smalltalk or unix commands). BTW this works
in MVC too, so we have a unix style shell for Morphic, MVC and external
console.

I do like the idea of a shell in which you are navigating through
objects in the image, as opposed to navigating the external file
system. This seems like a more object oriented model, and there is
no reason that it could not be extended to also execute operating
system functions like in CommandShell.

It also seems like the SqueakshProject shell could be easily mapped
to an external console so it would work as an external REPL too,
and the user interaction would be the same in either case.

If we can make Morphic be reloadable, then a good exercise would be
to enter a new SqueakshProject, unload MVC and Morphic, reload them,
and end up with a working image that still allows new Morphic and
MVC projects to be opened.

Dave

(*) Some of this will work on Windows but you really need a unix
platform to do anything useful with CommandShell.


On Sat, Feb 13, 2016 at 02:43:41AM -0800, marcel.taeumel wrote:
> Hi Karl, hi David,
> 
> "SqueaSH" was just an idea to have a small Squeak Shell. Last summer, we hat
> a students' project that involved nice ideas about talking to a Squeak image
> from a command line (outside the VM). 
> 
> Once I figure out the best way of quickly rendering text, we could just
> reuse the students' results to actually create a small Squeak Shell. The
> students also thought about more a convenient input language for quick
> do-its etc. If it is not that much work, I could make use of that project.
> 
> As a prompt/pwd we could use the current "self" like this:
> 
> >cd Morph
> Morph>cd self new
> Morph new>self
> aMorph(123456)
> Morph new>self color
> Color blue
> Morph new>cd self color
> Morph new color>self
> Color blue
> Morph new color>_
> 
> And some bindings:
> 
> Morph new color>col := self.
> Morph new color>ls
> self -> Color blue.
> col -> Color blue.
> Morph new color>_
> 
> And a shortcuts (CMD+1...9) to provide multiple "terminals" (i.e.
> workspaces). Not sure.
> 
> If there are Morphic projects open, we might want to "start" applications in
> there:
> 
> >TetrisGame new &
> Morph added to project "Unnamed Morphic Project" (#someId). To enter that
> project, type "enter someId".
> >_
> 
> Something like that. That basic idea is to minimize
> drawing/layouting/graphics. Support tiny displays. Optimized keyboard input;
> no mouse required at best.
> 
> The biggest challenge right now seems to be the object-oriented event
> handling and rendering of Text instances. Both should be independent from
> Morphic. Well, there is the class DisplayText and Paragraph (ST80) inherits
> from that. Hmm... NewParagraph is just an Object subclass.
> 
> Any ideas? I know that tODE (from Dale) has a (more interactive) command
> line interface with mouse support.
> 
> Any volunteers? :-D
> 
> Best,
> Marcel
> 
> 
> 
> --
> View this message in context: http://forum.world.st/Minimal-Squeak-Project-tp4877272p4877382.html
> Sent from the Squeak - Dev mailing list archive at Nabble.com.


More information about the Squeak-dev mailing list