> This post was inspired by another post about exactly the same thing. I couldn't find it when I looked for it, so I wrote this. All credit to the original author for noticing how interesting this rabbit hole is.
I think the author may be thinking of Ken Thompson's Turing Award lecture "Reflections on Trusting Trust".
Although that presentation does point out that the technique is more generally used in quines. Given that there is a fair amount of research, papers and commentary on quines, it's possible that the author may have read something along those lines.
One rule of programming I figured out pretty quick is: if there are two ways of doing it and there is a 50/50 chance of one being correct and the other one isn't, chances are you will get it wrong the first time.
I remember a similar article for some C compiler, and it turned out the only place the value 0x10 appeared was in the compiler binary, because in the source code it had something like "\\n" -> "\n"
The incorrect capitalization made me think that, perhaps, there's a scarcely known escape sequence \N that is different from \n. Maybe it matches any character that isn't a newline? Nope, just small caps in the original article.
> This post was inspired by another post about exactly the same thing. I couldn't find it when I looked for it, so I wrote this. All credit to the original author for noticing how interesting this rabbit hole is.
I think the author may be thinking of Ken Thompson's Turing Award lecture "Reflections on Trusting Trust".
Although that presentation does point out that the technique is more generally used in quines. Given that there is a fair amount of research, papers and commentary on quines, it's possible that the author may have read something along those lines.
https://en.wikipedia.org/wiki/Quine_(computing)
I thought this was going to be about '\N' but there's only '\n' here.
I always thought, maybe because of C, that \0??? is an octal escape; so in my mind \012 is \x0a or 0x0a, and \010 is 0x08.
So I find this quite confusing; maybe OCaml does not have octal escapes but decimal ones, and \09 is the Tab character. I haven't checked.
I'm guessing the “other post” that inspired this might be: https://research.swtch.com/nih
One rule of programming I figured out pretty quick is: if there are two ways of doing it and there is a 50/50 chance of one being correct and the other one isn't, chances are you will get it wrong the first time.
The USB rule.
First time is the wrong way up
Second time is also the wrong way up
Third time works
It's because of the quantum properties of USB connectors. They have spin 1/2.
I remember a similar article for some C compiler, and it turned out the only place the value 0x10 appeared was in the compiler binary, because in the source code it had something like "\\n" -> "\n"
if only this went into where the ocaml escape came from :)
It does, it links to this: https://github.com/ocaml/ocaml/blob/4d6ecfb5cf4a5da814784dee...
The incorrect capitalization made me think that, perhaps, there's a scarcely known escape sequence \N that is different from \n. Maybe it matches any character that isn't a newline? Nope, just small caps in the original article.
If you do view source, it’s actually \n, but it gets transformed to uppercase because of this CSS rule:
So, the HN title is wrong.
The original title is.
There is actually.
Many systems use \N in CSVs or similar as NULL, to distinguish from an empty string.
I figured this is what the article was about?
Previous discussion: https://news.ycombinator.com/item?id=41564527
this is a nothingburger of an article