Hello World,<p>I'm xem, author of this mini app, but standing on the shoulders of giants:<p>it's inspired by <a href="http://aem1k.com/sheet/" rel="nofollow">http://aem1k.com/sheet/</a><p>which was inspired by <a href="http://jsfiddle.net/ondras/hYfN3/" rel="nofollow">http://jsfiddle.net/ondras/hYfN3/</a><p>Cheers to all the JS codegolf team who teached me this noble art and continue to learn new tricks everyday with me!<p>You can find a list of all our mini apps here:
<a href="https://gist.github.com/xem/206db44adbdd09bac424" rel="nofollow">https://gist.github.com/xem/206db44adbdd09bac424</a>
Initially, I wa puzzled by how the grid could be showing placeholders (the grey "A1", "A2", etc.) when there's no placeholder attribute defined in the source code. Then I discovered that the code running in the demo is not actually the showcased 220-byte source code at all. The code is still impressively small, but you should fix this — it's misleading as is.
There's a nice comment from the author in an AMA about how this project contained one of his best coding moments: <a href="https://github.com/xem/ama/issues/14#issuecomment-123275496" rel="nofollow">https://github.com/xem/ama/issues/14#issuecomment-123275496</a>
Judging by some of the comments one can regularly find on HN about the size of apps, this may be considered a pinnacle internet technology to be standardized mainstream<p>Tongue in cheek aside, very creative code. Thank you for sharing
If we're using ES2015, why not save a byte?<p><pre><code> <script>(o=b=>{for(j in a)for(i in a)y=a[i]+-~j,b?document.write([["<p>"][i]]+`<input onfocus=value=[o[id]] onblur=o[id]=value;o() id=${y}>`):eval(y+(".value"+o[y]).replace(/[A-Z]\d/g," +$&.value"))})(a="ABCD")</script></code></pre>
If, like me, you're trying to figure out how this works, I've expanded it here to make it more readable:<p><a href="https://pastebin.com/1c72BYK1" rel="nofollow">https://pastebin.com/1c72BYK1</a>
Awesome Job. Looks like it was an iterative effort<p><a href="https://github.com/xem/ama/issues/14" rel="nofollow">https://github.com/xem/ama/issues/14</a>
Yesterday I was blown away by both tetris and snake golfed out to this degree and now this. I feel like this is the modern reincarnation of obfuscated c.<p>Can somebody explain to me how:
"a[i]+-~j" is the same as "a[i]+(j+1)" ?
I hate to say that, but I just seem to have broken it. Here's how: I put 0.1 in A1, 0.2 in A2 and =A1+A2 in B1. Now B1 displays "=A1+A2" instead of the result.
I was wondering and wondering why it wasn't working for me. Colons break the script. I tried to write "TOTAL:" in a cell and none of the equations would resolve. I wanted in on the fun and I didn't get it until I relented and checked the console. :P<p>Pretty fun, though
Reminds me of an IOCCC entry.<p><a href="http://www0.us.ioccc.org/years.html#2000_jarijyrki" rel="nofollow">http://www0.us.ioccc.org/years.html#2000_jarijyrki</a>
Super impressive and I love code-golfing but the title is slighlty misleading since the HTML part of the app, the cells, seem not to be included in the 220b. Still great.
Reminds me of the HTML-only MTG life counter I made:<p><a href="http://zichy.de/public/counter.html" rel="nofollow">http://zichy.de/public/counter.html</a> (437b)
I'm concerned about the lack of type annotations. What about XSS prevention? Maintainability? An API? How are people supposed to use this code in future projects? Your variable names don't conform to Code Complete. This code smells funny. Haven't you read clean code? And I don't think it's general enough. What if people want to add columns, but preserve formulas? What made you think you shouldn't use React for this? At least Vue, come on.<p><i>ah, if only we could all code just what we needed, instead of over-engineering solutions to problems we wished we had</i>