SISC for Seasoned Schemers

Scott G. Miller

Matthias Radestock

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

The source code refers to the DocBook XML source files. The object code refers to the generated HTML, PostScript, PDF, and other forms.

This documentation 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 General Public License for more details.

You should have received a copy of the GNU General Public License (in Appendix E, GNU General Public License) along with this documentation; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA


Table of Contents

1. Introduction
Features
About this document
About procedure documentation
Where to obtain this document
Version Applicability
2. Installation and Invocation
Required Environment
The Read-Eval-Print-Loop
Display Conventions
Running SISC
Command-line Switches
Configuration Parameters
Running Scheme Programs
Loading
Scheme Shell Scripts
3. Scheme Language
Types
Numbers
Characters
Symbols
Strings
Pairs and Lists
Vectors
Boxes
Parameters
Immutable types
Equivalence
Syntax and Lexical Structure
Comments
Shared Structures
Control Features
Syntactic Extension
Errors and Error Handling
Failure Continuations
Error Records
Examples
dynamic-wind
Symbolic Environments and Property Maps
Access Functions
Obtaining and Naming
Chained Symbolic Environments
Miscellaneous Functions
4. Debugging Facilities
Passive Debugging
Active Debugging
Runtime Tracing
Breakpoints
5. I/O
Ports
URLs
Buffered I/O
Character Ports
String Ports
Binary Ports and Block IO
Java Ports
Serialization
Networking
IP Addressing
Socket Operations
TCP
TLS and SSL
UDP
Multicast UDP
User Defined Ports
Miscellaneous
Pretty-Printing
Source Loading
Location Tracking
Locating Resources
File Manipulation
Class Loading
6. Threads and Concurrency
Scheme Thread Semantics
Basic Thread Operations
High-level Functions
Thread Scheduling
Synchronization Primitives
Mutex Operations
Condition Variable Operations
High-level Concurrency
7. Types and Objects
Type System
Core Procedures and Predicates
Derived Procedures and Predicates
Hooks
Standard Types
Generic Procedures
Defining Generic Procedures
Defining Methods
Invoking Generic Procedures
Procedures on Methods
Miscellaneous
Object System
Classes
Slots
Instantiation
Inheritance
8. Java Interaction
Calling Scheme from Java
Application Contexts
The SISC Heap
The Dynamic Environment
The Interpreter
Miscellaneous Features
Quick Reference
Calling Java from Scheme
Classes
Methods
Fields
Instances
Arrays
Proxies
Types and Conversions
Multi-threading
Exception Handling
Access Permissions
Common Usage
Java Reflection Interface
Classes
Constructors
Methods
Fields
Arrays
Proxies
9. Additional Libraries
Optional SISC Libraries
Definitions
Bitwise Logical Operations
Records
Hash Tables
Binary Buffers
Procedure Properties
Loadable Scheme Libraries
Operating System Interface
Third-Party Libraries
SRFIs
SLIB
Creating Libraries
10. Modules and Libraries
Modules
Overview
Style
Modularizing Existing Code
Evaluation
Libraries
require-extension
11. Extensibility
Adding Types
External Representation of Values
Equality
Serializable Values
Adding Native Bindings
Native Procedures
Fixable Native Procedures
Indexed Native Libraries
Serialization
Deserializer methods
Serializer methods
A. Errata
B. R5RS Liberties and Violations
C. Troubleshooting
Kaffe
D. Backend Details
Limits
Datastructure Limits
Symbol Uniqueness
Performance and Efficiency considerations
Math
Strings
Interrupts
E. GNU General Public License
Preamble
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
Section 0
Section 1
Section 2
Section 3
Section 4
Section 5
Section 6
Section 7
Section 8
Section 9
Section 10
NO WARRANTY Section 11
Section 12
How to Apply These Terms to Your New Programs
Index of Functions, Parameters, and Syntax

List of Tables

2.1. SISC Command line Switches
3.1. Named character literals
3.2. String escape codes
8.1. Typical Java to Scheme, External Calls
8.2. Typical Java to Scheme, Internal Calls
8.3. Common S2J Usage
D.1. SISC Limits

List of Examples

3.1. Case sensitive Symbol literals
3.2. Circular Structures
3.3. Return a new value
3.4. Restart with a different value
3.5. Propagate the error
3.6. Propagate a different error with the same error continuation
3.7. Raise a new error
3.8. Errors and dynamic-wind
5.1. User defined string ports
7.1. Hook Installation
10.1. Loading and importing with require-extension