Subject: Re: FOCAL

From: jones@pyrite (Douglas W. Jones,201H MLH,3193350740,3193382879)
Date: Tue, 19 Oct 1993 14:16:01 GMT

>From article <[email-masked]>,
by [email-masked] (DoN. Nichols):
> 
> 	But there wasn't room for a reasonable BASIC in the PDP-8.

First, there's no such thing as a reasonable BASIC.

Second, by 1973, DEC's EduSystem 5 was being sold, consisting of a
4K PDP-8/E with Basic.  The 1973 Introduction to Programming says
that this basic contained the following commands:  LET, PRINT,
READ, DATA, GOTO, IF, FOR, NEXT, GOSUB, RETURN, INPUT, REM, RESTORE,
DEF, DIM, STOP, END, LIST, RUN, SCRATCH, the single character print
command (:), and the nine standard functions.

Now I'll be the first to admit that this misses the boat in the
area of parameter passing, pointers, records, object oriented
development environments, and the like, but it is certainly as
reasonable a language as FOCAL.
					Doug Jones
					[email-masked]

---

From: [email-masked] (Charles Lasner)
Date: 20 Oct 1993 08:00:13 GMT

In article <[email-masked]>,
>First, there's no such thing as a reasonable BASIC.

Agreed, and as much an oxymoron as military intelligence or computer science.

>reasonable a language as FOCAL.

Perhaps a brief history of PDP-8 BASIC is in order:

(in no particular order)

CINET-BASIC is really FOCAL patched to look like BASIC.  It runs as does
FOCAL in a 4K paper-tape environment that can be hostile to O/S'es with
conventions about the disposition of 07600-07777.  (A trait also shared by
many paper-tape programs, especially diagnostics!)

Lenny Elekman's 4K BASIC, as described above.  This is a tokenizing "digestive"
interpreter that can run much faster than brute-force interpreting FOCAL.  The
standard drawback applies: Comments waste space, and the precise form of the
original source is not preserved, rather the LIST command does a lot of
guesswork formatting, etc.  Again, it needs just about all of 4K, although
it will wipe out 07600-07777 as a pushdown stack, etc. so that OS's can
at least load it!

Various offshoots of Elekman's BASIC exist, such as Jack Burness' 8K version
and the variant of that usually known as LAB-8/E BASIC.  They are one and
the same program with conditional assembly for the lab functions, etc.  The
lab version has an interesting bug: should a lab peripheral cause an unexpected
interrupt, the location where the constant 10. is stored gets clobbered,
causing arithmetic errors and the curious LIST behavior where line numbers
get changed such as line 100 becomes line 104.57!  A still further variant
was added to CAPS-8.  Some of these systems go under the "edu-system"
series, but it's hard to tell the differences without a score-card.  I think
that EDU-10 and -5 are the same beast except that the ":" feature is missing
from -10.

There is some form of TSS8 BASIC which is supposed to run in 4K with a lot
of swapping unique to TSS8.

OS/8 BASIC uses a compiler and run-time system with a lot of chaining to
allow for excessive modularity as a deliberate design feature.  It is 
noteworthy as the most widely bug-reported OS/8 program of all time.  Variants
of it exist known as CBASIC (commercial BASIC meaning arithmetic on strings
containing decimal numbers) or Industrial BASIC (adding some digital I/O
functions, etc.).

Lenny Elekman and Richard Lary's original POLY BASIC is a true compiler,
run-time, and complete BASIC-only O/S that runs in 4K on a disk device
or DECtape.  This is an efficient compiler that creates interpretive code
quickly, and is ideal for student batch runs, etc.  DEC sold variants of it
called EDU-30 or -15/30.  Card reader support was added to allow for student
batches with off-line card preparation, etc.  Various people have worked on
variants of this for OS/8 as well.  At least one variation did something
rather interesting:  You are required to save the various components of
the program in a proscribed order on the system device, the only device the
program can be run from.  Then, you ought to delete all of the individual
entries, and create a super-entry covering all of the files, since the
modules load each other relying on the disk record offsets implied by the
saving procedure being explicitly followed, etc.  Thus, this is the only way
to guarantee that record ordering should the files be moved, etc.  Another
version was attempted using the same general methodology as OS/8 BASIC, etc.
which trades generic file handling for inefficiency, etc.

Contrasting this, all FOCAL implementations stem from FOCAL, 1969 or one
of its predecessors.  The standard version is the assembly of the two
files generally known as FOCAL.ZZM and FLOAT.ZZM.  The splitting of the
files into two modules is arbitrary, and doesn't completely address the usual
reasons for modularity, and are more likely related to file size than anything
else, etc.

Also, note that virtually all of these programs include a primitive albeit
functional editing environment to type in the programs.  All of the versions
that are not true compilers have to run with the editing means occupying
part of the 4K or 8K space!

cjl

---

From: [email-masked]
Date: 21 Oct 93 09:05:40 +0930

> First, there's no such thing as a reasonable BASIC.

I hope I got the attribution right there.  Are you writing as a FOCAL lover, 
or comp.sci.language purist ?

While it was fashionable amongst computing science types to knock Basic, the 
usual argument overlooked the following :

1. Powerful software could be easily written and debugged in DEC's variations, 
   eg BasicPlus.  It could also be compiled in BP2. Long variable names made
   for readable code. 

2. It's just as easy to write bad code in Pascal etc as in Basic, ie, bad code 
   is more a function of the programmmer than the language.

(I'll just go and slip on my asbestos jocks !!)

Regards,

John Bennett                                   [email-masked]

---

From: [email-masked] (DoN. Nichols)
Date: Thu, 21 Oct 1993 03:45:20 GMT

>I hope I got the attribution right there.  Are you writing as a FOCAL lover, 

	Nope!  You didn't!  I *might* have added (but didn't) ", (if you can
consider BASIC to be reasonable. :-)"

>or comp.sci.language purist ?

What *I* wrote was:
->From article <[email-masked]>,
->by [email-masked] (DoN. Nichols):
->> 
->>       But there wasn't room for a reasonable BASIC in the PDP-8.

And, the line to which you were responding was written by:

->From: jones@pyrite (Douglas W. Jones,201H MLH, 3193350740,3193382879) 

Sorry that I've lost the article number - it wasn't included in the headers
I swept out of the previous article.

	I never really got a chance to use FOCAL.

	I've used several dialects of BASIC (after 6800 assembly language),
and managed to do reasonable things with them.  Some versions I find quite
reasonable, such as HP's "Rocky Mountain BASIC", or OS-9's BASIC-09.
However, I do find that I prefer languages like C, or even Pascal for the
sort of things that I would have done in BASIC.  (I say "even Pascal",
because I was using random-access files by the time I got to Pascal, and
most implementations don't make it very easy.  (Some don't even make it
possible. :-)
-- 
 Email:   <[email-masked]>  |  ...!uunet!ceilidh!dnichols 
		 <[email-masked]>
 Donald Nichols (DoN.)  |   Voice (Days): (703) 704-2280 (Eves): (703) 938-4564
	--- Black Holes are where God is dividing by zero ---