Questions tagged [kawa]

Kawa is a language framework written in Java that implements the programming language Scheme, and can be used to implement other languages. 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.

Kawa is a language framework written in Java that implements the programming language Scheme, and can be used to implement other languages. 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 Scheme programming language, you can access Java object fields and methods, using code like this:

(invoke object 'method argument ...)

This will invoke a Java method, and does the same thing as object.method(argument, ...) in Java. You can access an object's fields with:

object:field-name

or

(invoke object 'field)

You can also invoke static (class) methods with the function "invoke-static". You can extend Kawa with Java code (creating scheme functions in Java), as well as combine Kawa with other JVM implementations.

For further details refer the below sites:

http://www.gnu.org/software/kawa/

http://en.wikipedia.org/wiki/Kawa_(Scheme_implementation)

13 questions
68
votes
11 answers

Why Clojure over other JVM Lisps: Kawa, Armed Bear or SISC?

The JVM already had three Lisps before Clojure arrived on the scene: Kawa, Armed Bear and SISC. What gap does Clojure fill that was left by those Lisps?
uzo
  • 2,821
  • 2
  • 25
  • 26
7
votes
2 answers

How to convert a degrees calculation to radians? (Kawa to Java)

I have tried to convert a calculation from an app I made using MIT AppInventor which uses Kawa to Android using Java.The problem I'm facing is that the trigonometric parts of the calculation in Kawa are using degress.My question is how do I…
Brian Var
  • 6,029
  • 25
  • 114
  • 212
4
votes
1 answer

Using Kawa in Emacs

Are there any modes or resources for Kawa in Emacs? I've checked, but am not able to find any. Mostly, I'd like to be able to run a Kawa REPL inside of Emacs, but some kind of completion/syntax checking would be great too.
Koz Ross
  • 3,040
  • 2
  • 24
  • 44
3
votes
1 answer

How to rewrite a calculation in Kawa to Java?

I have coded a simple calculation app using MIT AppInventor and I want to transfer the exact set of calculations to Java for an Android app but they are different frameworks.So I did my best to trandfer the calculation to Java as shown below.But the…
Brian Var
  • 6,029
  • 25
  • 114
  • 212
1
vote
1 answer

`java.lang.NoClassDefFoundError: android/view/View` while trying to build 'HelloWorld' project from android-kawa in Termux

I've been trying to employ Kawa Scheme for developing Android project. I've found two repositories on GitHub: one called 'android-kawa', and another called 'KawaDroid'. They're both a bit dated (last updates were around 2012). In the case of…
Maciek Godek
  • 172
  • 12
1
vote
3 answers

How to show error message from eval in Scheme?

I'm trying to create code that evaluates expression and return error as string for error: (cond-expand (gambit) (gauche) (kawa) (guile (import (rnrs base) (rnrs exceptions) (rnrs conditions)) (define…
jcubic
  • 61,973
  • 54
  • 229
  • 402
1
vote
1 answer

Is there a way to direectly loop over a Java Iterable in Kawa or alternatively loop on the java.util.Iterator

I have not found the way to directly loop over a Java java.lang.Iterable or java.util.Iterator in Kawa (Scheme) using Java interop I can get at my Java java.lang.Iterable and then at my java.util.Iterator and loop over the items using a recursive…
1
vote
1 answer

Scheme (Kawa) - How to force macro expansion inside another macro

I want to make a macro, that when used in class definition creates a field, it's public setter, and an annotation. However, it'd seem the macro is not expanding, mostly because it's used inside other (class definition) macro. Here is an example how…
Coderino Javarino
  • 2,819
  • 4
  • 21
  • 43
1
vote
1 answer

Class loader issues in Kawa when using OrientDB

I'm seeing some odd class loading issues when using Kawa 2.1 and OrientDB (community 2.1.10). My CLASSPATH only contains jars related to kawa and orientdb. The following snippet: (! g (com.tinkerpop.blueprints.impls.orient.OrientGraph…
Sunder
  • 1,445
  • 2
  • 12
  • 22
1
vote
1 answer

JVM Scheme Abstract Syntax Tree access

There are a number of Scheme implementations running on the JVM (e.g. JScheme, Kawa). Do any of them support both of: a) Two-way interoperability with Java. b) Access to the AST for a Scheme expression?
NietzscheanAI
  • 966
  • 6
  • 16
1
vote
2 answers

Listing the contents of a directory (Windows 7)

Using Kawa 1.14. I have tried opening the directory as a file (because file-exists? reports #t), and using read-line to read the "contents", but it does not work. I get an "Access denied" error.
Vince Refiti
  • 483
  • 1
  • 5
  • 9
1
vote
1 answer

Calling scheme function from Java using kawa, but half the returned list is omitted and replaced by three dots (...)

I wrote the following scheme function, which works as expected when called in Dr Racket, but only returns half of the result when called using kawa. (define getYValues (lambda (f base lst) (if (null? lst) base …
Marmoy
  • 8,009
  • 7
  • 46
  • 74
0
votes
2 answers

What is the return type of (display 8) ? / What are void-valued expressions?

In the Kawa implementation of Scheme, the expression (null? ()) obviously returns #t . But if I type (null? (display 8)) into the interpreter, the output is 8#f So it seems as if display is a function that does have a side effect, to wit printing…
Sean Letendre
  • 2,623
  • 3
  • 14
  • 32