3 ms·
Automating stuff or finding creative ways to solve voluminous problems. E.g. contract to port many lines of Java to C++: parse the program with ANTLR, spit out
by karmakaze 5y ago
Automating stuff or finding creative ways to solve voluminous problems. E.g. contract to port many lines of Java to C++: parse the program with ANTLR, spit out the C++ code with some simple errors corrected manually. How to deal with no GC? return reference values copied up one stack-frame at a time, or pass down mutable structures. Another one was switching from Swift to Java (or the reverse I forget) but it had a huge test suite that also needed porting. Write a grammar, parse, translate the ASTs, unparse. Do it for the program and tests. Fixup all the compiler errors. Sure the parser, AST transforms and unparser could maybe only handle 40% of the language, but Pareto principle applies.