larcenists / larceny

Larceny Scheme implementation
Other
202 stars 32 forks source link

larceny -r7rs on Windows #764

Closed olopierpa closed 8 years ago

olopierpa commented 8 years ago

Hello,

on Windows 8, the binary just downloaded from larcenists.org, invoked as "larceny -r7rs" produces the output pasted below. It appears to work only in r5rs mode.

Larceny v0.99 "Goldie" (May 25 2016 12:00:56, precise:Win32:unified) larceny.heap, built on Wed 05/25/2016 Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R6RS/r6rsmode.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R7RS/r7rs-includer.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R7RS/r7rs-cond-expander.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R6RS/r6rs-compat-larceny.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R6RS/r6rs-runtime.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R6RS/r6rs-expander.sch Warning: loading source in favor of stale fasl file: e:\Local\Software\Larceny\larceny-0.99-bin-native-ia32-win32\/lib/R6RS/r6rs-standard-libraries.sch WARNING from macro expander: Syntactic keyword used as a variable begin WARNING from macro expander: Syntactic keyword used as a variable if WARNING from macro expander: Syntactic keyword used as a variable lambda WARNING from macro expander: Syntactic keyword used as a variable quote WARNING from macro expander: Syntactic keyword used as a variable set! WARNING from macro expander: Syntactic keyword used as a variable and WARNING from macro expander: Syntactic keyword used as a variable or WARNING from macro expander: Syntactic keyword used as a variable define WARNING from macro expander: Syntactic keyword used as a variable define-syntax WARNING from macro expander: Syntactic keyword used as a variable let-syntax WARNING from macro expander: Syntactic keyword used as a variable letrec-syntax WARNING from macro expander: Syntactic keyword used as a variable begin WARNING from macro expander: Syntactic keyword used as a variable if WARNING from macro expander: Syntactic keyword used as a variable set! WARNING from macro expander: Syntactic keyword used as a variable and WARNING from macro expander: Syntactic keyword used as a variable or WARNING from macro expander: Syntactic keyword used as a variable lambda WARNING from macro expander: Syntactic keyword used as a variable quote WARNING from macro expander: Syntactic keyword used as a variable define WARNING from macro expander: Syntactic keyword used as a variable define-syntax WARNING from macro expander: Syntactic keyword used as a variable let-syntax WARNING from macro expander: Syntactic keyword used as a variable letrec-syntax

Error: ?: undefined global variable: primitives Entering debugger; type "?" for help. debug>

WillClinger commented 8 years ago

olopierpa wrote:

on Windows 8, the binary just downloaded from larcenists.org, invoked as "larceny -r7rs" produces the output pasted below. It appears to work only in r5rs mode.

Ouch. I thought I had tested that, but evidently not. I'll fix it today.

In the meantime, you can fix it yourself in your local copy by re-compiling the R7RS runtime:

larceny Larceny v0.99 "Goldie" (May 25 2016 12:00:56, precise:Win32:unified) larceny.heap, built on Wed 05/25/2016

(require 'r7rsmode) (larceny:compile-r7rs-runtime)

Will

WillClinger commented 8 years ago

Both of the binary downloads worked for me. I suspect you unpacked the .zip or .tar.gz file and then copied rather than moved the unpacked directory. Copying the directory changes the file modification dates/times, making the compiled .fasl files look stale. If you move/rename the directory instead of copying it, it should work out of the box.

Please let us know if that solves the problem.

olopierpa commented 8 years ago

On Thu, Jun 9, 2016 at 8:15 PM, Will Clinger notifications@github.com wrote:

Both of the binary downloads worked for me. I suspect you unpacked the .zip or .tar.gz file and then copied rather than moved the unpacked directory. Copying the directory changes the file modification dates/times, making the compiled .fasl files look stale. If you move/rename the directory instead of copying it, it should work out of the box.

Solved. No, it was not because of copying. I had unpacked the zip with the windows builtin unzipper, and this results in the following dates & times:

e:/Local/Software/Larceny/larceny-0.99-bin-native-ia32-win32/lib/R7RS: total used in directory 83 available 318823280 drwxrwxrwx 1 pierpa NESSUNO 4096 06-09 21:00 . drwxrwxrwx 1 pierpa NESSUNO 4096 06-09 21:01 .. drwxrwxrwx 1 pierpa NESSUNO 8192 06-09 21:00 scheme -rw-rw-rw- 1 pierpa NESSUNO 29992 06-09 21:00 r7rs-cond-expander.fasl -rw-rw-rw- 1 pierpa NESSUNO 16457 06-09 21:00 r7rs-cond-expander.sch -rw-rw-rw- 1 pierpa NESSUNO 14320 06-09 21:00 r7rs-includer.fasl -rw-rw-rw- 1 pierpa NESSUNO 6948 06-09 21:00 r7rs-includer.sch -rw-rw-rw- 1 pierpa NESSUNO 108 06-09 21:00 r7rsmode.sch

which are the times at which I unpacked the zip.

I tried unpacking with a different unzipper (7zip) and now the dates are correct:

e:/Local/Software/Larceny/larceny-0.99-bin-native-ia32-win32/lib/R7RS: total used in directory 83 available 318793400 drwxrwxrwx 1 pierpa NESSUNO 4096 06-09 21:07 . drwxrwxrwx 1 pierpa NESSUNO 4096 06-09 21:07 .. drwxrwxrwx 1 pierpa NESSUNO 8192 06-09 21:07 scheme -rw-rw-rw- 1 pierpa NESSUNO 29992 05-25 18:04 r7rs-cond-expander.fasl -rw-rw-rw- 1 pierpa NESSUNO 16457 05-25 17:54 r7rs-cond-expander.sch -rw-rw-rw- 1 pierpa NESSUNO 14320 05-25 18:04 r7rs-includer.fasl -rw-rw-rw- 1 pierpa NESSUNO 6948 05-25 17:54 r7rs-includer.sch -rw-rw-rw- 1 pierpa NESSUNO 108 05-25 17:54 r7rsmode.sch

And indeed now it works.

Thank you for the help!