Archive: forth/utilities

Up to parent directory

primes
primes.fs 30Nov04 13:37:08EST 3.3K A commented version of Eratosthenes' sieve, designed for viewing primes in a range.
byteprimes.fs 30Nov04 13:36:19EST 3.9K The Gilbreath, Byte Magazine version of the above.

ttester
ttester.fs Anton Ertl's ttester.fs extends the original Hayes tester to floating point, including some ideas from ftester-old.fs, and adds support for an integrated floating point stack. Tests preserve initial stacks. It works on ANS Forth systems with or without floating point, and with or without an integrated stack. Consult the gforth CVS link at left for history and probably the newest version.
ttester-xf.fs 12Jan12 15:19:20EST 18K A revision of ttester restricted to a separate floating-point stack. With some restrictions on the words used, it remains compatible with ttester. It does overflow checking for initial, resultant, and goal stack storage, with configurable limits. Error reporting and approximate equality continue to be vectorized, as with ttester, but with independent error reporting for the two stacks.
xftester.fs
xtester.fs
ftester.fs
31Jan11 14:28:42EST
05Feb11 08:19:25EST
05Feb11 08:21:02EST
9.0K
6.2K
12K
These three files are functionally identical to ttester-xf.fs, with xftester.fs a short driver that loads the independent components, xtester.fs and ftester.fs, which test the data and floating-point stacks.
ttester-xfarray-test.fs 05Feb11 12:42:10EST 6.9K Test file for the array factors in the xtester and ftester modules used by ttester-xf.fs. Uses ttester.fs, and loads ttester-xf.fs, xtester.fs, and ftester.fs.
ttester-xf-test.fs 01Feb11 09:44:54EST 12K Test file for ttester-xf.fs that uses ttester-xf.fs itself.
tester-display.fs 20Feb12 08:12:22EST 3.9K Krishna Myneni's ANSI color terminal support for ttester, ttester-xf, and other test files, with printing words conditional on VERBOSE.
xtester-errors.fs
ftester-errors.fs
12Jan12 15:19:20EST
12Jan12 15:18:35EST
1.6K
1.7K
Enhanced error reporting for tests that use xtester or ftester. Both require tester-display.fs.
ttester-xf.zip 28Feb11 13:45:57EST 34K Both the consolidated and separated ttester-xf and xftester testers and components, their tests, and the display and enhanced error files needed to run their tests.

floating point
fslflocals.fs 30Nov04 13:36:37EST 2.2K FSL floating point locals with an alignment fix.
fatan2-test.fs 27Mar09 10:07:32EDT 4.8K Tests whether FATAN2 returns the principal angle, including the ISO C / Special UNIX 3 specification for signed zero, signed infinity, and NaN inputs. Requires ttester.fs
ieee-fprox-test.fs 01Jul09 08:41:48EDT 9.0K Tests whether F~ meets the proposed Forth 200x, IEEE-FP specification for signed zero, infinity, and nan arguments. Requires ttester.fs
ieee-arith-test.fs 02Oct09 18:23:48EDT 7.3K Tests whether basic floating-point arithmetic, except for F*+, meets the proposed Forth 200x, IEEE-FP specification for special arguments. Requires ttester.fs
fnextup.fs 28Jul09 10:49:56EDT 5.7K Contains a reference implementation of the proposed Forth 200x, IEEE-FP FNEXTUP for double precision, due to Andrew Haley. Requires rawfloat.fs, and includes tests that require mixfloat.fs and ttester.fs
fulps.fs 28Jul09 10:50:07EDT 1.7K Compute error in units of reference value ulps. Uses rawfloat.fs and the same FNEXTUP as fnextup.fs. Only for doubles.
ftester-old.fs 07Nov10 10:03:09EST 5.8K John R. Hayes' tester.fr extended to include a separate floating point stack, with a treatment of approximate equality inspired by Dirk Zoller's float.4th (05Aug93). This has been superceded by ttester.fs and the ftester component of ttester-xf.fs.
dztest-float.fs 30Nov04 13:36:35EST 7.2K Dirk Zoller's float tests rewritten for ftester-old.fs.
mixfloat.fs
mixfloat-test.fs
23Dec10 08:20:04EST
25Jul09 09:11:44EDT
37K
28K
Convert among IEEE 754-2008 mixed hex/decimal, radix 2 power strings, raw32, raw64, raw80, and raw128 floating-point encodings on the data stack (corresponding to IEEE interchange formats), raw 8-, 16-, 20-, and 32-digit hex strings, and default floats on the floating-point stack. Also store/fetch the raw formats to memory. Works for both big- and little-endian systems, and with or without a separate fp stack. The test program requires ttester.fs.
rawfloat.fs
rawfloat-test.fs
01Aug09 10:09:01EDT
31Jul09 15:24:47EDT
11K
5.0K
A small sublibrary of mixfloat.fs which makes the bits of floating-point encodings portably accessible. It converts between raw32, raw64, raw80, and raw128 encodings on the data stack (corresponding to IEEE interchange formats), and default floats on the fp stack. Also stores/fetches the raw formats to/from system memory formats. Works for big- and little-endian systems. The test program requires ttester.fs.
rawhex.fs
rawhex-test.fs
29Jul09 08:12:30EDT
25Jul09 08:42:23EDT
10K
3.6K
A small sublibrary of mixfloat.fs which converts between raw floating-point hex strings and raw32, raw64, raw80, and raw128 data-stack formats. The test program requires ttester.fs.
hexfloat.fs 23Jul09 08:13:07EDT 36K Replaced by mixfloat.fs. Soon to disappear.
hexfloat-test.fs 23Jul09 08:22:28EDT 28K Replaced by mixfloat-test.fs. Soon to disappear.
rawhex2float.fs 15Mar09 08:21:22EDT 3.2K Convert a raw float hex string to an ANS Forth default float.
plainfarray.fs 08Jun07 17:56:43EDT 4.8K Plain floating point arrays for ANS Forth default floats, with some variation from FSL conventions. The words work with or without a separate float stack.

structures
plainstruct.fs
plainstruct-test.fs
09Jul10 12:29:16EDT
04Aug10 10:41:29EDT
5.1K
9.1K
Structure words, including most of those in the Forth 200x standard. Includes optional explicit (not state smart) early binding. Formerly named plainstruct-200x.fs. Tests require ttester.fs.
qdstruct.fs 30Nov04 13:37:14EST 3.1K Quick and dirty structures.
qdstruct-pfe.fs 30Nov04 13:37:12EST 2.0K Nonstandard word and string fields for quick and dirty structures.
namedstruct.fs 28Aug10 09:51:34EDT 6.8K Named structures with reusable field and method names.
qdnamstruct.fs 30Nov04 13:37:10EST 4.3K Quick and dirty structures with reusable member names.

modules
modules.fs
modular-forth.lyx
modular-forth.pdf
A modules library compatible with Forth 200x, by Krishna Myneni and David N. Williams. The literate programming source is modular-forth.lyx, and modules.fs and modular-forth.pdf are the generated Forth source and documentation.
modules-test.fs 16Feb12 20:02:51EST 8.7K Tests for modules.fs. They require otester.fs and ttester-xf.fs, plus tester display and error support files.
modules-test.zip 16Feb12 20:02:55EST 182K All of the above, plus all files needed to run the tests.

search order
order.fs
order-test.fs
16Feb12 20:02:28EST
16Feb12 20:02:28EST
3.5K
2.7K
A small extension library based on the Search-Order word set, an anthology of words discussed in comp.lang.forth which emphasizes the role of the search order as a stack. The tests require otester.fs, ttester-xf.fs, and display support files.
otester.fs
otester-errors.fs
otester-test.fs
16Feb12 20:02:30EST
16Feb12 20:02:29EST
16Feb12 20:02:29EST
7.2K
1.4K
4.8K
Hayes-style tester and enhanced error display support for the search order considered as another stack, plus a tester for the tester.
order.zip 16Feb12 20:02:29EST 20K All of the above, plus support files needed to run the tests.

miscellaneous
tester.fs 04Sep06 10:14:02EDT 1.6K John R. Hayes' tester.fr.
testerplus.fs 04Sep06 10:09:00EDT 2.4K The above file modifed to include Krishna Myneni's color-coded commenting and a count of errors. This is being phased out in favor of ttester-xf.fs plus its enhanced display support files.
recurse-test.fs 19Mar10 11:15:25EDT 5.7K Tests for RECURSE using examples supplied by Bill Muench. Requires ttester.fs
undef.fs 30Nov04 13:37:26EST 729 ANS Forth bootstrap for [UNDEFINED].
lfinput.fs 28Aug06 06:38:40EDT 9.1K Line file parsing analogous to the input stream. Needs either parsing.fs or our pfe external parsing library.
lfinput-test.fs
lftest1.txt
lftest2.txt
04Aug10 10:21:39EDT
02Aug06 12:18:11EDT
02Aug06 12:08:05EDT
2.4K
107
107
Rudimentary tests for lfinput.fs.
AAma-count.fs 26Apr09 09:33:24EDT 4.5K This utility counts the basic kinds of lines in text source files for Martinus Veltman's Ann Arbor macro assembler, and accumulates totals for successive files. It uses lfinput.fs and part of the mstrings library collection.
aelocals-xl.fs 29Aug08 08:46:46EDT 2.0K Two modifications of Anton Ertl's anslocal.fs that work across lines. Needs parsing.fs and dstrings.fs.
xstacks.fs 25Oct09 09:50:27EDT 8.9K An ANS Forth implementation of the "basic" xstack words in the pfe xstacks loadable module, and of the xstack defining words in xstacks-pfe.fs
xstacks-test.fs 20Dec06 21:16:29EST 5.6K Hayes-type tests for xstacks.fs, with a switch for the pfe implementation of the basic xstacks words. Needs twx.fs
twx.fs 09Sep06 13:41:45EDT 3.5K John Hayes' Forth testing words modified to work with xstacks.
qdexeca-pfe.fs 24Dec04 13:00:02EST 2.1K Defining words for execution arrays, based on pfe primitives in execution-ext.c
sudoku.fs 18Nov05 15:02:14EST 14K Robert Spykerman's Sudoku puzzle solver enhanced to input a full puzzle from the command line or a file.
copyinput.fs 30Nov04 13:36:21EST 5.2K Words to save the input stream across lines up to a terminating string so it can be processed later. Includes a word for extending structures.
sarray.fs 30Mar07 13:03:21EDT 3.4K ANS Forth string arrays.
dstring-array.fs 30Mar07 10:35:29EDT 3.6K Dynamic string arrays.
mkindexfile.fs 08Nov06 17:37:46EST 11K Write a index.html file for this archive from user input.
logs/

Up to top of archive

Files in this directory under the GNU LGPL typically have a POLITENESS request.