← Back to context

Comment by djmips

7 days ago

Have you tested this? Does it work?

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.)

It works but it can’t do much other than demonstrate semantics. The evaluator won’t even be able to add numbers for example.