6 ms·
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 co
by zestyping 9y ago
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.
- aidos 9y agoI think that's probably just because it's been revised and the placeholders were added after. To be fair, it only adds an extra 18 chars, taking it up to 238-byte in size. EDIT Here it is once you add the extra property: (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+" placeholder="+y+">"):eval(y+(".value"+o[y]).replace(/[A-Z]\d/g," +$&.value"))})(a="ABCD")
- jahnu 9y agoI'm more concerned with the use of the symbol `b` to denote bytes instead of `B` :)
- abainbridge 9y agoYeah. A 220 bit spreadsheet would be impressive. Particularly the achievement of the source length not being a whole number of bytes.
- dheera 9y agoIf you include start and stop bits it works out.
- xem 9y agoYeah, sorry for the confusion. The placeholders and the compact style (no gutters) were added in the homepage for puerly aesthetic purposes, but these things take a lot of bytes without really adding functionnality, so we decided to not count them in the most golfed code. You can see a version with labels and localStorage persistence at the bottom of the page though. But thanks for your edit!