From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Vorfeed Canal Newsgroups: gmane.lisp.guile.user Subject: Re: PHP to GUILE Date: Mon, 26 Sep 2005 12:17:15 +0400 Message-ID: <6efab23505092601173a0b89b5@mail.gmail.com> References: <6efab235050925145055ba774c@mail.gmail.com> <87ll1k61w4.fsf@zip.com.au> <38294b7405092600273de6d37f@mail.gmail.com> Reply-To: Vorfeed Canal NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1127733542 7949 80.91.229.2 (26 Sep 2005 11:19:02 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 26 Sep 2005 11:19:02 +0000 (UTC) Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Mon Sep 26 13:19:01 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EJqzS-0004NT-PP for guile-user@m.gmane.org; Mon, 26 Sep 2005 13:17:47 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EJqzR-00040W-Vh for guile-user@m.gmane.org; Mon, 26 Sep 2005 07:17:46 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EJoIw-0004Dx-0S for guile-user@gnu.org; Mon, 26 Sep 2005 04:25:42 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EJoGt-0003tP-95 for guile-user@gnu.org; Mon, 26 Sep 2005 04:23:35 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EJoAl-0002e8-Up for guile-user@gnu.org; Mon, 26 Sep 2005 04:17:16 -0400 Original-Received: from [72.14.204.199] (helo=qproxy.gmail.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EJoAl-0007nk-Mi for guile-user@gnu.org; Mon, 26 Sep 2005 04:17:15 -0400 Original-Received: by qproxy.gmail.com with SMTP id e12so397662qbe for ; Mon, 26 Sep 2005 01:17:15 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=gZUA8qpqXmpRdchNHitQJJaxih09D7M3NIXtUnKiv2eGSSHXb15J3ak37KI7Rzd8/Fq4cRjQJSzXxcWTwlUea+5CYTkdu40c2Zzds786xMrOsd+ht5PkqdABkxHU2ivcuZs3Ovn1/hn+1Gl7Ptlr8fYu3jqAG6Wnwy3LaHUukx4= Original-Received: by 10.65.52.6 with SMTP id e6mr508634qbk; Mon, 26 Sep 2005 01:17:15 -0700 (PDT) Original-Received: by 10.65.100.16 with HTTP; Mon, 26 Sep 2005 01:17:15 -0700 (PDT) Original-To: guile-user@gnu.org In-Reply-To: <38294b7405092600273de6d37f@mail.gmail.com> Content-Disposition: inline X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:4771 Archived-At: On 9/26/05, Zeeshan Ali wrote: > > With a full path to `load-extension' you can put a module anywhere. > > If your code is a package in its own right then this is a good thing, > > so you can be certain to get the right file (ie. whatever crazy > > directory the user might have given). > > Yeah! and you can have a look at the source code of xchat-guile to > see how exactly thats done: > http://piipiip.net/~zeenix/xchat-guile-0.2.tar.gz I took a look. Conclusion: it's a mess. Why? Easy: guile.so is installed in /usr/lib/xchat/plugins while plugin-system.scm in installed iin /usr/share/guile/site/xchat-guile. Ok, if it's in /usr/share/guile/site/xchat-guile then it's guile extension, right ? Sorry, but no: guile> (use-modules (xchat-guile plugin-system)) Backtrace: In unknown file: ?: 14* (if (or # #) (try-load-module name)) ?: 15 [try-load-module (xchat-guile plugin-system)] ?: 16 (or (begin (try-module-linked name)) (try-module-autoload name) .= ..) ?: 17* [try-module-autoload (xchat-guile plugin-system)] ?: 18 (let* (# # # #) (resolve-module dir-hint-module-name #f) (and # #= )) ... ?: 19 (letrec ((load-file #)) (dynamic-wind (lambda () #) (lambda () #) ...) ...) ?: 20* [dynamic-wind # # #] ?: 21* [#] ?: 22* (let* ((file #)) (cond (# =3D> #) (# =3D> #))) ?: 23 [# "/usr/share/guile/site/xchat-guile/plugin-system.scm"] ?: 24 [load-file # ...] ?: 25* [save-module-excursion #] ?: 26 (let (# #) (dynamic-wind # thunk #)) ?: 27 [dynamic-wind # # #] ?: 28* [#] ?: 29* [primitive-load "/usr/share/guile/site/xchat-guile/plugin-system.= scm"] In /usr/share/guile/site/xchat-guile/plugin-system.scm: 6: 30* (use-modules (xchat-guile main)) 6: 31 (eval-case (# # *unspecified*) (else #)) 6: 32 (begin (process-use-modules (list (list #))) *unspecified*) In unknown file: ?: 33* [process-use-modules (((xchat-guile main)))] : In procedure process-use-modules in expression (process-use-modules (list #)): : no code for module (xchat-guile main) ABORT: (misc-error) And in this case it's easy to move plugin-system.scm to /usr/lib/xchat/plugins (where it belongs) since guile DOES have adjustable %load-path . GUILE does NOT have something similar for native libraries. That's the problem. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user