Clever Geek Handbook
📜 ⬆️ ⬇️

Kawa

Kawa is an implementation of the Scheme language , a dialect of the Lisp language , which provides tight integration with the java environment [1] [2] .

Kawa
Kawa-logo.svg
Type ofScheme programming language interpreter / compiler
DeveloperPer bothner
Written onScheme / Java
operating systemCross platform
First edition
Hardware platformJava virtual machine
Latest version3.0 ( October 2, 2017 )
LicenseMIT License
Websitegnu.org/software/kawa/

It includes both an interpreter [3] and a compiler in the Java Virtual Machine (JVM) code [4] .

In addition, Kawa is a framework for implementing high-level dynamic languages. So, with its help, XQuery (Qexo [5] ) [2] and Emacs Lisp (JEmacs [6] ) [1] are implemented .

Java Integration

One of the features of the Scheme dialect implemented in Kawa is the ease of access to Java objects.

To call the method of the object, the following code is used:

  (invoke object 'method argument ...)

This will make an object method call, i.e. an action similar to object.method (argument, ...) will occur in Java.

To access the fields of an object:

  object: field-name

or

  (invoke object 'field)

The static methods of the class are called using the invoke-static function.

Kawa allows you to create lisp functions in the Java language.

Notes

  1. ↑ 1 2 Per Bothner. Compiling Java with GCJ // Linux Journal . - 2003. - January 1.
  2. ↑ 1 2 Mensah, 2011 .
  3. ↑ The following commands are used to run Kawa on Linux :
      export CLASSPATH = $ CLASSPATH: /path/to/kawa/kawa-1.10.jar
     java kawa.repl 
  4. ↑ To compile the Scheme file.scm file into a file of the file.class class, you need to use the -C option: java kawa.repl --main -C file.scm
  5. ↑ Qexo - The GNU Kawa implementation of XQuery
  6. ↑ JEmacs - the Java / Scheme-based Emacs Text Editor

Literature

  • Kuassi Mensah. 5.2.3. Proof of Concept # 3: Running Kawa (Scheme) in the Database // Oracle Database Programming using Java and Web Services . - Digital Press, 2011 .-- 1121 p. - ISBN 9780080525112 .
Source - https://ru.wikipedia.org/w/index.php?title=Kawa&oldid=99158811


More articles:

  • Golden Ferret
  • Fungus Amongus
  • League Goiano
  • F-22 Interceptor
  • ANT1
  • ERT3
  • Libakov, Mikhail Vadimovich
  • Nal, Anatoly Mironovich
  • Meychik, Mark Naumovich
  • Centonization

All articles

Clever Geek | 2019