mosh
mosh copied to clipboard
Stop using Gauche in the bootstrap process
It seems porting vm.scm to Mosh is not trivial. I think it would be a few hours of work If everything goes well.
Reduced 1 gosh dependency.
Notes for myself. I was not able to make vm.scm work with Mosh. Still need more work higepon/mosh at gosh_vm2.
What to do
Use mosh instead of gosh in /root/mosh.git/boot/Makefile.
psyntax-mosh-image.scmc: runtimes/psyntax-mosh/psyntax.scm compiler-vm.scm
gosh vm.scm compile-file-without-macro $< > $@
sed -i -e "s/#\\\\null/#\\\\nul/g;s/|\.\.\.|/\.\.\./g" $@
match.scmc: baselib/match.scm compiler-vm.scm
gosh vm.scm compile-file-without-macro $< > $@
sed -i -e "s/#\\\\null/#\\\\nul/g;s/|\.\.\.|/\.\.\./g" $@
baselib.scmc: baselib.scm compiler-vm.scm
gosh vm.scm compile-file-with-macro $< > $@
sed -i -e "s/#\\
Notes
- nmosh using vm.scm in mosh.git/misc/scripts/gen-nmosh-bootstrap.sps. It converts vm.scm => vm.sls. Is this being used? cc @okuoku
- vm.scm written in Gauche Scheme. R5RS style.
- vm.scm is using define-syntax heavily.
- load the following libraries
- ./baselib/match.scm
- I don't see any issue.
- ./free-vars-decl.scm
- I don't see any issue
- ./compiler-vm.scm
- This is generated by gen-compiler as follows. It expands cond-expand in compiler.scm.
- compiler.scm is using define-macro very heavily.
- ./baselib/match.scm
compiler-vm-cpp.scm: compiler.scm free-vars-decl.scm $(CORE_INCLUDE_LIBS)
mosh -5 $(SCRIPTS_DIR)/gen-compiler.scm $< "mosh" > $@
compiler-vm.scm: compiler.scm free-vars-decl.scm $(CORE_INCLUDE_LIBS)
mosh -5 $(SCRIPTS_DIR)/gen-compiler.scm $< "vm?" > $@
- mosh should run vm.scm as r6rs script.
Command to run the script
(cd boot/ && rm baselib.scmc && make baselib.scmc)
This is difficult one!
# (cd boot/ && rm baselib.scmc && make baselib.scmc)
mosh vm.scm compile-file-with-macro baselib.scm > baselib.scmc
Condition components:
1. &message message: "invalid expression"
2. &syntax form: ()
subform: #f
Is this being used?
No. That was failed attempt to port vm to R6RS. I guess we can drop gen-nmosh-bootstrap.sps
entirely.
Is this being used?
No. That was failed attempt to port vm to R6RS. I guess we can drop
gen-nmosh-bootstrap.sps
entirely.
Okay! will do.
This is difficult one!
This should really tell the line number of the location. Will look into it.
@higepon prioritize this so that mosh can be distributed via homebrew.
Tried. But this is so hard.