The shortest pull request ever(github.com) |
The shortest pull request ever(github.com) |
Byte Order Marks have stolen hours and days of my life. Anyone suffering the pain of developing on a windows box can relate. Windows puts BOMs by default in the front of every file. Thus windows programs silently ignore it, but then linux machines run the program and choke on the BOM. You have to specifically ask the editor if the BOM is even there, it doesn't show up in the editor by default. I have specific lines in my .vimrc[1] that prevent BOMs from ruining my day/week, but they still pop up often. I often joke there will be a byte order mark on my tombstone, along with avahi daemon.
1: https://git.sr.ht/~djha-skin/dotfiles/tree/main/item/dot-con...
Me too, to some degree. I have discovered them in a Ruby code base at work, in the middle of a line of code (copy pasted), where the Ruby interpreter thinks they are undeclared identifiers. When the code runs, it throws an exception every time that complains of “Undeclared identifier `‘”.
The dad-joke of it is that “You gotta sweep for BOMs before they blow up your code.”
I'm sure there were good reasons that BOM sounded like the right idea at Microsoft, but everyone else just used straight UTF-8 and it was fine.
In 1996, it was realized 16-bit wasn't enough, and was expanded in Unicode 2.0, which also included UTF-16, a variable-width encoding, which required the BOM.
Windows 2000 supported UTF-16 on release.
Why didn't Windows 2000 support UTF-8, which was invented in 1992 and implemented in Plan9 in that same year? Who can say...
Tell us more!
It was like a week or two later until I finally went to my friend and said I must be stupid but I can't do this it's not working and he just disabled the avahi daemon and everything started working again.
Blarg.
Sounds like that is a good choice for the option name
They always end up +0-0 - see:
Presumably the plagiarism system was just looking for exact matches of long substrings.
I hope it returns the copied string.
String "" is plagiarised
It determines the end-of-line format, tabs, bom, and nul characters:
Also, does it detect files that only contain CR as EOL characters? Or files that have different EOL characters on different lines?
https://en.wikipedia.org/wiki/Newline#Representation
CR does not appear to really be used as EOL. Also, I don't think having different EOL chars within the same file is really a thing.
https://github.com/jftuga/chars/issues/2
According to the page, several machines and operating systems used CR as EOL. While the systems are all obsolete, files from that era that use CR as EOL could persist and be transferred to modern systems. Clearly those are weird on modern systems, so they should be warned about in a linting situation, which I would like to use your project 'chars' in.
Having different EOL chars within the same file is definitely a thing, usually by mistake. I had to fix a bug about this recently:
* when used with -f, only display a list of failed files, one per line
> The active directory domain was a .local domain
.local is a reserved domain for mDNS (aka ZeroConf or Bonjour, the stuff Avahi handles), standardized in early 2013.
Then again, 2014 is soon enough after for that for knowledge not to have percolated everywhere, and/or for it to stomp on older networks that had used .local beforehand.
Then Apple made the same mistake with Bonjour / mDNS, and the IETF standardized Apple’s use of .local and it all became an even worse mess.
git commit --allow-empty -m "initial"
git push -u origin HEAD
git checkout -b first-pr
# type-y type-yOnce you account for automated systems, many other reasons can arise. Not just the “trigger CI” case mentioned in another comment, triggering builds or processes based on remote content the code accesses, or generating something either random or seeded by the commit hash/timestamp/message/etc.
It can even be a Homer Simpson-style drinking bird button press, so finished software doesn’t get mistaken for abandoned.
Probably whole worlds of things I haven’t imagined because I don’t use git hooks or submodules.
git commit --allow-empty -m "Initial commit." heroku stack:set heroku-22
git commit -m 'upgrade to heroku-22 stack' --allow-empty
git push heroku masterI guess conceptually you could use it to represent "I started from nothing."