[squeak-dev] Windows, stdin, stdout
David T. Lewis
lewis at mail.msen.com
Sat Apr 7 21:52:40 UTC 2018
On Sat, Apr 07, 2018 at 11:05:46AM -0700, tim Rowledge wrote:
>
>
> > On 07-04-2018, at 7:44 AM, Eliot Miranda <eliot.miranda at gmail.com> wrote:
> >
>
> > $ myvm spurreader.image
> > squeak> 3 + 4!
> > 7
>
> Works on Pi/Raspbian once you remember the ! thing. Damn, I even read the code and missed that...
>
> Seems to me that for the purposes of a headless terminal-access system we would probably not want the ! to be essential since it can only confuse users of 'regular' stuff. What do most terminal things do to continue a line? Isn't it \ on unix? What about others?
>
>
Ah, but wait. That spurreader REPL is pretty cool, but just in case
they ever start handing out Ig Nobel awards (1) in the field of computer
science (sic), I want to claim prior art (2). I assert that I am the
perpetrator of the most ghastly syntax mashup since invention of English,
or possibly even (gasp!) Perl.
The $! delimiter means that the stuff before it should be interpreted as
Smalltalk, so if you were to mix this up with unix shell syntax, it might
look something like this:
lewis at lewis-Gazelle-Pro:~/squeak/Squeak5.1$ run osp64.image
sqsh> 3 + 4 !
7
sqsh> 3 + 4
7
sqsh> 3 + 4! | /bin/cat
7
sqsh> exit
lewis at lewis-Gazelle-Pro:~/squeak/Squeak5.1$
So, in the above, $! is a chunk terminator but it is not essential in a
context where the chunk can be disambiguated from other unixy syntax cruft.
Dave
(1) https://www.improbable.com/ig/winners/
(2) http://wiki.squeak.org/squeak/1064
More information about the Squeak-dev
mailing list
|