%PDF-1.6 % \def\m{ This file is also a LaTeX program that prints its own content (use `xelatex `) ```
# Baseline Pizza - The 1-2-3 Recipe ## Ingredients * 500g flour * 5g yeast * 10g salt * 15g oil ## Method Combine ingredients in a large mixing bowl. Start pouring about 400g of water into the mixture, combining into a dough. Stop adding water when the dough comes together into a soft mass. Add a little more flour if the dough is too sticky. Add a little more water if the dough is too crumbly. Knead the dough for 5-10 minutes. Cover the bowl, and leave to prove for a couple of hours. After it has approximately doubled in size, cut it and shape it into pizza bases, then leave those for another hour. Bake without toppings in a very hot oven for 5 minutes. Add toppings, then return to the oven for another 10 minutes. Congratulations! You have made baseline pizza! This recipe is easy as 1-2-3 to remember, because the yeast, salt, and oil are 1%, 2%, and 3% of the flour by weight. Why is there a pizza recipe on the front cover of Lab 6? Tune in next page. # Lab 6 Issue 3 - Gemini Edition 2.99 JUNE 2022 Can't beat inflation. => https://www.unicode.org/consortium/adopted-characters.html Official sponsor of 6 Also in this HTML/PDF/Gemini/LaTeX/x86 polyglot issue: * HTML comes to Lab 6 * Tombstone of the Druid v0.7.0 changelog * Back Issues & Errata * Comments * Tracking No coverdisk this month. Or is there? # Pizza If you've searched for recipes online recently, you will have noticed the bombardment of garbage topping and tailing small morsels of useful information. The purpose is to grab you by the eyeballs and drag you over as much advertising as possible before you give up. Finding the information you need means you are finished with the page and will not look at any more advertising. Finding the information you need must therefore take as long as possible. This issue of Lab 6 is dedicated to presenting a simple pizza recipe as plainly and clearly as possible. It appears right at the top of page 1, above even the logo and branding. Branding is life to content farms, so as revenge I bring subordination and death to branding. Anyway, about that pizza... here's the verbiage that normally stands in your way - but this time, relegated to page 2 safely out of your way. The recipe is a baseline in the sense that it lays a solid foundation for a basic pizza, on top of which improvements and customisations can be added: different types of flour, different levels of hydration, different flavours of oils, different proving times and temperatures. One useful tweak is to cold prove the dough in the fridge (with the bowl sealed in clingfilm) all day, or overnight. This gives the yeast more time to work and develop flavour. If left too long, the dough will eventually turn into a micro-brewery and enter strange new taste landscapes. Proving dough is chemistry and biology and art. You can get radically different results with different times and temperatures. Experimentation is mandatory. # HTML comes to Lab 6 Good news people! Lab 6 has seen the error of its ways, and admits that HTML is better than PDF. Accordingly, this file now renders in all the following modes: * As a Gemini gemtext document * As a PDF/A document * As a plain text file * As a LaTeX program that prints its own content * And finally, you asked for it: as HTML in a regular web browser If your web browser respects MIME types in HTTP Headers, you may find the document rendering as PDF by default. But if you don't like this, just save the file, rename it with a .html extension, and open it again in your browser. ## How does this work? Badly. As in, it will make the W3C HTML validation service cry. A valid HTML document is required to start with a DOCTYPE declaration, but a valid PDF/A document is required to start with %PDF. These cannot both simultaneously exist at offset zero. What do we do? => https://quirks.spec.whatwg.org/ Quirks mode to the rescue! A nice side-effect of the HTML specpocalypse is that there is even a spec for documents that don't conform to the spec. Browsers have long had a mode for displaying HTML documents that deviate from strict spec compliance; they are notoriously liberal in what they accept as renderable content. And so it turns out you can just stick a style tag almost anywhere you like, and browsers will merrily obey its CSS. In this case, we can put it close to the end of the document, just after the < !-- HTML comment -- > that encloses the "binary" PDF content. The CSS first hides the entire document, then selectively displays just the plain text part enclosed in a < div >. The < div > and < /div > are hidden from Gemini clients because they are on ``` preformatting toggle lines, and the spec mandates such text must be ignored. There are three final lines of PDF endmatter which we can also hide in an HTML comment that never gets closed (which of course is invalid HTML, but accepted by all browsers without issue). We must take care with two things: * The end-comment string --> must not appear in the PDF content. This turns out to be easy to avoid, as no PDF syntax uses the double-hyphen, and we can insert arbitrary whitespace into the ASCII85-encoded binary streams to separate any double-hyphens that happen to be generated. Recall from Issue 2 that we encode all PDF streams using the ASCII85 filter in order to remove characters such as 0x00 nulls which would threaten any application wishing to interpret the file as text. => https://www.lab6.com/2 Issue 2 * The begin-comment string < !-- must not appear in the plain text Gemini content, otherwise the rest of the document will be interpreted as a comment by the browser. But wait, how did we create the < !-- string above, and again in this sentence? If you are reading the file in a PDF reader, you are reading the result of PDF text drawing commands that are encoded beyond the reach of the browser's HTML parser. The gemtext content is a separate copy of the text. One workaround would be to use a Unicode U+200B zero-width space between the angle bracket and the exclamation mark. That would cause Gemini browsers to display < !-- and HTML parsers to not see a comment. However, we are going to forego use of U+200B in exchange for one more parlour trick - read on - and so we accept a compromise to the gemtext edition by putting in an extra space: < !-- In theory, we are also constrained to avoid the left angle bracket, which opens HTML tags, but in practice we can rely on quirks mode to not care about mismatched angle brackets or unrecognised tags: a b c < recall ## Improving the reading experience in Gemini mode Issue 2 encapsulated the non-human-readable main PDF content in a Gemini ``` preformatted block ``` at the end of the document, with the binary content safely ASCII85-encoded in order to keep the file 100% UTF-8. This was partially successful at keeping it out of the way of Gemini readers. The worst side-effect was the lengthening of the scroll bar (in clients such as Lagrange) to accommodate the thousands of lines of encoded content. Can we do better than this? Yes we can! We will use the following features of gemtext and PDF: * Gemtext disallows 0x0D carriage returns as line separators. * PDF allows 0x0D carriage returns as line separators. * Gemini clients must ignore any characters after the ``` on a preformatting toggle off line. This means if we could replace all the 0x0A line feed characters with 0x0D carriage returns in the PDF content, Gemini clients would not see them as line separators, but instead would see the PDF content as one very, very long line. What's more, we could put that very long line at the end of a ``` preformatting toggle off line, making it completely invisible to Gemini readers. While that would be ideal, there's a snag: there is one place in a PDF file where line feeds cannot be replaced by carriage returns: the byte following the stream keyword in an object stream. The following from the PDF 1.7 Reference, section, is offered as rationale: > Without the restriction against following the keyword stream by a CARRIAGE RETURN alone, it would be impossible to differentiate a stream that uses CARRIAGE RETURN as its end-of-line marker and has a LINE FEED as its first byte of data from one that uses a CARRIAGE RETURN-LINE FEED sequence to denote end-of-line. => https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf PDF 1.7 Reference Still, while we cannot replace every last line feed, we can still replace enough of them to dramatically improve the Gemini reading experience, reducing from thousands of preformatted lines to a few dozen. ## What's this about LaTeX? If you don't like the formatting of this issue, but still like PDF, you can generate a much plainer document by running this file through LaTeX, as follows: ``` $ mv 3.pdf 3.tex $ xelatex 3.tex ``` This is possible primarily thanks to TeX using % as the character that starts comments. PDF/A mandates % characters at the start of the first two lines, which TeX will happily ignore. We can then define a TeX macro that swallows the Gemini ``` characters, and the ``` characters in turn will hide the rest of the TeX commands from Gemini. An HTML comment within the TeX macro will hide most of the TeX from browsers, but not all, so we can insert a < div > that encapsulates the gemtext and use CSS later on to make only the < div > visible. We can't hide the initial TeX macro definition from Gemini clients, but we can at least put some friendly text in it. ## Can we go further? Here's the additional parlour trick. Since we are encoding the PDF binary content as ASCII85, and PDF objects are expressed in ASCII, could we go as far as making the entire file 7-bit-clean ASCII? Yes, we could, if we could overcome a couple of hurdles: * The PDF spec requires line 2 to contain "at least four binary characters - that is, characters whose codes are 128 or greater", if the file contains binary data. Since our file no longer contains binary data, we could omit this line. * PDF/A also requires use of an XMP metadata packet, which in turn requires its opening XML processing instruction to contain a U+FEFF character (to be used as a byte order marker), expressed in a UTF encoding. The UTF-8 encoding is 0xEFBBBF, which isn't ASCII, but fortunately, omitting the U+FEFF entirely is also allowed, to maintain "backward compatibility with earlier versions of the XMP packet specification". But doing either of these things won't be necessary, because what we really want to do is place the 0x55 and 0xAA bytes at file offset 510 and 511, which is enough to make the file a valid x86 boot sector! A much bigger polyglot payoff than merely rendering as ASCII. Is it really a valid boot sector? Well, for some value of valid. It will be recognised by the BIOS, which will load it and jump into it, but it falls *somewhat* short of being a functioning operating system (the first opcode byte to be executed will be the % from %PDF, which is 0x25, which is a logical AND between the subsequent bytes and the undefined contents of the AX register). But it's a start. The byte sequence 0x55AA is not valid UTF-8 either, but we have a wide selection of single-byte ISO-8859 encodings to choose from. Browsers will obey a < meta charset="..." > tag located in the first 1024 bytes, and Gemini clients can be informed of the encoding using a MIME type such as "text/gemini; charset=latin1". ## Is there any practical application? This is basic research. Power for power's sake. Build it, and the practical applications will come. # Longitudinal Storytime... Once # Tombstone of the Druid v0.7.0 changelog * FEATURE: player can now use two or more Wiimotes at the same time. * FEATURE: new class: antipope. * FEATURE: new armour: laced boots, with Reidemeister minigame. * FEATURE: improved rare gothic belt balance; no single rare gothic belt can beat every other rare gothic belt in all contests. Player must now exercise judgement in assignment of rare gothic belt skill points. * EXPERIMENTAL FEATURE: liquids. Opt in using the --liquids command line option. Beware: worlds generated with this option cannot make portal connections to non-liquids-enabled worlds. * FIX: removed region locking. * FIX: turn counter can no longer go below zero when using stacked scrolls of time travel. * FIX: saved games contained strings that were getting users banned from Dropbox. * FIX: closed the loophole allowing infinite copper bar trading when server clock diverges from client clock. * OPTIMISATION: rendering of nm cattle grids now O(nm) instead of O(2^nm). * CHORE: depend on ncurses >= 6.3 Source tarballs and precompiled binaries in .deb and AppImage format have been uploaded to the usual repository. This is NOT an LTS release - players with high value games in progress should stay on v0.6.16. # Back Issues & Errata Every issue of Lab 6 is carved out of solid wood, self-documented, known to the state of California to contain metadata, and certified in verapdf as PDF/A-3b. This document's primary URL is https://lab6.com/3, and its hexadecimal SHA256 hash begins 0x03, identifying the issue number. When this host goes down and you are forced to search for mirrors, use this handy random 128-bit integer that appears in every issue: 250e3f7d581acff115537ba38e89ad31 All content is licensed under: => https://creativecommons.org/licenses/by-sa/4.0/ https://creativecommons.org/licenses/by-sa/4.0/ ## Issue 0 SHA-256: 00c411fee9419cd861d9850dc56d53b7e6a211e90df9a1ca953e021b0cf31a56 All hail PDF; FORENSIC.ZIP. Available over HTTPS, IPFS, and Geminispace: => https://www.lab6.com/0 https://www.lab6.com/0 => ipfs://QmTAQJro5RmXXpsPbXPZFSAMQZY8Lpw69EskGaJZXTBrWp ipfs://QmTAQJro5RmXXpsPbXPZFSAMQZY8Lpw69EskGaJZXTBrWp => gemini://lab6.com/0 gemini://lab6.com/0 ## Issue 1 SHA-256: 0145df4ffcd382db238d1bc87c014013aa9cbc2298fe2a68fef09ca66cc99da6 Making PDFs accessible by polyglotting with MP3; Remarks on replacing HTML with PDF; Fantasy Footbyte, with 256 unique team name puns. Oh no! The Issue 1 coverdisk was truncated. Ironic, as this was the disk that contained the patch for Issue 0, but also appropriate, as the image representing the disk did have "doesn't work" written on it. To make amends, Issue 3 contains the real coverdisk1.img. Available over HTTPS, IPFS, and Geminispace: => https://www.lab6.com/1 https://www.lab6.com/1 => ipfs://QmZHFELyjXrMzmjDdxoMBZaf4sa6hrxJhAuzUpP6DDV1Xy ipfs://QmZHFELyjXrMzmjDdxoMBZaf4sa6hrxJhAuzUpP6DDV1Xy => gemini://lab6.com/1 gemini://lab6.com/1 ## Issue 2 SHA-256: 0249500532346a546b8bb711755d9b1748d3a9593beeedba3b149554c58f6976 A Gemini-PDF polyglot; The Tilde Quilt; Society. Available over HTTPS, IPFS, and Geminispace: => https://www.lab6.com/2 https://www.lab6.com/2 => ipfs://Qmf1LPBTUunr57xPYbQSNXpnN5veQy9gJxr5G3K2bqSp1K ipfs://Qmf1LPBTUunr57xPYbQSNXpnN5veQy9gJxr5G3K2bqSp1K => gemini://lab6.com/2 gemini://lab6.com/2 # Comments Send your feedback to comment@input.lab6.com and it may be published in the next issue. You can also comment on the issue by typing your comment into the URL bar of your browser, immediately after the issue number, like this: ``` https://www.lab6.com/3Your Comment Goes Here gemini://lab6.com/3or here. ``` Real names and email addresses will not be published, unless requested. Somehow this commenting system turned out to be quite popular, albeit with some latency. The two main waves of comments come from issues 1 and 2 hitting Hacker News and The Register. => https://news.ycombinator.com/item?id=27880905 https://news.ycombinator.com/item?id=27880905 => https://news.ycombinator.com/item?id=31375013 https://news.ycombinator.com/item?id=31375013 => https://www.theregister.com/2021/07/20/pdf_html_debate/ https://www.theregister.com/2021/07/20/pdf_html_debate/ ## Issue 0 2021-07-19T18:06:32Z (via Gemini) > This is served over gemini with mimetype text/gemini, which for this issue doesn't really make sense. lab6 official response: Agreed, and this has now been corrected. ## Issue 1 19/Jul/2021:12:05:43 >An interesting comment system. Not sure if it will catch on, but definitely well-supported. Cool! 19/Jul/2021:13:24:52 >Thoroughly enjoyed the dramatic reading! 19/Jul/2021:15:14:23 >this is quirky and stupid as hell which is to say I love it 19/Jul/2021:15:28:45 >using bombdillo I get screens and screens full of junk, and when I quit so characterset has hijacked my terminal prompt forcing me to source bashrc so fail on two gemini readers which ones work 19/Jul/2021:16:09:00 >Very interesting issue, I have to say. A lot of cool trickery you did there, with binary polyglots, the embedded FAT12 image and so on. I discovered your website through HackerNews. Have you thought of distributing your files over IPFS? Why not include an IPFS hash with your issues? I certainly feel like the way you do your publishing is not practical, but it's very unique, it feels like a book, a letter or something alike, that you throw in your drawer, your bookshelf or whatever, and then you remember it after a few years and look back on it, and breath in the old paper smell, and think back on how much you enjoyed it. Comparatively, websites are very forgettable and dispensable. 19/Jul/2021:17:37:32 >0How do you know if this is a comment on issue 1 starting with '0' or a comment on issue 10 starting with 'H'? lab6 official response: Advanced deep learning algorithms. 19/Jul/2021:22:50:33 >This is really innovative and memorable - thanks you! 20/Jul/2021:05:30:59 >uhhh well that's kind of a wacky idea but i guess here goes 20/Jul/2021:12:09:45 >I tried to extract coverdisk1.img with multiple different tools but it gets truncated at about 45 kibibytes. Why is it happening? 20/Jul/2021:13:03:46 >haha this is so good 20/Jul/2021:14:03:05 >thinking of writing a web browser in scratch 20/Jul/2021:20:23:45 >I commend your creativity 21/Jul/2021:07:34:04 >Inserting a comment 21/Jul/2021:14:56:26 >En serio aix? es un input normal? 29/Jul/2021:12:51:11 >The awesome comment system even works from a Matrix room with URL previsualization 03/Aug/2021:12:33:27 >While the concept and execution are impressive, isn't including all that extra data in the file needless bloat that would slow down the connection if one uses older hardware? Or is the extra data insignificant compared to the entire pdf with attachment? extra text so that the browser doesnt search instead of submit. 07/Aug/2021:20:16:32 >has another typo: "supports pdfs flawlessy" lab6 official response: Thank you. A patch is theoretically possible. 19/Sep/2021:18:41:38 >Hello this is very interesting and also incredibly cursed 14/May/2022:06:22:19 >Hello dear sir, I appreciated listening to the dramatic reading of your Issue 1 as my first experience of the issue. The half-hearted attempts at reading some of the verbatim text and command line listings were a great source of unintentional comedy 14/May/2022:07:19:51 >Heartily enjoyed! Keep up the great work. - IridescenceDeep 14/May/2022:07:43:25 >Sneed 14/May/2022:09:22:47 >Very cool! loved the PDF hacky part. ~sdomi 14/May/2022:09:33:10 >oh my god... 14/May/2022:10:20:16 >Dear Sir or Madam, your lovely PDF didn't play as an MP3 in my default video player. It said it didn't understand PDFs. I demand a refund. Regards, Anonymous Coward. 14/May/2022:12:43:05 >Hello, World! 14/May/2022:14:26:06 >One of the most delightful hacks I've experienced in some time. The pleasant and amusing audio book reading was the cherry on top. 14/May/2022:15:20:30 >What if issue 11 comes a long, then I can no longer submit a 1 as a comment to issue 1????? panic! 14/May/2022:16:35:01 >Elpher cannot open your gemini link :( 14/May/2022:16:37:28 >Zamn this looks awesome 14/May/2022:16:42:31 >blablabla 14/May/2022:16:44:22 >Very cool 14/May/2022:23:00:12 >This is hilarious. Keep doing this. 15/May/2022:07:40:50 >Wow, this is incredlibe!!! 20/May/2022:07:28:31 >what a neat comment system 20/May/2022:08:04:02 >Siema siema 26/May/2022:06:20:49 >This is very weird, but in a good way. Keep it up! 02/Jun/2022:16:18:38 >Where's comment section? ## Issue 2 19/Jul/2021:13:02:43 > I like to read longer texts on my Kobo, and generally hate PDFs because they won't reflow nicely. So it was a pleasant surprise to read your first issue and find it displays beautifully. Generating the PDFs is another matter - if I had a one-step process from plain text to PDF/A I might even set up my own PDF site, but the whole multiformat thing is just too complex for me. Graham 19/Jul/2021:13:43:41 >hello 19/Jul/2021:13:52:42 >Could you please shout out my friend Phil? The message is "Rise of the Balfourine!" - Thanks. These articles are fantastic 19/Jul/2021:15:15:12 >does not load in the lagrange gemini reader 19/Jul/2021:20:01:47 >Hi! My mind is blown by those polyglot files. Nice! 20/Jul/2021:03:38:55 >the ipfs links you give are not working in brave browser i haven't spent any time troubleshooting though 2021-07-20T03:39:35Z (via Gemini) >does this comment feature work on gemini too? 2021-07-20T03:40:18Z (via Gemini) >this feature works in gemini too! 20/Jul/2021:12:48:41 >nice job my friend 20/Jul/2021:21:10:37 >I had never known that one can sponsor a unicode character and am surprised that more people haven't sponsored one. 21/Jul/2021:22:06:10 >Hey, love your zine. Good stuff yo. 2021-07-22T12:34:18Z (via Gemini) >Those football team names deserve some kind of medal, and then another one for reading them out. 22/Jul/2021:19:28:29 >Ive enjoyed readint this. I too an sick of the SEO/Ad driven web of today. Though most of the tech you discuss here is beyone my means 23/Jul/2021:20:21:25 >I laughed out loud at your commenting system. Good show! 25/Jul/2021:08:59:11 >Great work on ployglot PDF. You're ahead of your time and meaningfully challenge established beliefs, and so naturally will be rediculed. Ignore the idiots, they still live in a flat world. 2021-07-26T15:20:14Z (via Gemini) >Great to see the comments also work on gemini! Keep up the good words :-) 24/Aug/2021:21:19:56 >Love what you're doing, I hope we'll have a new issue soon :) lab6 official response: Thank you for your patience! 2021-09-04T19:44:44Z (via Gemini) >I'm watching this PDF on GemiNaut on Windows 11 PR (Yes, I know it doesn't make sense) and it renders perfectly 2021-09-04T19:45:29Z >Both GemiNaut and LaGrange alerts that you certificate has expired 2021-09-04T19:47:37Z >The link for the previous edition in comments section points to https version of the issue 2021-09-04T19:49:51Z >And please explain in next release the voodoo that manipulates the SHA-256 hash lab6 official response: Change a non-critical range of bytes in a loop until you hit the target hash prefix 2021-10-18T18:41:39Z >very nice magazine you got there, i love reading it, regards,, 11/Nov/2021:17:53:29 >omg, i really love this "website"! it has been a breath of fresh air, and i'm sure i'll steal its design in some future creation one day. 04/Dec/2021:14:45:48 >Eagerly awaiting the next issue lab6 official response: Thank you for your patience! 09/Dec/2021:02:53:19 >i feel happy because of these issues but i also feel sad because i do not know how to find the coverdisk as a pdf attachment 07/Jan/2022:01:29:17 >Could you please shout out my friend Phil? The message is "Rise of the Balfourine!" - Thanks. These articles are fantastic lab6 official response: Think hard before making any more declarations, Phil. 25/May/2022:14:09:26 >Am I second? I'd like to thank my family and friends. 14/May/2022:12:30:02 >Somehow I keep getting the SocketExpection No route to host when I try to open the gemini version in the deedum browser - wonder what's causing it. lab6 official response: The Gemini server was down. In cases like these, best to just wait a few months and try again. 15/May/2022:12:15:37 >what kind of reponse i get when i make a comment lab6 official response: Fabulous cash prizes. 15/May/2022:15:35:08 >Oh heyyy 15/May/2022:16:31:36 >Good look 01/Jun/2022:15:15:54 >I'll be darned. lab6 official response: You will be. # Tracking ```Table of accidental clocks +-----------------------------------------------+-----------------------------+ | OEIS entries | 354,744 | +-----------------------------------------------+-----------------------------+ | English Wikipedia entries | 6,522,684 | +-----------------------------------------------+-----------------------------+ | RC5-72 keys tested | 414,381,015,840,122,208,256 | +-----------------------------------------------+-----------------------------+ | Bitcoin blocks | 741,1777 | +-----------------------------------------------+-----------------------------+ | XKCDs | 2,635 | +-----------------------------------------------+-----------------------------+ | IPv6 adoption | 41.27% | +-----------------------------------------------+-----------------------------+ | Abe Vigoda Status Page Status | Still up | +-----------------------------------------------+-----------------------------+ | Largest Prime | 2^82,589,933 - 1 | +-----------------------------------------------+-----------------------------+ | BTTF Movies | 3 | +-----------------------------------------------+-----------------------------+ | World population according to the CIA | 7,772,850,805 | +-----------------------------------------------+-----------------------------+ | Latest stable Linux kernel | 5.18.5 | +-----------------------------------------------+-----------------------------+ | Color Names | 2,986,052 | +-----------------------------------------------+-----------------------------+ | Latest number of tildeverse's #counting | 19,311 | +-----------------------------------------------+-----------------------------+ | Count of University of Queensland pitch drops | 9 | +-----------------------------------------------+-----------------------------+ | Project Gutenberg eBooks | 68,341 | +-----------------------------------------------+-----------------------------+ | OCRemix Releases | 4,351 | +-----------------------------------------------+-----------------------------+ | Atmospheric CO2 ppm | 420.63 | +-----------------------------------------------+-----------------------------+ ``` Special tracking mention of Queen Elizabeth II who has become the second longest reigning monarch of all time, closing in on Louis XIV with only two more years to go before becoming the GOAT. Go get him, your majesty! If you're reading this in a PDF viewer, congratulations, you made it to the end! If you're reading this in a Gemini client, what follows is the PDF data. If you're reading this in the operating system that somehow emerges from the file when booted in qemu, you're on your own. ```