DNW's Forth Page

Revised: July 15, 2010

Randolph Peters' short and elegant Pocket-Forth packages: Case, OO, Struct.

Strings

Structures. There have been many approaches, and the following list is certainly incomplete. John Hayes and Marcel Hendrix are prominently mentioned in these links. Common practice has disilled a simple and elegant approach that was standardized in Forth 200x in 2007.

Lists

Single/Double-Ended, Single/Double-Linked Lists is a library of ANS compatible files implementing four kinds of lists, with node-space management.

is a library of ANS compatible files implementing four kinds of lists, with node-space management. Lisp-Like Lists , ANS Forth list processing in the style of LISP, by David Sharp, Marcel Hendrix, and Krishna Myneni.

, ANS Forth list processing in the style of LISP, by David Sharp, Marcel Hendrix, and Krishna Myneni. Forth Foundation Library, by Dick van Oudheusden. It includes various list operations, and many other utilities as well.

Forth to C translation. We know of only three such translators, including our own.

Complex arithmetic and elementary functions

Links to our revisions of Julian V. Noble's complex lexicon to include OpenMath principal expressions for the inverse functions, and Kahan extended accuracy algorithms, are included on a separate page.

We also did a pfe port of JVN's lexicon, including the Kahan algorithms.

Formal correctness tests of the lexicon are based on a floating point extension of John Hayes' ANS Forth tester program called ttester .

program called . Zelefunt , a collection of programs that ports W. J. Cody's Fortran celefunt package, tests the accuracy of some of the complex functions.

, a collection of programs that ports W. J. Cody's Fortran celefunt package, tests the accuracy of some of the complex functions. Borda's mouthpiece, a Forth treatment of an example by William Kahan showing how signed zero can help calculations on branch cuts.

External modules for pfe. Besides the dynamic string and complex math modules which are part of the pfe distribution, we have written a few external modules. Among them is an experimental implementation of a 2009 proposal for IEEE floating point.

kForth in MacOS X. We did a port of Krishna Myneni's kForth to the PowerPC under MacOS X. Our main contribution was the ppc assembly language code for the virtual machine, including Forth primitives and mixed precision division subroutines, plus a number of tests.

While we still use pfe as our main Forth system, we're impressed by kForth's relatively lean design among C-based Forth's. Its byte-code threading scheme allows control structures and return stack manipulations that are normally compilation only to work also in interactive mode. And its performance on the standard four benchmarks is quite decent. We get a user time ratio of about 4.00 for kForth-fast 1.4.0 compared to gforth-fast 0.6.2 on our dual-G4 osx system, and 2.86 on a tri-i686 linux system.