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.
We’ll take a look
One thing I notice is that the expander now uses fasl, but doesn’t expose the fasl functions
Can you add those as exports? Otherwise pycket will end up with two copies
And just to be clear, the new format will involve a fasl format with entries that are also in fasl format, right?
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.
@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
I just pushed a fix
I guess that’s ok, since older versions of Racket won’t easily bootstrap anymore
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”.)
I think the alternative would be to add a primitive table for '#%linklet-expander
since that doesn’t exist yet
I had cache-dir
lying around, but it might be from before that went in compiled/
by default
I can remove that
@mflatt I wired everything up today, and it all works
now pycket -l racket/base
uses everything from zo, which is very nice
(it does compile one trivial linklet whose content is (void) (void)
but I don’t know where that comes from)