This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: questions about kawa (or possibly scheme)


* Don Cohen [2008-09-09 21:45+0200] writes:

> Per Bothner writes:
>
>  > > The main question is where I should look (if there is any such place)
>  > > for answers to questions such as those below.
> Since there's no answer, I guess this is the place.

Darius Bacon's "Scheme for Common Lispers" could be useful:
http://www.accesscom.com/~darius/writings/scheme-for-lispers.html

> I was hoping to browse the list and thus find functions/variables
> of interest.  What's the proper way to find out what's there?
> I tried looking at the latest scheme spec index but I don't see things
> like write -- which I just guessed by luck after print didn't work.

To list all variables in the REPL, I use something like this:

 (do ((enum ((<gnu.mapping.Environment>:current):enumerateAllLocations)))
     ((not (enum:hasMoreElements)))
   (format #t "~a~%" (enum:nextLocation)))

But often there is no other way than to grep through Kawa's source code.

> At a higher level the objective is to write applications in lisp 
> (I'm hoping scheme will suffice) while using java for the UI.
> I've been assuming that it's easy from a java app to create a kawa
> process, pass it strings to read/eval/print, get the string outputs
> from print and put them into the java UI.
> Is this plan impacted by kawa being compiler oriented, or anything
> else that you can tell?

This sounds like a good plan.  The compiler-orientedness matters when
you use modules: non-exported functions will be compiled down to JVM
methods, and you can't no longer call them (easily) from the REPL.
Redefining them is also not so easy.  Of course, those issues are only
relevant during development.  

The compiler is very useful when interacting with Java: you get compile
time warnings when calling undefined methods etc.

A slight annoyance when interacting with Lisp, is that Kawa's
reader/printer treats `:' specially, i.e. you can't use CL-style
symbols easily. E.g: ':foo => foo:

Helmut.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]