Both libqrencode and qrcode-terminal are capable of using ANSI escape codes for colored text to produce black and whites squares. Two space characters make about the right aspect ratio in an xterm window. I reinvented the same method myself a while ago, so it's funny how different people come up with the same idea. Haven't tried it on a VT100 terminal yet, but it should probably work there too.
qrencode also has a -t argument which accepts a utf8 value. Great way for quickly opening URLs you have in your clipboard on mobile devices during development as you can pipe in your clipboard to qrencode.
I love this. I can't get the newline breaks to work in my QR scanner, but I got excited about the idea of generating recursive QR codes. i.e. QR codes that embed another unicode QR code inside of them.
It would be like if I made a website called "veggiebot" and the logo were a tomato, and everyone were getting up in arms about tomatoes technically being a fruit (berry).
Yes. In theory tomatoes are not vegetables. But in practice they are treated as vegetables and searching for images of "vegetables" in google will almost certainly yield pictures of tomatoes.
In theory ASCII is not Unicode. But in practice, 99% of people don't care about the under-the-hood esoteric intricacies of all the different character encodings. They see a picture made from printable characters instead of pixels and think "ASCII art"
I agree with you! But while we're being pedantic, I should complain that I don't like "tomato/fruit" analogy since the categories "fruits" and "vegetables" are not mutually exclusive.
There's no botanical definition of "vegetable" like there is with "fruit". So it's sort of disingenuous to complain about edible plant categorization while using the social/cultural sense of the first word but not the other.
> In theory tomatoes are not vegetables.
I don't think I agree with that sentence. "Did you know that a tomato is technically a fruit?" is true and interesting if you've never heard it before.
On the other hand "Did you know that a tomato isn't a vegetable; it's technically a fruit!" <- This is false. Fruits are only not vegetables if you use the social/cultural sense of both words.
I was struggling with coming up with a perfect analogy, but this phenomenon basically happens when a word becomes ubiquitous to mean an entire class of something, like how "Kleenix" means "tissue" or "Coke" means "carbonated beverage" (depending on your location in the US).
(1) I acknowledge that the author already states that "[they are] quite well aware that this uses Unicode not ASCII."
(2) Having said that, as a request to everybody for future text-based creations, could we please stop referring to non-ASCII text as "ASCII". Using characters that aren't in ASCII really shouldn't be referred to as ASCII. Pretty please.
(3) The more generic label of "text QR" or "text-based QR" would be better, in my opinion. In this particular situation, saying "Unicode text QR" or "Unicode QR" would also be appropriate.
It seems like "ASCII QR" is a play on "ASCII art", which is an existing compound word with a specific history and meaning that the term "text art" simply does not have. When I think of ASCII art, it reminds me of old plain-text video game FAQs, which often included elaborate ASCII art throughout. "Text QR" or "Unicode QR" does not have that association.
Of course; but ASCII art only uses ASCII characters. Back in the BBS days you could use ANSI to give you different characters and colors; but that was called ANSI, not ASCII.
"Unicode QR" is probably the best term for what's happening here.
It's typically used to refer to certain Microsoft 8-bit code pages, like Windows-1252, that extend 7-bit ASCII to 8 bits. My understanding is that these code pages were proposed as an ANSI standard, but never adopted. ISO 8859-1 (Latin-1) is similar but not identical to Windows-1252 (Latin-1 has control characters in some positions where Windows-1252 has printable characters -- and Unicode inherits those control characters from Latin-1.)
The meaning of words change. Selfie used to mean a self-taken photo of yourself. Now people call every photo of a person a selfie.
ASCII used to mean a specific encoding, but its most widely known usage was in ASCII Art. And so the meaning of the word changes: ASCII starts to mean “ASCII art” even when it’s Unicode.
You can't fight semantics. Words take on new meanings all the time. "Literally" and "nonplussed" used to mean one thing, now they mean the opposite thing.
"ASCII" is becoming ubiquitous for "Of or relating to printing characters in the style of a terminal shell/CLI"
Just look at the package that was the #1 link yesterday - Asciinema or whatever.
I bet you a dollar Asciinema isn't actually printing ASCII encoded characters.
Am I missing something? 0x.co looks basically like a simple bit.ly clone but that accepts non-urls too.
You need to be online to perform a lookup, and can only look it up on 0x.co. If the website goes down, if the database gets lost, if you don't also include a "go look this up on 0x.co" note, etc. etc. the codes have no utility. These are problems that QR codes solve.
Agreed. In fact, I don't know what people use Oh By codes for ... but they do, in fact, create them and even purchase them.
I will point out that it is difficult to "tell" someone a QR code over the phone ... or shout it to them ... or chalk one of them up on a wall, etc. Oh By codes solve this problem (to whatever degree this is a problem to someone).
That's just a service for hosting up to four kilobytes of text combined with an URL shortener.
If the service provider ever decides to discontinue it, and they eventually will, all your codes will become meaningless. As are they when you don't have internet access for whatever reason.
QR on the other hand can embed a similar amount of text and is always readable and independent of any single service provider.
Not op but I think QR codes are great and here to stay. They might not be the most efficient or ideal on a technical level, but they are very intuitive with basically universal mindshare. People understand the concept of scanning barcodes.
Ever since Apple added automatic detection of QR codes to the camera app, I think they're pretty well cemented as a good way to transmit small amounts of data.
I don't think I've honestly ever seen someone use QR codes due to their own initiative. I.e, I've seen people use it to pair stuff (≈ Apple watch) and for 2FA etc.
But I think the whole concept of QR codes on posters etc will never take off. It's probably quicker to type in a URL or search for it, the codes are also often time to small or cumbersome to actually scan successfully.
I think the idea of augmenting meatspace content with some kind of hyperlink will finally be implemented on phones with NFC tags, especially since iPhones are starting to support background scanning.
However, when/if AR glasses become mainstream, we will probably use visual markers, and perhaps they will be QR but I'm betting a more visual pleasing standard will come, that can be embedded in the physical space without being as jarring [0].
[0]: Consider the impressive tracking already implemented in ARKit 2 (https://www.youtube.com/watch?v=ZhHExAxyVow). The image is however only recognised as being part of a pre-defined, hardcoded, set of images, but it's not hard to imagine Apple suggesting some "iQR"-standard which is less intrusive but much much much more computationally expensive to detect. I have implemented a silly POC conference app which recognises badges using ARKit 2 simply by using different enough images as background on the badges (wouldn't probably scale to a large conference however...).
56 comments
[ 3.0 ms ] story [ 107 ms ] threadhttps://github.com/lincolnloop/python-qrcode
In Archlinux, it's in the python-qrcode package.
There're other command line utilities to make PNG QRs, like `qrencode`.
It would be like if I made a website called "veggiebot" and the logo were a tomato, and everyone were getting up in arms about tomatoes technically being a fruit (berry).
Yes. In theory tomatoes are not vegetables. But in practice they are treated as vegetables and searching for images of "vegetables" in google will almost certainly yield pictures of tomatoes.
In theory ASCII is not Unicode. But in practice, 99% of people don't care about the under-the-hood esoteric intricacies of all the different character encodings. They see a picture made from printable characters instead of pixels and think "ASCII art"
There's no botanical definition of "vegetable" like there is with "fruit". So it's sort of disingenuous to complain about edible plant categorization while using the social/cultural sense of the first word but not the other.
> In theory tomatoes are not vegetables.
I don't think I agree with that sentence. "Did you know that a tomato is technically a fruit?" is true and interesting if you've never heard it before.
On the other hand "Did you know that a tomato isn't a vegetable; it's technically a fruit!" <- This is false. Fruits are only not vegetables if you use the social/cultural sense of both words.
Author: "Coke QR"
HN: "That's not Coke, that's Sprite!"
dang: changes title to "Carbonated Beverage QR"
(2) Having said that, as a request to everybody for future text-based creations, could we please stop referring to non-ASCII text as "ASCII". Using characters that aren't in ASCII really shouldn't be referred to as ASCII. Pretty please.
(3) The more generic label of "text QR" or "text-based QR" would be better, in my opinion. In this particular situation, saying "Unicode text QR" or "Unicode QR" would also be appropriate.
e: lol why downvoting the inquisitive reader? this community sheeesh. hacker news seems a misnomer more than anything.
Unicode is already not common enough, last thing that IMHO is needed are _more_ programs that don't implement well accepted, well tested standards.
"Unicode QR" is probably the best term for what's happening here.
It's typically used to refer to certain Microsoft 8-bit code pages, like Windows-1252, that extend 7-bit ASCII to 8 bits. My understanding is that these code pages were proposed as an ANSI standard, but never adopted. ISO 8859-1 (Latin-1) is similar but not identical to Windows-1252 (Latin-1 has control characters in some positions where Windows-1252 has printable characters -- and Unicode inherits those control characters from Latin-1.)
ASCII used to mean a specific encoding, but its most widely known usage was in ASCII Art. And so the meaning of the word changes: ASCII starts to mean “ASCII art” even when it’s Unicode.
"ASCII" is becoming ubiquitous for "Of or relating to printing characters in the style of a terminal shell/CLI"
Just look at the package that was the #1 link yesterday - Asciinema or whatever.
I bet you a dollar Asciinema isn't actually printing ASCII encoded characters.
Please let's discuss something more interesting than the name now.
Upper half: * ' " ` ^
Lower half: o _ z
Source: have played nethack.
[1] 0x.co
You need to be online to perform a lookup, and can only look it up on 0x.co. If the website goes down, if the database gets lost, if you don't also include a "go look this up on 0x.co" note, etc. etc. the codes have no utility. These are problems that QR codes solve.
Agreed. In fact, I don't know what people use Oh By codes for ... but they do, in fact, create them and even purchase them.
I will point out that it is difficult to "tell" someone a QR code over the phone ... or shout it to them ... or chalk one of them up on a wall, etc. Oh By codes solve this problem (to whatever degree this is a problem to someone).
If the service provider ever decides to discontinue it, and they eventually will, all your codes will become meaningless. As are they when you don't have internet access for whatever reason.
QR on the other hand can embed a similar amount of text and is always readable and independent of any single service provider.
Oh By will continue to be maintained into the indefinite future. Come see in twenty years.
I have a very good track record in this regard.
interesting naming choices you made there
I don't think I've honestly ever seen someone use QR codes due to their own initiative. I.e, I've seen people use it to pair stuff (≈ Apple watch) and for 2FA etc.
But I think the whole concept of QR codes on posters etc will never take off. It's probably quicker to type in a URL or search for it, the codes are also often time to small or cumbersome to actually scan successfully.
I think the idea of augmenting meatspace content with some kind of hyperlink will finally be implemented on phones with NFC tags, especially since iPhones are starting to support background scanning.
However, when/if AR glasses become mainstream, we will probably use visual markers, and perhaps they will be QR but I'm betting a more visual pleasing standard will come, that can be embedded in the physical space without being as jarring [0].
[0]: Consider the impressive tracking already implemented in ARKit 2 (https://www.youtube.com/watch?v=ZhHExAxyVow). The image is however only recognised as being part of a pre-defined, hardcoded, set of images, but it's not hard to imagine Apple suggesting some "iQR"-standard which is less intrusive but much much much more computationally expensive to detect. I have implemented a silly POC conference app which recognises badges using ARKit 2 simply by using different enough images as background on the badges (wouldn't probably scale to a large conference however...).