Re: Forth as an operating system
- From: geomoch@xxxxxxxxx
- Date: Wed, 28 Nov 2007 16:52:40 -0800 (PST)
Thank you for your insightful and detailed response :)
On Nov 28, 3:42 pm, foxchip <f...@xxxxxxxxxxxxxxxxxxx> wrote:
Perhaps an even larger fundamental different is that in an all
Forth system programs are suppose to cooperate. That greatly
simplifies the Operating System services as it doesn't have to
act like a traffic cop and judge to resolve disputes between
hostile programs that would otherwise crash the system. The
fundamental idea behind an monolithic one-size-fits-all OS
is that programs (perhaps written by other people) may be
hostile, buggy, or badly written and protection is essential.
The fundamental idea behind Forth is that programs are not
hostile, can be bug free and are not necessarily bad things.
A good point, and one I realize would need a solution. Any attempt
to write a general purpose Forth OS would need to incorporate
things like memory protection and exception handling. My hope
is that that by building such features on Forth they could share
some of Forth's elegance.
I am interested in a
complete operating system and associated software in Forth,
"complete" isn't clearly defined. In 40S we had boot code,
de-compression code in the boot code, a flash file system,
a GUI, a multitasker and memory manager, a set of network
protocols including UDP, TCP/IP, BOOTP, TFTP, PPP, TELNET,
HTTP, SMTP, etc., and of course drivers for the video,
lcd, keyboard, ir controller, modem, etc. and more. We
could host web pages or download games or applets and
run Forth script. That's what the browser and email
applications, and other Internet appliance apps needed.
That's not 'complete' compared to something like Unix.
Most fundamentally it is based on all Forth not all
possible languages being hosted and being hostile.
That's a very similar set of features to what I envisage
as a 2nd milestone (the first simply being a running Forth).
I have the feeling that Unix is in some ways too complete,
much functionality is duplicated in different parts
a Unix system. As for languages, at one level Forth is a
tool for the creation of domain specific languages. One
of the attractions of a general purpose Forth OS would IMHO
be that all problems could be solved by extending the core
language it was built upon.
kinda like a forth-unix (foonix?).
I recall a Forth-Unix project that produced a few years
of reports at SVFIG before the project was abandoned.
I concluded that Forth was not designed to write something
like Unix, C was.
I expect you are right. I don't propose a reimplementation of
Unix in Forth, it would be much better to solve the problem
'the Forth way' rather than attempting to emulate 'the C way'.
Unix did however get many things right, it would seem unwise
not to learn from it.
I think the werty is the only thing that has claimed that
ARM is ideal for Forth. ;-) But it is nice.
Hehe, only forth chips are really ideal I suppose, and I
hope I don't come across like werty. ARM seems a much
better architecture than x86 for Forth though, unless
there are ways around the x86's quirks that I am not
aware of. On ARM Forth should be able to be as fast as
C, this seems impossible on x86.
Having seen the effort thrown at a foonix in the past and the results
achieved I think very few are interested. Forth OS tend to be as
'complete' as they need to be and if Linux defines 'complete' then
people have Linux. Linux isn't Forth but can host Forth, it isn't
an all Forth system. The two ideas of embedding OS as needed for
cooperative programs and creating a monolithic OS for all languages
and resolving the problems of hostile programs are just so different.
I suppose what's really at the core of my thinking is this:
what if back in the 70s the general purpose operating system had
developed as an evolution of Forth rather than the development
of C/Unix. Would we be in a better place now than we are? While
both Unix and Forth have been developed by more capable people than me
in this time I can't help but feel an opportunity was lost. With
hindsight perhaps Forth would have been a better platform to build
perhaps not then, but now and in the future. As it is that's not how
things went but...
On Nov 28, 8:45 pm, Brad Eckert <nospaambr...@xxxxxxxxxxxx> wrote:
With multi-core CPUs, I think (Gordon) Moore's law will be making
Forth more attractive. You have to ask, where will these chips be in
20 years? Well, there will be a lot of memory, a lot of cores, and
very limited (in terms of throughput) off-chip memory. It's resource
constrained systems all over again, but with a bunch of them crammed
into one chip.
It's the opposite of what happened with single processors, which
became so cheap that Forth's efficiency advantages didn't matter much
It may be that the tendency for progress to involve adding layers
to existing systems cannot be sustained indefinitly, that at some
point a fundamental rethink will be required. Of course that may not
be the case at all.
- Re: Forth as an operating system
- From: foxchip
- Re: Forth as an operating system
- Prev by Date: Re: Forth and Unix -- history
- Next by Date: Re: Define SWAP through DUP and arithmetics?
- Previous by thread: Re: Forth as an operating system
- Next by thread: Re: Forth as an operating system