guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: PHP to GUILE


From: Vorfeed Canal
Subject: Re: PHP to GUILE
Date: Mon, 26 Sep 2005 12:17:15 +0400

On 9/26/05, Zeeshan Ali <address@hidden> 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 #<procedure #f ()> #<procedure #f ()>
#<procedure #f ()>]
   ?: 21* [#<procedure #f ()>]
   ?: 22* (let* ((file #)) (cond (# => #) (# => #)))
   ?: 23  [#<procedure #f #>
"/usr/share/guile/site/xchat-guile/plugin-system.scm"]
   ?: 24  [load-file #<primitive-procedure primitive-load> ...]
   ?: 25* [save-module-excursion #<procedure #f ()>]
   ?: 26  (let (# #) (dynamic-wind # thunk #))
   ?: 27  [dynamic-wind #<procedure #f ()> #<procedure #f ()>
#<procedure #f ()>]
   ?: 28* [#<procedure #f ()>]
   ?: 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)))]

<unnamed port>: In procedure process-use-modules in expression
(process-use-modules (list #)):
<unnamed port>: 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.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]