[Larceny-users] on porting to larceny

William D Clinger will at ccs.neu.edu
Sat Dec 27 14:20:51 EST 2008


Marco Moggi wrote:
> The built in PARAMETERIZE does not act as a
> LETREC-like form:

That has been logged as a requested enhancement
(ticket #601).

> If I have not missed it in the source, the FFI
> does not implement peekers and pokers for "long
> double" and "long long".  They are unusual, but if
> the cost of adding them is small...

I don't think they are supported by all C compilers,
so trying to support them in our basic FFI might
compromise portability.  Perhaps they should go into
a dynamically loadable library.

> the phrase "You can checkout the source
> anonymously by following the instructions at
> SvnHttpCheckout." does not jump into my eyes.
> IMHO it should.

I revised the main Wiki page.

> Cough... sorry for making myself a nuisance,
> but can LARCENYLIBPATH be renamed to
> LARCENY_LIBPATH? It would be more readable.

Will do.

> I tried to run compiled Larceny programs using
> the "binfmt_misc" Linux  kernel module, but it has
> not worked  because "larceny -r6rs  -program" does
> not like compiled files.

I don't know anything about binfmt_misc, but I do
know that Larceny runs compiled top-level programs
via a "larceny -r6rs -program <mypgm>" command.

> I cannot use COMPILE-STALE-LIBRARIES because
> when  there are the following files in the same
> directory:
>
> compat.ikarus.sls
> compat.larceny.sls
> compat.ypsilon.sls
>
> Larceny attempts to compile all of them, not only
> the "larceny.sls" one.

That has been logged as a requested enhancement
(ticket #602).

> If I now run programs that import the libraries
> sometimes they work, other times I get the "Client
> was expanded against a different build of this
> library."

Are you saying that you have some program A that
works sometimes but not others, without any
intervening changes to program A or to any of the
libraries or to any compiled files at all?

Or are you saying that it works for some programs
but not for others?

> Even when running the Larceny REPL, doing:
>
> > (import (rnrs))
> > (import (uriel foreign))
>
> raises the error about "(uriel  cstring)", but in
> Uriel's compilation script I have:
>
> | (compile-library "uriel/cstring.sls"
> |                  "uriel/cstring.larceny.slfasl")
> | (compile-library "uriel/foreign.sls"
> |                  "uriel/foreign.larceny.slfasl")
>
> so cstring is compiled first.  I dunno what to do.

It sounds as though (uriel foreign) might import some
library L that (hereditarily) imports some library L2
that (hereditarily) imports (uriel cstring), and that
your script is either failing to compile L2 or is
compiling it before (uriel cstring).  But that's just
a guess.

> Is there an automagic way to get a list of non-R6RS
> Larceny bindings that may be useful in R6RS mode?

Almost.  Larceny's apropos procedure can be used to
compute a list of *all* variables present within the
current interaction environment.  That list will
include some (but not all) R6RS bindings as well
as Larceny's bindings, and it will also include
bindings for deprecated features you shouldn't use.

    % larceny
    Larceny v0.97a2 (alpha test)....
    > (require 'apropos)
    #t
    > (apropos "")
    (%get-int %get-long %get-pointer %get-short ...)

Will



More information about the Larceny-users mailing list