8

What is the exact meaning of these characters ←, ≡, ¬, ≠, ⌾, and and how are used in Smalltalk-80?

consider the following expressions: (taken from the smalltalk-80 source code)

  1. ^self class ≡ x ≡ false
  2. ^mem ◦ ¬448 ≠ 0
  3. strm frame ← 15000 ⌾ frame origin y rect: 20000 ⌾ frame corner y.
  4. neg ← (aStream ∢ 45 "-" ifTrue: [true] ifFalse: [aStream ∢ 21 "**¬**"]).

Note: This examples were extracted from the original Xerox Alto disks found in this link: http://bitsavers.trailing-edge.com/bits/Xerox/Alto/disk_images/

7
  • $⌾ looks like the old version of the current $@ for Point formation x@y. $∢ seems to be reading the next character of aStream and answering with its code point (note that 45 is the ASCII of $-. Commented Jan 27, 2021 at 9:46
  • $≡ seems the old version for the current #== and $≠ for $~=. Commented Jan 27, 2021 at 13:58
  • Could you provide a reference to the source. for those characters? As far as I can tell from looking at page 82 of this the only non-ASCII characters are the left arrow and the up arrow. Commented Jan 27, 2021 at 15:34
  • That seems to be a curious mix of Smalltalk-76/78 and Smalltalk-80. Where did you find in?
    – codefrau
    Commented Jan 27, 2021 at 18:09
  • 1
    @LeandroCaniglia I would say that ∢ is an eye: so it is a lookup for an object in the stream (peekFor:), it answers true if next char code is 45. If true, it advance the stream to next position.
    – aka.nice
    Commented Jan 29, 2021 at 22:45

1 Answer 1

8

Sounds like this is a source file from a Xerox-internal version of Smalltalk-80. For the public release they must have replaced these "unusual" chars (which required custom font glyphs) with ASCII, only keeping and glyphs for the _ and ^ ASCII characters.

This is a best guess based on my experience with St76/78 (Update: confirmed by Dan Ingalls):

  1. assignment as in var ← object. Same in St80.

  2. rcvr word← arg is an alternative to word: and usually indicates assignment to a slot of the receiver (e.g. x← as in point x ← 100). St80 only allows keywords ending in a colon :.

    The parser treats as lower precedence so you can have keyword expressions on both sides of it. E.g.

    a foo: b ← c bar: d

    would eval c bar: d and pass the result as second argument to a's foo:← method).

  3. indexing as in array◦index. St80 uses at: instead.

  4. ◦← equivalent to St80's at:put: as in array◦index ← value

  5. identity, like St80's ==

  6. ¬ literal for negative numbers as in ¬1 for -1. The parser treated - as a binary message selector so another symbol had to be used for negative numbers literals.

  7. not equal, like St80's ~=

  8. not identical, like St80's ~~

  9. create a Point, like St80's @

  10. match token from stream. If the next token read from stream matches the argument, it is consumed and returned. Otherwise it answers false.

For more info check out the Smalltalk Zoo website.

2
  • 1
    This is cool. I have read a lot about Smalltalk-72–78 but have never actually read anything other than Smalltalk-80 and beyond (Self, Newspeak, Strongtalk, etc.) Commented Jan 28, 2021 at 19:19
  • 3
    I sent this to Dan Ingalls who confirmed this is correct.
    – codefrau
    Commented Jan 29, 2021 at 16:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.