Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #58602

Re: Forth in Javascript?

From Lars Brinkhoff <lars.spam@nocrew.org>
Newsgroups comp.lang.forth
Subject Re: Forth in Javascript?
Organization nocrew
References <29323fdc-9fb6-49c6-afd9-47b1865d1d63@googlegroups.com> <20170503035336.0ddeb1c8@_> <86lgqegxlt.fsf@molnjunk.nocrew.org> <ca42659b-75a5-41f4-8fbb-e885eb363f1d@googlegroups.com>
Date 2017-05-03 19:36 +0200
Message-ID <86a86thmgb.fsf@molnjunk.nocrew.org> (permalink)

Show all headers | View raw


Brad Eckert <hwfwguy@gmail.com> writes:
> From the repositories I looked at, they are all written in
> JavaScript. No surprise, but I'd rather see a JS kernel loading a
> bunch of Forth.  I think a bytecode interpreter implemented as a giant
> switch statement would be pretty fast.

The asm.js target in my Forth is like that.  One part of the kernel is
written in Forth, and the other part consists of primitives written in
JavaScript.  The kernel loads the rest of the system from Forth source.

Every primitive has a unique ID, which is used by a switch statement in
the inner interpreter.

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Forth in Javascript? Brad Eckert <hwfwguy@gmail.com> - 2017-05-02 20:54 -0700
  Re: Forth in Javascript? Ron Aaron <rambamist@gmail.com> - 2017-05-03 07:05 +0300
  Re: Forth in Javascript? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-03 06:54 +0200
  Re: Forth in Javascript? Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-05-03 03:53 -0400
    Re: Forth in Javascript? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-03 10:20 +0200
      Re: Forth in Javascript? Brad Eckert <hwfwguy@gmail.com> - 2017-05-03 09:55 -0700
        Re: Forth in Javascript? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-03 19:36 +0200
  Re: Forth in Javascript? JUERGEN <epldfpga@aol.com> - 2017-05-03 03:05 -0700
  Re: Forth in Javascript? crc <charles.childers@gmail.com> - 2017-05-03 10:29 -0700

csiph-web