sink-kernel/README.md -rw-r--r-- 3.0 KiB
1eaa72f8Amirouche wip 9 months ago


These source files collectively form a Scheme program that interprets a language that is almost, but not quite, Kernel. The program is called SINK, which is an acronym for Scheme-based Interpreter for Not-quite Kernel.

The interpreter is meant to have been written in unextended R5RS Scheme. Incidental file "subfiles/script.scm", which is not part of the interpreter proper, uses extensions in MzScheme.


This program was designed and written by John N. Shutt, copyright 2009, and is distributed under the GNU General Public License version 2 or later. Each individual source file begins with a two-line notice:

; This file is part of SINK, a Scheme-based Interpreter for Not-quite Kernel ; Copyright (c) 2009 John N. Shutt

This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.


Because the program is written in R5RS Scheme, its Kernel-error-handling facilities rely on dynamic-wind to catch errors occurring in native Scheme procedures. Unfortunately, this behavior is not actually spelled out in the R5RS, and some implementors of R5RS Scheme have seen fit not to integrate dynamic-wind gracefully with their error handling. Consequently, under some implementations of R5RS Scheme an error in a primitive (such as dividing by zero) will cause the entire SINK interpreter to abend. The program was developed under MzScheme, where dynamic-wind catches errors as expected (or at least it did, as of version 103 of MzScheme that was used during development).

Files in the home directory


This file.


A summary of the revision history of the program.


The primary source file for running SINK under Scheme interactive mode.
Loading this file creates the interpreter by loading all secondary source
files in the proper sequence, and outputs a startup message identifying
the program and giving instructions on how to run it.


An MS-DOS batch file for running SINK directly under the MS-DOS prompt,
bypassing Scheme interactive mode.


Directory containing all the secondary source files.


Directory containing miscellaneous (not-quite-)Kernel source files for
testing.  Source files that are pure Kernel have file type ".krn", those
that are not (because they use "%" instead of "#") have file type ".snk".


The GNU General Public License.