RScheme
The Implementation
Donovan Kolbly
Table of Contents
I.
User Guide
1.
Introduction
Overview
Conventions
2.
Program Structure
Lexical structure
Naming conventions
Expression Structure
3.
Data Types
Booleans
Symbols
Numbers
Characters
Strings
Functions
Collections
4.
Flow of Control
5.
Lists and pairs
Print representation
Side-effects vs. functional programming
Functions
6.
Object System
Classes
7.
Input/Output
Input port constructors
8.
String Manipulation
String operations
Character sets and tables
Regular Expressions
9.
Vectors
Vector operations
10.
Tables
Table operations
11.
Pathnames
Functions
Example usage
12.
Exception handling
Overview
Forms
Example usage
13.
The Module System and the Module Compiler
Introduction and Terminology
Organization of a Module
Compilation and its Semantics
14.
Command-Line Interface
System Argument Processing
REPL Argument Processing
15.
Compiling to C
Incorporation of object code using static linking
Incorporation of object code using dynamic linking
16.
Thread System
Thread Objects
Synchronization
High Level Programming
Thread Safe Input and Output
17.
Internet Connectivity
Server-side Procedures
18.
Debugging in RScheme
trace
-- Trace function entry and exit.
break
-- Break on function entry.
no-break
-- Remove tracing or breakpoint on a function.
abt
-- Print backtrace of function calls.
bt
-- Print continuation chain (stack).
19.
Calendar
date->string
-- Convert a date object into string format (YYYY.MM.DD)
string->date
-- Parse a date in standard format (YYYY.MM.DD) into a date object
ymd->date
-- Convert a day in separate year, month, and day to a date object.
date->ymd
-- Returns the parts of a date in the Gregorian calendar.
date+
-- Compute a new date relative to a given date.
date=?
-- Compare dates
date->time
-- Compute the time on a particular day
date->weekday
-- The day of the week on which the date falls.
date->week
-- Breaks a date into week number and day of week.
week->date
-- Compute the date for a given week and day of week.
short-weekday-name
-- Return the short (English) names for date quantities
20.
Persistent Object Store
Creating and Accessing an Object Store
Commit Records
Defining Pivot Points
Reachability-based Persistence
Functions Reference
21.
PostgresQL Interface
Initialization
Commands
Queries
Errors
Object mappings
Functions Reference
22.
HTML and HTTP
HTML
Web Server Support
Web Client Support
CGI Support
Extended Example
23.
POSIX System Call Interface
Time Functions
File Descriptor Functions
Filesystem Functions
stat
Functions
Network Functions
Miscellaneous
24.
Unix System Interface
get-env
-- Get an environment variable.
set-env
-- Set an environment variable.
reset-env
-- Replace process environment.
unset-env
-- Remove
key
from environment.
mkdir
-- Create directory
mkdirs
-- Create directories
system
-- Invoke command using sh
getrusage
-- Get process resource usage.
open-input-process*
-- Open an input process.
sleep
-- Sleep for the given amount of time.
fork
-- Fork a new process
wait
-- Wait for process completion.
wait-for
-- Wait for a particular subprocess to complete.
getpid
-- Get the current process id.
getpgrp
-- Get process group id.
getppid
-- Get parent process id.
getuid
-- Get user id.
geteuid
-- Get effective user id.
getlogin
-- Get the name of the login user.
getpw
-- Get the password entry for the given entity.
exec*
-- Transform current process into a new program.
exec
-- Exec a new program.
pipe
-- Create a pipe pair.
kill
-- Send a signal to a process.
hostname
-- Determine the hostname of the current machine.
II.
Technical Guide
A.
Obtaining RScheme
List of Tables
2-1.
Token examples
2-2.
Examples of identifiers following conventions
8-1.
Regular Expression Operators
14-1.
Command-line Interface Flags defined for the RScheme executable environment. See also the following table.
14-2.
RScheme Shell Flags
List of Figures
5-1.
List structure after side-effects.
5-2.
List after append
5-3.
List after append!
8-1.
Sample String
List of Examples
8-1.
Regular Expression Examples
11-1.
Filename Examples
12-1.
Examples using exception handlers
Next
User Guide