Table of Contents
Tutorial
News: Recent changes
The Kawa Scheme language
Getting and installing Kawa
Usage Reference
Features
Syntax
Multiple values
Symbols and namespaces
Procedures
Numbers
Characters and text
Data structures
Exception handling
Eval and Environments
Debugging
Program structure
Miscellaneous
Input, output, files
Types
Object, Classes and Modules
Working with XML and HTML
Special topics
The Kawa language framework
Frequently Asked Questions
The Kawa Community
License
Index
The Kawa Scheme language
Table of Contents
The Kawa Scheme language
1. Getting and installing Kawa
1.1. Getting Kawa
1.1.1. Getting the development sources using SVN
1.2. Getting and running Java
1.3. Installing and using the binary distribution
1.4. Installing and using the source distribution
1.4.1. Build Kawa using
configure
and
make
1.4.2. Build Kawa using
ant
1.4.3. Compiling Kawa to native code with GCJ
1.4.4. Building Kawa under MS-Windows
2. Usage Reference
2.1. Command-line arguments
2.1.1. General options
2.1.2. Options for language selection
2.1.3. Options for warnings and errors
2.1.4. Options for setting variables
2.1.5. Options for controlling output formatting
2.1.6. Options for compiling and optimizing
2.1.7. Options for debugging
2.1.8. Options for web servers
2.2. Running Command Scripts
2.3. Running a Command Interpreter in a new Window
2.4. Exiting Kawa
2.5. Compiling
2.5.1. Compiling to a set of .class files
2.5.2. Compiling to an archive file
2.5.3. Compiling using Ant
2.5.4. Compiling to a standalone application
2.5.5. Compiling to an applet
2.5.6. Compiling to a native executable
3. Features
3.1. Implemented SRFIs
3.2. Compatibility with standards
4. Syntax
4.1. Notation
4.2. Lexical and datum syntax
4.3. Lexical syntax
4.3.1. Formal account
4.3.2. Line endings
4.3.3. Whitespace and comments
4.3.4. Identifiers
4.3.5. Numbers
4.4. Datum syntax
4.4.1. Abbreviations
4.5. Hash-prefixed forms
4.6. Primitive expression syntax
4.6.1. Literal expressions
4.6.2. Variable references
4.6.3. Procedure calls
4.6.4. Macros
4.7. Property access using colon notation
4.7.1. Part lookup rules
4.7.2. Specific cases
4.7.2.1. Type literal
4.7.2.2. Type cast
4.7.2.3. Type test
4.7.2.4. New object construction
4.7.2.5. Invoking methods
4.7.2.6. Accessing fields
4.7.2.7. Getting array length
4.8. Bodies
4.9. Syntax and conditional compilation
4.10. Macros
4.10.1. Identifier predicates
4.10.1.1. Syntax-object and datum conversions
4.10.1.2. Convenience forms
5. Multiple values
6. Symbols and namespaces
6.1. Simple symbols
6.2. Namespaces and compound symbols
6.2.1. Namespace objects
6.2.2. Compound symbols
6.2.3. Namespace aliases
6.3. Keywords
6.4. Special named constants
7. Procedures
7.1. Procedure properties
7.2. Generic (dynamically overloaded) procedures
7.3. Extended Formal Arguments List
8. Numbers
8.1. Arithmetic operations
8.2. Quantities and Units
8.3. Logical Number Operations
8.3.1. Deprecated Logical Number Operations
8.4. Performance of numeric operations
9. Characters and text
9.1. Characters
9.2. Character sets
9.3. Strings
9.4. Unicode character classes and conversions
9.4.1. Characters
9.4.2. Strings
9.4.3. Deprecated in-place case modification
9.5. Regular expressions
9.5.1. Java regular expressions
9.5.2. Portable Scheme regular expressions
10. Data structures
10.1. Sequences
10.2. Lists
10.3. Vectors
10.4. Uniform vectors
10.4.1. Relationship with Java arrays
10.5. Bytevectors
10.6. Streams - lazy lists
10.7. Multi-dimensional Arrays
10.8. Hash tables
10.8.1. R6RS hash tables
10.8.1.1. Procedures
10.8.1.2. Inspection
10.8.1.3. Hash functions
10.8.2. SRFI-69 hash tables
10.8.2.1. Type constructors and predicate
10.8.2.2. Reflective queries
10.8.2.3. Dealing with single elements
10.8.2.4. Dealing with the whole contents
10.8.2.5. Hash functions
11. Exception handling
12. Eval and Environments
12.1. Locations
12.2. Parameter objects
13. Debugging
14. Program structure
14.1. Definitions
14.2. Conditionals
14.3. Lazy evaluation
14.3.1. Delayed evaluation
14.3.2. Implicit forcing
14.3.3. Blank promises
14.3.4. Lazy and eager types
14.4. Threads
15. Miscellaneous
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. Resources
16.4. File System Interface
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
17. Types
17.1. Standard Types
17.2. Parameterized Types
17.3. Declaring Types of Variables
17.4. 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. How a module becomes a class
18.5.3. Static vs non-static modules
18.5.4. Module options
18.5.5. Requiring (importing) a module
18.6. Record types
18.7. Creating New Record Types On-the-fly
18.8. Calling Java methods from Scheme
18.8.1. Calling static methods using colon notation
18.8.2. Calling instance methods using colon notation
18.8.3. Method names
18.8.4. Invoking a method with the
invoke
function
18.8.5. Using a namespace prefix
18.9. Allocating objects
18.10. Accessing object fields
18.10.1. Accessing static fields and properties
18.10.2. Accessing instance fields and properties
18.10.3. Using field and static-field methods
18.10.4. Older colon-dot notation
18.11. Mapping Scheme names to Java names
18.12. Scheme types in Java
18.13. Using Java Arrays
18.13.1. Creating new Java arrays
18.13.2. Accessing Java array elements
18.13.3. Old low-level array macros
18.14. Loading Java functions into Scheme
18.15. Evaluating Scheme expressions from Java
18.15.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 JDK 6 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. Special topics
20.1. Building JavaFX applications
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. Processes
20.5. Deprecated low-level functions
20.5.1. Low-level Method invocation
20.5.2. Low-level field operations
20.5.3. Old low-level array macros
21. The Kawa language framework
22. Frequently Asked Questions
23. The Kawa Community
23.1. Reporting bugs
23.2. General Kawa email and discussion
23.3. Acknowledgements and thanks
23.4. Technical Support
23.5. Projects using Kawa
23.6. Ideas and tasks for contributing to Kawa
23.6.1. Compiler should use class-file reading instead of reflection
23.6.2. Make use of Java-7 MethodHandles
23.6.3. R6RS and R7RS libraries and syntax
23.6.4. Optimize switches (case)
23.6.5. Parameterized types
23.6.6. Function types
23.6.7. Full continuations
23.6.8. Faster tailcalls
23.6.9. TreeList-optimization
23.6.10. Implement R7RS exceptions
23.6.11. Asynchronous evaluation
23.6.12. REPL console and other REPL improvement
23.6.13. XQuery-1.1-functionality
23.6.14. XQuery-updates
23.6.15. Common Lisp support
23.6.16. JEmacs improvements
23.6.17. Improved IDE integration
23.6.17.1. Plugin for NetBeans IDE
23.6.17.2. Plugin for Eclipse IDE
23.6.17.3. Improve Emacs integration
23.6.17.4. Implement
javax.tools
and code-range support in Kawa compiler
23.6.18. Output formatting and pretty printing
23.6.19. Shell/process syntax
23.6.20. Rich String Literals
24. License
24.1. License for the Kawa software
24.2. License for the Kawa manual
Index
Index