Live data from Hacker News

Show HN: Tetris in a PDF

th0mas.nl

121–130 of 238 posts

Re: Show HN: Tetris in a PDF

#121
Ok, I kinda knew it was possible (I guess, anybody did), but this should be a very illustrative example. And unfortunately it doesn't seem like PDFs are gonna go away (though, really, why the hell there isn't any alternative?!) So it raises the question: is there any way to handle this garbage safely? I.e. in a way it couldn't run JS? I'm pretty sure it is not really necessary to read 99.999% PDFs out there.

Re: Show HN: Tetris in a PDF

#122
post #121

Ok, I kinda knew it was possible (I guess, anybody did), but this should be a very illustrative example. And unfortunately it doesn't seem like PDFs are gonna go away (though, really, why the hell there isn't any alternative?!) So it raises the question: is there any way to handle this garbage safely? I.e. in a way it couldn't run JS? I'm pretty sure it is not really necessary to read 99.999% PDFs out there.

You can build mupdf with -javascript on Gentoo (I also bwrap it to hell, personally).

Re: Show HN: Tetris in a PDF

#123
post #94

This is amazing and terrifying (I am a security engineer and parsing complex document formats is a never-ending treasure trove of vulnerabilities).

The amount of attack surface in various format parsers is pretty stunning and terrifying indeed

Re: Show HN: Tetris in a PDF

#124

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.

It works for me. Maybe you need to upgrade your paper? What version are you using?

Re: Show HN: Tetris in a PDF

#126

Earlier quoted context omitted.

AI agents run in isolated VMs, but PDFs have been out here running in the open for 30 years!

But can your PDF run an AI agent?

Looking forward to a day when you may not have a powerful enough GPU to open a PDF

Re: Show HN: Tetris in a PDF

#127
A few questions if you're willing:

1. What led you to want to do this project?

2. Have you worked with PDFs before? Do you work with PDFs as part of your day job?

3. Have you implemented Tetris before or is this your first time?

4. How long did it take you?

Re: Show HN: Tetris in a PDF

#128

Earlier quoted context omitted.

AI agents run in isolated VMs, but PDFs have been out here running in the open for 30 years!

But can your PDF run an AI agent?

In my opinion the question isn’t so much “if” but rather “when”.

When will AI research and hardware capabilities reach a point that it’s practical to embed something like that into a regular document?

We’ve already seen proof of concept LLMs embedded into OpenType fonts.

I guess the other question is then “what capabilities would these AI agents have?” You’d hope just permission to present within that document. But that depends entirely on what unpatched vulnerabilities are lurking (such as the Microsoft ANSI RCE also featured on the HN front page)

Post reply on HN