* [r6rs] on libraries extensions and search paths
@ 2010-06-07 19:58 Marco Maggi
2010-06-07 21:43 ` Andy Wingo
0 siblings, 1 reply; 5+ messages in thread
From: Marco Maggi @ 2010-06-07 19:58 UTC (permalink / raw)
To: guile-user
Many R6RS implementations support searching for libraries in
files ending with the ".sls" extension, giving precedence to
an implementation-specific extension; for example: when
both
mine.sls
mine.guile.sls
files are present, Guile should load "mine.guile.sls" when
looking for "(mine)". Is there a plan to add this?
Many R6RS implementation allow the selection of a search
path for libraries through an environment variable; what
about "GUILE_R6RS_LIBPATH"?
--
Marco Maggi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [r6rs] on libraries extensions and search paths
2010-06-07 19:58 [r6rs] on libraries extensions and search paths Marco Maggi
@ 2010-06-07 21:43 ` Andy Wingo
2010-06-08 5:03 ` Marco Maggi
0 siblings, 1 reply; 5+ messages in thread
From: Andy Wingo @ 2010-06-07 21:43 UTC (permalink / raw)
To: Marco Maggi; +Cc: guile-user
On Mon 07 Jun 2010 21:58, Marco Maggi <marco.maggi-ipsu@poste.it> writes:
> Many R6RS implementations support searching for libraries in
> files ending with the ".sls" extension, giving precedence to
> an implementation-specific extension; for example: when
> both
>
> mine.sls
> mine.guile.sls
>
> files are present, Guile should load "mine.guile.sls" when
> looking for "(mine)". Is there a plan to add this?
I believe that if you modify %load-extensions you can achieve this
effect. I would rather not do it by default due to the stat penalty.
(set! %load-extensions '(".guile.sls" ".sls" ".scm" ""))
See "Loading" in the manual.
> Many R6RS implementation allow the selection of a search
> path for libraries through an environment variable; what
> about "GUILE_R6RS_LIBPATH"?
See GUILE_LOAD_PATH and %load-patch in the manual. See also docs on
GUILE_LOAD_COMPILED_PATH, which currently only exist in the NEWS (ugh).
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [r6rs] on libraries extensions and search paths
2010-06-07 21:43 ` Andy Wingo
@ 2010-06-08 5:03 ` Marco Maggi
2010-06-08 7:34 ` Andy Wingo
2010-06-08 7:34 ` Andy Wingo
0 siblings, 2 replies; 5+ messages in thread
From: Marco Maggi @ 2010-06-08 5:03 UTC (permalink / raw)
To: Andy Wingo; +Cc: guile-user
"Andy Wingo" wrote:
> I believe that if you modify %load-extensions you can
> achieve this effect. I would rather not do it by default
> due to the stat penalty.
>
> (set! %load-extensions '(".guile.sls" ".sls" ".scm" ""))
Do you mean to edit boot-9.scm or something like that?
Petite Chez Scheme allows to set the extensions from an
environment variable...
--
Marco Maggi
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [r6rs] on libraries extensions and search paths
2010-06-08 5:03 ` Marco Maggi
@ 2010-06-08 7:34 ` Andy Wingo
2010-06-08 7:34 ` Andy Wingo
1 sibling, 0 replies; 5+ messages in thread
From: Andy Wingo @ 2010-06-08 7:34 UTC (permalink / raw)
To: Marco Maggi; +Cc: guile-user
On Tue 08 Jun 2010 07:03, Marco Maggi <marco.maggi-ipsu@poste.it> writes:
> "Andy Wingo" wrote:
>> I believe that if you modify %load-extensions you can
>> achieve this effect. I would rather not do it by default
>> due to the stat penalty.
>>
>> (set! %load-extensions '(".guile.sls" ".sls" ".scm" ""))
>
> Do you mean to edit boot-9.scm or something like that?
> Petite Chez Scheme allows to set the extensions from an
> environment variable...
Heh, I meant from the repl. From the command line you could run guile -l
my-init.scm -s my-prog.scm.
Andy
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [r6rs] on libraries extensions and search paths
2010-06-08 5:03 ` Marco Maggi
2010-06-08 7:34 ` Andy Wingo
@ 2010-06-08 7:34 ` Andy Wingo
1 sibling, 0 replies; 5+ messages in thread
From: Andy Wingo @ 2010-06-08 7:34 UTC (permalink / raw)
To: Marco Maggi; +Cc: guile-user
On Tue 08 Jun 2010 07:03, Marco Maggi <marco.maggi-ipsu@poste.it> writes:
> "Andy Wingo" wrote:
>> I believe that if you modify %load-extensions you can
>> achieve this effect. I would rather not do it by default
>> due to the stat penalty.
>>
>> (set! %load-extensions '(".guile.sls" ".sls" ".scm" ""))
>
> Do you mean to edit boot-9.scm or something like that?
> Petite Chez Scheme allows to set the extensions from an
> environment variable...
One more thing: an env var would not be a bad idea. Patches accepted :)
A
--
http://wingolog.org/
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-06-08 7:34 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-07 19:58 [r6rs] on libraries extensions and search paths Marco Maggi
2010-06-07 21:43 ` Andy Wingo
2010-06-08 5:03 ` Marco Maggi
2010-06-08 7:34 ` Andy Wingo
2010-06-08 7:34 ` Andy Wingo
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).