Towards an ST-72 example

Alan Kay Alan.Kay at disney.com
Sun Nov 21 03:58:31 UTC 1999


Helge --

The "regular colon" means "eval the next expression in the message, and
bind if colon has a symbol as an argument" -- so just : will eval the next
expression, and :b will eval the next expression and bind the result to
"b".
     The "open colon" means "don't eval the next item in the message, and
bind this if colon has a symbol as an argument -- so "open colon"b will
bind the next whatever (usually a symbol or a list) to "b".
     The "keyhole" means "peek" at the next thing in the message, but don't
advance the parsing of the message.
     This was my "one-half page" way to do an OOP language with extensible
syntax: each class actually has a procedural recognizer as its interface.
We had a more elaborate second stage in mind for this that showed a cleaner
looking class, but we never got around to implementing it. Rosetta
Smalltalk came up with a different way to do a cleaner class interface. The
benefit of the ST-72 way was that the message recognition used straight
<rec> <message> syntax and needed no further explanation ...

Cheers,

Alan

-----

At 6:13 PM -0800 11/20/99, Helge Horch wrote:
>Folks,
>
>I must say I enjoy playing with ST-72 *very* much. Cool stuff! So I thought
>I'd share my findings:
>
>The keymap is a tad richer than hinted at in the transcript. As it says there,
>
>> for doit,          type the cursor-up key
>> for open-colon,    type the semicolon key
>> for apostrophe-s,  type the open-string-quote key
>
>Note: the last one means backquote (`), although I haven't found a use for
>it yet. (It's aliased by control-S, by the way).
>
>There's more, however:
>
>The uparrow equivalent (double uparrow) is mapped to the '!' key (shift-1).
>
>The quote (in LISP terminology) with the "pointing hand" symbol is mapped
>to '"'. That is, to assign 3+4 to a variable called seven, you'd say
>   "seven_3+4
>and press DOIT. This seems to be the equivalent of the "right-sling arrow"
>in some ST-72 papers.
>
>The peek symbol (eye) is mapped to '%' (shift-5) on my German keyboard, and
>the conditional (implication, "=>") is mapped to '?' here
>(shift-theKeyNextToZero). As the filein tells, the turtle symbol (face) is
>mapped to '@'.
>
>Furthermore, the PAGE-UP key results in a keyhole (?) symbol, HOME gives a
>"<=" symbol. INSERT seems to trigger a secondary listener, which you can
>close with the END key. DEL shows a "flash" symbol. I don't know what all
>these are for, and 'd appreciate any hints.
>
>Control keys are interesting, too: A (<= symbol), C (open colon), D
>(terminates listener), E (open secondary listener), F (@), G (dot), K
>(keyhole symbol), N (not equal symbol), O (double quote), P (arrow+open
>paren), Q (!), R (open dot), S ("'s" symbol, like `), T (Alto symbol), U
>(overline), V (%), W (boolean or), X (boolean and), Y (fat arrow), Z (>=).
>Control H, I and M seem to have their usual function.
>
>I haven't found the mapping for the "box" symbol and the vertical bar
>(silly as it may sound, and it's not shift-6) yet, though. Please help?
>
>Having these, I could finally try out the following example class from the
>John Shoch paper [1]. This is the equivalent of a LISP cons cell:
>
>"pair _ class | left right
>   (
>   isnew => ("left _ BOX. "right _ BOX.)
>   %left => (%_ => (!"left_BOX.) !left.)
>   %right => (%_ => (!"right_BOX.) !right)
>   %print => ( '(' print. left print. '.' print. right print. ')' print)
>   ) DOIT
>
>Also, I did not know that ST-72 already had the open colon (;). What was it
>for? (I tried using it for BOX, with little success.)
>
>Appreciating any hints I remain,
>Helge "Dr. Watson" Horch
>
>[1] Shoch, John F.: "An Overview of the Programming Language Smalltalk-72",
>ACM SIGPLAN Notices Vol. 14, #9 of August 1977, pp.64-73.





More information about the Squeak-dev mailing list