From: Per Bothner <per@bothner.com>
To: dan@ironoxide.ca, Kawa Mailing List <kawa@sourceware.org>
Subject: Re: Questions for Geiser
Date: Tue, 07 Apr 2015 05:59:00 -0000 [thread overview]
Message-ID: <5523722A.3040507@bothner.com> (raw)
In-Reply-To: <87d23g4imi.fsf@ironoxide.ca>
On 04/06/2015 10:23 PM, Dan Leslie wrote:
>
> I began efforts to add support for Kawa to Geiser while on my way home
> from work. A bit of forewarning: due to day job and family constraints
> most of my FOSS efforts are in those moments where I can find some time
> on the train to hack.
>
> Anyhow, I've several questions I'd like to raise:
>
> 1. Is there a way to define new top level methods? Or rather, are
> top level methods a thing in Kawa? Not that this is a blocker, I'm
> simply curious.
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.
(I use "module" similarly to R7RS uses the term library.)
A named top-level function is compiled a primary method that implements it,
possibly some helper methods (that I'll ignore for now), and a field
that holds the function as a value.
> 2. What reflection and completion utilities are available, if any? I
> noticed that SchemeWay effectively overrides relevant binding routines
> in order to keep a dictionary for reflection; that doesn't seem like
> an approach that would be reasonable to maintain or one that I'd like to mimic.
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.
> 3. Geiser is very module-centric, and supports behaviours wherein its
> aware of the R7RS-library or implementation-specific module in which a
> symbol lays and will rebind it appropriately when a relevant region or
> other is evaluated. What tools does Kawa provide for, say, declaring the
> library/module/namespace in which a block is to be evaluated?
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
--
--Per Bothner
per@bothner.com http://per.bothner.com/
next prev parent reply other threads:[~2015-04-07 5:59 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-07 5:23 Dan Leslie
2015-04-07 5:59 ` Per Bothner [this message]
2015-04-07 7:58 ` Helmut Eller
2015-04-07 17:08 ` Dan Leslie
2015-04-07 18:43 ` Per Bothner
2015-04-07 17:04 ` Dan Leslie
2015-04-07 19:01 ` Per Bothner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5523722A.3040507@bothner.com \
--to=per@bothner.com \
--cc=dan@ironoxide.ca \
--cc=kawa@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).