can it execute the y-combinator?
(define Y (lambda (f) (lambda args ((f (Y f)) . args))))11–20 of 28 posts
can it execute the y-combinator?
(define Y (lambda (f) (lambda args ((f (Y f)) . args))))Holy cow this is —structurally, not just expression— some of the worst C code I have ever seen, with the abuse of the 'double' type, 'T' cast that looks like a declaration, endian dependency, and strict aliasing violations galore… does this even work on a modern compiler? o.O
Yeah. It's munged to fit in 99 lines.
It could've used a struct rather than wedging tags into a double's first byte and still be 99 lines.
Holy cow this is —structurally, not just expression— some of the worst C code I have ever seen, with the abuse of the 'double' type, 'T' cast that looks like a declaration, endian dependency, and strict aliasing violations galore… does this even work on a modern compiler? o.O
Lisp in ~100 lines of Python: https://flownet.com/ron/l.py
Holy cow this is —structurally, not just expression— some of the worst C code I have ever seen, with the abuse of the 'double' type, 'T' cast that looks like a declaration, endian dependency, and strict aliasing violations galore… does this even work on a modern compiler? o.O
can it execute the y-combinator?
Lisp in ~100 lines of Python: https://flownet.com/ron/l.py
https://pockemul.com/index.php/2020/04/27/pockemul-1-10-0-ne...
Holy cow this is —structurally, not just expression— some of the worst C code I have ever seen, with the abuse of the 'double' type, 'T' cast that looks like a declaration, endian dependency, and strict aliasing violations galore… does this even work on a modern compiler? o.O
Certainly not the worst I have seen, by far; but yes, not pretty. IMHO “Just for making it shorter“. I would very much prefer 200 lines of actually readable nice code.
Earlier quoted context omitted.
Yeah. It's munged to fit in 99 lines.
That's besides my point, which is why I said "structure, not just expression". It could've used a struct rather than wedging tags into a double's first byte and still be 99 lines.