From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: rm@fabula.de Newsgroups: gmane.lisp.guile.devel Subject: Re: What replaces scm_register_module_xxx (Doc update?) Date: Thu, 8 Aug 2002 18:19:58 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <20020808161958.GA24162@www> References: <20020808134824.GB23831@www> <20020808102103.021cdc0c.dsmith@altustech.com> <874re5mnfs.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1028822902 26145 127.0.0.1 (8 Aug 2002 16:08:22 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 8 Aug 2002 16:08:22 +0000 (UTC) Cc: "Dale P. Smith" , guile-devel@gnu.org Return-path: Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17cppk-0006nY-00 for ; Thu, 08 Aug 2002 18:08:20 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.35 #1 (Debian)) id 17cpqT-0006e3-00; Thu, 08 Aug 2002 12:09:05 -0400 Original-Received: from www.elogos.de ([212.18.192.92]) by fencepost.gnu.org with smtp (Exim 3.35 #1 (Debian)) id 17cppU-0006Ur-00 for ; Thu, 08 Aug 2002 12:08:04 -0400 Original-Received: by www.elogos.de (Postfix, from userid 5001) id A03D21049A6; Thu, 8 Aug 2002 18:19:58 +0200 (CEST) Original-To: Rob Browning Content-Disposition: inline In-Reply-To: <874re5mnfs.fsf@raven.i.defaultvalue.org> User-Agent: Mutt/1.3.24i Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1014 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1014 On Thu, Aug 08, 2002 at 09:31:51AM -0500, Rob Browning wrote: > "Dale P. Smith" writes: > > > The new method is to use a .scm file that defines the module, > > dynamically loads the compiled code, and then exports whatever you > > need. > > Right. > > (define-module (foo bar)) > (load-extension "libguile-foo-bar-v-1" "init_guile_foo_bar-v-1") > (export foo-1) > (export foo-2) > (export bar-1) > ... I think there's a misunderstanding/misconception here (or, better: in guile's current C api). The 'load-c-functions-through-scheme' aproach might be fine and all that's needed as long as we only want to extend _guile_ (the application) with external libs. But guile is inteded to be an embedded srcipting language as well (at least that's what the documentation says). If i want my users to be able to script some of my applications functionality there's no library i can load with 'load-extension' -- of course i could put the tiny scm_* wrapper functions into a dll and have _that_ loaded, but i wouldn't call this good design practise (oh, i could 'load-extension' my own application instead, but that's not really portable ...). Having to provide (and deploy!) scm file(s) just to be able to put my functions into different modules feels clumsy. BTW, another problem i see (and face in mod_guile): with the above mentioned approach it seems to be impossible for one dll to provide functions that go into different modules. ;; file: foo/strings (define-module (foo strings)) (load-extension "libguile-foo-bar-v-1" "init_guile_foo_bar-v-1") (export foo-1) (export foo-2) (export bar-1) ;; file: foo/utils (define-module (foo utils)) (load-extension "libguile-foo-bar-v-1" "init_guile_foo_bar-v-1") (export foo-4) (export foo-5) Probably doesn't work as expected, or? Ralf Mattes _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel