Live data from Hacker News

Show HN: Tetris in a PDF

th0mas.nl

221–230 of 238 posts

Re: Show HN: Tetris in a PDF

#221
post #219

Earlier quoted context omitted.

My point is that nothing runs without at least one initial user interaction - which makes a big difference for security. I believe this is even true for Acrobat with default settings, because while you can trigger JavaScript when a document is opened (/OpenAction) Acrobat will ask for permission.

I think I got your point but might have expressed myself badly. The pdf can run js and messes with the display right at opening time, without any warning or ask for permission.

Exactly, thanks for the clarification.

Re: Show HN: Tetris in a PDF

#222

Earlier quoted context omitted.

Theres a malaysian movie where the main premise is a hacker who uses pdf executions to steal one cent from every persons bank account. Its pretty interesting.

Do you know the name of the movie?

Not OP, but I found a series, not a movie, titled _One Cent Thief_ that fits the description. Sounds interesting.

https://archive.org/details/OneCentThiefSeries

Re: Show HN: Tetris in a PDF

#223
post #47

You glorious bastard, what a cool project! This is already a contender for most hacker project of the year :-) (below is not serious) I would advise people against using this in production though because it's still missing some critical features. For example: 1. The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work. 2. It doesn't work…

"The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work." -- this comment made my me laugh/choke on my coffee and I have no regrets.

Can't wait for physical paper with JS support

Re: Show HN: Tetris in a PDF

#224

You glorious bastard, what a cool project! This is already a contender for most hacker project of the year :-) (below is not serious) I would advise people against using this in production though because it's still missing some critical features. For example: 1. The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work. 2. It doesn't work…

I actually printed it out and wanted to see if it worked or not.. LMAO

Re: Show HN: Tetris in a PDF

#226
post #108

This is awesome. Took a bit of prompting but was able to get a semi-working (only in Chrome) Flappy Bird out of Claude in ~10 minutes. Seems like the collision detection needs some work :) https://github.com/baileywjohnson/flapdfy-bird/blob/main/fla...

Actually works, a bit buggy but its a good POC.

Re: Show HN: Tetris in a PDF

#227
post #54

Earlier quoted context omitted.

A tetris PDF could be in a 1 pixel iframe right on this page and you'd never know it. So it doesn't require any user action to download one.

That's why you run NoScript along side with UBO

This PDF still runs with JS disabled in both of those, and in Firefox about:config...

Re: Show HN: Tetris in a PDF

#228
post #223
post #47

Earlier quoted context omitted.

"The Javascript stops working when printed to physical paper. The resulting paper just has a static image and the controls no longer work." -- this comment made my me laugh/choke on my coffee and I have no regrets.

Can't wait for physical paper with JS support

There is probably an E-Paper capable of JS support, however it would be difficult to use for printing due to it's thickness ...

https://en.wikipedia.org/wiki/Electronic_paper

Re: Show HN: Tetris in a PDF

#229
post #132

Earlier quoted context omitted.

For Chrome's PDF renderer, the runtime is V8, so we're literally one (hilarious) line of code away from this glorious future existing today: https://pdfium.googlesource.com/pdfium/+/refs/heads/main/fpd... > // Use interpreted JS only to avoid RWX pages in our address space. Also, --jitless implies --no-expose-wasm, which reduce exposure since no PDF should contain web assembly. > return "--jitless";

You could write an LLM in plain JS, right?

Yep, but one without the ability to even JIT down to vectorized CPU commands (to say nothing of GPU connectivity) would be incredibly slow indeed!

Re: Show HN: Tetris in a PDF

#230
post #161

Earlier quoted context omitted.

Acrobat 9.5 works fine on Linux, if a little slow. This Tetris game makes it crash though.

Oh, thanks, that's good to hear! Edit: only now I see that's also from 2009 with updates into 2013. Do you where one can easily download the latest patched version?

http://www.deb-multimedia.org/dists/stable/non-free/binary-i...
Post reply on HN