Re:Schemesh: Fusion between Unix shell and Lisp REPL
by cosmos0072 on Sunday February 16, 2025 @04:34AM
(#43066742)
Porting to a different Scheme implementation requires some effort:
schemesh needs a good, bidirectional C FFI and an (eval) that allows any Scheme form, including definitions.
For creating a single `schemesh` executable with the usual shell-compatible options and arguments, the Scheme implementation also needs to be linkable as a library from C:
Chez Scheme provides a `kernel.o` or `libkernel.a` library that you can link into C code, then call the C functions Sscheme_init(), Sregister_boot_file() and finally Scall0(some_scheme_repl_procedure) or Sscheme_start()
For creating a single `schemesh` executable with the usual shell-compatible options and arguments, the Scheme implementation also needs to be linkable as a library from C:
Chez Scheme provides a `kernel.o` or `libkernel.a` library that you can link into C code, then call the C functions Sscheme_init(), Sregister_boot_file() and finally Scall0(some_scheme_repl_procedure) or Sscheme_start()