[comp.lang.forth] Forth Programs

a342@mindlink.UUCP (John McKechnie) (12/14/89)

I'm aware of a 123 "look alike" written in Forth - VP Planner!
At least the info I have says it was written in Forth.

S72UZAW@TOWSONVX.BITNET (Yahn Zawadzki) (12/16/89)

Also a major CAD program for the Mac is written in MacForth...  Can't think of
the name/company right now...
(I think the reason I remember this one is because it uses the same interface
as the CAD we use on our Sun's...  not at all like the standard Mac user
interface..)

---
Jan (Yahn) Zawadzki
INET: yahn@midget.towson.edu          (If you are in some weirdo-uucp domain,)
Bitnet: s72uzaw @ TOWSONVX            (PLEASE use bitnet gateways..!         )

        I did it ON a vax...  :)
---

marc@noe.UUCP (Marc de Groot) (12/18/89)

In article <798@mindlink.UUCP> a342@mindlink.UUCP (John McKechnie) writes:
>I'm aware of a 123 "look alike" written in Forth - VP Planner!
>At least the info I have says it was written in Forth.

And I'm aware of two:

Finnigan Instruments of San Jose is the world's leading supplier of mass
spectrometer equipment.  They have a data acquisition system which is written
entirely in Forth.  The source code measures 16 megabytes!  That's 16,000
16 x 64 screens.  They not only have been very successful with this product,
they have included they ability for their customers to extend the system
in the field (in Forth).  To my amazement, customer acceptance has been
very good.

Another:  The program Swivel 3D, marketed by Paracomp for the Macintosh,
is a whizzy 3D modeling and rendering program.  It is written in CSI's
MacForth.  The source is 4 - 3" ring binders full of paper.

---

There are two reasons (IMHO) why C became more accepted than Forth:

1)  The universities took advantage of AT&T's offer for Unix licenses at
bargain prices.  The hackers at the universities learned what was avail-
able to them.

2) MS-DOS was designed with two sets of system calls: one set that looked
like CP/M, allowing upward compatibility, and another that looked like
Unix, allowing C programs that used the Unix library calls to be compatible.

---

If Forth had been handed to a bunch of hyperactive hackers at UC Berkeley
in 1978 or thereabouts, we would likely see a robust operating system
based on Forth.  In fact, it would likely have TCP/IP features to allow
it to talk to the Internet, and good stuff to support multi-user operation.




-- 
Marc de Groot (KG6KF)         |"...few people know what to do with a computer.
Noe Systems, San Francisco    | They decide that running an operating system
UUCP: uunet!hoptoad!noe!marc  | is a substitute for doing productive work."
Internet: marc@kg6kf.AMPR.ORG | -Chuck Moore

dbin@norsat.UUCP (Dave Binette) (12/19/89)

In article <798@mindlink.UUCP> a342@mindlink.UUCP (John McKechnie) writes:
>I'm aware of a 123 "look alike" written in Forth - VP Planner!
>At least the info I have says it was written in Forth.

Yes, it is,
or at least was,
written in forth.

This I know because I wrote a small portion of it.
Specifically the windowed user I/O portion
that allowed a small scrolling window
into a larger field.

peter@ficc.uu.net (Peter da Silva) (12/19/89)

In article <735@noe.UUCP> marc@noe.UUCP (Marc de Groot) writes:
> If Forth had been handed to a bunch of hyperactive hackers at UC Berkeley
> in 1978 or thereabouts...

Sorry to burst your bubble. Marc, but it was. At least there were Forth
systems floating around Berkeley in 1979, when I got there.
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.
"It was just dumb luck that Unix managed to break through the Stupidity Barrier
and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com

marc@noe.UUCP (Marc de Groot) (12/22/89)

In article <7355@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>In article <735@noe.UUCP> marc@noe.UUCP (Marc de Groot) writes:
>> If Forth had been handed to a bunch of hyperactive hackers at UC Berkeley
>> in 1978 or thereabouts...
>
>Sorry to burst your bubble. Marc, but it was. At least there were Forth
>systems floating around Berkeley in 1979, when I got there.
>-- 
>`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
> 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.

Sorry to burst YOUR bubble, Peter, but I LIVED in Berkeley in 1979 (and
through 1987) and I used the PDP-11 Forth on UNIX "D" at Berkeley, and
I have been hanging out with the hackers who work in Evans Hall since
1984.  They didn't even KNOW there was a Forth for their machines, much
less care.  They all will tell you that Forth sucks, but *very* few of 
them have even seen it.  You can't be a member of the Big Hacker Club
at UCB unless you're a Unix bigot -- it was partly peer pressure that 
drove me to work at Microport to find out what these people were so 
excited about.  Needless to say, I've now worked both sides of the 
C/Forth fence, and I *still* consider Forth to be the best way to deal 
with a computer.

Especially after being told by my boss at Microport that you can't
get anything done in a single day with a computer.

Perhaps my original comment was poorly phrased, but I stand by what
I *meant*, which is that if Unix and C hadn't been there and Forth
had been the only thing around, we'd have a "real cool" OS written
in Forth.

We'd perhaps also have more hackers there who understand the difference
between unreadability and illiteracy.  :-)
-- 
Marc de Groot (KG6KF)         |"...few people know what to do with a computer.
Noe Systems, San Francisco    | They decide that running an operating system
UUCP: uunet!hoptoad!noe!marc  | is a substitute for doing productive work."
Internet: marc@kg6kf.AMPR.ORG | -Chuck Moore

peter@ficc.uu.net (Peter da Silva) (12/26/89)

In article <737@noe.UUCP> marc@noe.UUCP (Marc de Groot) writes:
> Sorry to burst YOUR bubble, Peter, but I LIVED in Berkeley in 1979 (and
> through 1987)

Well, I lived there 1978 through 1981. I'll see you and raise you 400
quatloos. You obviously hung around with the wrong set of hackers.

Forth didn't catch on for one simple reason... it's whole design is based
on the assumption of rigidly limited memory. We're not in that world any
more, except for us embedded control weenies.
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.
"It was just dumb luck that Unix managed to break through the Stupidity Barrier
and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com

marc@noe.UUCP (Marc de Groot) (12/27/89)

In article <7416@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>In article <737@noe.UUCP> marc@noe.UUCP (Marc de Groot) writes:
>> Sorry to burst YOUR bubble, Peter, but I LIVED in Berkeley in 1979 (and
>> through 1987)
>
>Well, I lived there 1978 through 1981. I'll see you and raise you 400
>quatloos. You obviously hung around with the wrong set of hackers.

OK, no need to turn this group into another flame haven.  I'll see you. :-)

>Forth didn't catch on for one simple reason... it's whole design is based
>on the assumption of rigidly limited memory. We're not in that world any
>more, except for us embedded control weenies.

I have to take issue with this.  Forth's whole design (IMHO) is based
on threaded code, and nothing more.  It seems to me that you can strip
every word out of the dictionary and start over, as long as you keep NEXT.

Forth is not a reserved word set and it is not a functional specification.
It is an *approach* to programming.  Again, IMHO.

Now if you want to talk about fig-Forth or other existing implementations,
I could list a bunch of reasons besides the one you gave why Forth didn't
catch on.

>"It was just dumb luck that Unix managed to break through the Stupidity Barrier
>and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com

Which elegance are you talking about?  The elegance which requires > 1 Meg of
RAM to run with any performance?  Or the elegance which eats 30% of the CPU
cycles?  ;-)
-- 
Marc de Groot (KG6KF)         |"...few people know what to do with a computer.
Noe Systems, San Francisco    | They decide that running an operating system
UUCP: uunet!hoptoad!noe!marc  | is a substitute for doing productive work."
Internet: marc@kg6kf.AMPR.ORG | -Chuck Moore

wmb@SUN.COM (12/29/89)

> > "It was just dumb luck that Unix managed to break through the Stupidity
> > Barrier and become popular in spite of its inherent elegance."
> > -- gavin@krypton.sgi.com

> Which elegance are you talking about?  The elegance which requires > 1 Meg of
> RAM to run with any performance?  Or the elegance which eats 30% of the CPU
> cycles?  ;-)

This "30% of the CPU cycles" number is nonsense.  I wish Forth programmers
would quit making such unfounded claims about Unix eating cycles.  It makes
Forth look bad in the Unix community because Unix people think that Forth
people don't know what they are talking about (which is often true).

My Sun Forth product runs maybe 3% slower under Unix than it runs standalone,
without Unix, and differences of this magnitude are basically irrelevant,
besides being hard to measure.

Of course, if other processes are running at the same time, things can slow
down, but nobody forces you to run other processes.

It may be true that there are some Unix implementations where the scheduler
overhead approaches 30%, but that is not the fault of Unix itself.
The overhead of Sun's Unix isn't anywhere near 30%.

The ">1 Meg of RAM" thing is true, but it was not always that way. Unix
used to run just dandy on a PDP-11 with 256K or less.  When I started
working for Sun, Unix used to work just fine in 1 Meg.  The increase in
size came about because people started demanding more and more features,
particularly such things as extensive networking support and window systems.

Everything these days takes at least a megabyte; my 512K Mac won't hardly
run any popular programs anymore.  Forth is small because it has resisted
the addition of many features which appear to be necessary for commercial
acceptance.

Small is beautiful, but it doesn't sell products; not when a megabyte
of RAM only costs $100.

Mitch

peter@ficc.uu.net (Peter da Silva) (12/29/89)

> >Forth didn't catch on for one simple reason... it's whole design is based
> >on the assumption of rigidly limited memory. We're not in that world any
> >more, except for us embedded control weenies.

> I have to take issue with this.  Forth's whole design (IMHO) is based
> on threaded code, and nothing more.  It seems to me that you can strip
> every word out of the dictionary and start over, as long as you keep NEXT.

You mean like Adobe did?

What, you mean Forth caught on after all!

But it takes HOW MUCH memory?

:->

> Which elegance are you talking about?  The elegance which requires > 1 Meg of
> RAM to run with any performance?  Or the elegance which eats 30% of the CPU
> cycles?  ;-)

You're obviously confusing UNIX with some of the more recent brain-dead
implementations, like BSD and System V. UNIX's whole design (IMHO) is based
on a small set of system calls and a uniform files-oriented interface. It seems
to me that you could strip every word out of the kernel and start over, as
long as you keep chapter 2 of the manual.

Hey, is there an echo in here?
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.
"It was just dumb luck that Unix managed to break through the Stupidity Barrier
and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com

carroll@s.cs.uiuc.edu (12/29/89)

/* Written  9:47 am  Dec 27, 1989 by marc@noe.UUCP in s.cs.uiuc.edu:comp.lang.forth */
/* ---------- "Re: Forth Programs (was Forth learn" ---------- */
>"It was just dumb luck that Unix managed to break through the Stupidity Barrier
>and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com

Which elegance are you talking about?  The elegance which requires > 1 Meg of
RAM to run with any performance?  Or the elegance which eats 30% of the CPU
cycles?  ;-)
-- 
/* End of text from s.cs.uiuc.edu:comp.lang.forth */
Well, the UNIX about which that comment was made was probably the original
PDP-11 lean&mean version. In the early days, UNIX was to the current OS's as
Forth is to current langauges now. The elegance of the "everything is a file"
metaphor is one part of the overall elegance. Unfortunately, what we have
today is the result of the degenerative disease "creeping featurism". If
you want to talk about FORTH as way of programming as opposed to a language
per se, then one could talk about UNIX as a way of building OS's that
speaks of unity of design, orthogonality, and user power. The problems you
site come from losing sight of this.

P.S. I like UNIX, and I like Forth.

marc@noe.UUCP (Marc de Groot) (12/30/89)

Mitch Bradley writes:
>This "30% of the CPU cycles" number is nonsense.  I wish Forth programmers
>would quit making such unfounded claims about Unix eating cycles.  It makes
>Forth look bad in the Unix community because Unix people think that Forth
>people don't know what they are talking about (which is often true).

You're not running Unix.  You're running SunOS.

I'm running Microport "Real Unix" System V/AT on my '286 box.  It eats
about 30% of the CPU cycles.

By all accounts, the port is very poor.  I call it as I see it, and I
haven't seen it on Sun boxes.

Please don't forget that I worked for Microport.  I am not only a "Forth
people".  I am a "Unix people" too.

-- 
Marc de Groot (KG6KF)         |"...few people know what to do with a computer.
Noe Systems, San Francisco    | They decide that running an operating system
UUCP: uunet!hoptoad!noe!marc  | is a substitute for doing productive work."
Internet: marc@kg6kf.AMPR.ORG | -Chuck Moore

wmb@SUN.COM (Mitch Bradley) (12/31/89)

> I'm running Microport "Real Unix" System V/AT on my '286 box.  It eats
> about 30% of the CPU cycles.

This isn't so much the fault of Unix, and maybe not even the fault of the
port.  It's the fault of the AT hardware, which was optimized for DOS,
not Unix.

Unix is a multi-tasking operating system with processes which are
protected from each other.  Some hardware support is required in order
to do this efficiently.

One of the reasons that Sun was successful was because the original
Sun hardware was designed by people who understood about MMUs and how
to build them cost-effectively using standard microcomputer technology.
Consequently, Sun boxes ran Unix well.  It really doesn't take that much
hardware, it just takes the right hardware.

Nowadays, the industry in general has learned how to do this, and
the current generation of microcomputer hardware (e.g. the 386)
can support Unix just fine.  In particular, Intel has finally figured out
how to build a decent MMU and how not to cripple a processor with 64K
segments.

I note that Forth doesn't have much of an answer for the 64K segment problem
either.  At every Forth conference, there seems to be some sort of working
group of people trying in vain to cope with Intel segment brain-damage.

Actually, the AT could probably run V7 Unix just fine, in 16-bit mode
just like the PDP-11.  However, the ante has been upped, and nobody wants
V7 anymore.

Mitch

BARTHO@CGEUGE54.BITNET (PAUL BARTHOLDI) (01/02/90)

>> I'm running Microport "Real Unix" System V/AT on my '286 box.  It eats
>> about 30% of the CPU cycles.
>
> This isn't so much the fault of Unix, and maybe not even the fault of the
> port.  It's the fault of the AT hardware, which was optimized for DOS,
> not Unix.

Mitch also claimed 3% for sun/unix.  I am not shure these figures make any
sense.  If you have a single pure cpu task, then even 3% is too much and
wasted (I once turned off entirely the OS during a long computation!) while
when many tasks run jointly, share data, i/o etc, I am ready to accept
even much more than 30% for the system if it does what I need. We also have
a Microport "Real Unix" on a 286 that control a very fast dedicated controler
on one side, and is linked via ethernet to a sun 3/60. The user sits on the
sun.  We could have done avery thing in Forth on the 286, shure, but unix
was definitely much smoother, more resilient etc.  Of course a lot of time
is spend in the OS, but not necessarely wasted!  Even in forth, I would have
to fetch, share and release buffers, manage queues, enable/desable i/o etc

At last, concerning the hardware and its influence on overhead, I entirely
agree with Mitch.  The only problem is that a lot a hardware exists now for
the AT at a rather low cost, so that, even brain damaged and slowed down by
wrongly designed MMU, it can still be a cost effective solution ...

                  H A P P Y    N E W   Y E A R     !

                                                      Paul Bartholdi
                                                   Observatory of Geneva

PS I have found on both IBM PC, XT and AT that the interrupt lines are not
correctly terminated.  It has no effect as long you are running DOS, but
can be the cause of a lot of trouble with multitasking systems like unix
and Minix.  Could this be why you get 30% overhead ?

peter@ficc.uu.net (Peter da Silva) (01/03/90)

> Actually, the AT could probably run V7 Unix just fine, in 16-bit mode
> just like the PDP-11.  However, the ante has been upped, and nobody wants
> V7 anymore.

Can you say "MINIX"? V7 UNIX on an 8088. Not even a hard disk.

I knew you could. Actually, the original PC could run V7 just fine. I
was using Xenix on an XT at one time. It was nearly as good as an 11/23,
at a fraction of the price... and better than some of the more bizzarre
System-III based releases out at that time.

(this has little to do with Forth any more. Note followups)
-- 
`-_-' Peter da Silva. +1 713 274 5180. <peter@ficc.uu.net>.
 'U`  Also <peter@ficc.lonestar.org> or <peter@sugar.lonestar.org>.
"It was just dumb luck that Unix managed to break through the Stupidity Barrier
and become popular in spite of its inherent elegance." -- gavin@krypton.sgi.com