3 ms·
Ask HN: Whats the smallest code that you looked at and said wow that's so clever
- theGeatZhopa 4y agoNot a code, but an AI-Like solution for any programmer's problems on windows systems.. ALT+F4. (But generally, I think the lambda functions of python is kind of clever, short code. Some solutions based on lambda functions let me shiver in respect)
- auroralimon 4y agothere lots of examples, in many languages, of Dijkstra’s Two Stack calculator. this one is in ?javascript? https://switzerb.github.io/imposter/algorithms/2021/01/12/dijkstra-two-stack.html https://switzerb.github.io/imposter/algorithms/2021/01/12/di... a very elegant piece of code
- mintaka5 4y agoany self-replicating quine is amazing
- ninethirty 4y agoBUSINESS CARD RAYTRACER https://fabiensanglard.net/rayTracing_back_of_business_card/ https://fabiensanglard.net/rayTracing_back_of_business_card/ Tupper's Self-Referential Formula https://mathworld.wolfram.com/TuppersSelf-ReferentialFormula.html https://mathworld.wolfram.com/TuppersSelf-ReferentialFormula...
- simonblack 4y agoDuff's Device. https://en.wikipedia.org/wiki/Duff%27s_device https://en.wikipedia.org/wiki/Duff%27s_device