Sheet, a spreadsheet program in 217 bytes of javascript

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

6 Likes

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.

4 Likes

Only thing missing is a decoder ring.

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

7 Likes

What the sheet?

Nice. Type this into one of the boxes:

=+alert('hi!')

One of the less nefarious things you can do.

3 Likes

That’s good!

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

5 Likes

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

1 Like

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

2 Likes

Please tell me I get Rickrolled

3 Likes

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.

1 Like

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…

1 Like

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

???

Well that’s fucking annoying as all get out.

Glad I made your day. :smiley:

1 Like

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

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.

2 Likes

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

1 Like

Not properly commented. C-

1 Like