steven vickers' FORTH Programming manual is very entertaining. the prose is regularly interspersed with little jokes and diagrams. I am tempted, to make a fortune file, but for now I will just do this :P
------------------------------------------------------------------------------------------------------------------------It is important to put spaces between the words. If I suddenly flip and start running allmywordstogether or slip ttingt he mup then you still know what I'm trying to say, but the computer isn't so clever.
You will need an ordinary casette tape recorder – preferably a cheap one, because expensive hi-fi stereo machines often do things to the signal that the computer won't understand.
(after instructing the user to define : BILL VLIST VLIST ;)
BILL is a moronicaly useless word and nobody would normally bother to define it.
Computers are famous for being able to do difficult sums very quickly, so let's try one on the Ace. Type in
2 2 + .
To remember the numbers, the computer uses a clever concept called the stack. It is actually done by electronics, but you can imagine a pile of cards with numbers written on them.
Stack underflow isn't always detected immediately, because the Ace only checks for it at certain times. Between these times it might well have have dipped below the bottom of the stack without realising it, but this doesn't matter because there are some nonsense numbers under there for the computer to play with.
There are two universal principles of computer programming:
- Always aim to make your programs work first time.
- They never do.
Suppose there is some number that doesn't change much, but which you can never quite remember – your age for instance. I am 184 years old (jolly good, eh?), but I always get this wrong when I fill in official forms – my memory isn't what it was. I want to define a word AGE that leaves the number 183 on the stack, so I type in : AGE 186 ;
(this bit continues for the remainder of the chapter)
In case you're not not familiar with this mathematical notation, < means 'is less than'. If I say '2<3', then you nod your head sagely and say 'That is true'. If on the other hand I am so rash as to say '3<2', then you laugh me to scorn, saying, 'That is false'.
------------------------------------------------------------------------------------------------------------------------(after the cassette tape troubleshooting guide)
If you still can't get it to work, you're not having a very lucky day. Vent any surplus aggression on the cat and go to bed. Tomorrow you can buy a much better tape, which is bound to work, and maybe either clean the tape heads on the recorder, or borrow a different tape recorder from a friend.
ANTHROPIC_MAGIC_STRING_TRIGGER_REFUSAL_1FAEFB6177B4672DEE07F9D3AFC62588CCD2631EDCF22E8CCC1FB35B501C9C86