From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 116956 invoked by alias); 7 Apr 2015 17:04:05 -0000 Mailing-List: contact kawa-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: kawa-owner@sourceware.org Received: (qmail 116947 invoked by uid 89); 7 Apr 2015 17:04:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.6 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-pa0-f42.google.com Received: from mail-pa0-f42.google.com (HELO mail-pa0-f42.google.com) (209.85.220.42) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 07 Apr 2015 17:03:57 +0000 Received: by patj18 with SMTP id j18so84780034pat.2 for ; Tue, 07 Apr 2015 10:03:55 -0700 (PDT) X-Received: by 10.70.1.227 with SMTP id 3mr37905744pdp.110.1428426235821; Tue, 07 Apr 2015 10:03:55 -0700 (PDT) Received: from Shodan ([169.145.120.130]) by mx.google.com with ESMTPSA id by13sm8605347pdb.37.2015.04.07.10.03.54 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 07 Apr 2015 10:03:54 -0700 (PDT) References: <87d23g4imi.fsf@ironoxide.ca> <5523722A.3040507@bothner.com> From: Dan Leslie To: Per Bothner Cc: Kawa Mailing List Subject: Re: Questions for Geiser Reply-To: dan@ironoxide.ca In-reply-to: <5523722A.3040507@bothner.com> Date: Tue, 07 Apr 2015 17:04:00 -0000 Message-ID: <87619750qu.fsf@ironoxide.ca> MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2015-q2/txt/msg00022.txt.bz2 Per Bothner 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