On Saturday, April 8, 2017 at 3:31:09 AM UTC+2, Darin Murphy wrote:
As the transcriber of Starting Forth,
please allow me to explain some aspects that
have not been properly addressed yet. I also
want to make some additional comments.
It seems that 99% of the problems discussed
in this thread can be solved by properly reading
a section in the on-line version's Acknowledgements.
I'll reproduce and annotate it here:
"Starting Forth, First Edition is from 1981. These
web pages were designed in 2003, when it became
apparent that SF would never be re-issued by the
copyright holder. A small supply of about 500 books
was all that was left.
When you can get hold of the original, do so."
My 2003 transcription (
home.iae.nl/users/mhx/sf.html)
was illegal, or at least unsanctioned.
I found it unacceptable that this refreshingly
unconventional textbook, which had instantly converted
me to a Forth addict when I was still at university,
would become unavailable to next generations.
It took me about a year to transcribe the text and
adjust the code. I did not have access to the original
artwork. Leo's original drawings were back-added by
Forth Inc. when they eventually approved my
transcription and setup their own SF pages at
https://www.forth.com/starting-forth/ . We reached
an agreement that is described in the
"Copyright Notice" you find in the Acknowledgement
section of the transcript.
The two page sets contain the same text, but
Marlin Ouverson has adjusted the look-and-feel of the
Forth Inc. rendering by properly sabotaging the HTML
standards :-)
"In this transcript Forth code has been ANSified.
The samples should run on, at least, iForth and
SwiftForth. Where necessary, statements that were
valid in 1981 have been exchanged with statements
more appropriate for 2003 (when this tribute was written)."
I guess this is the measure that causes the present
confusion.
*None of the code in the original SF (OSF) is ANS,
because ANS Forth did not exist when OSF was
written.*
There is no way a modern Forth can run OSF examples
unmodified, unless one first writes an emulator for
OSF's Forth dialect (16-bit threaded code) in ANS
Forth--a 64-bit optimizing compiler, most probably.
Such an emulator would not teach the reader modern
Forth. It'd only allow to recreate the experience
of the original readers of OSF. This would be about
as useful as writing a MIX emulator to try out the
algorithms in Knuth's TAOCP.
"Starting Forth is full of very difficult to reproduce
graphics. These enormously enhance the text's mnemonic
value, and are invaluable for a first-time Forth user.
I have therefore added "substitute" graphic elements,
roughly at the same spot where they are in the original.
The original graphics are, of course, much better."
Mrs. Rather does not like, and consistently never has
liked, Leo's pictures.
Although I respect her opinion, it is well-accepted
that pictures work (
https://www.mindtools.com/memory.html).
With regards to silliness, e.g. "LaTeX: A Document
Preparation System", uses pictures in a very serious
text aimed at very serious people.
"In this transcript I have assumed a 32-bit,
byte-addressing Forth, with 8-bit characters.
The address returned by WORD is assumed to be HERE.
This allows the common trick of ALLOTing length of
str CHARS after using WORD in order to compile
string str to memory. Multitasking issues are
ignored (e.g. no >TYPE, just TYPE). Division is
symmetric, not floored, and two's complement is
assumed throughout. Most Forths should not have
problems with this. Chapter 7 exploits extended
uses of number conversion. Some Forths are broken
in this respect, but iForth and SwiftForth do support
these neat features."
At the time the ANS standard was developed,
there were people that for various strategic
reasons loved to point out why conventional Forth
phrases would NOT work on OrangeCarrotHead Forth as
released in 1947 for the big-endian 1's complement
55-bit IBM 321 mainframe. I did not want any of such
if's and but's in the transcribed SF, and opted to show
Forth code that should run on a "reasonable" Forth.
I made sure that at least two existing Forths could
run all the code of the new SF, and added
warnings for code that was far left-field.
It is great that no contributor here remembers
anymore that in pre-ANS times it was *impossible* to
take a snippet of published Forth and run it on one's
own system. CFA, LFA, ', ['], signed division, 2+ for
addressing, 1-based PICK, segmented 16-bit Forth,
floating-point, blocks, non-standard words with
standard names (OR, NOT) ...
Then about that OCTAL thing in Chapter 8:
"Your Forth system already has a number of
variables defined; one is called BASE. BASE
contains the number base that you're currently
working in. In fact, the definition of HEX and
DECIMAL (and OCTAL, if your system has it) are simply
: DECIMAL 10 BASE ! ;
: HEX 16 BASE ! ;
: OCTAL 8 BASE ! ;
What is there to be confused about? Doesn't gForth
have BASE ?
-marcel