Discussion:
[Larceny-users] Evaluate <expr> at startup does not work for import
Marijn Schouten (hkBst)
2009-05-13 13:55:51 UTC
Permalink
Hi,

I noticed that it doesn't seem to work when you try to import at startup.


$ larceny -err5rs -- -e "(import (rnrs))"
Larceny v0.97a4 (alpha test) (May 10 2009 12:38:12, precise:Linux:unified)


Error: Undefined global variable "rnrs".
Entering debugger; type "?" for help.
debug> #<EOF>
Error while evaluating (import (rnrs))
larceny.heap, built on zo mei 10 12:39:01 CEST 2009
ERR5RS mode (no libraries have been imported)
$ larceny -err5rs
Larceny v0.97a4 (alpha test) (May 10 2009 12:38:12, precise:Linux:unified)
larceny.heap, built on zo mei 10 12:39:01 CEST 2009
ERR5RS mode (no libraries have been imported)
(import (rnrs))
Autoloading (rnrs)
Autoloading (rnrs enums)
Autoloading (rnrs lists)
Autoloading (rnrs syntax-case)
Autoloading (rnrs conditions)
Autoloading (err5rs records procedural)
Autoloading (rnrs exceptions)
Autoloading (rnrs hashtables)
Autoloading (rnrs arithmetic bitwise)
Autoloading (rnrs programs)
Autoloading (rnrs files)
Autoloading (rnrs io ports)
Autoloading (larceny deprecated)
Autoloading (rnrs records syntactic)
Autoloading (rnrs records procedural)
Autoloading (rnrs control)
Autoloading (rnrs sorting)
Autoloading (rnrs bytevectors)
Autoloading (rnrs unicode)
I would like to start larceny in a way that loads syntax-case before loading
whatever file I want to run (also in the same command). Is that possible?

Thanks,

Marijn

PS My svn troubles were caused by using neon-0.28.4. I've downgraded to
neon-0.28.3 and now svn works fine again.

- --
If you cannot read my mind, then listen to what I say.

Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
<http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
William D Clinger
2009-05-13 14:47:45 UTC
Permalink
Post by Marijn Schouten (hkBst)
I noticed that it doesn't seem to work when you try to import at startup.
In Larceny, all code that is evaluated using the -e
command-line option must be written in R5 Scheme.
That allows you to load R5RS code at startup, even
if the mode is ERR5RS.

I suppose we could add an -eERR5RS command-line option,
but right now we're trying to figure out how to reduce
the number of command-line options we have to support.

In R6RS mode, of course, the -e command-line option isn't
interpreted at all.
Post by Marijn Schouten (hkBst)
I would like to start larceny in a way that loads syntax-case before loading
whatever file I want to run (also in the same command). Is that possible?
I don't think that's feasible in Larceny's ERR5RS mode.
On the other hand, it sounds as though you may be trying
to run something as a batch program, in which case R6RS
mode might work for you.
Post by Marijn Schouten (hkBst)
PS My svn troubles were caused by using neon-0.28.4. I've downgraded to
neon-0.28.3 and now svn works fine again.
Thank you for following up on that.

Will

Loading...