2 ms·
I don't know about JavaScript, but generally short code is impressive: For most of these things, if you think about doing them "the usual way", you think about
by beagle3 13y ago
I don't know about JavaScript, but generally short code is impressive: For most of these things, if you think about doing them "the usual way", you think about a 10x or 100x (or 1000x) more lines of code. e.g. there used to be a 842 line Java Spreadsheet example in the JDK (maybe it is still there). And then, someone shows you that it can be done in 35 lines of JavaScript.
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.htm http://nsl.com/papers/spreadsheet.htm