Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
SIOD(1C)								SIOD(1C)

NAME
     siod - small scheme interpreter (Scheme In One Defun).

SYNOPSIS
     siod  [-sX]  [-hX]  [-iX]	[-gX]  [-oX] [-nX] [-eX] [-vX] [-lX] [-mX] [-vX]
     [filenames]

DESCRIPTION
     Siod is a very small scheme interpreter which can be used	for  interactive
     calculations,  scripts,  or  included  as	a  command interpreter or exten-
     sion/macro language in other applications. See the documentation for inter-
     facing requirements and how to add user-defined data types. The  dash-style
     command line options may also be delimited by commas.

ARGUMENTS
     The  arguments  are files which are loaded from the current or SIOD_LIB di-
     rectory, by usual default /usr/local/lib/siod. Or the symbol repl to  cause
     entry  into  the  read-eval-print-loop,  or parenthetical expressions to be
     evaluated.

   COMMAND LINE OPTIONS
     -hXXXXX
	     The XXXXX should be an integer, specifying the number of cons cells
	     to allocate in the heap. The default is 100000:10.  Or  an  integer
	     followed  by a colon, the number after which gives the maximum num-
	     ber of heaps to malloc with mark and sweep gc mode.

     -iXXXXX
	     The XXXXX should be the name of an init file to load  before  going
	     into the read/eval/print loop.

     -gX     The  X is 1 for a stop and copy garbage collector, 0 for a mark and
	     sweep one (the default).

     -oXXXXX
	     The XXXXX should be an integer, specifying the size of the  obarray
	     (symbol hash table) to use. Defaults to 1000. Each array element is
	     a list of symbols.

     -nXXXXX
	     The  XXXXX  should be an integer, specifying the number of pre-cons
	     numbers to create. The default is 100.

     -sXXXXX
	     The XXXXX should be an integer, specifying the number of  bytes  of
	     recursion on the machine (C-call frame) stack to allow. This may be
	     changed  while  the  programming is running, and is mainly a conve-
	     nience for detecting defects in programs. Default 200000.

     -eXXXXX
	     The XXXXX is an expression to  evaluate  (after  loading  the  init
	     file,  if	any).	After evaluating the expression the program will
	     exit.

     -lXXXXX
	     The XXXXX is a library directory to use for the require  procedure.
	     defaults	to   the   environment	variable  SIOD_LIB  or	/usr/lo-
	     cal/lib/siod.

     -vXXXXX
	     The XXXXX is an integer verboseness from  0  to  4.  When	used  in
	     scripts the most generally useful level is 0. Defaults to 4.

     -mXXXXX
	     The  XXXXX  can  be  0  (default)	which has no effect, or 1, which
	     causes the scheme procedure main, with no arguments to  be  invoked
	     after  all  files	are  loaded, or 2, which does the same thing but
	     prevents further arguments from being interpreted, or 3, which will
	     wrap special error handling around the call to main which is conve-
	     nient for writing cgi scripts producing html. The	environment  may
	     be  obtained from the getenv procedure or the variable *env*. Argu-
	     ments are found in *args*.

     -vXXXXX
	     The XXXXX Is passed along to the siod argument processing,  however
	     if the value is greater than 0 a Content-type: text/plain header is
	     generated	immediately  (except if the number is represented with a
	     leading zero), which  can	be  convenient	for  debugging	WWW  cgi
	     scripts. For example:

	     #!/usr/local/bin/siod -v0,-m2
	     (define (main)
	       (writes nil "Hello World0))

	     Which if invoked normally will result in

	     %hello.scm
	     Hello World

	     And with the verbose flag over-ride on the command line:

	     %hello.scm -v5
	     Content-type: text/plain

	     Welcome to SIOD, Scheme In One Defun, Version 3.1x 12-JUN-95
	     (C) Copyright 1988-1994 Paradigm Associates Inc.
	     10 heaps. size = 100000 cells, 2400000 bytes. 2048 inums. GC is mark and sweep
	     loading hello.scm
	     (define (main) (writes nil "Hello World
	     "))
	     done.
	     Hello World
	     EXIT

RETURN VALUE
     Errors during non-interactive usage mode result in a non-zero exit status.

ALTERNATIVE SYNTAX
     Files which are loaded by the interpreter may contain the sequence of char-
     acters  parser:XXXXX in a comment in the first line of the file.  This will
     result in the automatic loading of the  file  parser_XXXXX.scm  which  must
     provide  a  procedure  parser_XXXXX to return a procedure to read the forms
     from the file to be loaded. Useful values of XXXXX include read, pratt, and
     fasl.

FILES
     /usr/local/lib/siod/*   /usr/local/lib/siod/siod.html   /usr/local/lib/lib-
     siod.so

SEE ALSO
     command csiod http://people.delphi.com/gjc/siod.html

     Structure and Interpretation of Computer Programs , by Abelson and Sussman,
     MIT Press.

DIAGNOSTICS
     Error messages may also set the variable errobj to the offending object.

BUGS
     With  -g1	it does not GC during EVAL, only before each READ/EVAL/PRINT cy-
     cle.  It does GC during EVAL with -g0, but that code may  not  run  without
     modification on all architectures.

VERSION
     Current version is 3.2, 12-MAR-96, by George Carrette. GJC@world.std.com

				      LOCAL				SIOD(1C)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=siod&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help