samth
2017-2-21 13:39:53

yay, it works


samth
2017-2-21 13:40:24

I updated my PR to be able to directly run a racket file using chez, and it works for a trivial racket/base program


samth
2017-2-21 13:40:37

unfortunately, extracting a module that uses displayln doesn’t work


samth
2017-2-21 22:30:19

@mflatt extraction appears to have a bug when run to #lang typed/racket/base programs


samth
2017-2-21 22:30:24
Flattening to a single linklet...
list-ref: contract violation
  expected: pair?
  given: '#s(linklet #~6.8.1.4D#�#~6.8.1.4B=
*AJZq����                          *?Vas�������'4I[h���������
                     b�����P;	Z	w
O
 �
  ��Hdelay/idleOmake-promise/idleJdelay/thread...
  argument position: 1st
  other arguments...:
   1
  context...:
   /home/samth/tmp/linklet/pkgs/expander/run/linklet.rkt:255:0: extract-import-variables-from-expression25
   /home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:65:2: for-loop
   /home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:55:0: pick-variable-names21
   /home/samth/tmp/linklet/pkgs/expander/extract/flatten.rkt:13:0: flatten!12
   /home/samth/tmp/linklet/pkgs/expander/extract/main.rkt:23:0: extract11
   "/home/samth/tmp/linklet/pkgs/expander/run.rkt": [running body]
   for-loop_82
   run-module-instance!123.1
   for-loop_81
   for-loop_80
   run-module-instance!123.1
   perform-require!74.1

samth
2017-2-21 22:30:41

looking at the stack trace was not illuminating, sadly


mflatt
2017-2-21 23:02:59

@samth Is it possible that you’re using a -c directory that has been used in compiled mode (instead of source mode)?


samth
2017-2-21 23:03:26

I got the same error with just a #lang racket file, so maybe that’s it


mflatt
2017-2-21 23:03:31

In any case, I don’t think you’re going to be able to extract from a typed/racket/base program, because it’s likely to depend on syntax


samth
2017-2-21 23:36:00

removing the cache directory fixed it for #lang racket, although that produces an odd chez error that I don’t understand yet


samth
2017-2-21 23:45:08

unfortunately the weird error looks like either a bug in your error handler that prints stack traces or (more likely) a chez bug


samth
2017-2-21 23:46:12

I’m currently going from Exception: variable \x31;/exn:fail:syntax is not bound with the regular Chez error handler to compile: ~? in call to ~s with yours


samth
2017-2-21 23:48:28

one thing to note: chez prints the symbol 1/x as \x31;/x