2022-08-04 14:00:11 -04:00
|
|
|
<html>
|
|
|
|
<head>
|
|
|
|
<title>GScheme</title>
|
|
|
|
</head>
|
2022-08-05 07:02:50 -04:00
|
|
|
|
|
|
|
<body text="#000000" bgcolor="#CCCCCC" link="#0000FF" vlink="#000000">
|
2022-08-04 14:00:11 -04:00
|
|
|
|
|
|
|
<H1> GScheme </H1>
|
|
|
|
|
2022-08-05 07:02:50 -04:00
|
|
|
A GNUstep-aware scheme interpreter.
|
2022-08-04 14:00:11 -04:00
|
|
|
|
|
|
|
Includes many examples, e.g. the sieve of Erathostenes to compute primes, a
|
|
|
|
Koch curve plotter, mandelbrot set, graphs of various functions etc. GScheme
|
|
|
|
is fully tail recursive. The garbage collector bypasses GNUstep's
|
|
|
|
retain/release mechanism in order to deal with circular data structures. <P>
|
|
|
|
|
|
|
|
GScheme is document-based and you can edit more than one file at the
|
|
|
|
same time. <P>
|
|
|
|
|
|
|
|
Speed leaves something to be desired as there is a lot of overhead due
|
|
|
|
to Objective C.<P>
|
|
|
|
|
|
|
|
Press Ctrl-Return in the interpreter window to evaluate the last form
|
|
|
|
that you have entered. This will copy the form to the paste board, so that you
|
|
|
|
may re-enter it by pressing Alt-V.
|
|
|
|
<P>
|
|
|
|
|
|
|
|
<IMG SRC=GScheme.png>
|
|
|
|
<P>
|
|
|
|
|
2022-08-05 07:02:12 -04:00
|
|
|
Download it
|
|
|
|
<A HREF="//files.scheme.org/GScheme-20060213.tar">
|
|
|
|
here (TAR)</A>.
|
2022-08-04 14:00:11 -04:00
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
Special forms implemented include
|
|
|
|
<UL>
|
2022-08-05 07:02:50 -04:00
|
|
|
<LI> define, set!, lambda,
|
2022-08-04 14:00:11 -04:00
|
|
|
<LI> if, and, or
|
|
|
|
<LI> begin, apply,
|
|
|
|
<LI> quote, case, cond,
|
|
|
|
<LI> let, let, letrec,
|
|
|
|
<LI> call-with-current-continuation
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
Primitives implemented include
|
|
|
|
<UL>
|
|
|
|
<LI> +, *, -, /, =, >, <,
|
|
|
|
<LI> draw-move, draw-line, draw-color,
|
|
|
|
<LI> sin, cos, sqrt,
|
|
|
|
<LI> quotient, remainder, not,
|
|
|
|
<LI> zero?, pair?, number?, eqv?, eq?,
|
|
|
|
<LI> cons, car, cdr, list, null?,
|
|
|
|
<LI> set-car!, set-cdr!,
|
|
|
|
<LI> display, newline
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
|
|
|
|
There is a library of additional primitives that are loaded on start-up.
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of July 23, 2002:
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> make-vector, vector?, list->vector, vector->list?
|
|
|
|
<LI> vector-length, vector-ref, vector-set! and vector-fill!.
|
|
|
|
<LI> asin, acos
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
Examples now include queens.scm, which solves the classic problem and
|
|
|
|
takes symmetries into account.
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of July 31, 2002:
|
|
|
|
|
|
|
|
<UL>
|
2022-08-05 07:02:50 -04:00
|
|
|
<LI> memory management completely reworked
|
2022-08-04 14:00:11 -04:00
|
|
|
|
|
|
|
<LI> browse-environment pops up a window that shows the current
|
|
|
|
environment (e.g. for environment diagrams); browse.scm shows how
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of January 10, 2005:
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> memory management simplified
|
2022-08-05 07:02:50 -04:00
|
|
|
<LI> new UI for browse-environment
|
2022-08-04 14:00:11 -04:00
|
|
|
<LI> additional primitives: exp, log, tan, atan
|
|
|
|
<LI> evaluate external files
|
|
|
|
<LI> more intutive UI e.g. the last form entered is copied to the paste board
|
|
|
|
and may be repeated by pressing Alt-V
|
|
|
|
<LI> better error handling
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<PRE>
|
|
|
|
Important: older GNUstep installations may need to replace
|
|
|
|
#include <GNUstepBase/GSIMap.h>
|
|
|
|
by
|
|
|
|
#include <base/GSIMap.h>
|
|
|
|
at the very beginning of SchemeTypes.m.
|
|
|
|
</PRE>
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of February 17, 2005:
|
|
|
|
<P>
|
|
|
|
New primitives:
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> draw-show produces an image window with the data that have
|
|
|
|
accumulated and resets the image
|
|
|
|
<LI> draw-circle draws a circle of a given radius at the current position
|
|
|
|
without changing the position
|
|
|
|
<LI> fill-circle is like draw-circle, but fills the circle
|
|
|
|
<LI> random outputs a random integer in the interval [0, n) when invoked
|
|
|
|
with an integer "n" and a random double in the interval [0, v) when
|
|
|
|
invoked with a double "v"
|
|
|
|
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of February 25, 2005:
|
|
|
|
<P>
|
|
|
|
New primitives, graphical ones come first.
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> string-size returns a pair containing the width and height of the
|
|
|
|
string in the current font
|
|
|
|
<LI> draw-font sets the current font to a font of a given size
|
|
|
|
<LI> draw-string draws a string at the current position and advances the
|
|
|
|
position to just behind the newly drawn string.
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
There is a demo in "text.scm." You will probably have to change the
|
|
|
|
font names in the demo to reflect the fonts that you have on your
|
|
|
|
system e.g. as displayed in the font panel of Ink.app.
|
|
|
|
|
|
|
|
Additional primitives:
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> string->symbol
|
|
|
|
<LI> symbol->string
|
|
|
|
<LI> integer->char
|
|
|
|
<LI> char->integer
|
|
|
|
<LI> string-ref
|
|
|
|
<LI> list->string
|
|
|
|
<LI> string->list
|
|
|
|
<LI> make-string
|
|
|
|
<LI> string-append
|
|
|
|
<LI> number->string (works for integers in bases between 2 and 36 and decimal floats).
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
|
|
|
|
New! As of Mar 2, 2005:
|
|
|
|
<P>
|
|
|
|
New primitives:
|
|
|
|
|
|
|
|
<UL>
|
|
|
|
<LI> eval
|
|
|
|
<LI> string-length
|
|
|
|
<LI> draw-rect: draws a rectangle of the given width and height at the
|
|
|
|
current position
|
|
|
|
<LI> fill-rect: fills the rectangle with the current color.
|
|
|
|
<LI> format: format a string using the ~a escape etc.
|
|
|
|
</UL>
|
|
|
|
|
|
|
|
<HR>
|
|
|
|
<A HREF=mailto:markoriedelde@yahoo.de>
|
|
|
|
markoriedelde@yahoo.de
|
|
|
|
</A>
|
|
|
|
|
|
|
|
|
|
|
|
</body>
|
2022-08-05 07:02:50 -04:00
|
|
|
</html>
|