News: Recent changes
Features
The Kawa Community
Getting and installing Kawa
Kawa Scheme Tutorial
Reference Documentation
Usage Reference (running Kawa)
Syntax
Program structure
Multiple values
Symbols and namespaces
Procedures
Numbers
Characters and text
Data structures
Eval and Environments
Debugging
Input, output, files
Types
Object, Classes and Modules
Working with XML and HTML
Miscellaneous topics
Frequently Asked Questions
The Kawa language framework
License
Index
Table of Contents
Part . Reference Documentation
Table of Contents
5. Usage Reference (running Kawa)
5.1. Command-line arguments
5.1.1. Argument processing
5.1.2. General options
5.1.3. Options for language selection
5.1.4. Options for warnings and errors
5.1.5. Options for setting variables
5.1.6. Options for controlling output formatting
5.1.7. Options for compiling and optimizing
5.1.8. Options for debugging
5.1.9. Options for web servers
5.1.10. Options for the JVM
5.2. Running Command Scripts
5.2.1. Setting kawa options in the script
5.2.2. Other ways to pass options using meta-arg or –script
5.2.3. Scripts for compiled code
5.3. Running a Command Interpreter in a new Window
5.4. Exiting Kawa
5.5. Compiling to byte-code
5.5.1. Compiling to a set of .class files
5.5.2. Compiling to an archive file
5.5.3. Compiling using Ant
5.5.4. Compiling to a standalone application
5.5.5. Compiling to an applet
5.5.6. Compiling to a native executable
6. Syntax
6.1. Notation
6.2. Lexical and datum syntax
6.3. Lexical syntax
6.3.1. Formal account
6.3.2. Line endings
6.3.3. Whitespace and comments
6.3.4. Identifiers
6.3.5. Numbers
6.4. Datum syntax
6.4.1. Datum labels
6.4.2. Abbreviations
6.5. Hash-prefixed forms
6.6. Primitive expression syntax
6.6.1. Literal expressions
6.6.2. Variable references
6.6.3. Procedure calls
6.7. Property access using colon notation
6.7.1. Part lookup rules
6.7.2. Specific cases
6.7.2.1. Invoking methods
6.7.2.2. Accessing fields
6.7.2.3. Type literal
6.7.2.4. Type cast
6.7.2.5. Type test
6.7.2.6. New object construction
6.7.2.7. Getting array length
6.8. Programs and Bodies
6.9. Syntax and conditional compilation
6.10. Macros
6.10.1. Pattern language
6.10.2. Identifier predicates
6.10.3. Syntax-object and datum conversions
6.10.4. Signaling errors in macro transformers
6.10.5. Convenience forms
6.11. Named quasi-literals
7. Program structure
7.1. Boolean values
7.2. Conditionals
7.3. Definitions
7.4. Local binding constructs
7.5. Lazy evaluation
7.5.1. Delayed evaluation
7.5.2. Implicit forcing
7.5.3. Blank promises
7.5.4. Lazy and eager types
7.6. Threads
7.7. Exception handling
7.7.1. Simple error objects
7.7.2. Named exceptions
7.7.3. Native exception handling
8. Multiple values
9. Symbols and namespaces
9.1. Simple symbols
9.2. Namespaces and compound symbols
9.2.1. Namespace objects
9.2.2. Compound symbols
9.2.3. Namespace aliases
9.3. Keywords
9.4. Special named constants
10. Procedures
10.1. Procedure properties
10.1.1. Standard properties
10.2. Generic (dynamically overloaded) procedures
10.3. Extended Formal Arguments List
10.4. Partial application
11. Numbers
11.1. Arithmetic operations
11.2. Numerical input and output
11.3. Quaternions
11.3.1. The
(kawa quaternions)
module
11.3.2. The
(kawa rotations)
module
11.3.2.1. Rotation Representation Conversions
11.3.2.2. Rotation Operations
11.4. Quantities and Units
11.5. Logical Number Operations
11.5.1. SRFI-60 Logical Number Operations
11.5.2. Deprecated Logical Number Operations
11.6. Performance of numeric operations
12. Characters and text
12.1. Characters
12.2. Character sets
12.3. Strings
12.3.1. Basic string procedures
12.3.2. String Comparisons
12.3.3. String Conversions
12.3.4. String Cursor API
12.4. String literals
12.4.1. Simple string literals
12.4.2. String templates
12.4.2.1. Special characters
12.4.2.2. Multiline string literals
12.4.2.3. Embedded expressions
12.4.2.4. Formatting
12.5. Unicode character classes and conversions
12.5.1. Characters
12.5.2. Deprecated in-place case modification
12.6. Regular expressions
12.6.1. Java regular expressions
12.6.2. Portable Scheme regular expressions
13. Data structures
13.1. Sequences
13.2. Lists
13.2.1. SRFI-1 list library
13.2.2. SRFI-101 Purely Functional Random-Access Pairs and Lists
13.3. Vectors
13.4. Uniform vectors
13.4.1. Relationship with Java arrays
13.5. Bytevectors
13.6. Streams - lazy lists
13.7. Multi-dimensional Arrays
13.8. Hash tables
13.8.1. R6RS hash tables
13.8.1.1. Procedures
13.8.1.2. Inspection
13.8.1.3. Hash functions
13.8.2. SRFI-69 hash tables
13.8.2.1. Type constructors and predicate
13.8.2.2. Reflective queries
13.8.2.3. Dealing with single elements
13.8.2.4. Dealing with the whole contents
13.8.2.5. Hash functions
14. Eval and Environments
14.1. Locations
14.2. Parameter objects
15. Debugging
16. Input, output, files
16.1. Named output formats
16.2. Paths - file name, URLs, and URIs
16.2.1. Extracting Path components
16.3. File System Interface
16.4. Reading and writing whole files
16.4.1. Reading a file
16.4.2. Blobs
16.4.3. Writing to a file
16.4.4. Functions
16.5. Ports
16.5.1. String and bytevector ports
16.5.2. Input
16.5.3. Output
16.5.4. Line numbers and other input port properties
16.5.5. Miscellaeous
16.6. Formatted Output (Common-Lisp-style)
16.6.1. Implemented CL Format Control Directives
16.6.2. Formatting Integers
16.6.3. Formatting real numbers
16.6.4. Miscellaneous formatting operators
16.6.5. Unimplemented CL Format Control Directives
16.6.6. Extended, Replaced and Additional Control Directives
16.7. Resources
17. Types
17.1. Standard Types
17.2. Parameterized Types
17.3. Type tests and conversions
18. Object, Classes and Modules
18.1. Defining new classes
18.1.1. General class properties
18.1.2. Declaring fields
18.1.3. Declaring methods
18.1.4. Example
18.1.5. Synchronized methods
18.2. Anonymous classes
18.2.1. Lambda as shorthand for anonymous class
18.3. Enumeration types
18.4. Annotations of declarations
18.5. Modules and how they are compiled to classes
18.5.1. Name visibility
18.5.2. R7RS explicit library modules
18.5.3. How a module becomes a class
18.5.4. Static vs non-static modules
18.5.5. Module options
18.6. Importing from a library
18.6.1. Searching for modules
18.6.2. Searching for source files
18.6.3. Builtin libraries
18.6.4. Importing from a plain class
18.7. Record types
18.8. Creating New Record Types On-the-fly
18.9. Calling Java methods from Scheme
18.9.1. Calling static methods using colon notation
18.9.2. Calling instance methods using colon notation
18.9.3. Method names
18.9.4. Invoking a method with the
invoke
function
18.9.5. Using a namespace prefix
18.10. Allocating objects
18.11. Accessing object fields
18.11.1. Accessing static fields and properties
18.11.2. Accessing instance fields and properties
18.11.3. Using field and static-field methods
18.11.4. Older colon-dot notation
18.12. Mapping Scheme names to Java names
18.13. Scheme types in Java
18.14. Using Java Arrays
18.14.1. Creating new Java arrays
18.14.2. Accessing Java array elements
18.14.3. Old low-level array macros
18.15. Loading Java functions into Scheme
18.16. Evaluating Scheme expressions from Java
18.16.1. Using
javax.script
portable Java scripting
19. Working with XML and HTML
19.1. Formatting XML
19.2. Creating HTML nodes
19.3. Creating XML nodes
19.4. XML literals
19.4.1. Element constructors
19.4.2. Elements contents (children)
19.4.3. Attributes
19.4.4. QNames and namespaces
19.4.5. Other XML types
19.4.5.1. Processing instructions
19.4.5.2. XML comments
19.4.5.3. CDATA sections
19.5. Web page scripts
19.6. Self-configuring web page scripts
19.6.1. Using the OpenJDK built-in web server
19.6.2. Using a servlet container
19.6.3. Finding a matching script
19.6.4. Determining script language
19.6.5. Compilation and caching
19.7. Installing web page scripts as Servlets
19.7.1. Creating a web application
19.7.2. Compiling a web page script to a servlet
19.7.3. Installing a servlet under Tomcat
19.7.4. Installing a servlet under Glassfish
19.7.5. Servlet-specific script functions
19.8. Installing Kawa programs as CGI scripts
19.9. Functions for accessing HTTP requests
19.9.1. Request URL components
19.9.2. Request parameters
19.9.3. Request headers
19.9.4. Request body
19.9.5. Request IP addresses and ports
19.9.6. Miscellaneous request properties
19.10. Generating HTTP responses
19.11. Using non-Scheme languages for XML/HTML
19.11.1. XQuery language
19.11.2. XSL transformations
19.11.3. KRL - The Kawa Report Language for generating XML/HTML
19.11.4. Differences between KRL and BRL
20. Miscellaneous topics
20.1. Building JavaFX applications
20.1.1. Using JavaFX with JDK 7
20.2. Building for Android
20.2.1. Downloading and setting up the Android SDK
20.2.2. Building Kawa for Android
20.2.3. Creating the application
20.2.4. Running the application on the Android emulator
20.2.5. Running the application on your device
20.2.6. Some debugging notes
20.2.7. Other resources
20.3. Android view construction
20.3.1. View object allocation
20.3.2. Event handlers
20.4. System inquiry
20.5. Processes
20.5.1. Creating a process
20.5.2. Process literals
20.5.3. Process values and process output
20.5.4. Substitution and tokenization
20.5.5. Input/output redirection
20.5.6. Pipe-lines
20.5.7. Setting the process environment
20.5.8. Waiting for process exit
20.5.9. Exiting the current process
20.5.10. Deprecated functions
20.6. Time-related functions
20.7. Deprecated low-level functions
20.7.1. Low-level Method invocation
20.7.2. Low-level field operations
20.7.3. Old low-level array macros
21. Frequently Asked Questions
22. The Kawa language framework
23. License
23.1. License for the Kawa software
23.2. License for the Kawa manual
Index
Index