Re:The Super Tiny Compiler
by convolvatron on Thursday March 02, 2023 @08:05PM
(#35004448)
it wasn't clear at all from a 5 second skim of the code and looking at the readme what the source and targets were
[ Parent
| on HN ]
Ten seconds probably would have done it.
Re:The Super Tiny Compiler
by JonChesterfield on Thursday March 02, 2023 @08:27PM
(#35004622)
* We're going to compile some lisp-like function calls into some C-like
* function calls.
From the top of the source file.
Re:The Super Tiny Compiler
by actually_a_dog on Thursday March 02, 2023 @11:05PM
(#35005684)
Yep, from test.js:
> const input = '(add 2 (subtract 4 2))';
> const output = 'add(2, subtract(4, 2));';
That's on lines 83/84. I'm not entirely sure that qualifies as the "top" of the source file. It's on the 4th page of the source file, given a traditional 80x25 terminal. (Assuming no wrapping, which the ascii art banner definitely could. A lot.)