This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: Questions for Geiser
- From: Dan Leslie <dan at ironoxide dot ca>
- To: Per Bothner <per at bothner dot com>
- Cc: Kawa Mailing List <kawa at sourceware dot org>
- Date: Tue, 07 Apr 2015 10:03:53 -0700
- Subject: Re: Questions for Geiser
- Authentication-results: sourceware.org; auth=none
- References: <87d23g4imi dot fsf at ironoxide dot ca> <5523722A dot 3040507 at bothner dot com>
- Reply-to: dan at ironoxide dot ca
Per Bothner <per@bothner.com> writes:
> Not sure what you mean. You can certainly define top-level functions.
> Or rather module-level functions - and those are implicitly added to the
> top-level environment when you load a module.
Heh, I had a feeling I should have been clearer. Nomenclature can
often be a point of confusion when it's not shared. :)
In Guile, Chicken and others there are various actions that are only
available at the REPL, like setting breakpoints and whatnot. Generally a
comma precedes the method name in order to differentiate it from a
symbol that could be found in the active environment.
Geiser exploits the ability to define new functions of this sort in
order to avoid polluting the active environment with geiser-specific
methods. There are perhaps other ways I can avoid name collisions and
other concerns, but my first inclination was to attempt to describe new
toplevel functions of this form.
> The Kawa compiler and run-time do quite a bit of reflection. For example you can
> import a plain-old-Java-class with static fields (using the R7RS import
> command), and the static fields become bindings in the importing scope.
> When you import a module/library, Kawa basically resolves the module to a Java class,
> and then just looks at the public fields of the class, figuring out the bindings
> from those.
Very interesting! Are these utilities documented? I was digging through
the info docs and website yesterday, but I readily accept that I may
have overlooked it.
> Kawa does support R7RS eval and load, where you can specify an environment to use,
> in the form of R7RS environment specifiers. See:
>
> http://www.gnu.org/software/kawa/Eval-and-Environments.html
>
>> I hope that wasn't to abrupt of me. I'm rather curious about this scheme
>> of which I haven't a whole lot of experience. :)
>
> Kawa is also very module-centric. I suggest reading this:
>
> http://www.gnu.org/software/kawa/Module-classes.html
> http://www.gnu.org/software/kawa/Importing.html
Ah yes, I read that. I take it that unless a R7RS define-library
expression is used that a "module" consists of all definitions found
within a given file, with visibility determined by the documented export
expressions?
I am absolutely green to Kawa; if that wasn't obvious. :)
-Dan
--
-Dan Leslie