10 ms·
Show HN: Tiniest Scheme Interpreter
- motxilo 15y agoPersonally, I am not a fan of these lookma-my-interpreter-in-zero-lines stuff. Take a look at http://norvig.com/lispy.html http://norvig.com/lispy.html. Bigger, but well engineered.
- zura 15y agoYes, I'd prefer more exotic stuff like Scheme-to-C compiler written in Prolog or any other combination, not bounded by nbr of lines.
- c4m 15y agoThanks for the feedback guys! I intend to do more interpreter/compiler projects so perhaps you will end up considering one of my future projects sufficiently interesting or exotic :)
- mst 15y ago"I just learned language X, look at how I can fail to implement lisp in more lines of X than the original mccarthy code took to actually implement lisp" really just isn't relevant here. I'm glad you're learning python. I'm glad you're enjoying it. I'm glad you managed to write something that you think is within spitting distance of lisp with it. But there's no need to post it to HN. Wait until you've done something actually interesting.
- motxilo 15y agoThere is no need to be rude, mst. If people don't consider such submissions interesting, they simply won't vote them up.
- ElliotH 15y agoI'm not entirely sure this is valid. I'm happy to be shown that I'm wrong, but it doesn't seem to support environments meaning that you couldn't implement define, making it essentially not a scheme interpreter. I'd be impressed by an actual implementation of R5RS in a small line count, but this just seems to be a calculator with lambda expressions and lists.
- c4m 15y agoThanks for the feedback. It does support environments - if you check the source code it refers to environments as 'scope'. It is not possible to properly implement lambda without implementing environments.