jsbuffer — The Compiler Rewrites Itself
Five years after mff, Victor rebuilt the entire serialization stack from scratch in TypeScript. No C, no native bindings, the most ambitious code generation yet.
6 posts
Five years after mff, Victor rebuilt the entire serialization stack from scratch in TypeScript. No C, no native bindings, the most ambitious code generation yet.
Victor's serialization framework wraps btc's C parser in TypeScript and adds the code generator that was missing from every earlier project. btc was never standalone.
Victor's 2017 serialization library parses the same kind of schema that btc parses in C. The JavaScript version came first. The C port came after.
Victor's 2018 compiler parses a custom schema language in pure C. The same technique from vdom-raw, now with malloc and -Werror.
Victor stopped extracting parsers from frameworks and wrote his own. An HTML-to-virtual-dom compiler — hand-built lexer, recursive descent parser, ESTree AST, code generation. The shift from extraction to creation.
A line-by-line comparison of Victor's parse.js against Angular 1.4.1's $parse. The extraction was almost verbatim — and incomplete in ways that matter.