Jump to content

Kawa (Scheme implementation)

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by JorgePeixoto (talk | contribs) at 14:08, 14 February 2020 (Latest version is 3.1.1). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Kawa
FamilyLisp
Designed byPer Bothner
DeveloperThe Kawa Community
First appeared9 February 1998; 26 years ago (1998-02-09)
Stable release
3.1.1 [1] / 16 January 2020; 4 years ago (2020-01-16) (w/R7RS compatibility)
Implementation languageJava, Scheme
PlatformJava virtual machine
OSCross-platform
LicenseMIT
Websitewww.gnu.org/software/kawa
Influenced by
Lisp, Scheme

Kawa is a language framework written in the programming language Java that implements the programming language Scheme, a dialect of Lisp, and can be used to implement other languages to run on the Java virtual machine (JVM). It is a part of the GNU Project.

The name Kawa comes from the Polish word for coffee; a play on words, since Java is another familiar name for coffee.

Integration with Java

Besides using the language Scheme, Java object fields and methods can be accessed using code such as: (invoke object 'method argument ...). This will invoke a Java method, and does the same thing as object.method(argument, ...) in Java. An object's fields can be accessed with: object:field-name or (invoke object 'field-name). Static (class) methods can be invoked with the function invoke-static. Kawa can be extended with Java code (by creating scheme functions in Java), and combined with other JVM implementations.

How to use

Kawa can be run normally via the kawa script:

$ kawa [optional arguments] ...

Alternatively, Kawa can be run by hand:

$ java -jar /path/to/kawa/kawa.jar [optional arguments] ...

To compile a Scheme file to a class file, the -C parameter is used:

$ java kawa.repl --main -C file.scm

This will produce file.class, which can be run by typing java file. It is also possible to create an applet or servlet (to compile a servlet, servlet-xxx.jar must be in the CLASSPATH variable).

See also

External links

1958 1960 1965 1970 1975 1980 1985 1990 1995 2000 2005 2010 2015 2020
 LISP 1, 1.5, LISP 2(abandoned)
 Maclisp
 Interlisp
 MDL
 Lisp Machine Lisp
 Scheme  R5RS  R6RS  R7RS small
 NIL
 ZIL (Zork Implementation Language)
 Franz Lisp
 Common Lisp  ANSI standard
 Le Lisp
 MIT Scheme
 XLISP
 T
 Chez Scheme
 Emacs Lisp
 AutoLISP
 PicoLisp
 Gambit
 EuLisp
 ISLISP
 OpenLisp
 PLT Scheme  Racket
 newLISP
 GNU Guile
 Visual LISP
 Clojure
 Arc
 LFE
 Hy
 Chialisp
  1. ^ "Kawa: News - Recent Changes". gnu.org. Retrieved 2020-02-14.