As a hacker, it is a case study of (ab)using some JavaScript features on one hand (yes, with , I'm talking about you), and on the other hand, it is tractable proof about which part of (say) the 842 lines are useless, and why.
Many people have not experienced lots of functionality in very little code, and the fact that it is possible is both surprising, and often inspiring.
And JavaScript is familiar, so it gets an audience. If I posted the two (2) line K2 spreadsheet, that does a lot MORE (e.g. keyboard control) than the 30 line JS one, and needs a 200KB K interpreter, instead of a 20MB browser - then people will just ignore it with a SEP field.
S..t:".[`D;(;);{. y};S[]];S[.;`f]:9$D[]"
S:D:.+(`$'_ci 97+!26;26 99#,"");`show$`S
If you want to know more, head over to http://nsl.com/papers/spreadsheet.htmCombine that with the behaviour of human attention, precisely how one thing inspires another, and trace it back to the original "spreadsheet in 30 lines" post, you can see that these type of posts are just recurring manifestations of executions of the same principle.
By the way, JavaScript, even without the host of browser-side framework, IS a powerful language. Of course, it stands on the shoulders of giants: JIT, platform abstraction, type-management, memory management, graphics (browser), visual toolkit (browser) etc.
Because it's fun.
I could imagine the existence of a JIT compiler engine that caches everything smaller than 64 lines, or maybe less than 1K compiled. Imagining doesn't make it so, but it would explain a heck of a lot.
Is there anything other than competitiveness like obfuscated C contests?
Whatever the reason is, I don’t mind so long as the submissions are interesting and I can browse the source. The ray tracing one that’s #1 at the moment IS impressive but I had to read the HN comments to find the source article.
I don't mind the 'X in 30 lines of JavaScript' articles at all, they're nice curiosities. That said, let's not pretend JavaScript is unique in its ability to do a lot in very few lines of code. I've seen more impressive raytracers written in just as few lines of C for example, Perl one-liners that draw a live analog clock on the console, competent Python web services in less than 100 lines of code, etc.