Language-SIOD

 view release on metacpan or  search on metacpan

siod.html  view on Meta::CPAN

but having very little
practical evidence at hand to actually prove the fact, I decided
one day while I was keeping the laboratory section room
open for course <B>EK201</B> to sit down and implement a demonstration
made up of a simple <B>cons</B>,
<b>arithmetic</b>, <B>read</b>, <b>eval</b>, and <b>print</b> 
in straightforward <B>C</B>
programming style, where the garbage collector was stop-and-copy and
could only run in the context of the toplevel loop. Defining and executing
<b>fib</b> resulted in a code-coverage of over 95% of the lines
of the C program. Hence, SIOD, Scheme in One Day. Borrowing the name
of a previous Scheme interpreter I had done to test the Lispmachine
microcode compiler, Scheme in One Defun.

<P>The motivation behind SIOD remains a small footprint, in every sense
of the word, at runtime, at compile time, and in <b>cognitive</b> attention
required to understand how the system works enough to be able to
extend it as well as the author would have done the work himself.

<P>About eight years have passed since that initial release. It has been
possible to add a feature or two without contributing to the cause
of software bloat, with the code segment of the libsiod shared
library remaining under 75K bytes on a prototypical comparison machine 
like a VAX. Furthermore, as the richness of the C runtime library 
available on most systems has improved over time, <B>SIOD</B> remains
a useful kind of glue to have in a software engineers toolbox.

<P>Please forgive the lack of full compliance with IEEE or R4RS
standards. Perhaps one of these days.

<A name="build"></A><H2>Building from Sources</h2>

See the <B>README</B> file that comes with the distribution.
The following systems are known to be supported using supplied
build files.

<TABLE BORDER=1>
<TR><TH>Make</TH><TH>OS</TH></TR>
<TR><TD>Digital Equipment Corporation</TD>
    <TD>DIGITAL UNIX (OSF/1)</TD></TR>
<TR><TD>Linux</TD>
    <TD>Linux</TD></TR>
<TR><TD>Hewlett-Packard Company</TD>
    <TD>HP-UX</TD></TR>
<TR><TD>Sun Microsystems</TD>
    <TD>Solaris</TD></TR>
<TR><TD>Silicon Graphics</TD>
    <TD>IRIX</TD></TR>
<TR><TD>Digital Equipment Corporation</TD>
    <TD>OpenVMS</TD></TR>
<TR><TD>Microsoft</TD>
    <TD>Windows 95</TD></TR>
</TABLE>

<A name="releasenotes"></a><H2>Release Notes</H2>

<UL>
<LI><B>1.0</B> April 1988.
Initial release. 
<LI><B>1.1</B> April 1988.
Macros, predicates, load. Better number recognizer in read,
provided siod.scm file.
<LI><B>1.2</B> April 1988.
Name changes as requested by JAR@AI.AI.MIT.EDU, plus some bug fixes.
<LI><B>1.3</B> May 1988.
Changed env to use frames instead of alist. define now works properly.
<LI><B>1.4</B> November 1989.
This release is functionally the same as release 1.3 but has been
remodularized in response to people who have been encorporating SIOD
as an interpreted extension language in other systems.
<LI><B>1.5</B> November 1989.
Added the -g flag to enable mark-and-sweep garbage collection.
The default is stop-and-copy. (Note: changed default to mark-and-sweep)
<LI><B>2.0</B> December 1989.
Set_Repl_Hooks, catch & throw. 
<LI><B>2.1</B> December 1989.
Additions to SIOD.SCM: Backquote, cond.
<LI><B>2.2</B> December 1989.
User Type extension. Read-Macros. (From C-programmer level).
<LI><B>2.3</B> December 1989.
save-forms. load with argument t, comment character, faster intern.
-o flag gives obarray size. default 100.
<LI><B>2.4</B> April 1990.
speed up arithmetic and the evaluator. fixes to siod.scm. no_interrupt
around calls to C I/O. gen_readr.
<LI><B>2.5</B> September 1990.
numeric arrays in siod.c
<LI><B>2.6</B> March 1992.
remodularize .h files, procedure prototypes. gc, eval, print hooks
now table-driven.
<LI><B>2.7</B> March 1992.
hash tables, fasload.
<LI><B>2.8</B> April 1992.
bug fixes.
<LI><B>2.9</B> August 1992.
added trace.c, fseek, ftell, some fixes.
<LI><B>3.0</B> May 1994.
Windows NT port. some cleanups. SQL support, more string stuff. 
Heap management flexibility, default to mark-and-sweep, suggestions
by some code reviewers for comp.sources.unix.
<LI><B>3.1x</B> June 1995.
Verbose flag to supress file loading and error messages, along
with enhanced command-line interface made siod useful for writing scripts.
Support for more C library and unix programming functionality,
including regular expressions and sockets. Debugging
hooks *eval-history-ptr*.
<LI><B>3.2</B> June 1996.
shared library modularization, dynamic linking interface for extensions.
documentation in html.h Lexical closure support at c-programmer level.
Arithmetic cleanup. parser:XXXXX extension. command "compiler"
interface.
<LI><B>3.4</B> Feb 1997. Windows NT/95 cleanup.
</UL>

<A name="scheme"></a><H2>What is Scheme?</H2>

Scheme is a programming language, a dialect of the Lisp (List
Processing) family of languages, generally utilizing a syntax based on
parenthetical expressions delimited by whitespace, although 
<a href="#hello.scm">alternative</a> syntax capabilities are sometimes
available. An implementation
such as SIOD usually runs by default in an immediate execution mode,
where programs are parsed as they are entered, then executed with
the results being printed. Hence this set of examples with input
syntax suitable for either Microsoft QBASIC or SIOD:

<P>
<TABLE BORDER=1>
<TR><TH>QBASIC.EXE input</TH>
    <TH>SIOD input</TH>
    <TH>SIOD Result</TH></TR>

<TR><TD><PRE>PRINT (1 + 2) * (3 + 4)</PRE></TD>
    <TD><PRE>(* (+ 1 2) (+ 3 4))</PRE></TD>
    <TD><PRE>21</PRE></TD></TR>

<TR><TD><PRE>PRINT "HELLO-" + "BUDDY"</PRE></TD>
    <TD><PRE>(string-append "HELLO-" "BUDDY")</PRE></TD>
    <TD><PRE>"HELLO-BUDDY"</PRE></TD></TR>



( run in 0.983 second using v1.01-cache-2.11-cpan-5837b0d9d2c )