Hi Eliot,
Actually, I was only joking. Somehow Tim seems to bring that out in me. But see below.
On Sun, Apr 08, 2018 at 04:50:42AM -0700, Eliot Miranda wrote:
Hi David,
On Apr 7, 2018, at 2:52 PM, David T. Lewis lewis@mail.msen.com wrote:
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@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,
It is not. It's just a very quick hack to test the threaded ffi and the simulator.
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@lewis-Gazelle-Pro:~/squeak/Squeak5.1$ run osp64.image
sqsh> 3 + 4 ! 7 sqsh> 3 + 4 7
So do you require long expressions occur on one line?
sqsh> 3 + 4! | /bin/cat 7 sqsh> exit lewis@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.
The issue is how to input a multi line doit. Do you allow it and hence either require each end of line to be escaped (Unix/C, end a non end line with \ CR) or I escaped and require an input terminator (st chunk's ! or Unix here script's repeat of the opening tag)?
Well, this is a completely silly idea that nobody would ever bother using using even it if did exist. And it was a nice sunny Sunday afternoon here in Michigan, I had a good pot of coffee at hand, so what the heck - I just went ahead and implemented it. After all, it's not as though the syntax mashup could possibly get any worse, so why not?
If you update your CommandShell package to the latest version, you can now use ExternalCommandShell to do wonderfully useless things such as this:
lewis@lewis-Gazelle-Pro:~/squeak/Squeak5.1$ run squeakSpur64.image
sqsh> 3 + 4 7 sqsh> 3 + 4! 7 sqsh> 3\ + 4! 7 sqsh> exit
;-)
Dave
Dave
(1) https://www.improbable.com/ig/winners/ (2) http://wiki.squeak.org/squeak/1064