by dleslie · 4y ago · 0 comments
Input: TypeScript
Output: QuakeC
Code: Sample 3
Seems to spin forever. (Which makes sense, as QuakeC is incapable of the constructs in Sample 3).Edit: after a few minutes spinning it's... Spewing a lot of nonsense. It seems to be dumping every variable combination it can "think" of that it has seen in QuakeC.
For what it's worth, Sample 2 generates syntactically invalid code, having `:` instead of `::`. Sample 1 is actually working code (but relies on the implicit typing rules, which gives you the default real kind instead of double precision reals). Interestingly, translating Sample 1 from Rust to Fortran suddenly generates a subroutine instead of a function, but does generate types.