The .PDF basics vid was the first in the series: https://www.youtube.com/watch?v=q6KgFezu8tw
Show HN: Tetris in a PDF
111–120 of 238 posts
Re: Show HN: Tetris in a PDF
#112This is amazing and terrifying (I am a security engineer and parsing complex document formats is a never-ending treasure trove of vulnerabilities).
Re: Show HN: Tetris in a PDF
#113I have increasing confidence that when AIs finally destroy the Internet the delivery vehicle will be the file format that was created, as the Internet itself was, as a form of digital paper.
Re: Show HN: Tetris in a PDF
#114Playable where? It doesn't work in the Adobe Chrome PDF viewer, or in Preview.
Re: Show HN: Tetris in a PDF
#115Something neat I found, you're able to 'clip' the blocks into each other by spinning them right before the block settles.
Re: Show HN: Tetris in a PDF
#116i've tried making "interactive" PDFs before but using POST and server side rendering rather than client, e.g. a PDF typewriter i made a little while back on http://news.coffee
Re: Show HN: Tetris in a PDF
#117Re: Show HN: Tetris in a PDF
#118Earlier quoted context omitted.
That's how it inevitably goes with Turing completeness :) The real achievement here arguably isn't running code (that's provided by the PDF spec and implementations), but managing to hook it up to user input/output in an ergonomic-enough way to play Tetris.
The mention of Turing Completeness got me curious, so I looked something up. Behold, a C compiler written in Lambda Calculus: https://github.com/woodrush/lambda-8cc
The PDF [1] containing the Lambda calculus term manages to hang/glitch/crash both Firefox's and macOS Preview's PDF renderer, which in itself is quite the achievement in portability.
Update: Nevermind, Firefox handles it perfectly, it just (probably wisely) disables seamless scrolling and I have to use the "next/previous" page buttons manually. macOS got there after a minute or two of loading with no UI indications.
Re: Show HN: Tetris in a PDF
#119This is amazing and terrifying (I am a security engineer and parsing complex document formats is a never-ending treasure trove of vulnerabilities).
Re: Show HN: Tetris in a PDF
#120You 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…
hahaha I wish you almost didn't include the parenthesis. I've had some clients who would definitely email me that point #1.