Back to front pageView on Hacker News (opens in a new tab)Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years agoPreferably an elegant snippet rather than an entire (well engineered) codebase.Comments (380) 116 threadsEarlier commentsrurounijones7 years ago#Maybe not elegant but as a child, the first time I sawrepeat 360 [fd 1 rt 1]used to draw a circle in Logo on the BBC micro. So obvious to an adult but blew my mind.tu70017 years ago#For me it's gradient descent with back propagation and fast Fourier and fast multiplication Schönhage–Strassen algorithm.vagab0nd7 years ago#I did not write this, but: main(){char*s="main(){char*s=%c%s%c;printf(s,34,s,34);}";printf(s,34,s,34);}yitchelle7 years ago#Personally, it is "hello world".It is beautiful because it was my introduction to C that led to the world that I am in now.Load more commentsAll comments shown.Couldn't load more comments. Check your connection and try again.
Ask HN: What is the most beautiful piece of code you've ever read?476 pointsby seisvelas (on Hacker News)7 years ago
rurounijones7 years ago#Maybe not elegant but as a child, the first time I sawrepeat 360 [fd 1 rt 1]used to draw a circle in Logo on the BBC micro. So obvious to an adult but blew my mind.
tu70017 years ago#For me it's gradient descent with back propagation and fast Fourier and fast multiplication Schönhage–Strassen algorithm.
vagab0nd7 years ago#I did not write this, but: main(){char*s="main(){char*s=%c%s%c;printf(s,34,s,34);}";printf(s,34,s,34);}
yitchelle7 years ago#Personally, it is "hello world".It is beautiful because it was my introduction to C that led to the world that I am in now.
Comments (380) 116 threads
Earlier commentsrepeat 360 [fd 1 rt 1]
used to draw a circle in Logo on the BBC micro. So obvious to an adult but blew my mind.
It is beautiful because it was my introduction to C that led to the world that I am in now.
All comments shown.
Couldn't load more comments. Check your connection and try again.