public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* forth interpreter as kernel module
@ 2002-04-04 23:49 David N. Welton
  2002-04-04 23:59 ` M. Edward (Ed) Borasky
  2002-04-05  0:19 ` Alan Cox
  0 siblings, 2 replies; 10+ messages in thread
From: David N. Welton @ 2002-04-04 23:49 UTC (permalink / raw)
  To: linux-kernel


[ please CC replies to me ]

Hello,

Once upon a time, I had a rather random idea, and, acting on it, I
wedged a forth interpreter into the Linux kernel.  I've always wanted
to clean it up and do things nicely, but have never really found the
time or the motivation.

So, I am posting here, in the hope that someone might find the idea
interesting and take it up, or, better yet, think of something that it
might actually be used for (this was besides the point when I did it).

I doubt the code itself is of much interest.  Actually, I'm pretty
embarassed about it, but decided to make it available despite that.

It does run, on my system (2.4.18):

@grantspass [/home/davidw/workshop/pforth-21] # insmod kpforth.o 
Warning: loading kpforth.o will taint the kernel: no license

@grantspass [/proc] # echo 3 . > kpforth
@grantspass [/proc] # cat kpforth-out 
pfLoadDictionary - Filename ignored! Loading from static data.
Static data copied to newly allocated dictionaries.
Begin AUTO.INIT ------
3    ok
Stack<10> 

Although from what I recall when experimenting with it, there are some
definite 'issues'.  See aforementioned disclaimer about the code.  It
doesn't interface with the kernel in any interesting ways, either.

Anyway, for the interested/bored/adventerous, the code may be found
at:

http://www.dedasys.com/freesoftware/files/kpforth-21.tgz

The original forth system that I based it on - pforth - which is much
better code then mine, is by Phil Burk.

I would be interested in comments on what should be fixed in the code,
although I may not have time to act on them.

Anyway, hope this is of interest to someone, and thank you for your
time,
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
     Personal: http://www.dedasys.com/davidw/
Free Software: http://www.dedasys.com/freesoftware/
   Apache Tcl: http://tcl.apache.org/

^ permalink raw reply	[flat|nested] 10+ messages in thread
* Forth interpreter as kernel module
@ 2002-04-06  1:22 Rick A. Hohensee
  2002-04-06  5:10 ` M. Edward Borasky
  0 siblings, 1 reply; 10+ messages in thread
From: Rick A. Hohensee @ 2002-04-06  1:22 UTC (permalink / raw)
  To: linux-kernel

Two Forths in Linuxspace now? That's 3 stack machines. Heheheheh,




        MAKE YOUR TIME. ALL YOUR BASE ARE BELONG TO KSPAMD.





Does the pforth version run as a kernel daemon like H3rL does?

Phil Burk is I believe still affiliated with Mills College. He'd love to
hear about this. Mike Haas too, probably. Mike Haas wrote the kernel of
Amiga JForth and Phil wrote all the music stuff. I added all the Linux
syscalls to the PForth in cLIeNUX mostly out of nostalgia for JForth, a
"...once in a paradigm thing." Jack "jax" Woehr (sp?). Phil was quite
pleased to hear there's a PForth out there with 160 Linux syscalls as
primitives.

That PForth is in ftp://linux01.gwdg.de/pub/cLIeNUX/interim along with
H3rL, Hohensee's 3-ring Linux, which is a Linux kernel with a 3-stack
machine in 0wnerland. Read ./ABOUT .

Alan,
 an Open Firmware IN kernelspace has the potential to have the
functionality of Open Firmware, AND serve as something like an Open Driver
Initiative, with a performance hit perhaps, depending on how the Forth is
implemented. There are native compiling Forths, but they're not nice tiny
little things.

Ed,
 As far as security is concerned, a Forth on say vt1 (it's on vt1 here,
er, it's H3sm, a 3-stack machine, but anyway...) is no worse really than
root. As far as how a Forth compares to a kdb, it doesn't. Forth is a
debugger, a compiler, an interpreter, AND a desert topping. A forth won't
have the niceties of an evolved unix tool, but you can write them
interactively. And write things you can't imagine until the problem pops
up, like that thing Torvalds did recently for sniffing at some
Torvaldsianly obscure cache tree buffer tree page cache buffer thing. You
can write stuff like that with the same interactivity you associate with
shell scripting.

More to the point, Forth can be a great personalizer of unix/Linux. Sure,
you don't want a Forth in your DNS box. (I do, but...) You do want a Forth
in your multimedia box. Bigtime. Which is why the "forth" command in
cLIeNUX is upforth, PForth with a unix Jones.

If Forth in Linux is going to go somewhere, Mitch Bradley might want to
comment. He's the author of OpenBoot, and I find that some of my best
Forth-on-unix ideas, he had 15 years ago. He left Sun and does Bradley
Forthworks or Forthware, last I heard. Post to comp.lang.forth too.

Rick Hohensee

Birth Of Kspamd reenactment...
imagine each space as *exactly* one second elapsed between string
outputs...

SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM SPAM
SPAM SPAM SPAM SPAM SPAM SPAM SPAM<cursor>




^ permalink raw reply	[flat|nested] 10+ messages in thread
* forth interpreter as kernel module
@ 2002-04-07 10:05 Rick A. Hohensee
  0 siblings, 0 replies; 10+ messages in thread
From: Rick A. Hohensee @ 2002-04-07 10:05 UTC (permalink / raw)
  To: linux-kernel; +Cc: davidw

Interesting. That 1998 file for making a /proc scripting thing,
what else has it been used for? 

Sometime around June 2001 I released a 3-stack Forthlike language 
embedded in a Linux kernel. The implementation is quite different 
than yours. In H3rL, Hohensee's 3-ring Linux, H3sm, Hohensee's 3-stack
machine, runs as a kernel daemon with regular user interaction via
a vt. I use vt1 on this box. 

I would also call your attention to upforth. H3rL, H3sm and upforth
are in ftp://linux01.gwdg.de/pub/cLIeNUX/interim

Rick Hohensee


^ permalink raw reply	[flat|nested] 10+ messages in thread
* Forth interpreter as kernel module
@ 2002-04-08  8:53 Rick A. Hohensee
  0 siblings, 0 replies; 10+ messages in thread
From: Rick A. Hohensee @ 2002-04-08  8:53 UTC (permalink / raw)
  To: linux-kernel

>Segher Boessenkool
 >  I'm writing a full OF implementation for OpenBios. It will also be
  > able to run in user space, which might be a better solution for things
   >like softboot (and besides, it makes development a lot easier).

For in-kernel User Mode Linux might help. Jeff Dike suggested that to me
at H3rL announce time. Valid suggestion, just not the tendency of a guy
that writes an in-kernel 3-stack Forth in pure assembly and doesn't put
Perl in his distro.

Rick Hohensee


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2002-04-08  8:54 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-04-04 23:49 forth interpreter as kernel module David N. Welton
2002-04-04 23:59 ` M. Edward (Ed) Borasky
2002-04-05  0:19 ` Alan Cox
2002-04-05  2:51   ` Eric W. Biederman
2002-04-05 18:16   ` benh
2002-04-07 20:50     ` Segher Boessenkool
  -- strict thread matches above, loose matches on Subject: below --
2002-04-06  1:22 Forth " Rick A. Hohensee
2002-04-06  5:10 ` M. Edward Borasky
2002-04-07 10:05 forth " Rick A. Hohensee
2002-04-08  8:53 Forth " Rick A. Hohensee

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox