knowledge-database (beta)

Current group: comp.lang.forth

Forth interpreter, written in JavaScript

Forth interpreter, written in JavaScript  
CaffeineJunkie
 Re: Forth interpreter, written in JavaScript  
Guy Macon
From:CaffeineJunkie
Subject:Forth interpreter, written in JavaScript
Date:Wed, 19 Jan 2005 17:09:08 +0100
* reposted because of flaky formatting *

Hi,
I've been doing a bit of work towards implementing a
Forth interpreter in Javascript. While this is surely
not the ideal choice of language for a Forth interpreter,
it is still useful for linking to online Forth primers
and tutorials, allowing to start the interpreter with
a mouse click, causing the web browser to download and
execute it on users' machine, providing an immediate
opportunity to try out and toy around with Forth. No
need to install a Forth interpreter locally.

This interpreter is in very early state, incomplete and
buggy, but showing signs of life. Work on it started 4
days ago; this was also the first authors's exposure to
Javascript.

More information, including links to source and launcher
can be found here:
http://forthfreak.net/wiki/index.cgi?ForthInJavaScript.
A list of what works, and what doesn't, can be found
there too.

Currently, the interpreter requires Firefox, Mozilla
or Netscape to run. Opera and Internet Explorer don't -
the key event handler doesn't see entered keystrokes.
Konqueror works somewhat: cursor- and output position
do not match. Other browsers haven't been tested.

The interpreter is distributed under the Gnu Public
License, and most kinds of input would be welcome.
The best place to comment on the interpreter would
probably be the Forthfreak wiki link to
ForthInJavaScriptComments, or, with full url, http://forthfreak.net/wiki/index.cgi?ForthInJavaScriptComments.
Thank you for your attention.
From:Guy Macon
Subject:Re: Forth interpreter, written in JavaScript
Date:Fri, 21 Jan 2005 12:37:33 +0000

I have been playing with it at
http://forthfreak.net/JS-Forth.html and
http://forthfreak.net/wiki/index.cgi?ForthInJavaScript

Interesting start, needs a bit of work.

Wouldn't it be cool if somebody (wink wink nudge nudge)
would put up a full-featured Forth that any of us could
make part of our web pages? Letting the user run it as
was done at the URL above is cool, but how about making
a version that lets you do Javascriptish webby things
by writing programs in Forth and putting the code in
your HTML? Would that be cool or what? 31337! :)

BTW, I just put a copy of it in alt.binaries.emulators

--
Guy Macon
   

Copyright © 2006 knowledge-database   -   All rights reserved