Skij
is an interactive Scheme interpreter for the Java environment. Here you
can try out Skij running as an applet, assuming your browser supports enough
of the JDK 1.1 version of Java. The only one that does, as far as I know,
is Netscape Communicator 4.
You can also download
Skij to run as an application or for use as a debugging interface for your
own Java applications.
;
At the skij> prompt, you can type Scheme forms to be evaluated. Examples follow; some browsers will allow you to cut and paste this text into the applet. Note that you are limited by the applet security model; so much of Java functionality can't be accessed. If you run Scheme as an application these limitations disappear. The applet is also limited by the listener interface; I prefer to run Skij under Emacs, which gives you parenthesis matching, a history mechanism, and automatic indentation.
The classic recursive factorial:
; make a button
(define b (make-button "Press
Me"
(lambda (evt)
(print "Thanks, that felt good"))))
(invoke w 'add b)
(invoke w 'show) ;
redisplay
(describe *applet*)See the definition of a Scheme procedure:
Note: if you have Swing installed on your system, try inspect instead of describe.
(ppp make-button) ; pretty-print procedureSkij can also call JavaScript methods:
(jsinvoke *javascript-window* 'moveBy 100 20)
Note: this doesn't always work due to browser idiosyncracies.