Skip to content

Comment on Making a Python interpreter in 1024 bytesparent

Comments

You're right, mathematically it's undeniably true. However...

One could imagine an even smaller subset interpreter. It's an interpreter for a subset of Python, consisting only of the programs that print "Hello World". Since it doesn't do any error checking, for all other programs the output is undefined. Implementing it is very simple: Just ignore the input file, and print "Hello World". As a bonus, it's an interpreter for the subset of "Hello World" programs in all other programming languages too!

</tongue-in-cheek>

This has actually been done:

https://esolangs.org/wiki/Hello

While quines (programs that print their own source code) aren't possible in Hello, there's a version that makes it possible:

https://esolangs.org/wiki/Hello_Plus_Plus

And if you say the original isn't good enough because it can't do anything else... well, esolangs have you covered there too:

https://esolangs.org/wiki/HQ9_Plus

(It should be noted that these are all joke esolangs. There are actual languages on the wiki that are very interesting though - I would definitely recommend you take them out!)

I would definitely recommend you take them out!

I obviously meant "check them out" here. I was using speech recognition and it clearly misheard what I said.

I'd edit, but it's been long enough since I posted that HN isn't offering that option for this comment any more.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.