V15.01 News (8 January 2015)

Now unable to build 32-bit version on 64-bit system. This problem surfaced only after updating my workstation to Linux Mint 17.1, which happened to involve installing a new version of gcc. It should still be possible to build a 32-bit version on a 32-bit system.

Note that this experience confirms the move to using tcc and musl instead of gcc/glibc was the right thing to do.

Unix SPITBOL 15.01 (Jan 2015)

This version adds support for x86-64, so that both 32-bit and 64-bit versions of Spitbol are now available.

Downloads in the traditional form are no longer directly supported, since both "Google Code" and "Github" no longer provide downloads built by the project.

Spitbol is now available only from its home at github.com/hardbol/spitbol. If you wish to use git to work with the probject, use:
$ git clone http://github.com/hardbol/spitbol

If you just want to use the system, then select "Download ZIP" from the project home page, and extract the files from that.

The binaries for 32-bit and 64-bit versions can be found in ./bin/spitbol.m32 and ./bin/spitbol.m64, respectively.

This 64-bit version is built by default, as 32-bit processors are no longer widely used.

Three tools are needed to build Spitbol:

  1. A C compiler
  2. A C runtime library
  3. An assembler

Previous versions used gcc and glibc for the compiler and runtime support, and the nasm assembler.

This version uses tcc for the compiler, musl for the runtime support, and continues the use of nasm.

The make file makefile now uses tcc and musl to build (only) the 64-bit version. To build the 32-bit version and/or to use gcc, use makefile.gcc.

This version rescinds the support for Unicode added in version 13.05. (This caused enough problems that it was deemed best to abandon this experiment.)

Known problems

Unix SPITBOl 13.05 (May 2013)

This version includes versions of SPITBOL for both ASCII (8-bit characters) and Unicode (32-bit characters). The binaries can be found in ./bin/spitbol and ./bin/uspitbol, respectively.

Unicode SPITBOL

The Unicode version of SPITBOL (uspitbol) uses 32-bit characters internally. Character strings are converted from UTF-8 encoding to 32-bit characters when input from the command line, the operating system environment, a pipe, or a file opened in line mode. Character strings are converted from 32-bit characters 8-bit characters in UTF-8 format when written to a file opened in line mode, a pipe, or when passed as an argument to an operating system procedure.

Program source files, which are read by SPITBOL in line mode, may thus contain UTF-8 format Unicode characters in strings and comments. Identifiers are still restricted to ASCII.

Use the following command to build the Unicode version:

$ make UNICODE=1

Overview

SPITBOL is an extremely high performance implementation of the SNOBOL4 language.

It is maintained by Dave Shields (thedaveshields at gmail dot com).

Source files, development versions, as well as other files of interest, can be found at github.com/hardbol/spitbol.

Downloads are available from http://code.google.com/p/spitbol/downloads/list

Licensing

SPITBOL is licensed with the GPLv2 (or later) license.

COPYING contains a copy of the GPLv2 license.

COPYING-SAVE-FILE describes licensing issues for a SPITBOL "save file."

COPYING-LOAD-MODULES describes licensing issues for a SPITBOL "load module."

Known Problems and Limitations

Load modules are not supported.

Loading of external functions is not supported.

Installing SPITBOL

If you just want to use spitbol without building it, the file ./bin/spitbol contains a statically-linked copy of the 8-bit version of spitbol.

You can install it in /usr/local/bin/spitbol with the command:

$ sudo make install

Building SPITBOL

You should be able to build SPITBOL on most Unix systems with a processor that implements the x86-32 or x86-64 architecture.

The development work and testing was done using the 32-bit version of linux mint, a variant of Ubuntu.

You need the gcc compiler, make, and the netwide assembler, nasm, to build the system. You can install nasm with:

$ sudo apt-get install nasm

The file ./bin/spitbol is the base version of Spitbol that is used to build the system.

To see if spitbol is working, try the "hello world" program:

$ ./bin/spitbol test/hi.spt

To build the system:

$ make clean
$ make

This should produce the file spitbol. You can test it with the "hello world" program:

$ ./spitbol test/hi.spt

Directory demos contains some demonstration programs.
Directory test contains some small test programs.

To test the system more comprehensively, do:

$ ./test/sanity-test
which verifies that the version of SPITBOL just built is able to translate itself. This test passes if the diff outputs are null.

NEVER replace the file ./bin/spitbol with a newly built spitbol unless you have run the sanity test.

By default, the spitbol binary is linked statically. To get a dynamically-linked version, do:

$ make
$ rm spitbol
$ make spitbol-dynamic

Use the command:

$ make install
to install spitbol in /usr/local/bin.

This version of SPITBOL was built using a 32-bit version of Unix. If you are running a 64-bit system, then you may get compile errors when you try to build the system, in which case you need to install the 32-bit runtime libraries.

You can do this on Mint (and also Ubuntu) with:

$ sudo apt-get install ia32-libs
or, if that doesn't work, try:
$ sudo apt-get install ia32-libs-multiarch

Files

The SPITBOL implementation includes the following files:

Notes

This version contains code supporting both 32 and 64 bit implementations of SPITBOL. Only the 32-bit version is complete. The 64-bit version is able to compile lex and asm, but fails compiling the error message processor.

You can build the 64-bit version, on a 64-bit system, with:

$ make ARCH=X32_64

Documentation

The ./docs directory contains:

The SPITBOL project notes with sadness the death of Ed Quillen in June, 2012. To quote from Mark Emmer's Acknowledgments in the SPITBOL Manual:

Ed Quillen, local novelist, political columnist, and SNOBOL enthusiast, co-authored this manual. He combined various terse SPITBOL documents from other systems with Catspaw's SNOBOL4+ manual, while providing more complete explanations of some concepts. Any observed clarity is this manual is due to Ed, while the more opaque portions can be blamed on me.

You can learn more about Ed at Ed's web site and Denver Post columnist Ed Quillen dies at age 61 in his Salida home.

Resources

Mark Emmer's SNOBOL4 site: snobol4.com

Phil Bunde's SNOBOL site: snobol4.org

Release History

Unix SPITBOL 13.01 (January 2013)

This version completes the initial port to Linux. Currently only Intel 32-bit (X32) architecture is supported. There are files for building a 64-bit version, but this version is not able to compile itself.