Live data from Hacker News

Show HN: Tetris in a PDF

th0mas.nl

151–160 of 238 posts

Re: Show HN: Tetris in a PDF

#152
post #140

Earlier quoted context omitted.

But can your PDF run an AI agent?

> But can your PDF run an AI agent? Oh it's so much worse than that. Your font can run an AI agent. Llama.ttf: A font which is also an LLM -- https://news.ycombinator.com/item?id=40766791

Well a font using a custom experimental shaping library. Your font can't do it normally.

Re: Show HN: Tetris in a PDF

#153
post #132

Earlier quoted context omitted.

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 t…

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?

Re: Show HN: Tetris in a PDF

#155
post #147

Earlier quoted context omitted.

That's why you run NoScript along side with UBO

I'm pretty sure noscript will break 90% of the webpages I visit. I just rawdog the internet. If Chrome gets 0day'd then a lot of us are going down - at least I'll have company.

    > If Chrome gets 0day'd then a lot of us are going down
If anything, Google would have the correct incentive to protect itself from a zero-day exploit. I guess they could release a patched version internally only, but I doubt it. I do think they want the image of Chrome to be relatively positive and giant security hole (patched slowed) would do them no favours.

Re: Show HN: Tetris in a PDF

#156
post #6

Fortunately this does not work in Safari where the rendering is done natively.

I like how you used "fortunately". For me too the most important in PDF is to print a good and accurate text and graphics (preferably vector graphics), which recently is not as easy as it would be possible

Re: Show HN: Tetris in a PDF

#158

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…

> Javascript

Oh, so that's what it is. Bleh. Ok.

I thought it was cooler and made use of the fact that PostScript is a Turing-complete language to write Tetris in PostScript.

(I never really understood the PDF format but I always assumed it's some kind of compressed PostScript)

Re: Show HN: Tetris in a PDF

#159
post #138

https://www.nutrient.io/blog/how-to-program-a-calculator-pdf... See here for how we did a calculator in a PDF

Love the demo video and post but for some reason this doesn't seem to work for me. Running Chrome on Android 14

Don't be sad, Google is planning to bring native Tetris support to Android.

Re: Show HN: Tetris in a PDF

#160
post #140

Earlier quoted context omitted.

But can your PDF run an AI agent?

> But can your PDF run an AI agent? Oh it's so much worse than that. Your font can run an AI agent. Llama.ttf: A font which is also an LLM -- https://news.ycombinator.com/item?id=40766791

Crazy. Looking forward shipping apps as .ttf instead of docker images.
Post reply on HN