From: ForthNet@willett.pgh.pa.us (ForthNet articles from GEnie)
Newsgroups: comp.lang.forth
Subject: An Open ANSI Forth Implementation
Date: 6 Sep 92 13:07:26 GMT
Organization: EIEI-U

Category 10,  Topic 41
Message 77        Fri Sep 04, 1992
B.DUNN5 [Brian]              at 07:38 EDT
 
 
 >  Clearly we are at the point now where it should be
 > possible to come up with library routines which provide similar
 > functionality between the Mac, Intuition, Windows, Gem and maybe X.
 > Or maybe I'm just naive.

I am naive too.  I made a little Forth shell overlaying Atari ST Gem calls in
a generic manner.  Basic window and event handling.  Mike Hore is working on a
similar shell for Mac's OS and his MOPS Forth.  A little game which uses
windows and mice and events via the generic words is working on both systems,
from the same Forth source code.

Neither one of us wrote windows from scratch.  We just used the same name and
parameters for existing functionality.  All the sudden, generic window and
event handling is portable.

Some systems do funny things with windows, which would have to be broken to
support a generic interface ( for example, Mach2 ties windows and tasks
together on a one to one basis, rather than allowing any task to use any
window ).  For most systems, all it takes is matching parameters and names of
your existing GUI interfaces to some agreed on base.

I can post a quick list of the names and stack diagrams which I used, and the
ST source is on GEnie's download area.

ANS-Fig Forth could use the same names for the same functions on many systems,
and large applications could use the same portable source on many platforms,
for windows, device handling, file selectors, menus, random numbers, input
output conversions, special keycodes, structures, arrays, simple task
handling, basic sounds, fixed point trig, SQRT, sort, etc.

Every Forth has them, they just call them different things.  A conversion
shell could be supplied with each vendor's Forth for use with portable source,
while maintaining the special features provided by the particular vendor.

ANS-Fig Forth is a great idea.  People can write portable code usable on many
machines, and college students need not pay a bundle.

Vendors still have plenty of room for things like those Amiga multitasking
tricks, network packages, fancy editors, optimization, assemblers, enhanced
sound and graphics, databases, expert systems, multiuser systems, preemptive
taskers, bizzare dictionaries, host object module linking, 3d graphics,
elaborate debuggers, music languages, AI enhancements, support for many
platforms, support for fancy PC expansion cards, good software floating point,
MMU and other co-processor tricks, and whole applications.  This is the stuff
which a person would pay for.

ANS-Fig Forth could draw lines and circles in a generic window while beeping
and buzzing.  A vendor Forth could draw filled and shaded 3d graphics at
blinding speed on a page flipped display with a scrolling background and multi
voice stereo sound.  ANS-Fig Forth could have a standard way to send a
character to a modem, while a vendor Forth could be running a ham radio AX-25
packet radio node using out of the box software.  ANS-Fig Forth could have a
simple text editor with cut and paste. A vendor Forth could have multi
windows, execute a line at a time, have outlining and formatted printout,
keyboard macros, and be able to compile and patch single definitions.

ANS-Fig Forth would be sufficient for most college programming projects, and
could be used for sharing portable source code.  In the meantime, if there
were a $200 vendor Forth for my machine which made good use of every special
piece of hardware I had plus provided a slick editor and debugger and
optimized linkable object code and all the rest, while ALSO having a shell to
run ANS Fig code, I would snatch that up in an instant.

You public domain Forth implementers: let's agree on something more than DUP. 
Let's have portable structures to catch up with C, and portable windows to
perhaps pass them.  All we have to do is agree.

You vendors: give us something we can't make ourselves in our spare time. Give
us something which can make our machines smoke along in full color, stereo, FP
copro'ed, MMU controlled, multiwindowed, AI driven glory.

As was quoted previously:
 > Or maybe I'm just naive.

-----
This message came from GEnie via willett.  You *cannot* reply to the author
using e-mail.  Please post a follow-up article, or use any instructions
the author may have included (USMail addresses, telephone #, etc.).
Report problems to: dwp@willett.pgh.pa.us