Scheme In A Grid
Can Your Spreadsheet Do This?
Having a real programming language at your disposal means being
able to do things that are just not possible with the usual
"macro languages". Here are a few things that Siag can do.
I don't know of any other spreadsheet (or any other kind of
application for that matter) that can match this,
possibly because nobody else is wacky enough to want features
All the code for these samples is included on this web page.
Like Siag itself, there is no warranty
for the usefulness of any of this code.
Under the Tools menu button is an entry for a "Webserver".
This is in fact a fully functioning, one-shot web server that
can serve the current document as an HTML table over the Internet
to an ordinary browser such as Netscape. By one-shot I mean that
it serves the document once and then resumes normal operation.
This is not a limitation that is built into Siag but simply
a design decision in the code for this command.
Try this: start Siag and load a document. Then choose Tools - Webserver
on the menu. Now start a WWW browser and load the following URL:
Pretty cool, eh?
The code for this command
is 40 lines
of Scheme, not counting comments and white space but including
the function to produce the HTML table.
contains code to implement
a simple file manager. To do this, a few new commands are added.
- Reads the contents of the current directory and
displays the filenames.
- Delete the filename in the current cell.
- Prompt for a destination and copy the filename in
the current cell.
- Prompt for a destination and move/rename the
filename in the current cell.
- Change working directory to the name in the
Siag can use SMTP to send documents. Load the file
and issue the command
Now log in as user@host and check the mail.
Picture of the mailing process
Siag can be used for such tasks as changing passwords, adding users
and so on. Load the file
Load the file /etc/passwd using the *.csv format with ':' as separator.
You can now use the ordinary commands to delete lines, add lines,
edit cells and so on. Passwords can be edited with the (edit-password)
command. Now save the file, again using the *.csv
format with ':' as separator.
Caution: I don't recommend saving this as /etc/passwd on a
production server. ;-)