Discussion:
[Larceny-users] Importing (srfi :19 time)
Eduardo Cavazos
2010-03-20 09:33:05 UTC
Permalink
Hello,

Here's what I'm getting when I import SRFI 19:

~ $ LARCENY_LIBPATH='' larceny --err5rs
Larceny v0.97 "Funny in the Head" (Aug 19 2009 06:31:24,
precise:Linux:unified)
larceny.heap, built on Wed Aug 19 06:33:35 EDT 2009
ERR5RS mode (no libraries have been imported)
(import (srfi :19 time))
Autoloading (srfi :19 time)


Error: environment-get-cell: denotes a macro: cond-expand
Entering debugger; type "?" for help.
debug>

Does this work for any of y'all?

Ed
Eduardo Cavazos
2010-03-20 09:34:31 UTC
Permalink
Here's what I get when I try to use the SRFI 19 from Derrick's collection:

Error: Undefined global variable "current-utc-time".
Entering debugger; type "?" for help.

Ed
w***@ccs.neu.edu
2010-03-20 14:27:21 UTC
Permalink
Post by Eduardo Cavazos
~ $ LARCENY_LIBPATH='' larceny --err5rs
Larceny v0.97 "Funny in the Head" (Aug 19 2009 06:31:24,
precise:Linux:unified)
larceny.heap, built on Wed Aug 19 06:33:35 EDT 2009
ERR5RS mode (no libraries have been imported)
(import (srfi :19 time))
Autoloading (srfi :19 time)
Error: environment-get-cell: denotes a macro: cond-expand
Entering debugger; type "?" for help.
debug>
Does this work for any of y'all?
Yes. Just tested under both Linux and Mac OS X, and it
worked for me.

I'd suggest downloading a clean binary in some temporary
directory. If it doesn't work, then the problem may have
to do with differences between your Linux and ours. If
the clean download works, then you should suspect changes
you've made in your Larceny directories.

Will
Eduardo Cavazos
2010-03-20 14:42:02 UTC
Permalink
Post by w***@ccs.neu.edu
I'd suggest downloading a clean binary in some temporary
directory. If it doesn't work, then the problem may have
to do with differences between your Linux and ours. If
the clean download works, then you should suspect changes
you've made in your Larceny directories.
(import (srfi :19 time))
Autoloading (srfi :19 time)
Warning: loading source in favor of stale fasl file:
/tmp/larceny-0.97-bin-native-ia32-linux86/lib/Standard/time.sch
Warning: loading source in favor of stale fasl file:
/tmp/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-i386.sch
Warning: loading source in favor of stale fasl file:
/tmp/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-linux-x86.sch
But, notice the warnings. Did you get those?

Ed
Eduardo Cavazos
2010-03-20 14:47:10 UTC
Permalink
Also, the 'cal' program I posted to c.l.s about works fine:

~ $ larceny --r6rs --program ~/scratch/_cal-c.sps
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Standard/time.sch
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-i386.sch
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-linux-x86.sch
March 2010
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31
~ $ larceny --r6rs --program ~/scratch/_cal-c.sps -- 1 2012
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Standard/time.sch
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-i386.sch
Warning: loading source in favor of stale fasl file:
/home/dharmatech/src/larceny-0.97-bin-native-ia32-linux86/lib/Ffi/ffi-linux-x86.sch
January 2012
Su Mo Tu We Th Fr Sa
1 2 3 4 5 6 7
8 9 10 11 12 13 14
15 16 17 18 19 20 21
22 23 24 25 26 27 28
29 30 31
~ $
William D Clinger
2010-03-20 19:16:42 UTC
Permalink
Post by Eduardo Cavazos
But, notice the warnings. Did you get those?
Yes. That might be related to dynamic recompilation
by the FFI, but I'll have to check.

Will
Felix Klock
2010-03-20 22:39:39 UTC
Permalink
Post by William D Clinger
Post by Eduardo Cavazos
But, notice the warnings. Did you get those?
Yes. That might be related to dynamic recompilation
by the FFI, but I'll have to check.
I think those warnings are signaled not by the FFI, but rather our load or require procedure.

They try to do some magic to load fasls rather than source code by inspecting timestamps and assuming that if the fasl's timestamp is more recent that the source file, then it is the compiled version of that source code.

The problem (I believe) is that unpacking a tarball can mess up the timestamps, so that a source file will be marked as more recent than the fasl.

-Felix
Felix Klock
2010-03-20 22:43:56 UTC
Permalink
Post by Felix Klock
Post by William D Clinger
Post by Eduardo Cavazos
But, notice the warnings. Did you get those?
Yes. That might be related to dynamic recompilation
by the FFI, but I'll have to check.
I think those warnings are signaled not by the FFI, but rather our load or require procedure.
A quick couple of grep's give weight to this hypothesis; check out the format invocation in src/Lib/Common/require.sch:

(define (warn src)
(if noisy
(format #t "Warning: loading source in favor of stale fasl file: ~a~%"
src))
src)

-Felix

Loading...