Some libraries written for, or converted to run in, R7RS Scheme.

Download: latest version

Requires:

R7RSlarge bitwise, comparator, hashtable, list and sort

SRFIs 27, 64 and 152 (or 13).


Tested against:

Gauche 0.9.11: https://practicalscheme.net/gauche/

Kawa 3.1.1: https://www.gnu.org/software/kawa/

Sagittarius 0.9.8: https://bitbucket.org/ktakashi/sagittariusscheme/wiki/Home

Robin
A set of libraries written by myself for R7RS Scheme.
Library Name  Description 

(robin abbrev) 
Creates a set of unambiguous abbreviations for strings (based on Ruby’s Abbrev class). 
(robin confusionmatrix) 
Supports incremental construction of a confusion matrix, and calculation of common quantitative statistics. 
(robin csv) 
Read/write csv files, according to RFC4180. 
(robin disjointset) 
Data structure to hold sets of items in disjoint sets. 
(robin simulatedannealing) 
Stochastic optimisation algorithm. 
(robin srfi64utils) 
Helper functions for SRFI 64 testing. 
(robin statistics) 
Descriptive statistical functions. 
(robin text) 
Formatting, similarity measures etc for text data. 
NLTK
A repackaging of the Natural Language ToolKit, originally written for R6RS Scheme.
Library Name  Description 

(nltk dfsa) 
Implementation of Deterministic FiniteState Automaton. 
(nltk langen) 
English stop words. 
(nltk langhr) 
Croatian stop words. 
(nltk ngrams) 
Functions for creating and working with ngrams. 
(nltk sequence) 
Support functions for generating or working with sequences. 
(nltk vectorspace) 
Data structure for vectors, supporting operations like dotproduct, cosinesimilarity, etc. 
(not cgi, as required R6RS libraries not present)
PFDS
A repackaging of Purely Functional Data Structures, originally written for R6RS Scheme.
Documentation: API
Library Name  Description 

(pfds boundedbalancetree) 
An ordered set, represented as a balanced tree. 
(pfds deque) 
Doubleended queue. 
(pfds differencelist) 
Representation of a list with constant time append to either the front or end. 
(pfds fector) 
Functional vector  from https://github.com/ijp/fectors 
(pfds fingertree) 
A generalised form of "deque". 
(pfds hasharraymappedtrie) 
Similar to a hashtable, but with more efficient space requirements. 
(pfds heap) 
An ordered set, represented as a heap. 
(pfds prioritysearchqueue) 
Supports access, insertion, removal and update on arbitrary keys, as well as easy removal of the element with the lowest priority. 
(pfds queue) 
A simple queue structure, supported addition/removal from one end. 
(pfds sequence) 
Generalpurpose, variablelength collection, with efficient addition and removal from both ends and randomaccess. 
(pfds set) 
An ordered set, implemented internally using a boundedbalance tree. 
Rebottled
A repackaging of some smaller libraries, containing a single or few files, ported from various sources.
Documentation: examples
Library Name  Description 

(rebottled clpdf) (rebottled clpdfutils) 
Port of a Common Lisp library for writing PDF files. 
(rebottled pregexp) 
Dorai Sitaram’s portable regular expressions for Scheme: https://ds26gte.github.io/pregexp/. 
(rebottled pstk) 
A schemetcltk bridge, used to create GUI programs. 
(rebottled pstkplotchart) 
Requires 'tklib', supports graph plotting. 
SLIB
SLIB is a longestablished library containing around 30,000 lines of Scheme code, working with many Scheme implementations. The version here repackages as much of SLIB (version 3b5) as possible into reusable R7RS libraries, and includes many tests and examples.
All libraries are imported as (import (slib NAME))
in place of (require
'NAME)
, and function/variable names are preserved in most cases, so the
original documentation can still be used. (The README accompanying the source
code describes the changes in more detail.)
Library Name  Description 

(slib alisttable) 
Database tables using association lists. 
(slib alist) 
Functions to treat a list of keyvalue pairs as an associative database. 
(slib arrayforeach) 
Applicative routines for arrays. 
(slib arrayinterpolate) 
Interpolate array access. 
(slib bytenumber) 
Byte integer and IEEE floatingpoint conversions. 
(slib byte) 
Arrays of small integers. 
(slib chapterorder) 
Chapter ordering of strings. 
(slib charplot) 
Plotting on character devices. 
(slib coerce) 
Implementation of commonlisp coerce and typeof. 
(slib collect) 
Collection operations. 
(slib colornames) 
Colour name databases. 
(slib colorspace) 
Colour space conversions. 
(slib color) 
Colour data type. 
(slib commonlisptime) 
Common lisp time conversion routines. 
(slib commonlistfunctions) 
Some common lisp list functions. 
(slib common) 
Common functions, usually defined in slib’s init file. 
(slib commutativering) 
Extends Scheme numerics to any commutative ring. 
(slib crc) 
Compute cycle checksums. 
(slib databasebrowse) 
Relational database browser. 
(slib databasecommands) 
Embed commands in a relational database. 
(slib databaseinterpolate) 
Interpolate function from database table. 
(slib databases) 
Relational database utilities. 
(slib daylight) 
Model of sun and sky colours. 
(slib dbhtml) 
Convert relational databse to hyperlinked pages. 
(slib determinant) 
Matrix algebra. 
(slib diff) 
Sequence comparison algorithm. 
(slib directory) 
Directories. 
(slib dynamic) 
Dynamic datatype. 
(slib epsgraph) 
Create postscript graphs. 
(slib factor) 
Factorisation, prime test and generation. 
(slib filename) 
String matching for filenames (like bash). 
(slib format) 
Common lisp text output formatter. 
(slib fouriertransform) 
Discrete Fourier transform. 
(slib genericwrite) 
Used by prettyprint and truncatedprint. 
(slib getoptparameters) 
Convert getopt to passing parameters by name. 
(slib getopt) 
POSIX command argument processing. 
(slib hash) 
Hashing functions. 
(slib hilbertfill) 
Hilbert spacefilling mapping. 
(slib htmlforeach) 
HTML scan calls procedures for word, tag, whitespace and newline. 
(slib htmlform) 
Generate HTML2.0 forms. 
(slib http) 
Service HTTP or CGI requests. 
(slib limit) 
Oneside limit algorithm. 
(slib lineio) 
Line oriented input/output functions. 
(slib mathinteger) 
Mathematical functions restricted to exact integers. 
(slib mathreal) 
Mathematical functions restricted to real numbers. 
(slib metricunits) 
Implements "Representation of numerical values and SI units in character strings for information interchanges"  http://people.csail.mit.edu/jaffer/MIXF 
(slib minimize) 
Finds minimum f(x) for x_{0} ⇐ x ⇐ x_{1} 
(slib modular) 
Modular fixnum arithmetic. 
(slib nbsiscc) 
NBS/ISCC Colour System. 
(slib ncbidna) 
Read and manipulate NCBIformat nucleotide sequences. 
(slib objectstring) 
Write objects to a string. 
(slib object) 
Macroless object system. 
(slib parameters) 
Passing parameters by name. 
(slib peanofill) 
Peano spacefilling mapping. 
(slib pnm) 
Read and write PNM image files. 
(slib posixtime) 
POSIX timeconversion routines. 
(slib pprintfile) 
Prettyprint a Scheme file. 
(slib precedenceparse) 
Dynamically extensible parser/tokeniser. 
(slib prettyprint) 
Prettyprint scheme values. 
(slib printf) 
Implementation of standard C function. 
(slib priorityqueue) 
Priority queue data structure. 
(slib queue) 
Queue/stack data structure. 
(slib randominexact) 
Pseudorandom inexact real numbers. 
(slib rationalize) 
Find simplest number ratios. 
(slib readcommand) 
Break commandline into arguments. 
(slib relationaldatabase) 
Relationaldatabase system. 
(slib resene) 
Resene RGB values list. 
(slib rev2procedures) 
Some procedures from R2RS. 
(slib root) 
Newton’s and Laguerre’s methods for finding roots. 
(slib saturate) 
SaturatedColours dictionary. 
(slib scanf) 
Implementation of formatted input. 
(slib schmooz) 
Program for extracting texinfo commends from Scheme. 
(slib sierpinski) 
Hash function for 2D data which preserves nearness. 
(slib solid) 
Solid modelling with VRML97. 
(slib soundex) 
Original soundex algorithm. 
(slib spacefilling) 
Spacefilling functions and their inverses. 
(slib stringcase) 
String casing functions. 
(slib stringport) 
String ports. 
(slib stringsearch) 
Search for string from port. 
(slib subarray) 
Array accessory procedures. 
(slib timecore) 
Core time conversion routines. 
(slib timezone) 
Compute timezones and DST from TZ environment variable. 
(slib topologicalsort) 
Topological sort. 
(slib transact) 
Interface to programs. 
(slib tree) 
Implementation of common lisp tree functions. 
(slib tzfile) 
Read sysV style (binary) timezone file. 
(slib uri) 
Construct and decode Uniform Resource Identifiers. 
(slib withindatabase) 
Syntactic extensions for RDMS. 
(slib wttree) 
Weight balanced trees. 
(slib xmlparse) 
XML parsing and conversion to SXML. 
(slib yasos) 
Yet Another Scheme Object System. 
SRFI
Library Name  Description 

(srfi 63) 
Homogeneous and Heterogeneous Arrays 
(srfi 210) 
Procedures and syntax for multiple values. 
Kawa
The following libraries are provided specifically for Kawa. These are in part needed to support the remaining libraries, but also improve support for R7RSlarge.
Library Name  Description 

(scheme bitwise) 
Bitwise operations. 
(scheme box) 
Boxes. 
(scheme charset) 
Characterset library. 
(scheme comparator) 
Comparators (reduced). 
(scheme division) 
Integer division. 
(scheme hashtable) 
Intermediate hash tables. 
(scheme ideque) 
Immutable deques. 
(scheme ilist) 
Immutable list library. 
(scheme list) 
List library. 
(scheme listqueue) 
Queues based on lists. 
(scheme rlist) 
Purelyfunctional randomaccess lists and pairs. 
(scheme set) 
Sets and bags. 
(scheme sort) 
Sort libraries. 
(scheme stream) 
Streams. 
(scheme vector) 
Vector library. 
(srfi 27) 
Sources of random bits 
(srfi 31) 
A special form 
(srfi 152) 
String library (reduced) 
(srfi 195) 
Multiplevalue boxes 
Sagittarius
The following libraries are provided specifically for Sagittarius.
Library Name  Description 

(srfi 195) 
Multiplevalue boxes 