home .. forth .. misc mail list archive ..

Low-fat samizdat


>I learned Forth in half an hour originally.  Chuck's
>goal is to make it learnable in ten minutes.  I feel that ANS
>really needs a college course for a full semester to get any
>handle on it at all.  After all the goal was to make it look like
>all the other languages that get complexified so that it takes
>a signifigant investment just to get started.
>

I are an embedded systems designer and has been for years.
Programming is a sideline for me, I am primarily a hardware
designer. I refuse to make a choice between hardware and
software because knowledge of one makes me better at the
other. Also, I need to test new hardware without petitioning
the software-only priesthood for their kind attention.

The microprocessor revolution started out as an empowering
paradigm for innovators to boldly go where no man has gone
before. The technical rags were chock full of truly interesting
ideas which were simple enough for an enthusiast to take the
ball and run with. Before the advent of the IBM PC, (which
is a shockingly poor hardware design in all of its generations,
with correspondingly poor software) industry standards were
few, and sensible.

We used to commit the sin of re-inventing the wheel routinely,
and it took less time to deliver the goods than today, where
one is encouraged to seek out someone else's solution to your
problem, and *purchase* it, hoping that the crap actually works
with no latent bugs. Of course there are always bugs, with no
hope of getting the vendor to fix them in time for your project
deadline, so you bastardize your code with workarounds
which cause later bugs when the vendor (eventually) fixes their
product and issues a new release. Of course you never had
source code, and even if you did, it was written with less than
exemplary clarity, because of scheduling pressure.

It seems to me that the embedded world developed an
inferiority complex as awareness of the awesome deeds of
the Unix community became an icon for pecker matching.
The post-pioneering waves of developers and managers
now lust to jam a square peg in a round hole, because they
avoid re-inventing the wheel and are adopting industry
standards. The vendors also BTW provide a convenient
scapegoat when quality control is lost.

I am not knocking the accomplishments of the UNIX
community or claiming that the ANSI C environment is bad
*for the desktop environment*. My axe to grind is the fact
that well-marketed and trendy paradigms like C++, Java,
and Windoze CE are being flogged like mad *despite the
fact that they are acknowledged to be non-deterministic
and inefficient nightmares and not at all suitable for real-
time applications*. Another example of recent industry
standards being worthless is the fact that I have not been
able to get my hands on a VT100 terminal emulator that
runs under Win95 or NT that doesn't drop Rx characters.
Apparently, Windoze has better things to do than run your
application, with no recourse. I was forced to grab an old
486 from the boneyard and set it up as a DOS crate to
solve the problem. This is progress?

Oh yeah, Forth.

In the 16-bit world, I have been able to do whatever I needed
to with Forth-79. Forth-83 didn't appear to offer any advantage
worth scrapping my existing codebase and was getting mighty
complicated to implement, and to what benefit? For years, I
continued puttering away, happily writing usefull programs like
cross-assemblers and state machine compilers, and none of
these took more than a weekend to complete. Due to frequent
address changes, I lost touch with the Forth community via
Forth Dimensions, and wondered if anyone else out there was
still using Forth other than (presumably) Chuck Moore. (It turns
out that he had moved on to OK.)

I was initially overjoyed to discover the ANS initiative, because
Forth is still alive, but I am dismayed by the scope of it all, and
doubt that even if I agreed with the standard that I could master
it before it got revised again.

Portability is a valuable goal, but I value simplicity even more.
I would rather see a bare-bones Forth model cut over to
separate explicit standards tailored to different wordsizes than
a one size fits all approach. My experience with C compilers
has *consistently* demonstrated non-portability, even when the
wordsize is the same. ANS-Forth formalizes the declarations
of implementation dependencies, which only offer valuable
hints to a programmer tasked with porting a program. Java
and USCD Pascal are the only languages that I am aware of
that are truly portable, provided that both the compilers and
interpreters perform flawlessly. Java tool providers certainly
have their work cut out for them implementing a 1000 page
specification flawlessly!

Chuck Moore's research in silicon models is another case in
point where the industry standards are exposed to be bad and
self-serving.

I have been bemused by some of the recent postings to the MISC
mailing list where it seems that re-inventing the PC, or the set-top
browser, or the Nintendo set are the main ambitions. All in good
fun I hope, because competing with giant corporations is implied
in these endeavours. BTW, when it comes to video standards, the
FCC-mandated switchover to HDTV is due by 2006, for better or
for worse.

The magnitude of the task of keeping up with the Joneses is far
more than this old fossil is willing to embrace. What I want is an
embedded Forth computer with deterministic I/O that isn't tripping
over a bloated OS. A free-running timer, lots of parallel I/O, and
fast interrupt response are essential for what I have in mind. It
is faster and easier to write a software UART than it is to pore
through the datasheet for an over-featured, single-sourced UART
IC and write drivers catering to its idiosyncracies, for example.

Microprocessors were invented to eliminate acres of random
logic. The performance of today's silicon makes the original
concept more attractive than ever, but there are few examples
of this approach today.

We are constantly encouraged to use a Boeing 747 to do crop
dusting chores. I want to use a supersonic biplane to do mine.

The definition of elegance in design is when there is nothing
more to be taken away from it.

I am glad Chuck Moore is encouraging maverick Forths which
strive for elegance. I am reluctant to abandon ASCII files only
because "beautiful" Forth can be written using my favorite
text editor, but I would like to try ColorForth, if anyone is
willing to provide me with a copy.

I would like to experiment with using the simplest possible
Internet protocols to provide an underground communications
pipeline for Forth users of similar persuation. Nothing fancy,
simply text-based email, chat, and hypertext publishing. I am
not by any means an expert, and the RFCs that I have looked
at all raise further questions. In order to live to see some
results, the scope needs to be truly minimal.

Myron Plichota