Note:
The information on this page is outdated! Swindle is now part of
PLT Scheme.
Swindle is a collection of modules that extend PLT Scheme
(www.plt-scheme.org) with many additional features. The main feature
which started this project is a CLOS-like object system based on
Tiny-CLOS from Xerox, but there is a lot more -- see the feature list
below for a rough picture. The latest version of Swindle is available
at http://www.barzilay.org/Swindle/. There is also a low volume mailing
list, mail me to register. Comments, bugs, or whatever are welcome.
Downloading Swindle
To download Swindle for PLT v209, get
swindle.plt
and install it with the PLT setup tool.
(Older version files:
103, 203, 204, 205, 206, 207, 208)
The current version of Swindle is
20050206,
it should be used with PLT version
209.
(You can always find this information in
version.txt).
A brief overview can be found in
readme.txt
(also below), and a more extensive documentation can be found in
doc.txt.
Swindle is distributed under the terms of the
LGPL.
Feature List
The following is a high-level description of major features provided by
Swindle. For every feature, the file that provides it is specified, if
only a subset of the system is needed.
Some basic syntax extensions, including lambda &-keywords, and improved 'define' and 'let' forms. (Available separately using "base.ss".)
Generic setters with 'set!', more useful side effect forms: 'pset!', 'shift!', 'rotate!', and some simple ones like 'inc!', and 'push!'. (Available separately using "setf.ss", where the names 'setf!' and 'psetf!' are used to avoid changing the Scheme form.)
Convenient syntax for 'provide' forms. ("misc.ss")
Easy macro-defining macros -- simple syntax-rules macros with 'defsubst', and a generic 'defmacro' utility, all with a local 'let...' form, and extended to easily create symbol macros. ("misc.ss")
An 'collect' macro that provides very sophisticated list comprehensions and much more. ("misc.ss")
An 'echo' mechanism which is an alternative to using format strings, and contains many useful features including a list iteration construct, and easy to extend. ("misc.ss")
A 'regexper' syntax which is similar to a 'case' on strings with easy access to submatches. ("misc.ss")
A hash table that is suitable for memoization (works on identities of elements of a list). ("misc.ss")
A CLOS-like object system -- based on Tiny CLOS, but with many extensions that bring it much closer to CLOS, and heavily optimized. Some added features include singleton and struct classes, applicable stand-alone methods, method-combination, and some MOP extensions. (Available without syntax bindings in "tiny-clos.ss")
Good integration with the Scheme implementation: primitive values have corresponding Swindle classes, and struct types can also be used as type specializers. A Swindle class will be made when needed, and it will reflect the struct hierarchy. In addition, structs can be defined with a Swindle-line 'defstruct' syntax which will also make it possible to create these structs with 'make' using keyword arguments. ("tiny-clos.ss" and "extra.ss")
Many hairy macros that make the object system much more convenient (CLOS has also a lot of macro code). Some of the macros (especially 'defclass') can be customized. ("clos.ss")
Useful generic functions, including 'print-object' which is used to display all objects. ("extra.ss")
A 'match' mechanism with a generic-like interface. ("extra.ss")
Easy to add customized languages to DrScheme. ("custom.ss")
Source Files and On-Line Documentation
A list of files in this distribution follows. Files marked with
"module" provide a module by the same name, files marked with "language
module" modify the language and should be used as an initial import for
other modules. Most files (and especially all language modules) are
useful by themselves, even without using the whole Swindle environment.
The documentation file ("doc.txt") contains more explanations on all
Scheme files in a Help-Desk usable format, and the same information is
layed out better in the HTML documentation pages below.
On-line documentation is available when there's a
"DOC" link, and as an
index page.
setf.ss(module)[DOC] Generic setters similar to `setf' in Lisp, and a few more useful macros.
misc.ss(module)[DOC] Lots of useful functionality bits, including everything from frequently useful MzScheme standard libraries (`list.ss', `etc.ss', and `string.ss').
turbo.ss(language module)[DOC] A module that packages functionality from `base', `setf' (overriding `set!' with `setf!'), and `misc'.
tiny-clos.ss(module)[DOC] The core object system, based on Tiny CLOS from Xerox, but heavily modified, optimized and extended.
clos.ss(module)[DOC] Convenient macro wrappers for "tiny-clos.ss".
extra.ss(module)[DOC] Extra functionality on top of clos.
swindle.ss(language module)[DOC] The main Swindle environment module: packages `tiny-clos', `clos', and `extra' on top of `turbo', and some more general definitions.
This page was made using
html.ss
which is described separately in
html-doc.txt.
The script that uses this to make this whole thing (including
compiling, packaging, and creating documentation files) is
make,
which uses
documentation.txt
as its input.
This library is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation; either version 2.1 of the
License, or (at your option) any later version.
This library 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
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
USA