Warning: this is an htmlized version!
The original is here, and
the conversion rules are here.
[1] Starting RubyFORTH

At the prompt, enter:


This command calls "ruby" by default. If your interpreter is stored
as "ruby18", adjust this script.

Running the (experimental) installation script, './install.sh':

	./install.sh /usr/bin

will generate a 'rubyforth' executable in the target directory. The
script requires bash.

[2] Command line arguments

Everything following 'rubyforth' on the command line is evaluated as
Forth code. As such, one can include files (see [3]) and process data
before entering the outer interpreter.

By terminating these arguments with 'bye', RubyFORTH can be called
non-interactively from within shell scripts.

NB: The words ." and " should be escaped on the command line:

	./rubyforth .\" Welcome to RubyFORTH!\" cr

will print "Welcome to RubyFORTH" at startup.

[3] Including source

From within RubyFORTH -- or on the command line -- both Ruby and Forth modules
can be loaded.

To load Forth source, enter either of the following:

	include <filename>
	needs <filename>

replacing filename with the relevant path. 'needs' will only load
'filename' if it is not already loaded. Inclusion can be tested with:

	" <filename>" included?

-- this will leave a flag on the stack.

To load Ruby source, enter

	ruby-include <filename>

[4] Tools

Some useful RubyFORTH scripts are located in the 'tools' directory of this
distribution. If a script ends in '.rb', then include it with 'ruby-include'
-- otherwise, use 'include' or 'needs'.

[5] Semantics

For more information on the core vocabulary, please refer to the GLOSSARY

[6] Compatability

RubyFORTH is known to work with Ruby 1.8.