4 ms·
I think it’s cute/ironic that the first word the document introduces you to is “.” Which in normal English is something we used to separate runs of words.
by travisgriggs 3y ago
I think it’s cute/ironic that the first word the document introduces you to is “.” Which in normal English is something we used to separate runs of words.
- mananaysiempre 3y agoStandard word for printing the topmost element in Forth for decades, though. (The 1970 manual[1] uses it to introduce definitions instead, in place of the modern-day colon, but by 1977 using it for printing was already the consensus and made it into the Forth-77 standard[2].) It is less than perfect for programmatic use, what with the obligatory space afterwards and no field-width support (there are other words for that), but very nice in a REPL, where using a single unshifted key on a US keyboard is important[3]. [1] https://www.1strecon.org/downloads/Forth_Resources/CM_ForthLanguageInteractiveComputing_1970.pdf https://www.1strecon.org/downloads/Forth_Resources/CM_ForthL... [2] https://www.complang.tuwien.ac.at/forth/forth-77.txt https://www.complang.tuwien.ac.at/forth/forth-77.txt [3] http://yosefk.com/blog/i-cant-believe-im-praising-tcl.html http://yosefk.com/blog/i-cant-believe-im-praising-tcl.html
- astrobe_ 3y agoI've wondered for a long time why the dot was chosen for this instead of the question mark. Using the dot instead of the the semicolon to end definitions seems more natural (as far as "natural" makes sense in an RPN language). That's what I did in my dialect. I understood why when I wanted to use it as a calculator. All relevant keys for simple computations are then on the keypad. Well, Forth is flexible enough that you could define "00" to display results; the rule is that the interpreter looks for tokens in the dictionary first, and the try to convert to a number if a word of that name doesn't exist.