7 ms·
A QR code built from Emoji
- bartvk 6y agoInteresting, this would allow QR codes in the terminal.
- bzb6 6y agoYou could already use qr codes in the terminal because we’ve had black blocks and spaces for 60 years.
- phartenfeller 6y agoWould it still work when someone uses a white theme vs. a black theme for their terminal?
- edent 6y agoNo, generally not. Some QR scanners will scan "inverted" codes, but it is outside of the spec.
- rnestler 6y agoI usually just select the qr code in the terminal to invert it and then scan it :)
- tinus_hn 6y agoOfficially you do need to have the ‘dead space’ white area around the symbol as well or it won’t scan easily.
- LoSboccacc 6y agoThe 2015 spec clearly call for support for both dark over light and light over dark, and doesn't constrain light and dark to black and white.
- leipert 6y agoYou can usually define force and background colors in the Terminal, so you could force black on white. But then again someone can redefine the colors in their terminal. Some terminal emulators also support rgb; so a smart QR code program should be able to do it.
- xgulfie 6y ago> Some terminal emulators also support rgb * Most. Even cmd does.
- wastholm 6y agoAbsolutely. A couple of years ago when my son was really into Beyblade Burst, I wrote a little script that displayed Beyblade codes in the terminal (they're not QR but a different kind of 2D black-and-white "barcodes"). The Android app would scan those just fine.
- larschdk 6y agoqrencode (https://fukuchi.org/works/qrencode/ https://fukuchi.org/works/qrencode/) already does. It even does half-height squares (2 bits per character).
- deleted 6y ago[deleted]
- shreddit 6y agoWell yes these are emoji, but i was expecting something more “:)”-ish
- edent 6y agoYou could use skintone modifiers on some of the smilies - but I thought that was a bit weird.
- bufferoverflow 6y agoThey aren't emojis. Standard ASCII.
- edent 6y agoThat's not quite the case. The blocks are available in the Miscellaneous Symbols and Arrows section of Unicode. That's usually rendered as plain text (although not ASCII). But they're also paired with Variation Selector 16 (https://emojipedia.org/variation-selector-16/ https://emojipedia.org/variation-selector-16/) which gives them an Emoji presentation on most modern systems.
- rtkwe 6y agoYeah blocks from unicode aren't exactly what I was expecting when I clicked through. Of course you can make a QR code with what are essentially big black and white pixels...
- larschdk 6y agoqrencode[1] has been doing this for a long time in the terminal. It even supports half-block UTF-8 character (two bits per character, which makes them more square). [1]: https://fukuchi.org/works/qrencode/ https://fukuchi.org/works/qrencode/
- deleted 6y ago[deleted]
- pqb 6y agoI second qrencode. It is notoriously used by the password-store [0]. Theirs qr function is perfect to extract as a separate script and put them into the $PATH (especially useful when it is needed to generate and save some QR codes). The opposite tool to qrencode is zbarimg, which accepts first parameter to image file containing the QR code and prints out the encoded content. [0]: https://git.zx2c4.com/password-store/tree/src/password-store.sh?h=1.7.3#n180 https://git.zx2c4.com/password-store/tree/src/password-store...
- rozab 6y agoalias qr="qrencode -t UTF8" Very handy thing to have in the toolbox for those who live in the terminal, along with magic-wormhole and friends
- fouc 6y agoQR code built as ASCII art and then displayed prettily in Emoji Blocks to ensure proper contrast?
- tomashubelbauer 6y agoThis is cool and iOS camera is able to scan the code even without the CSS that squashes the squares together if scanned from a large enough distance (about 30 cm).
- stabbles 6y agoCan't you tweet a QR code made from Braille ASCII?
- edent 6y agoThe smallest QR codes are 21x21 pixels. Braille is 2x4. So you might be able to do it assuming there are the right patterns.
- froj 6y agoWhat about data matrix [1] instead of QR? The smallest symbol possible is 10x10 so that should be tweetable. [1] https://en.wikipedia.org/wiki/Data_Matrix https://en.wikipedia.org/wiki/Data_Matrix
- grenoire 6y agoBraille characters occupy all 256 (for the 2x4, 8-bit matrix) combinations, so invalid (unused) characters do exist.
- nlitened 6y agoI bet you can use these Unicode symbols to pack 4 bits in one character — would look much nicer, too: Edit: HN cuts them away. But the idea is using these https://en.m.wikipedia.org/wiki/Box-drawing_character https://en.m.wikipedia.org/wiki/Box-drawing_character section Historical
- baxtr 6y agoI don’t know why, but as a consumer I hate QR codes. Maybe because the hype there was? And the little bit of information they provide, like a link. I don’t know.
- wilsonrocks 6y agoI am similar, as are most people I know, yet it just seems to be the kind of thing that people think is great and that people love
- mr_mitm 6y agoI think it's great for boarding passes, parking tickets, theater admission, etc.
- pqb 6y ago> And the little bit of information they provide, like a link. I don’t know. I share the lack of sentiment to hype and overusing its name and symbol but I cannot agree about the sentence I have quoted about. The QR code comes with titles and URIs, which provides nice way how to share some information with a distinction of their type, i.e. a contact card, OTP passphrase, WiFi credentials (SSID/passphrase pair). Instead of providing a password, which is hard to spell out, we can just share an image and in a moment after scanning we are connected to the WiFi. Been there, works like a charm. We can also use them to share data of multi-MB weight over just an animation combined with generated QRs [0]. [0]: https://github.com/divan/txqr https://github.com/divan/txqr
- tinus_hn 6y agoThe hype was a bit too early when the codes were very hard to scan which was a big turn-off. These days they scan instantly and have a lot of useful applications.
- calgoo 6y agoHere in spain a lot of restaurants have posted QR codes on the tables so people can see the menu without touching it. Its been a great help during the pandemic. The experience on the iPhone has been really good. Android.... depends on the phone / os version / app etc. QR is something that should be part of the OS and apps should be able to register apps / protocols so it opens directly.
- deleted 6y ago[deleted]
- billpg 6y agohttps://billpg.com/qr.html https://billpg.com/qr.html (A little too long for twitter. Also, I could find a font that displayed these characters correctly.)
- billpg 6y ago* n't
- cornstalks 6y ago> Can I tweet that??!? > The smallest possible QR code is 21×21 pixels, that’s too many characters to fit into a Tweet. Sorry! Ah, but you're thinking inside the box! With Unicode block elements[1] you can divide a single character into a 2x2 block of "pixels", thus requiring a grid of only 11x11 (121 characters + 10 line breaks). Unicode braille patterns[2] come in 2x3 or 2x4 dot patterns, so depending on your font and how forgiving your QR code reader is, you might be able to use braille patterns for even larger QR codes. [1]: https://en.wikipedia.org/wiki/Block_Elements https://en.wikipedia.org/wiki/Block_Elements [2]: https://en.wikipedia.org/wiki/Braille_Patterns https://en.wikipedia.org/wiki/Braille_Patterns
- d33 6y agoAlso, couldn't error correction allow you to only put part of the QR code?
- edent 6y agoSort of. The 21x21 QR has an error correction of "L". That means up to 7% of the data area can be obscured. Realistically, as the code is a square, you could only lose data from the right hand side while maintaining integrity. A QR with "H" error correction can lose about 30% - but the code takes up a lot more pixels.
- lifthrasiir 6y agoQR code needs alignment patterns (5 by 5 bullseye shape) at correct positions to compensate distortion, so that limits the actual saving from entirely omitting the data because removing anything left of alignment patterns would not reduce the size. You also have to account for masking but that's a minor issue (the optimal masking algorithm is a recommendation and not a requirement).
- lifthrasiir 6y agoFor the testing purpose, the following is the QR code in the post rendered with braille patterns: ⡏⣭⡍⡇⣲⢱⡆⡏⣭⡍⡇ ⠧⠭⠥⠇⠖⡗⡆⠧⠭⠥⠇ ⡭⠉⢁⠽⣛⠾⢽⠘⣚⡾⠂ ⡬⠬⠭⡍⢟⡉⣔⠱⣛⡦⠃ ⡇⠿⠇⡇⣏⠹⢵⢱⡋⡖⠀ ⠉⠉⠉⠁⠉⠈⠀⠉⠉⠈⠀
- munro 6y agoI tried to scan this emoji QR code, and it didn't work on my iPhone.
- ehsankia 6y agoWorked fine on my Pixel Gcam. Links to the author's portfolio.
- ehsankia 6y agoNow we need to go deeper, we need to encode a smaller unicode qrcode as a bigger qrcode.
- tvst 6y agoWhat always bugged me about QR codes is that they're not human-readable. I'd love if there were a standard where you'd simply have a human-readable URL plus some markers at the start and end to help with OCR. And you could standardize the font too. For example: |: google.com [| (edit: hackernews removes unicode...)
- lifthrasiir 6y agoSee also the human-readable 2D barcode concept [1]. [1] https://mitxela.com/projects/hr_code https://mitxela.com/projects/hr_code
- elliottcarlson 6y agoNerd sniped - here is a quick tool to generate Slack Emoji based QR codes https://github.com/elliottcarlson/slack_qr https://github.com/elliottcarlson/slack_qr