mflatt
2018-11-21 14:33:39

I’m not sure that machine-independent bytecode is going to be worthwhile, but I cleaned up and pushed the linklet-directory/bundle writing change. The part that Pycket needs to define is probably exactly what you have now, and then submodules should work.


samth
2018-11-21 14:44:34

We’ll take a look


samth
2018-11-21 14:48:10

One thing I notice is that the expander now uses fasl, but doesn’t expose the fasl functions


samth
2018-11-21 14:48:35

Can you add those as exports? Otherwise pycket will end up with two copies


samth
2018-11-21 14:57:51

And just to be clear, the new format will involve a fasl format with entries that are also in fasl format, right?


mflatt
2018-11-21 15:49:50

The expander doesn’t actually use racket/fasl; I just forgot to remove racket/fasl from require, and I’ll push that fix later. But if the expander eventually uses racket/fasl, I’d expect to just live with multiple copies.


samth
2018-11-21 17:27:58

@mflatt building the bytecode version of the expander crashes in the decompiler. The command is: ../../bin/racket bootstrap-run.rkt -c compiled/cache-src ++knot read read/api.rkt ++knot read read/primitive-parameter.rkt ++knot read read/readtable-parameter.rkt ++knot read read/readtable.rkt ++knot read read/number.rkt -s -x -B -o compiled/exp.zo and the error is Compiling and decompiling linklet to compiled/exp.zo application: not a procedure; expected a procedure that can be applied to arguments given: #f arguments...: '#hasheq((0 . #<linklet>)) context...: /home/samth/sw/plt/racket/src/expander/extract/decompile.rkt:8:0: compile-and-decompile5 "/home/samth/sw/plt/racket/src/expander/run.rkt": [running body] temp37_0 for-loop run-module-instance!125 for-loop [repeats 1 more time] run-module-instance!125 perform-require!78 Makefile:93: recipe for target 'bytecode' failed


samth
2018-11-21 17:40:18

I just pushed a fix


mflatt
2018-11-21 17:42:26

I guess that’s ok, since older versions of Racket won’t easily bootstrap anymore


mflatt
2018-11-21 17:43:23

Why did you add “cache-dir” to “.gitignore”? Is that created by something that I forgot about? (And if so, I wonder why it’s not in “compiled”.)


samth
2018-11-21 17:45:36

I think the alternative would be to add a primitive table for '#%linklet-expander since that doesn’t exist yet


samth
2018-11-21 17:46:01

I had cache-dir lying around, but it might be from before that went in compiled/ by default


samth
2018-11-21 17:46:04

I can remove that


samth
2018-11-21 21:22:25

@mflatt I wired everything up today, and it all works


samth
2018-11-21 21:22:57

now pycket -l racket/base uses everything from zo, which is very nice


samth
2018-11-21 21:23:25

(it does compile one trivial linklet whose content is (void) (void) but I don’t know where that comes from)