3 ms·
The only way to re-bootstrap is to download a compiled (JS) release from npm, then use that to compile the .kal source in the git repository. Then you can use y
by rzimmerman 13y ago
The only way to re-bootstrap is to download a compiled (JS) release from npm, then use that to compile the .kal source in the git repository. Then you can use your newly compiled version of kal to recompile itself. This is how I create the npm releases.
It's not turtles all the way down, though. If you look way back, the 0.1ish releases of the compiler were written in CoffeeScript. I ported the compiler source over from CoffeeScript file by file as it matured and eventually got rid of the dependency entirely. Technically, you could start with the last release that was written in CoffeeScript and compile up to the current release.
- tlb 13y agoInteresting. It must get tricky when you make an incompatible change to the language. I guess you'd make the changes to the compiler still using the old language, update the test cases, make it stable, then change the compiler sources to reflect the new language, recompile the compiler, then check in the new compiler JS. With plenty of git checkpoints along the way.
- arnarbi 13y agoOne of the gems in CS literature illustrates this nicely: http://cm.bell-labs.com/who/ken/trust.html http://cm.bell-labs.com/who/ken/trust.html Essentially self-compiling compilers can "remember" things that are nowhere to be found in the source code.