chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] Some questions about loading libraries


From: Matt Gushee
Subject: Re: [Chicken-users] Some questions about loading libraries
Date: Sun, 20 Jan 2013 21:39:57 -0700

Just a quick update--

I am gradually working out the practical issues affecting my project (think I'm going to go OO for the database layer and any other core components that need to be interchangeable. I am still wondering about a couple of points I mentioned:

On Thu, Jan 17, 2013 at 3:44 PM, Matt Gushee <address@hidden> wrote:
 
On Tue, Jan 15, 2013 at 12:42 PM, Felix <address@hidden> wrote:
 
You could implement your own routine (probably based on "load"), which
scans a number of directories. "repository-path" is for eggs, and "require"
respects it. You can also add directories to "##sys#include-pathnames".
I think "require" will try this too.

I tried this, and on my system it only works for 'include', not for 'require'. BTW, I have Chicken 4.8.0 on Arch Linux. I compiled the package myself, but only in order to have the latest version; i.e. I didn't hack anything. There were no patches, and the build() function in the PKGBUILD script is:

> 4) Is LOAD-RELATIVE broken?
 
It means that if loading is chained, nested "load-relative" calls with
load files relative to the outer "load"/"load-relative" invocations. e.g. 
file a.scm:

...
(load "foo/b.scm")
...

file foo/b.scm:

...
(load-relative "c.scm")         ; <- will load "foo/c.scm"
...

Ohhhh, I see. This works for interpreted but not compiled code. At least that's how it is for me. Is that expected behavior? I didn't understand that from the docs.

Fairly minor points, but something is clearly wrong. Is there a problem with my expectations, or are we looking at bugs here?

--
Matt Gushee


reply via email to

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