I couldn't get it to do much. Also noticed a subtle bug here:
next = compile(read(buffer), cons("halt", NULL));
C doesn't guarantee the order in which arguments to a function are processed. Since 'cons' relies on 'read' being called first, the result is undefined behavior. (In fact I had to fix that before it would even "run" on my system.)
I couldn't get it to do much. Also noticed a subtle bug here:
C doesn't guarantee the order in which arguments to a function are processed. Since 'cons' relies on 'read' being called first, the result is undefined behavior. (In fact I had to fix that before it would even "run" on my system.)
It works but it can’t do much other than demonstrate semantics. The evaluator won’t even be able to add numbers for example.