Sheet, a spreadsheet program in 217 bytes of javascript


#1

Originally published at: https://boingboing.net/2017/09/29/sheet-a-spreadsheet-program-i.html


#2

If I understand the source (and I don’t necessarily) it looks like the eval() call is being used as a shortcut to arbitrarily convert strings of artihmetic operators (or any other paperclip you want to jam in that socket) into functional javascript. This seems…well, I guess that’s why they call golf The Most Dangerous Game.


#3

Only thing missing is a decoder ring.


#4

You’ll never guess what happens if you type
=window.location="https://www.youtube.com/watch?v=dQw4w9WgXcQ"
into one of the boxes…


#5

What the sheet?


#6

Nice. Type this into one of the boxes:

=+alert('hi!')

One of the less nefarious things you can do.


#7

That’s good!


#8

Yes, it’s like “how’s it parsing and calculating functions?” and then it’s like “oh.”


#9

Here and I thought Golf was the most dangerous game because many of its players are nearing death anyways.


#10

It would be even smaller, and more cryptic, if it was written in APL.


#11

Please tell me I get Rickrolled


#12

Earlier this year I had to implement a real spreadsheet like interface into an internal project at work, wading through many JavaScript spreadsheet in X lines/characters posts got annoying fast.

It was things like this that gave Perl a bad name in the late '90s, obfuscated golfed code that violated ever best practice just to cut out a few steps. Maybe golfing code is just the Bell-bottoms for programmers, we all know they are dumb and bad, but every few decades they just seem to need to come around again.


#13

I know they make perfect intuitive sense to hard math/CS people, but coming from an animation/web development background, Python list comprehensions always make me feel like I’m playing a little round of office puttputt right in the middle of a day…


#14

How in the magical what-the-what-balls?

???


#15

Well that’s fucking annoying as all get out.


#16

Glad I made your day. :smiley:


#17

Well, that was a bit dry and academic. But I suppose erudite folk’ll like it.


#18

Code Golf is a perfectly fine hobby, and a great recreational exercise. Leave your clubs at home when you go to work though, lest your coworkers want to beat you with them.


#19

I’d prefer they added a few more bytes to make it actually human readable.


#20

Not properly commented. C-