Live data from Hacker News

My Favourite Git Commit

fatbusinessman.com

251–260 of 389 posts

Re: My Favourite Git Commit

#251
post #228

Earlier quoted context omitted.

IMO the repo is the code However, I would have done a simpler commit and linked to an issue where I explained the problem/solution in more detail

This assumes your issue tracker doesn't change. I've been at my current position 8 years, and in that time we've had 3, and the first 2 are shut down.

We use Gitlab so it has both in the same project - but like you said that could change

Re: My Favourite Git Commit

#252
post #248
post #242

Earlier quoted context omitted.

I don't disagree, I've run into those dark corners myself. But the ease of use of globals is undeniable - there's a reason the Singleton pattern is still popular after all the ridicule it attracts.

Sure, it's easy to use. But that isn't the job of standardization bodies, or the right test to use on something as low level as this. It's harder to get right, but it is exactly these sort of failures in standardization that cause the most global pain, because they wend their way through everything.

In this case I don't think the locale functions were designed by committee, I think they were accepted as-is from a popular implementation. And they were implemented that way because it was the simplest most straight-forward way (I'll admit I'm just guessing now). Were they part of K&R C?

Re: My Favourite Git Commit

#253

Earlier quoted context omitted.

Final paragraph: > All in all, I believe this proves that software developers as a whole and as a culture produce worse results than drug addicted butt fucked monkeys randomly hacking on typewriters while inhaling the fumes of a radioactive dumpster fire fueled by chinese platsic toys for children and Elton John/Justin Bieber crossover CDs for all eternity. I also nominate this commit.

Pure, rage-filled, git commits are possibly the most honest form of art.

It's where the commit message comes in the process that makes them noteworthy. They're the final chance for a developer to vent their spleen or blow their trumpet before signing off on the results of possibly days of work.

Re: My Favourite Git Commit

#254

Earlier quoted context omitted.

…or fix the non-Unicode compatible systems that are consuming the commit messages and breaking? If they fail with an nbsp then they’re probably also going to fail with more obviously useful non-ASCII characters.

How often are non-breaking spaces purposely inserted vs accidentally? And the tools might handle them fine but will produce strange results or errors. An example is inserting a non-breaking space in a document or string. It will prevent word wrap, which might not have been the user intent. A linter that requires these spaces to be explicitly set in encoded form would avoid these issues.

Non-breaking spaces are required to typeset French correctly, at least: https://en.wikipedia.org/wiki/Question_mark#Stylistic_varian.... The accidental insertion of non-breaking spaces is a possible issue, and it's a bit harder to detect than other typos, but it's also probably not as bad as other typos. Overall I think it's a bit hard to make the case that they should be disallowed.

Re: My Favourite Git Commit

#255
post #202

Earlier quoted context omitted.

The commit was complaining specifically about the way locales were designed, not C as a whole. While C was very successful, I don't think you could argue that C locales ever reached the same level of popularity. That being said I do agree with you that this complaining is not massively productive. Dealing with localization and non-ASCII text is notoriously difficult. Look at Java, Python 3, Windows, PHP 6 and how man…

Locales being global state only makes sense for single-user applications. That assumption is no longer true once you have a server where every request may be from a different user. A better way to handle this is something like Go's context object, which gets passed explicitly.

That's not a very common use case for C, either now or back then (arguably you probably had more user-facing C cgi back then, but it was still one invocation per user so arguably you could set the locale for each call). Some webapps use C in the backend but generally don't deal with the localization at this level.

I'm not saying that C locales aren't bad and limited, I'm saying that it's a compromise that makes some sense. In particular when you're trying to bolt something into an already extremely popular language instead of designing a new thing from the ground up.

Can you imagine the churn if the C standard suddenly introduced a whole new set of string functions just to deal with the locales? Well, you don't really have to imagine, just look at the way it works on Windows with their wide strings.

Re: My Favourite Git Commit

#256
post #221

Earlier quoted context omitted.

It’s a shame you see it only as complaint, the brilliant thing about the text you’re replying to is that it educates the reader as to the bigger problem, as well as being very funny. Does your complaint do either? Understanding why C locales are broken may very well contribute to the lasting growth of humanity. Did you note that Eric Raymond fully agreed?

You’re assuming from a distance I can’t get the point at all. You’re assuming also ESR is some God incapable of normal human failures in reason. The issue is a real thing in C. Github to me is Arxiv. I don’t see a lot of research papers making a point with caustic words for the universe. But my background and education is math, my way of having to communicate issues and ideas is different. To me MPV is a few build sc…

I hope you can in the future find the value of using humor to make your comments enjoyable to read, like the author wm4 did.

> I don’t really care about social media norms and use throwaways liberally

Did you mean that to be funny? It’s quite ironic following your “rant by someone with no real responsibility” comment. That seems pretty funny to me, but not clear that was the intent.

Re: My Favourite Git Commit

#257
post #220
post #202

Earlier quoted context omitted.

The commit was complaining specifically about the way locales were designed, not C as a whole. While C was very successful, I don't think you could argue that C locales ever reached the same level of popularity. That being said I do agree with you that this complaining is not massively productive. Dealing with localization and non-ASCII text is notoriously difficult. Look at Java, Python 3, Windows, PHP 6 and how man…

When locales were invented, it was reasonable to assume that the locale would determine the character set. With the subsequent invention of Unicode that no longer needs to be the case, but code standards live forever.

>When locales were invented, it was reasonable to assume that the locale would determine the character set

Sure, but that's not what the commit is saying. Instead it's saying that it should only determine the charset and that Unicode effectively makes locales pointless. That's absolutely not the case, there's a lot more to locales than character encoding.

Re: My Favourite Git Commit

#258
post #46

For anybody wondering, the likely origin of the invalid character is somebody using an Apple Ireland/UK keyboard layout where # is Option-3 (AltGr-3), and non-breaking space is Option-Space (AltGr-Space).

Ah I would have bet good money on an apple product being involved.

Re: My Favourite Git Commit

#259

To an extent I find this lazy and even a humorous take is giving it attention it doesn’t deserve I can complain about anything Can this person build a language that’s still as broadly useful as C that no programmer will find issue with “Oh boy I encountered a particular odd and annoying thing. I won’t bother to offer an alternative. I’ll just complain about others efforts while ignoring they ultimately enabled me to…

This comment comes across really mean and judgmental. I didn’t read all of the original commit, but it read to me as informative and passionate with all of the frustrations solving a difficult problem comes with. Honestly, this comment is so over the top I can’t even detect whether you’re serious or not.

The point being I easily got the problem and a solution in the git commit that was originally posted without having to wade into the authors personal emotional preference for humor.

I’m trying to solve my own problems using Github. If I wanted to bullshit I’ll hit you up on IRC.

How much of these things are in source code we import into our systems? It’s enough reading through lines of obscure code. I don’t really want the lift of parsing others emotions.

Time & place, children.

Re: My Favourite Git Commit

#260

Earlier quoted context omitted.

Then use `git log --oneline` and you don't have to see the lengthy details, until the inevitable day when you find you need them.

How do you surface them when you need them, though? git grep?

Sure? Or 'git log', then use the pager to search, or pipe into something with better fuzzy search, etc?
Post reply on HN