NHacker Next
login
▲A Lisp in 99LOCgithub.com
68 points by shikaan 14 hours ago | 10 comments
Loading comments...
lisper 3 hours ago [-]
Lisp in ~100 lines of Python:

https://flownet.com/ron/l.py

eqvinox 7 hours ago [-]
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
omoikane 6 hours ago [-]
It does not, because there is a syntax error on line 81 (extra close parenthesis):

https://github.com/Robert-van-Engelen/tinylisp/blob/2d0fb35b...

Y_Y 4 hours ago [-]
Brought to you by this marvellous commit with the message "update",

https://github.com/Robert-van-Engelen/tinylisp/commit/40c6c0...

OhMeadhbh 5 hours ago [-]
Yeah. It's munged to fit in 99 lines.
eqvinox 2 minutes ago [-]
That's entirely not the point, which is why I said "structure, not just expression".
nivertech 3 hours ago [-]
A better starting point:

https://github.com/Robert-van-Engelen/tinylisp/blob/main/tin...

OhMeadhbh 14 hours ago [-]
Previously:

* https://news.ycombinator.com/item?id=32100035

* https://news.ycombinator.com/item?id=32095655

and

* https://BI6.US/CO/N/20250420.HTML#/042402

coderatlarge 2 hours ago [-]
can it execute the y-combinator?
spyrja 1 hours ago [-]
It doesn't appear to, but you could always add this to the included common.lisp file:

  (define Y (lambda (f) (lambda args ((f (Y f)) . args))))
curtisszmania 5 hours ago [-]
[dead]