Ancestors
Written by Verity :transHaskell::verifiedtransfem: on 2024-12-21 at 16:08
https://blog.veritates.love/qrinqr.html
512 bytes of JavaScript to generate a 32-byte QR code :3
=> More informations about this toot | More toots from monoidmusician@tech.lgbt
Written by Verity :transHaskell::verifiedtransfem: on 2024-12-21 at 16:11
the most halfhearted attempt at Galois fields you’ve ever seen, “i guess these numbers work” jkjk
=> More informations about this toot | More toots from monoidmusician@tech.lgbt
Toot
Written by Verity :transHaskell::verifiedtransfem: on 2024-12-21 at 16:24
the details in brief:
- it computes a Version 2 QR code (25x25 modules), with Low error correction (Version 1 cannot fit 32 bytes, and larger versions would mean more code required to generate it)
- It does compute the 10 bytes of error correction properly! that’s the Galois field stuff, and it isn’t too bad with these hardcoded parameters
- it uses a fixed mask pattern 0, since evaluating all mask patterns would be way too much code
- it generates the QR code in a single loop, walking the complicated zigzag pattern so that it pulls out the encoded data in the right order once it knows that none of the static patterns apply
maybe some alternative choices could be made (generating the QR code in another orientation?), and there’s probably a few more tweaks left to reduce it even further, but subjectively it feels pretty close to optimal
=> More informations about this toot | More toots from monoidmusician@tech.lgbt
Descendants
Written by Verity :transHaskell::verifiedtransfem: on 2024-12-21 at 16:28
fun fact: after the two bytes of QR code data wrapping (0x420…0) and ten bytes of error correction, there are still 7 empty modules (above the bottom finder pattern) that are filled with the mask pattern since they have no data
=> More informations about this toot | More toots from monoidmusician@tech.lgbt
Proxy Information
- Original URL
- gemini://mastogem.picasoft.net/thread/113691739255260700
- Status Code
- Success (20)
- Meta
text/gemini
- Capsule Response Time
- 320.982384 milliseconds
- Gemini-to-HTML Time
- 0.707462 milliseconds
This content has been proxied by September (ba2dc).