Threads for yawpitch

  1. 2

    Always good to see someone diving into the interpreter internals, but man I find supporting -‘ incomplete ternary expression to be a weirdly uncomfortable motivation for doing so.

    1. 3

      It is a complete expression, else defaults to None and you can’t return from your weirdly comfortable ternary expression whereas you can conditionally return from a function with postfix if which btw is a one-liner.

      1. 1

        It is a complete expression

        Didn’t say it wasn’t; I said it was an incomplete ternary expression, which is definitionally true.

        else defaults to None

        Understood, but not obviously a compelling syntactical feature and, if you ever decide to take up typing discipline, an antipattern in the making.

        and you can’t return from your weirdly comfortable ternary expression whereas you can conditionally return from a function with postfix if which btw is a one-liner

        Also not exactly a compelling feature, and returning from within an expression is ambiguous in a statement based language:

         value = return 42 if True
        

        Is that valid syntax? Is value dead code? Or can it only ever be None if reachable?

        Besides, you can already conditionally return in one line, so not sure that ability adds anything:

        if True: return 42
        

        I’m not some huge fan of Python’s ternary conditional, having picked up TCL’s terser version first, but shoe-horning TCL style syntax would also be an odd motivator for forking my own personal Python, with all the distribution problems that brings.

        1. 1

          Return with a bottle of wine if you can. I want wine conditionally and you want my statement to be as readable as possible. So it is obviously not an anti-pattern.

          value = return 42 if True
          
          # Is that valid syntax? Is value dead code? Or can it only ever be None if reachable?
          

          It would be invalid syntax. rhs can’t be a void value. Are we just making up uses where syntax might be confusing or harder to read? Is that the point?

          value = if True: return 42  
          

          This would probably throw the same error if if expressions could be used as rhs. Unfortunately they cannot be and it is an error. Another missing feature. The syntax is miserable, but yes, it is a one-liner.

          1. 1

            Return with a bottle of wine if you can. I want wine conditionally and you want my statement to be as readable as possible. So it is obviously not an anti-pattern.

            The statement:

            return bottle if wine else None
            

            … is arguably more readable than:

             return bottle if wine
            

            … if only because what is returned is explicit in all cases. Both are an antipattern when you’re being disciplined on types, because you’ve got one expression that evaluates to more than one possible type.

            Are we just making up uses where syntax might be confusing or harder to read? Is that the point?

            No attempt at straw manning, I’m actually uncertain of what valid syntax is for return in this two-thirds-of-ternary form. That uncertainty comes from its inherent instability, does:

            return bottle if wine
            print(“foo”)
            

            Return either bottle or None, terminating the function and making the print unreachable, or does control flow continue past that line of wine is False?

            return bottle if wine else None
            print(“foo”)
            

            Notice how there’s no question here that the print is unreachable.

            Unfortunately they cannot be and it is an error.

            The ternary if form — the only form of if expression in Python — can be used as the RHS of a return. The language just requires that such an expression must unambiguously evaluate to either the LHS or the RHS of the “if predicate” portion. Trying to return an if statement is nonsensical and should error.

            Another missing feature. The syntax is miserable, but yes, it is a one-liner.

            I see no missing feature. All I see is a bit of syntactic sugar that seems to have no obvious positives — without more clearly understanding the valid uses of return-if it certainly looks like it’s just the ternary if with “else None” elided — but which very clearly conflicts with two of the maxims of the Zen of Python (one obvious way to do things and explicit is better than implicit). As for the syntax being “miserable”… well that’s how I feel about Ruby, generally, so not sure we’ll come to any meaningful conclusions on that particular unprovable value judgement.

            1. 1

              I think the confusion lies where you missed the second half of the post where postfix if makes the return conditional. Else None makes it completely different. It will return None if condition is not met. This is not what it does. Yes, “finding syntax useful” is subjective, but it exists, and it is used, so it is useful. And it will lose its use when people stop using it. That’s the pragmatic solution to your philosophical dilemma. And you can have Optional[int] as the return type in python, so I don’t understand your protests of having anti-patterns and type inconsistencies. That’s where python does better I think. And that’s why I use it instead of ruby.

              1. 1

                I think the confusion lies where you missed the second half of the post where postfix if makes the return conditional. Else None makes it completely different. It will return None if condition is not met. This is not what it does.

                No, I didn’t miss the second half of the post, what I’m saying is that the Ruby-style syntax is inherently ambiguous, and that using the nil case to bypass return is semantically weird, logically inconsistent, and confusing to learners, all in one go.

                In Python the semantics of;

                var = EXPR
                return var
                raise RuntimeError()
                

                … are unambiguous; we always return whatever EXPR evaluates to, and in all cases control flow ceases and any code below the return statement is unreachable. I can glance at this and know that error is never raised.

                More importantly those first lines contracted into one one always has precisely the same behavior (modulo incrementing and decrementing a reference counter):

                return EXPR
                raise RuntimeError()
                

                But in Ruby-style syntax that’s not the case:

                var = EXPR
                return var
                raise RuntimeError()
                

                … can never throw that error, while:

                return EXPR
                raise RuntimeError()
                

                might do so, because EXPR may include a conditional.

                Besides, there already exists an obvious way to do this motivating example:

                def foo(test):
                     a = 1
                     return a if test
                     a += 1
                     return a
                

                … without considering early return at all:

                def foo(test):
                     a = 1
                     if test:
                         a += 1
                     return a
                

                Yes, “finding syntax useful” is subjective, but it exists, and it is used, so it is useful. And it will lose its use when people stop using it.

                Ahh, but it doesn’t exist in Python, and the present debate is over whether or not it makes sense to go to the trouble of adding an ambiguous and inconsistent feature to the language when, again, the addition essentially duplicates and mildly bikesheds functionality that has already been provided in an unambiguous and consistent way. Personally I’m all for this useful thing losing its use, but I’m sure it shouldn’t be added to the language in a misguided attempt to increase its use.

                That’s the pragmatic solution to your philosophical dilemma.

                I haven’t got a dilemma, and arguably the most pragmatic solution is to use the idioms of a language as you find them, rather than trying to shoehorn in idioms lifted from other languages, especially when those foreign idioms already have native solutions that are perfectly workable.

                1. 1

                  I think this is a pointless argument for inconsistency and shoehorning full of your personal preferences using counterexamples since you can do it for any language where the same keyword is used for two different idioms.

                  1. 1

                    Think what you’d like, but if you’re not ready to address concerns such those as I’ve raised you’ll never get your personal preference for this new idiom adopted into Python. Of course you’re welcome to incorporate it into your own personal Mython, though I’m not sure the distribution pain is worth it. But hey, you choose what hill to die on.

                    1. 1

                      You think I’d go to lengths to get my idea implemented and that your “arguments” provide some sort of basis for validity? Illusions of grandeur? It’s inconsistent because I don’t expect it. It’s an anti-pattern because I don’t know what Optional means. Languages don’t need new features because you can use existing syntax. Clicking reply on lobste.rs or any forum is not the kind of actual I would take if I wanted to get this implemented. I would go implement it, come up with a couple of actual useful real life examples, write a PEP and send a diff.

                      1. 1

                        I would go implement it, come up with a couple of actual useful real life examples, write a PEP and send a diff.

                        Please do. Then watch it be rejected for all the reasons listed above.

                        The phrase is “delusions of grandeur”, BTW.

                        1. 1

                          Great, thanks for your time.

    1. 29

      I’m posting this in a top-level comment so nobody thinks I’m singling/calling them out when I say this:

      I’ve heard the criticism of the blog post title and will take it to heart for future posts. We don’t need to keep talking about it in depth, and I worry that the discussions are going to get excessively heated if they continue their current trajectory.

      As many of you have pointed out, I’m also a programmer. So I’m punching myself with that remark too. And that part’s deliberate; many of my jokes have a tinge of self-deprecation to them. (That’s not because of, like, depression or low self-esteem or anything. I just have enough humility to make fun of myself without drawing blood.)

      My intention was to grab people’s attention and comment on a common cognitive bias I hear from programmers–many whom are renowned experts in the field–when someone brings up hash functions. It was not meant to make anyone feel bad. Quite the opposite: These misunderstandings are pervasive, and everyone makes dumb mistakes at least once.

      Here’s a real world example of what I mean.

      PASETO v1/v2 used a naked hash instead of HMAC for hedged nonces, which means if your RNG failed (unlikely), the derived nonce would be a hash of the plaintext–which is congruent to this problem from my blog post. PASETO was intended to be a boring cryptographic design. This was an interesting failure mode that was made possible by misunderstanding the correct way to use hash functions to solve a specific problem. Does that mean PASETO is bad? No, but you should probably switch to v3/v4 for other reasons.

      Mistakes are how we learn, but patterns in mistakes implicate one of two things:

      1. A failure in education (correctable by publishing better education material), or
      2. A failure in tooling (correctable by writing better specifications and standards that are easy to use and hard to misuse, from which better tools can be implemented)
      1. 9

        Please don’t get discouraged by the (harsh) criticism to make more blog posts, I like the technical detail and content.

        1. 8

          The only thing that would effectively discourage me from making more blog posts is running out of interesting things to talk about, and needing to sate my boredom with low-quality garbage.

        2. 3

          For the record, I though the title was brilliant… because no, very few of us understand hash functions — and most who do are more mathematician than programmer — but also we should be willing to admit that.

          “Humans are ignorant, inherently rather stupid, and prone to knee jerk reactions.” — A. Human

        1. 20

          It’d be nice to have some actual background on hashing in here instead of just broad generalizations and links to various hash functions. Examples:

          • There’s no mention of cyclic redundancy checks and why they are not valid as crypto functions (a mistake some programmers have made).
          • There’s no mention of avalanche effects, which is a good way of seeing how “random” a digest scheme is (with some implications for how well the output can be predicted/controlled by an attacker).
          • The mentioned attack on JSON hash tables in PHP (if you dig into it) would’ve been a great place to talk about trivial hashes (e.g., f(x) =0 or f(x)=x) and why they cause problems even in non-hostile environments, but that would’ve required more of an introduction to how hashing works…)
          • Lots of usage of jargon like “non-invertible”, “collision-resistance”, “preimage attack resistance”, etc. which is probably inaccessible if your audience is programmers who “don’t understand hash functions”.
          • There’s not really an explanation about the differences/similarities of crypto-strong hash functions, password hash functions, and key derivation functions, other than a mention that there is some relation but which isn’t elaborated on at all.
          • There’s not really any useful information at all about perceptual hashing vs other forms of multimedia digest approaches–there’s just some Apple hate.
          • etc.

          Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.

          (also, can you please cool it with the inflammatory article headlines?)

          1. 24

            Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.

            Please don’t pick a fight. It seems more angry than friendly.

            1. 22

              Honestly I think it’s a valid concern. One of the biggest problems with the computer security world, as stated repeatedly by leading experts in the field, is communication and teaching.

              1. 23

                A valid concern would be “infosec experts may not understand pedagogy” but why call out “infosec furries” specifically? Unless we should be concerned about infosec furries in particular vs other infosec experts?

                Are these acceptable?

                • but infosec gays may also not understand pedagogy
                • but infosec women may also not understand pedagogy
                • but infosec people of color may also not understand pedagogy

                No. So why furries? People need to get over it and quit furry bashing. This isn’t acceptable behavior on Lobste.rs, and I’m tired of it.

                1. 3

                  See elsewhere for the explanation; furry bashing doesn’t enter into it, though I see why you might have read it that way. Furries are internet denizens like the rest of us, with all that entails.

                  1. 12

                    I agree with you that it’s a bad title.

                    I also think that you wouldn’t have reacted nearly this strongly to the title if it wasn’t a furry blog.

                    1. 11

                      I read your other comments. But you said what you said, and that undermines all your pontificating about the harm of “insulting/demeaning a group” and “the sort of microaggression/toxicity that everybody talks so much about.” Take your own advice.

                    2. 2

                      “Furry” is a kink, not an identity or protected class. And normally you have to get people’s consent before you bring them into your kink.

                      1. 7

                        I don’t see any sexual imagery in this blog post.

                        1. 2

                          The OP’s site has some pretty well reasoned and presented articles on precisely why “furry” cannot reasonably be summarized as “a kink”.

                          And, no, you do not “normally” have to get someone’s consent to introduce them to the idea of your kink, unless said introduction involves you engaging them in the practice of your kink.

                        2. 1

                          Sorry, I didn’t realize the “furry” part was what you were opposed to. It sounded like you were upset with the implication that the infosec world is bad at teaching.

                    3. 6

                      Programmers might not understand hash functions, but infosec furries may also not understand pedagogy.

                      (also, can you please cool it with the inflammatory article headlines?)

                      https://www.youtube.com/watch?v=S2xHZPH5Sng

                      1. 10

                        One of the things he talks about there is testing the hypothesis and seeing which title actually worked. I only clicked this link because I recognized your domain name and knew you had written interesting articles in the past and might legitimately explain something I didn’t know. If not for that, I probably would have bypassed it since the title alone was not interesting at all.

                        1. 9

                          Even so, it is still possible to write clickbait titles that aren’t predicated on insulting/demeaning a group.

                          • “Hash functions: hard or just misunderstood?”
                          • “Things I wish more programmers knew about hashes”
                          • “Programmer hashes are not infosec hashes”
                          • “Are you hashing wrong? It’s more common than you might think”
                          • “uwu whats this notices ur hash function

                          How would you feel if I wrote “Gay furries don’t understand blog posting”? Even if I raise good points, and even if more people would click on it (out of outrage, presumably), it would still probably annoy a gay furry who wrote blogs and they’d go in with their hackles raised.

                          1. 8

                            The important difference between what I wrote and your hypothetical is the difference between punching up and punching down.

                            My original title was along the same lines as “Falsehoods Programmers Believe About _____” but I’ve grown a distaste for the cliche.

                            1. 7

                              The difference between “Programmers don’t understand hash functions” and “Gay furries don’t understand blog posting” is quite obvious to me and I definitely don’t want to engage in whatever Internet flame is going on here. Especially since, uh, I have a preeetty good idea about what the problem here is, and I tend to think it’s about gay furries, not article titles, which is definitely not a problem that I have. (This should probably be obvious but since I’m posting in this particular thread, I wanted to make sure :P).

                              But I also think this title really is needlessly nasty, independent of how it might be titled if it were about other audiences. It’s a bad generalisation – there are, in fact, plenty of programmers who understand hash functions – and it’s not exactly encouraging to those programmers who want to get into security, or who think their understanding of these matters is insufficient.

                              I am (or was?) one of them – this was an interest of mine many, many years ago, at a time when I was way too young to understand the advanced math. My career took me elsewhere, and not always where I wanted to go, and I tried to keep an eye on these things in the hope that maybe one day it’ll take me there. Needless to say, there’s only so much you can learn about these topics by spending a couple of evenings once in a blue moon studying them, so I never really got to be any good at it. So I think the explanation is amazing, but it would definitely benefit from not reminding me of my inadequacy.

                              And I’m in a happy boat, actually, this is only an interest of mine – but there are plenty of people who have to do it as part of their jobs, are not provided with adequate training of any kind, have no time to figure it out on their own, and regularly get yelled at when they get it wrong.

                              Now, I realise the title is tongue-in-cheek to some degree, the playful furries and the clever humour scattered throughout the post sort of gives it away. If you think about it for a moment it’s pretty clear that this is meant to grab attention, not remind people how much they suck. But it’s worth remembering that, in an age where web syndication is taken for granted to the point where it sounds like a Middle English term, this context isn’t carried everywhere. Case in point, this lobste.rs page includes only the title. Some people might react to it by clicking because you grabbed their attention, but others might just say yeah, thanks for reminding me, I’ll go cry in a corner.

                              Even if I didn’t realise it was tongue-in-cheek, it probably wouldn’t bother me, partly because I understand how writing “competitively” works (ironically, from around the same time), partly because I’ve developed a thick skin, and partly because, honestly, I’ve kindda given up on it, so I don’t care about it as much as I once did. But I can see why others would not feel the same way at all. You shouldn’t count on your audience having a thick skin or being old enough to have given up on most of their dreams anyway.

                              I know this is a real struggle because that’s just how blogs and blogging work today. You have to compete for attention to some degree, and this is particularly important when a large part of the technical audience is “confined” to places like HN and lobste.rs, where you have to grab attention through the title because there’s nothing else to grab attention through. But maybe you can find a kinder way to grab it, I dunno, maybe a clever pun? That never hurt anyone. These radical, blunt (supposedly “bluntly honest” but that’s just wishful thinking) headlines are all the rage in “big” Internet media because, just like Internet trolls, they thrive on controversy, us vs. them and a feeling of smugness, but is that really the kind of thing you want to borrow?

                              (Edit: just to make sure I get the other part of my message across, because I think it’s even more important: title aside, which could be nicer, the article was super bloody amazing: the explanation’s great, and I like the additional pointers, and the humour, and yes, the drawings! Please don’t take any of all that stuff above as a criticism of some sort: I wanted to present a different viewpoint from which the title might read differently than you intended, not that the article is bad. It’s not!)

                              1. 15

                                How do you know that you’re punching up?

                                What if the person encountering your blog is a programmer from an underrepresented background, just barely overcoming imposter syndrome, and now here’s this scary suggestion that they don’t understand hash functions? What if they actually made one of the mistakes in the article, and feel like they’re a complete fraud, and should leave the industry? This is the sort of microaggression/toxicity that everybody talks so much about, if I’m not mistaken.

                                The point is: you don’t know. You can’t know.

                                So, err on the side of not adding more negative shit to the world accidentally in the name of pageviews–especially when there are many, many other more positive options in easy reach.

                                EDIT:

                                I wouldn’t care if it weren’t for the fact that you’re a smart dude and clearly passionate about your work and that you have good knowledge to share, and that it pains me to see somebody making mistakes I’ve made in the past.

                                1. 8

                                  I wouldn’t care if it weren’t for the fact that you’re a smart dude and clearly passionate about your work

                                  I’m neither of those things :P

                                  and that you have good knowledge to share, and that it pains me to see somebody making mistakes I’ve made in the past.

                                  I appreciate your compassion on this subject. It’s definitely new territory for me (since forever I’ve been in the “boring headline out of clickbait adversion” territory).

                                  1. 9

                                    Do you actually not see a difference between saying a slightly negative thing about people of a certain profession and how they engage in that profession, and an ad-hominem using sexual orientation? What a weird and bad analogy?

                                    I’m trying to assume good intent here but all your comments make it sound like you’re annoyed at the furry pics and awkwardly trying to use cancel culture to lash out the author.

                                    1. 7

                                      Neither the label of programmers (with which I identify) nor of gay furries (with which the author identifies, according to their writing) is being misapplied. I’m sorry you feel that a plain statement of fact is somehow derogatory–there is nothing wrong with being a proud programmer or a proud gay furry.

                                      My point in giving that example was to critique the used construction of “ is ”. I picked that label because the author identified with it, and I picked the “bad at blogging” because it’s pretty obviously incorrect in its bluntness. If I had picked “lobsters” or “internet randos” the conjured association for the person I was in discussion with may not have had the same impact it that “programmers” had on me, so I went with what seemed reasonable.

                                      1. 4

                                        What do you gain by emphasizing soatok’s sexual identity, other than this morass of objections?

                                      2. 5

                                        I’m trying to assume good intent here

                                        that’s exactly what friendlysock is hoping for

                                        1. 5

                                          you’re right but it’s best not to feed them

                                        2. 8

                                          What if the person encountering your blog is a programmer from an underrepresented background, just barely overcoming imposter syndrome, and now here’s this scary suggestion that they don’t understand hash functions?

                                          Or they may read this and think ‘I’m glad it’s not just me!’. As a programmer who probably has a better than average understanding of hash functions, I don’t feel demeaned by this generalisation, if I were worried about my level of understanding I’d feel comforted by the idea that I wasn’t in a minority in my lack of understanding.

                                          What if they actually made one of the mistakes in the article, and feel like they’re a complete fraud, and should leave the industry?

                                          Or they may feel better that this mistake is so common that someone writes about it on a list of mistakes programmers make.

                                          1. 1

                                            What if the person encountering your blog is a programmer from an underrepresented background….

                                            While I said you’re picking a fight (and would add: “look at the thread, it’s a fight”), I see what you’re saying in this paragraph. I also value non-judgmental explanations.

                                        3. 6

                                          My problem with the title isn’t that it’s insulting, but that it’s inaccurate. Clearly some programmers do understand hash functions, even if other programmers do not. If nothing else, @soatok, a programmer, presumably understands hash functions, or why else would he write a blog post purporting to explain the right way to use them?

                                          Programmers don’t understand hash functions, and I can demonstrate this to most of the people that will read this with a single observation:

                                          When you saw the words “hash function” in the title, you might have assumed this was going to be a blog post about password storage.

                                          Specifically is wrong, at least about me, and almost certainly among other programmers as well. I don’t claim to have deep knowledge about cryptography, and I do expect that there’s probably something I could learn from this blog post, which I will read more carefully when I have a chance. But I am aware that the computer science concept of hash functions is useful for a variety of programming problems, and not just storing password-related data.

                                    1. 3

                                      Interesting language, but does suffer from some unfortunate brand confusion … I had actually hoped this article was a discussion of Inkle’s Ink which is a brilliant domain specific scripting language for interactive narrative that’s been open source since 2016 and (finally) hit a 1.0 stable release earlier this year.

                                      1. 14

                                        What’s going on here? How did this get to the top of lobste.rs with 26 upvotes? I’m happy for the OP that they could get their system to work, but as far as I can tell, the story here is “package manager used to manage packages.” We have been doing that for decades. Is there any way the community can get a lever to push back on thin stories like this one?

                                        1. 25

                                          Would it change your opinion if the article mentioned that the nix shell being used here is entirely disposable and this process leaves no mark in your OS setup? Also that even if this required some obscure versions of common system dependencies you could drop into such a shell without worrying about version conflicts or messing up your conventional package manager?

                                          I agree that the article is thin in content, but I don’t think you can write this story off as “package manager used to manage packages.” , I think nix shell is very magical in the package management world.

                                          1. 6

                                            I could do that with docker too and it would not leave a trace either

                                            1. 17

                                              Yes, but then you’d be inside a container, so you’d have to deal with the complexities of that, like mounting drives, routing network traffic etc. With nix shell, you’re not really isolated, you’re just inside a shell session that has the necessary environment variables that provide just the packages you’ve asked for.

                                              Aside from the isolation, the nix shell is also much more composable. It can drop you into a shell that simultaneously has a strange Java, python and Erlang environment all compiled with your personal fork of GCC, and you’d just have to specify your GCC as an override for that to happen.

                                              1. 4

                                                I get that, but I have to go through the learning curve of nix-shell, while I already know docker, since I need it for my job anyway. I am saying that there are more ways to achieve what the article is talking about. It is fine that the author is happy with their choice of tools, but it is very unremarkable for the title and given how many upvotes that article got.

                                                1. 5

                                                  Why not learn nix and then use it at work as well :) Nix knows how to package up a nix-defined environment into a docker container and produce very small images, and you don’t even need docker itself to do that. That’s what we do at work. I’m happy because as far as I’m concerned Nix is all there is and the DevOps folks are also happy because they get their docker images.

                                                  1. 3

                                                    I work in a humongous company where the tools and things are less free to choose from atm, so even if I learned nix, it would be a very tough sell..

                                              2. 3

                                                As someone who hasn’t used Docker, it would be nice to see what that looks like. I’m curious how the two approaches compare.

                                                1. 6

                                                  I think that the key takeaway is that with Docker, you’re actually running a container will a full-blown OS inside. I have a bias against it, which is basically just my opinion, so take it with a grain of salt.

                                                  I think that once the way to solve the problem of I need to run some specific version of X becomes let’s just virtualize a whole computer and OS because dependency handling is broken anyway, we, as a category simply gave up. It is side-stepping the problem.

                                                  Now, the approach with Nix is much more elegant. You have fully reproducible dependency graphs, and with nix-shell you can drop yourself in an environment that is suitable for whatever you need to run regardless of dependency conflicts. It is quite neat, and those shells are disposable. You’re not running in a container, you’re not virtualizing the OS, you’re just loading a different dependency graph in your context.

                                                  See, I don’t use Nix at all because I don’t have these needs, but I played with it and was impressed. I dislike our current approach of just run a container, it feels clunky to me. I think Docker has it’s place, specially in DevOps and stuff, but using it to solve the I need to run Python 2.x and stuff conflicts with my Python 3.x install is not the way I’d like to see our ecosystem going.


                                                  In the end, from a very high-level, almost stratospheric, point-of-view: both docker and nix-shell workflow will be the developer typing some commands on the terminal, and having what they need running. So from a mechanical standpoint of needing to run something, they’ll both solve the problem. I just don’t like how solving things by doing the evergreen is now the preferred solution.

                                                  Just be aware that this is an opinion from someone heavily biased against containers. You should play with both of them and decide for yourself.

                                                  1. 3

                                                    This comment is a very good description of why I’ve never tried Docker (and – full disclosure – use Nix for things like this).

                                                    But what I’m really asking – although I didn’t make this explicit – is a comparison of the ergonomics. The original post shows the shell.nix file that does this (although as I point out in another comment, there’s a shell one-liner that gets you the same thing). Is there an equivalent Dockerfile?

                                                    I was surprised to see Docker brought up at all because my (uninformed) assumption is that making a Docker image would be prohibitively slow or difficult for a one-off like this. I assumed it would be clunky to start a VM just to run a single script with a couple dependencies. But the fact that that was offered as an alternative to nix-shell makes me think that I’m wrong, and that Docker might be appropriate for more ad-hoc things than I expected, which makes me curious what that looks like. It points out a gap in my understanding that I’d like to fill… with as little exertion of effort as possible. :)

                                                    1. 4

                                                      But the fact that that was offered as an alternative to nix-shell makes me think that I’m wrong, and that Docker might be appropriate for more ad-hoc things than I expected, which makes me curious what that looks like. It points out a gap in my understanding that I’d like to fill… with as little exertion of effort as possible. :)

                                                      I think containers is a perfectly capable solution to this. The closest thing you can use would probably be toolbox.

                                                      https://github.com/containers/toolbox

                                                      It would allow you to even provide a standardized environment which would be decoupled from the deployment itself (if that makes sense). It also mount $HOME as well.

                                                      1. 3

                                                        I use Nix, but also have experience with Toolbox.

                                                        I would recommend most people to use Toolbox over nix-shell. With toolbox you can create one-off containers in literally seconds (it’s two commands). After entering the container you can just dnf install whatever you need. Your home directory gets mounted, so you do not have to juggle with volumes, etc. If you need to create the same environment more often, you can create a Dockerfile and build your toolbox containers with podman. The upstream containers that Fedora provides are also just built using Dockerfiles.

                                                        The post shows a simple use case, but if you want to do something less trivial, it often entails learning Nix the language and nixpkgs (and all its functions, idioms, etc.). And the Nix learning curve is steep (though it is much simpler if you are familiar with functional programming). This makes the toolbox approach orders of magnitude easier for most people - you basically need to know toolbox create and toolbox enter and you can use all the knowledge that you already have.

                                                        However, a very large shortcoming of toolbox/Dockerfiles/etc. is reproducibility. Sure, you can pass around an image and someone else will have the same environment. But Nix allows you to pin all dependencies plus the derivations (e.g. as a git SHA). You can give someone your Nix flake and they will have exactly the same dependency graph and build environment guaranteed.

                                                        Another difference is that once you know Nix, it is immensely powerful for defining packages. Nix is a turing-complete functional language, so nixpkgs can provide a lot of powerful abstractions. I dread every time I have to create/modify and RPM spec file, because it is so primitive compared to making a Nix derivation.

                                                        tl;dr: most people will want to use something like Toolbox, it is familiar and provides many of the same benefits as e.g. nix-shell (isolated, throw-away environments, with your home directory available). However, if you want strong reproduciblity across systems and a more powerful packaging/configuration language, learning Nix is worth it.

                                                      2. 3

                                                        A cool aspect of Docker is that it has a gazillion images already built and available for it. So depending on what you need, you’ll find a ready-made image you can put to good use with a single command. If there are no images that fill your exact need, then you’ll probably find an image that is close enough and can be customised. You don’t need to create images from scratch. You can remix what is already available. In terms of ergonomics, it is friendly and easy to use (for these simple cases).

                                                        So, NixPkgs have a steeper learning curve in comparison to dockerfiles. It might be simpler to just run Docker. What I don’t like is what is happening inside Docker, and how the solution for what looks like simple problems involves running a whole OS.

                                                        I’m aware that you can have containers without an OS like described in this thread, but that is not something I often see people using in the wild.

                                                      3. 1

                                                        Nit-pick: AFAIK one doesn’t really need Alpine or any other distro inside the container. It’s “merely” for convenience. AFAICT it’s entirely possible to e.g. run a Go application in a container without any distro. See e.g. https://www.cloudbees.com/blog/building-minimal-docker-containers-for-go-applications

                                                  2. 3

                                                    Let’s assume nix shell is actual magic — like sourcerer level, wave my hand and airplanes become dragons (or vice versa) magic — well this article just demonstrated that immense power by pulling a coin out of a deeply uncomfortable kid’s ear while pulling on her nose.

                                                    I can’t speak for the previous comment’s author, but those extra details, or indeed any meat on the bones, would definitely help justify this article’s otherwise nonsensical ranking.

                                                    1. 2

                                                      Yeah, I agree with your assessment. This article could just as well have the title “MacOS is so fragile, I consider this simple thing to be an issue”. The trouble with demonstrating nix shell’s power is that for all the common cases, you have a variety of ad-hoc solutions. And the truly complex cases appear contrived out of context (see my other comment, which you may or may not consider to be turning airplanes into dragons).

                                                  3. 19

                                                    nix is not the first thing most devs would think of when faced with that particular problem, so it’s interesting to see reasons to add it to your toolbox.

                                                    1. 9

                                                      Good, as it is not supposed to be the first thing. Learning a fringe system with a new syntax just to do something trivial is not supposed to be the first thing at all.

                                                    2. 4

                                                      I find it also baffling that this story has more upvotes than the excellent and original code visualization article currently also very high. Probably some nix up vote ring pushing this

                                                      1. 12

                                                        Or folks just like Nix I guess? 🤷

                                                        1. 11

                                                          Nix is cool and people like it.

                                                          1. 5

                                                            I didn’t think this article was amazing, but I found it more interesting than the code visualization one, which lost me at the first, “From this picture, you can immediately see that X,” and I had to search around the picture for longer than it would have taken me to construct a find command to find the X it was talking about.

                                                            This article, at least, caused me to say, “Oh, that’s kind of neat, wouldn’t have thought of using that.”

                                                          2. 6

                                                            This article is useless. It is way simpler (and the python way) to just create a 2.7 virtualenv and run “pip install psycopg2 graphwiz”. No need to write a nix file, and then write a blog post to convince yourself you didn’t waste your time!

                                                            Considering all nix posts get upvoted regardless of content, it’s about time we have a “nix” tag added to the site.

                                                            1. 14

                                                              This article is not useless just because you don’t see its value.

                                                              I work mainly with Ruby and have to deal with old projects. There are multiple instances where the Ruby way (using a Ruby version manager) did not work because it was unable to install an old Ruby version or gem on my new development machine. Using a nix-shell did the job every time.

                                                              just create a 2.7 virtualenv and run “pip install psycopg2 graphwiz”

                                                              What do you do if this fails due to some obscure dependency problem?

                                                              1. 4

                                                                What do you do if this fails due to some obscure dependency problem?

                                                                Arguably you solve it by pinning dependency versions in the pip install invocation or requirements.txt, as any Python developer not already using Nix would do.

                                                                This article is not useless just because you don’t see its value.

                                                                No, but it is fairly useless because it doesn’t do anything to establish that value, except to the choir.

                                                                1. 2

                                                                  In my experience there will be a point where your dependencies will fail due to mismatching OpenSSL, glibc versions and so on. No amount of pinning dependencies will protect you against that. The only way out is to update dependencies and the version of your language. But that would just detract from your goal of getting an old project to run or is straight up impossible.

                                                                  Enter Nix: You pin the entire environment in which your program will run. In addition you don’t pollute your development machine with different versions of libraries.

                                                                  1. 3

                                                                    Arguably that’s just shifting the burden of effort based on a value judgement. If your goal is to get an old project to run while emphasizing the value of incurring zero effort in updating it, then obviously Nix is a solution for you and you’ll instead put the effort into pinning its entire runtime environment. If, however, your value to emphasize is getting the project to run then it may well be a more fruitful choice to put the effort into updating the project.

                                                                    The article doesn’t talk about any of the hairier details you’re speaking to, it just shows someone taking a slightly out of date Python project and not wanting to put any personal effort into updating it… but updating it by writing a (in this case relatively trivial) Python 3 version and making that publicly available to others would arguably be the “better” solution, at least in terms of the value of contributing back to the community whose work you’re using.

                                                                    But ultimately my argument isn’t with the idea that Nix is a good solution to a specific problem, it’s that this particular article doesn’t really make that point and certainly doesn’t convincingly demonstrate the value of adding another complex bit of tooling to the toolkit. All the points you’ve raised would certainly help make that argument, but they’re not sadly not present in this particular article.

                                                                2. 1

                                                                  Just out of curiosity, I’m also dealing with ancient ruby versions and use nix at work but I couldn’t figure out how to get old enough versions, is there something that helps with that?

                                                                    1. 1

                                                                      Thank you, very helpful!

                                                                      1. 1

                                                                        Do note this method will get you a ruby linked to dependencies from the same checkout. In many cases this is what you want.

                                                                        If instead you want an older ruby but linked to newer libraries (eg, OpenSSL) there’s a few extra steps, but this is a great jumping off point to finding derivations to fork.

                                                                        1. 1

                                                                          Do note this method will get you a ruby linked to dependencies from the same checkout. In many cases this is what you want.

                                                                          Plus glibc, OpenSSL and other dependencies with many known vulnerabilities. This is fine for local stuff, but definitely not something you’d want to do for anything that is publicly visible.

                                                                          Also, note that mixing different nixpkgs versions does not work when an application uses OpenGL, Vulkan, or any GPU-related drivers/libraries. The graphics stack is global state in Nix/NixOS and mixing software with different glibc versions quickly goes awry.

                                                                    2. 2

                                                                      This comment mentions having done something similar with older versions by checking out an older version of the nixpkgs repo that had the version of the language that they needed.

                                                                      1. 2

                                                                        Like others already said you can just pin nixpkgs. Sometimes there is more work involved. For example this is the current shell.nix for a Ruby on Rails project that wasn’t touched for 5 years. I’m in the process of setting up a reproducible development environment to get development going again. As you can see I have to jump through hoops to get Nokogiri play nicely.

                                                                        There is also a German blog post with shell.nix examples in case you need inspiration.

                                                                    3. 4

                                                                      this example, perhaps. I recently contributed to a python 2 code base and running it locally was very difficult due to c library dependencies. The best I could do at the time was a Dockerfile (which I contributed with my changes) to encapsulate the environment. However, even with the container standpoint, fetching dependencies is still just as nebulous as “just apt install xyz.” Changes to the base image, an ambiently available dependency or simply turning off the distro package manager services for unsupported versions will break the container build. In the nix case, it is sort of forced on the user to spell it out completely what the code needs, combine with flakes and I have a lockfile not only for my python dependencies, but effectively the entire shell environment.

                                                                      More concretely, at work, the powers to be wanted to deploy python to an old armv7 SoC running on a device. Some of the python code requires c dependencies like openssl, protobuf runtime and other things and it was hard to cross compile this for the target. Yes, for development it works as you describe, you just use a venv, pip install (pipenv, poetry, or whatever as well) and everything is peachy. then comes to deployment:

                                                                      1. First you need to make a cross-compiled python interpreter, which involves first building the interpreter for your host triple then rebuilding the same source for the target host triple making sure to tell the build process where the host triple build is. This also ignores that some important python interpreter things may not build, like ctypes.
                                                                      2. Learn every environment variable you need to expose to the setup.py or the n-teenth build / packaging solution for the python project you want to deploy, hope it generates a wheel. We will conveniently ignore how every C depending package may use cmake, or make, or meson, etc, etc…
                                                                      3. make the wheels available to the image you actually ship.

                                                                      I was able to crap out a proof-of-concept in a small nix expression that made a shell that ran the python interpreter I wanted with the python dependencies needed on both the host and the target and didn’t even have to think. Nixpkgs even gives you cross compiling capabilities.

                                                                      1. 1

                                                                        Your suggested plan is two years out of date, because CPython 2.7 is officially past its end of life and Python 2 packages are generally no longer supported by upstream developers. This is the power of Nix: Old software continues to be available, as if bitrot were extremely delayed.

                                                                        1. 3

                                                                          CPython 2.7 is available in debian stable (even testing and sid!), centos and rhel. Even on MacOS it is still the default python, that ships witht he system. I don’t know why you think it is no longer available in any distro other than nix.

                                                                    1. 21

                                                                      Funny how an appeal to ESR’s authority makes me more inclined to believe the opposite of whatever argument is being made.

                                                                      1. 2

                                                                        I had the same reaction. I also find it amazing that they say ‘folks need CLAs because PRs have not been tested in court’ and then recommend a replacement that has not been tested in court either! Looking at https://developercertificate.org, it isn’t actually any kind of certificate, it’s just a text document, with nothing attached to it that looks like a signature. I don’t see how this actually solves any problems.

                                                                        1. 2

                                                                          The idea is that by using the -s/—sign off flag on commit a contributor makes an implicit affirmative assertion that their commit is bound by the DCO.

                                                                          My counter to that would be that if I can get a contributor to start using -s reflexively I can have them make an affirmative assertion of equal value about my carnal access to their family members, simply by writing a file anywhere in the repo.

                                                                          But yeah, there seem to be many holes in the argument, not merely the association with ESR… to their credit the author has updated the post with a counterpoint that kind of blows it out of the water.

                                                                          1. 1

                                                                            As far as I can see, there’s nothing in -s that looks like c cryptographic signature. I can create a git commit with my author set to you, commit with -s, and submit it somewhere. In most jurisdictions there’s a requirement that some amount of work is done to establish identity for parties agreeing to a contract. A signature, a corporate stamp, a witness who has checked some form of ID, and so on are all forms that have been tested in court.

                                                                            To my knowledge, in countries using legal systems derived from English common law, there is no statute law about what constitutes a valid evidence of a contract. The requirement in statute law is that a ‘meeting of minds’ has occurred and it’s up to the court to determine if a particular signature mechanism is sufficient evidence of this. A line in a text file saying that some name + email address has agreed to the contract, honest, doesn’t seem like it would meet this bar. In other countries, there are statute law requirements for a valid contract and CLA processes typically have some mechanism for that association.

                                                                            1. 1

                                                                              The semantic meaning of -s is repo-side defined; it’s certainly possible to require GPG signoff, and is often required, to the point where I’ve personally never used -s except with a configured GPG key and have never actually seen a repo that requires —signoff but does not also require that signoff to be cryptographically verified. Were such a repo to exist I’d agree the legal protections (if any) would be on shaky ground… though honestly I’m not sure cryptographic signatures are any more understood by courts (especially in countries that still regularly employ powdered wigs) than physical marks, the forgeability of which is well established.

                                                                      1. 3

                                                                        Something feels so icky about calling Traits “inheritance of interface”… maybe it’s too much time studying biology, but traits represent characteristics a thing has, regardless of whether or not those characteristics were inherited. The concept doesn’t comment whatsoever on how the traits were acquired.

                                                                        1. 13

                                                                          It was his project. Why shouldn’t he be on the board?

                                                                          1. 36

                                                                            I don’t know, that’s sort of like me saying “it was his company, why shouldn’t he be able to run it into the ground?”

                                                                            In both cases, the answer is the same I think: he’s not the only one on the ship, so it’d be pretty awful of him to sink it

                                                                            1. 12

                                                                              The argument was that he supported Epstein.

                                                                              Some people argued his statement was poorly worded, some argued that it reflected prior statements.

                                                                              Honestly, I dislike him in general for other reasons, although at least he isn’t ESR.

                                                                              Personally I feel the better question is:

                                                                              Why was he kicked out if it’s appropriate for him to return? Or the reverse, if it’s considered appropriate for him to return, why was he kicked out?

                                                                              e.g. did you make a real choice when he was kicked off or was it purely a political move

                                                                              1. 24

                                                                                The argument was that he supported Epstein.

                                                                                I think you either misunderstood what was being said at the time, or you’re extrapolating in dangerous ways what RMS posted on the MIT mailing list. Could you please dig up some links that support your statement?

                                                                                1. 10

                                                                                  Possibly more problematic than his support for Epstein (in terms of relevance to his board membership): he’s actively transmisogynistic, anti-queer, and apparently awful to be around most of the time if you’re not a cis dude. So for anyone interested in a more forward-thinking and diverse FSF (i.e. one that is not actively hostile to possible members/supporters/contributors who belong to certain demographics), having someone like him on the panel would be a bit concerning.

                                                                                  1. 9

                                                                                    [..] his support for Epstein

                                                                                    Since parent hasn’t substantiated this claim, could you please do it? I feel like it represents a gross mischaracterization of what RMS posted on the MIT mailing list. If you have evidence to the opposite I’d like to see that.

                                                                                    1. -4

                                                                                      I would call the above comment by vector_spaces defamation and ask that the account holder either be removed or required to put their real name under their account.

                                                                                      You shouldn’t be able to post possibly defamatory content on this site under an anon account.

                                                                                      1. 7

                                                                                        Accusing me of defamation (i.e. of making spurious false statements) and calling for the site owners to nuke my account or force me to dox myself 1. implies my comments were false right off the bat and 2. doesn’t really make me want to engage with you, since it comes off like you’re trying to intimidate me. Further, it makes me wonder what you’d even do with my real-life identity if you knew it, making you come off a bit creepy and hostile. So, given the main reason I maintain pseudo-anonymity is to avoid being targeted by creepy & hostile weirdos on the internet, as it concerns identifying myself: respectfully, no thanks! Although if you’re determined/creepy enough, I shouldn’t be too hard to unmask

                                                                                        Presumably you’re a hacker (in the original sense of the word – i.e. this is a compliment, not an accusation), and so presumably you have fairly well-honed Google-fu, so I’m honestly not sure why you and the parent are having trouble here. Fruitful search queries to get you started include “richard stallman harassment of women” and “richard stallman comments about women” and “richard stallman sexism”.

                                                                                        Anyway, virtually all of the results are anecdotal (except for the now-infamous comments Stallman made on the mailing list), which some may take issue with. I personally believe victims, and I think when such anecdotes multiply over the course of many decades as they have in Stallman’s case, they tend to suggest a pattern of behavior.

                                                                                        You used an interesting argument in another comment about how labels are dangerous because they don’t take into account who a person is now and how they’ve grown since. Rather they focus on a snapshot of the person as they were (perhaps making an offhanded and thoughtless comment). I think there is something to be said for this position, but my experience has been that people are generally willing to take growth into account if growth is shown. It really does not take much other than showing some sincerity & good faith – apologies go a long way, as do comments affirming queer/trans folks, or “my thoughtless comment wasn’t intended to dehumanize xyz, you’re right, I could have said that better”. Unfortunately we haven’t seen this at all from Stallman.

                                                                                        1. -5

                                                                                          I couldn’t give a shit about wanting to engage with you. I have a life.

                                                                                          “Defamation is the oral or written communication of a false statement about another that unjustly harms their reputation and usually constitutes a tort or crime” That perfectly describes your comment. The fact that you are unwilling to post your real name is not surprising. In my experience people that commit crimes usually wear masks and not name tags.

                                                                                          RMS has been publishing under his real name for nearly forty years and has endured countless personal attacks and death threats. He’s got more courage in his pinky finger than I see in your whole comments.

                                                                                          Edit: okay TIL defamation is not a “crime”, something about torts. So I was wrong on that front. But anyway, I think a good rule of thumb in life is if you’re going to say something mean about another person, do it under your real name. Even if that could get you hurt? No, ESPECIALLY if that could get you hurt. I grew up the son of a public official. Can’t tell you how many death threats we got. One time someone even firebombed our car. If you want to build a better world it takes people not being anonymous. RMS has set a great example of being open and authentic about who he is, even if it meant he has been attacked for 4 decades.

                                                                                          1. 7

                                                                                            If your entire premise here is that people aren’t allowed to discuss something unless they risk physically violent reprisal for their comments, and it certainly seems like that’s what you’re pushing, then:

                                                                                            1. No.
                                                                                            2. It suggests strongly that you don’t have, or don’t care if you have, facts and reason on your side, because the argument can always be “won” through violence or threat of the same. Making it a literal ad hominem, because the counterargument is against the person. A world where might makes right is not a world I particularly want to live in, and I think you probably don’t either – there’s always someone bigger/stronger/meaner who’ll be along eventually to teach you why.
                                                                                            3. Still no.

                                                                                            If you’re still here at this point: strongly suggest you take a long, long break from the internet.

                                                                                            1. 0

                                                                                              It is cowardly to attack another person from an anonymous account.

                                                                                              You want to attack an idea or organization, fine. But it is cowardly and dishonorable to throw stones at someone from an anonymous account. Always has been and always will be.

                                                                                            2. 4

                                                                                              Even if that could get you hurt? No, ESPECIALLY if that could get you hurt.

                                                                                              You would really do well to consider how radically different life is for people who aren’t cis white men.

                                                                                              1. 0

                                                                                                That’s right because I’ve never had guns pointed at my head or the shit kicked out of me by an angry mob standing up for what is right. I’m not talking about figuratively online.

                                                                                                Here’s a great video on courage: https://www.youtube.com/watch?v=_6XSBeMqSxM

                                                                                          2. 7

                                                                                            It’s often unsafe for queer people to use their real name online. Instituting a policy like that can simply remove whole swathes of minorities from discussions for that reason. If you think someone’s rhetoric amounts to “defamation” and don’t like that they’re anonymous, just accord it the attention you believe it deserves and move on.

                                                                                            1. 0

                                                                                              Fair enough. I just think there should be no place for lazy anonymous content. If you want to post anonymously, fine, but put a shred of effort into it before you write. There should be an extremely high bar of data backing if you post anonymous stuff. Otherwise this site is supporting defamation.

                                                                                        2. 9

                                                                                          Do you have a source on transmisogyny/anti-queer? All I could find was https://stallman.org/articles/genderless-pronouns.html, which is pretty tame (he’s just being stupid about grammar, which fits the neuroatypical M.O.)

                                                                                          1. 6

                                                                                            he’s actively transmisogynistic, anti-queer

                                                                                            What has he said or done that makes him anti-queer and transphobic? (genuine question and not a challenge btw, because I can’t remember seeing this ever being brought up before.)

                                                                                            1. 6

                                                                                              I am struggling to see it; I am even pleasantly surprised:

                                                                                              A proposed California bill would stop the state from doing business with companies that discriminate against transgender employees.

                                                                                              I think it is a step in the right direction.

                                                                                              I think his opinions on pronouns are perhaps off-the-mark, but not harmful (and oddly plural-friendly).

                                                                                              1. 8

                                                                                                There was an incident a few years ago where a transgender FSF employee was being harassed by a coworker for being trans. The employee brought it up to Stallman, who responded by terminating the trans employee.

                                                                                                The incident is discussed in this thread https://www.reddit.com/r/transgender/comments/539x50/breaking_the_free_software_foundation_dismissed_a/

                                                                                                In various places on his personal website he announces that he won’t use “they/them” pronouns for individuals and ridicules usage of singular “they/them”, despite the fact that “they/them” pronouns are some people’s chosen pronouns.

                                                                                                So while he posts stuff stating approval/support for queer and transgender folks (and that’s great), it is clear from other writing of his and also from his treatment of transgender folks that his support isn’t rooted in actually talking to people about this stuff.

                                                                                                1. 5

                                                                                                  Who knows what happened with that foring, or even how Stallman was involved. Maybe it was really bad. Maybe it wasn’t. Unless there’s a pattern of things it seems a bit much to attach these sort of descriptions like anti-queer.

                                                                                                  And I don’t think that having a different opinion on the future evolution of the English language to be more inclusive makes one “actively transmisogynistic, anti-queer”. I read his pronoun article before; you can dislike his “language innovation” but he seems to be doing it for the right reasons. As you said, you actively supports transgender people, which fits my general impression of him as fairly progressive (some issues with personal behaviour notwithstanding) so I was surprised by your description. He basically agrees with you: language should be inclusive, there is just a disagreement on how this can best be done. If this is the best you can come up with then, to be completely honest, is not a good look for you here, because what it looks like is the casual hurling of slurs over a fairly minor disagreement. It’s kinda toxic to be honest.

                                                                                                  As I have described at length elsewhere in this thread, I really don’t like Stallman and haven’t for a very long time. But please, let’s not turn him in to a devil he’s not.

                                                                                                  1. 2

                                                                                                    I’m not sure that calling Stallman “anti-trans” is correct either. To me, he seems more like your generally older, left-of-center out of touch dudes who haunt the American internet. He’s not kept up on the social changes in his sphere.

                                                                                                    The real question is, should a person like that be in a leadership position of an advocacy group? That’s for the FSF leadership and membership to decide.

                                                                                                    1. 3

                                                                                                      To me, he seems more like your generally older, left-of-center out of touch dudes who haunt the American internet. He’s not kept up on the social changes in his sphere.

                                                                                                      This sounds about right; combined with perhaps a rather large dose of stubbornness. In Dutch we have a rather nice word for this: “eigenwijs”, literally translated it’s “own wisdom”. It’s not exactly “stubbornness” but more “can only convinced by their own wisdom”. There isn’t really a word in English for this AFAIK.

                                                                                                      A lot of people are so quick to take everything in bad faith nowadays. It’s okay to be a bit older, “out of touch”, be pedantic, and have some eclectic opinions you post on your website that 6 people read. That doesn’t make you some sort of horrible person.

                                                                                                      The real question is, should a person like that be in a leadership position of an advocacy group?

                                                                                                      No, of course not.

                                                                                                      1. 2

                                                                                                        In Dutch we have a rather nice word for this: “eigenwijs”, literally translated it’s “own wisdom”. It’s not exactly “stubbornness” but more “can only convinced by their own wisdom”. There isn’t really a word in English for this AFAIK.

                                                                                                        Swedish has “envis” but it’s much more connected to being stubborn. Does Dutch have a word that’s more corresponding to “stubborn”?

                                                                                                        1. 2

                                                                                                          I’d use “koppig”; which translates to “headish” and probably has the same root as the English “headstrong” (and/or “pigheaded”, since “kop” is, traditionally anyway, only used to refer to the head of an animal).

                                                                                                          Eigenwijs does imply some degree of stubbornness, but it’s not exactly the same.

                                                                                                          1. 2

                                                                                                            OK, Swedish has “tjurskallig” (bull headed) in similar context. Almost willfully stubborn.

                                                                                                            Swedish has more Dutch loanwords than you might expect, and of course both are Germanic languages.

                                                                                                            This is getting way off-topic, but thanks for taking the time!

                                                                                                  2. 4

                                                                                                    In various places on his personal website he announces that he won’t use “they/them” pronouns for individuals and ridicules usage of singular “they/them”, despite the fact that “they/them” pronouns are some people’s chosen pronouns.

                                                                                                    This qualifies as “actively transmisogynistic”? I think your definitions are different than mine, probably to a severe degree. He even says he’s totally fine with using they/them for plural people, and he says that he’ll call you whatever you like even if it makes him personally mad!

                                                                                                    Dunno about the FSF firing thing, looking at news articles makes it look not exactly cut and dry. Rowe seems to be on good terms with Stallman now, perhaps it was a misunderstanding of some sort? Still seems absolutely unnecessary to call Stallman these horrible things. Call him out for making people uncomfortable with his “friendship cards” or whatever, sure, but come on.

                                                                                                    1. 4

                                                                                                      So, I interpreted his comments in that post and elsewhere as stating that he wouldn’t comply with they/them pronouns. But regardless, ridiculing someone’s choice of pronouns is actively anti-queer. Saying “I’ll respect your pronouns but I think they’re silly” (which is the most charitable interpretation of what he’s written) is actively hostile in my book.

                                                                                                      RE: the firing, I err on the side of believing victims. And Rowe was a friend of the person who was fired, not the person who was actually fired, so it’s immaterial what her current relationship is with Stallman.

                                                                                                      1. 3

                                                                                                        Yes, and Rowe was the complaintant (spelling?) in that situation, right? I couldn’t see any statement or anything from the fired employee, only Rowe’s. “I err on the side of believing victims” is all well and good, but it doesn’t look like the victim said anything? (and is also a hilarious way to imply that I don’t believe victims, nice one!).

                                                                                                        You can read his statements regarding pronouns however you like, I think he’s being a dickhead about it but I don’t think he’s being actively transmisogynistic. Or, to take a page from your book, maybe you’re being ableist to a clearly neurodivergent figure? Probably not, but that’s how I’m going to read what you’re saying now.

                                                                                                        1. 1

                                                                                                          Has Stallman ever identified himself as neurodivergent? It’s not a neutral term. I’d hesitate to apply it to someone against their express wishes.

                                                                                                          In the previous hellthread, @mempko states that Stallman has described himself as “borderline autistic”.

                                                                                                          https://lobste.rs/s/yxj6cd/remove_richard_stallman#c_j6rxy7

                                                                                                          Based on a comment in the previous hellthread, someone states that Stallman has described himself as “borderline autistic”.

                                                                                              2. 9

                                                                                                this is all that needed to be said. people are out here parsing his statements with a magnifying glass when he’s clearly been a mysogynist, he’s been anti-trans and anti-queer for a very long time. If we want a more inclusive community it starts at the top

                                                                                                1. 2

                                                                                                  I like how you have a non-anon account. Then we can have a conversation.

                                                                                                  You call him “anti-trans” and “anti-queer”. Can you back that up with data? Does he ever specifically give himself those labels or are you giving him those labels? If you are giving him those labels, based upon what data? What percentage of software and writings by RMS could be labelled that? Does 50% of his writing focus on those categories? 10%? 1%? .1%? 0.01%? 0.00001%?

                                                                                                  I for one read a lot of his code and writings, and can’t remember him ever talking about those issues so I would be very surprised if those were relevant labels at all to him.

                                                                                                  Also, growing up in Boston it was very common to use the terms “gay” and “fag” and “queer” in a derogatory sense early and often. It wasn’t until I dropped a “that’s gay” freshman year of college and a female hall mate from California (became a best friend) stormed off in disgust that I had any notion I was on the wrong side of that one. Could you have called 18 year old me “anti-gay”? Absolutely. But I just was ignorant, and eventually matured.

                                                                                                  I think labelling people is generally a bad idea. It would be like labelling a new garden “dead” before you even gave the seedlings a chance to grow.

                                                                                            2. 7

                                                                                              He had to leave due to a heated controversy that originated in a MIT mailing list. Details here: https://jorgemorais.gitlab.io/justice-for-rms/

                                                                                              1. 23

                                                                                                That’s not a particularly good source. The original article that led to his resignation is a better place to start reading:

                                                                                                https://selamjie.medium.com/remove-richard-stallman-fec6ec210794

                                                                                                You can also skip all that and just go read the CSAIL mailing list exchange yourself first, found at the bottom of this Vice article:

                                                                                                https://www.vice.com/en/article/9ke3ke/famed-computer-scientist-richard-stallman-described-epstein-victims-as-entirely-willing

                                                                                                Finally, just a general disclaimer: Stallman didn’t resign just because of the article by Selam, but rather because of the wide range of news coverage that documented his past behavior. Selam’s article was really just a catalyst.

                                                                                                1. 16

                                                                                                  Stallman didn’t resign just because of the article by Selam, but rather because of the wide range of news coverage that documented his past behavior.

                                                                                                  Or, rather, a bunch of slander, which is documented here.

                                                                                                  https://sterling-archermedes.github.io/

                                                                                                  1. 19

                                                                                                    Truth is an absolute defense to slander, and the article you link must admit that the things it analyzes are all ultimately rooted in things that Stallman actually factually truthfully really said and did. Beyond that it’s just a matter of how the author of that article and the authors of other articles subjectively interpret the given facts, which is a matter of opinion and thus something slander explicitly cannot apply to. So you should probably stop referring to “slander” in this context.

                                                                                                    1. 1

                                                                                                      Reporting that someone “says that an enslaved child [implied to be in the general case] could, somehow, be “entirely willing”” when they actually say that a [particular] enslaved minor close to age of majority in one specific country (not a child) may have presented themselves as willing — i.e. acted as if they were willing, i.e. propositioned someone who would have no idea that they were a slave or a minor — is clear, unadulterated slander.

                                                                                                      That it’s rooted in something that Stallman said doesn’t change that; twisting someone’s words in such a disgusting way is as wrong a lie as making something up entirely from scratch.

                                                                                                      I find it sick that you can actually pretend that the claims made about what Stallman said could be characterised as “truth”. Truth is an absolute defence to slander, but there was plenty of untruth propagated about what Stallman actually said.

                                                                                                      So I will not stop referring to slander in this context (though I am not @ethoh).

                                                                                                  2. 7

                                                                                                    Just reading some of that first link. The best word used was harem - I mean how does somebody use that word in a serious way in a non-historical context? I always knew the guy was eccentric, but he really comes off as a piece of garbage.

                                                                                                    I hadn’t even heard about any of this (don’t really pay attention on that side of the fence), boy oh boy. Thanks for those links.

                                                                                                    1. 6

                                                                                                      I see the word harem used all the time (and sometimes use it myself) and don’t at all see how it’s usage would make somebody “a piece of garbage”, can you elaborate?

                                                                                                      1. 10

                                                                                                        Have you used it to suggest that economically disadvantaged women and children being actively trafficked by a convicted sex offender constitute a harem*? Because that’s the usage that (among other things) makes Stallman “come off as a piece of garbage.” Which, if we’re going to keep trying to rules-lawyer, is not the same thing as ‘making [him] a “piece of garbage”’.

                                                                                                        * If we’re being at all technical a harem is an architectural feature; we probably should retire the word when applied to anything else.

                                                                                                2. 11

                                                                                                  You work on Void Linux, right? Can’t we say the same thing about Juan and Void? Clearly things aren’t always as simple as “it’s his project”.

                                                                                                  1. 6

                                                                                                    Touche. I’ll not be responding, but I appreciate the chuckle.

                                                                                                  2. 8

                                                                                                    Please read the Wikipedia article about him.

                                                                                                    1. 6

                                                                                                      None of which are criticisms of his work or even his working persona, but his personal persona.

                                                                                                      1. 21

                                                                                                        You can’t be a leader with half of your personality. While I agree that some things are in the realm of private, your personal blog and your public speeches aren’t. You can’t go and have spicy opinions on your personal blog all the time and then pretend that they do not matter when running your projects and finding your peers in your projects.

                                                                                                        People are particularly questioning his ability to lead GNU and the FSF in a new era.

                                                                                                        I also don’t know how 33 GNU developers signing a letter that Stallman can’t remain the head of the GNU project can be anything but criticism of his working persona. https://guix.gnu.org/blog/2019/joint-statement-on-the-gnu-project/

                                                                                                    2. 8

                                                                                                      I guess that depends whether the project wants to be judged by the things RMS says about.. you know … fucking kids.. fucking corpses.. etc.

                                                                                                    1. 1

                                                                                                      Anyone else notice code blocks in this article being truncated by several characters on the left if the device is in portrait orientation?

                                                                                                      Might just be me, but it makes the article unnecessarily hard to read, at least on an iPhone 12 Mini.

                                                                                                      1. 1

                                                                                                        No, I noticed the same on my iPhone SE.

                                                                                                      1. 17

                                                                                                        This is understandably tagged “historical”, but do note that it’s extremely relevant to this day. A while back, when I was still doing firmware for medical devices, this was de-factor required reading for everyone who joined the company.

                                                                                                        1. 2

                                                                                                          It should be required reading for every developer and manager. I came across some extremely graphic descriptions of some of the injuries and clinical outcomes when I first read about this tragedy… absolutely horrifying what an overflow can do.

                                                                                                        1. 1

                                                                                                          Again on clocks starting at midnight instead of 1AM. Again on unit circles starting at 0 radians instead of 1/π. Again on scales being tared at 0kg instead of 1kg. Again on rulers starting at 0cm instead of 1cm.

                                                                                                          I suppose my argument is that the index of the nth thing isn’t as useful as the bounds of the nth thing … any 1-based language needs to either compile-time desugar the index by subtracting 1 or incur the runtime cost of subtracting 1 from the index any time it’s actually used – because under the hood there’s just offsets – while gaining only a very mild degree of comfort for primates that first learn to think in fingers.

                                                                                                          Also I’m not sure an appeal to tradition is any more valid than an appeal to authority.

                                                                                                          1. 19

                                                                                                            A half-hour to learn Rust

                                                                                                            51 minute read

                                                                                                            ;)

                                                                                                            1. 14

                                                                                                              Truncation vs rounding

                                                                                                            1. 2

                                                                                                              Ok, after more diversions and tangents than I can possibly count, and having basically had to hold so much state in my head that I’ve had to page to disk multiple times, I’ve reached the end of the article, and what have I learned?

                                                                                                              1. I am now considerably less confident of the point of pointsfree than I was at the start… which is impressive, because I was pretty confident there was a point.
                                                                                                              2. I will fire anyone that suggests using Raku in production. Which is impressive, because I’m usually an advocate for polyglot.

                                                                                                              And I’m really not being flippant or trying to troll here. I truly came in wanting to gain a new perspective on pointsfree and tacit programming… I leave thinking that the line from Spiderman should be “with great power comes the responsibility not to use it”.

                                                                                                              1. 2

                                                                                                                I’m sorry that you feel that way; it sounds like neither my coding style nor my writing style are a good fit for your tastes.

                                                                                                                One point where I agree with you, however: I don’t think Raku is a great fit for polyglot programming, at least in the way I assume you mean it. Raku has good FFI and can easily call out to anything with a C ABI, so in that sense it’s good at polyglot. But if by “polyglot” you mean “an environment where different parts of the codebase are written in different languages but are understandable to the entire team (including people specializing in other languages)”, well, then Raku isn’t a great fit. As the 101 example shows, you can write Raku code that is easily understood by people without much Raku experience but, imo, that involves giving up most of what makes Raku powerful. At that point, you might as well just use Python/Ruby/JavaScript – and, since everyone already knows those, you can support a polyglot environment.

                                                                                                                (As I guess is clear, I believe than the advantages of deep mastery of a set of idioms outweigh the benefits of a polyglot setup, but I’m happy to agree to disagree on that point)

                                                                                                              1. 45

                                                                                                                Setting aside feelings one way or the other, posting this because the default behavior changing is bound to bite somebody in the next month or two. If anybody knows what minor version is going to start doing this, post here so we can know what to check git --version against. It appears this is landing prior to git 3.0.

                                                                                                                Quoting from the mailing list discussion:

                                                                                                                So we need to make sure existing users know that they can add:
                                                                                                                
                                                                                                                [init]
                                                                                                                    defaultBranch = master
                                                                                                                
                                                                                                                 to their ~/.gitconfig if they want the legacy behavior
                                                                                                                

                                                                                                                In case you need to support legacy scripts or muscle memory.

                                                                                                                git config --global init.defaultBranch master may also work, but haven’t tried it on my machine.

                                                                                                                1. 19

                                                                                                                  [init] defaultBranch = master

                                                                                                                  Adding this to my gitconfig now to avoid future issues…

                                                                                                                  1. 16

                                                                                                                    Wait, I thought that init.defaultBranch was the compromise, to avoid renaming the default branch in Git, while still allowing those who feel uncompfortable by it to avoid it as much as possible?

                                                                                                                    Are there any statistics or scientific attempts to qualify how much of a problem this is? It’s probably my fault, but I find it hard to imagine that if someone is in the need for version control, will learn all the basics up until the point where they see the word “master”and give up, not because of direct racism, but racism by association.

                                                                                                                    Non-technical issues like these are never easy, but there should at least be some discission where one position is designated as the morally superior before a word is said.

                                                                                                                    1. 27

                                                                                                                      main is shorter, simple, and has no negative connotations whatsoever. This is an easy thing to do and it makes people feel welcome

                                                                                                                      1. 25

                                                                                                                        Semi-serious question: How do we know that? I’m going to guess that the people who decieded to use “master” in version control systems didn’t do this out of mallace, but just because the phrase seemed appropriate. So how can we be sure that main won’t eventually fall our of favour? I remember that at the beginning of 2015 Elementary OS wanted to release a new version called “Isis”, afaik in reference to the egyptian god, but then the terror group in ISIS gaiend power and a more or less inncoent name became very controversial.

                                                                                                                        And does “shorter” and “simpler” even matter? Almost everyone uses autocompletion in some form or another, and it’s not something you use as often as “git commit”.

                                                                                                                        1. 17

                                                                                                                          If we knew the future the world would be a better place ;) In the absence of perfect prescience, we will have to be guided by the voices of today.

                                                                                                                          1. 7

                                                                                                                            Ok, fair enough, but let’s twist the question again: How do we know that everyone has a seat at the table? What if there is a language or a culture where main has a different meaning (a simple but unoffensive example is in Germany, where Main is a river)? Apparently there were no black people, or people “decendents of slavery” to be exact (because not all back people were slaves) were present when the term “master” came into use, to correct this issue early on. But then on the other hand, if I remember correctly, make still uses tabs instead of general indentation, beacuse Stuart Feldman didn’t want to disrupt his userbase of at most a few dozen users.

                                                                                                                            1. 7

                                                                                                                              Of course, given that “git” itself is an offensive term in the UK, I insist that the whole project must be immediately renamed.

                                                                                                                              1. 6

                                                                                                                                false equivalence bad-faith troll

                                                                                                                                1. 1

                                                                                                                                  Ok, but it is a swear word and you would be chastised for saying it in a learning environment.

                                                                                                                                  Much like “GIMP” doesn’t belong in polite conversation.

                                                                                                                              2. 2

                                                                                                                                What are you hoping to achieve with this thought experiment?

                                                                                                                                1. 8

                                                                                                                                  I intend to show that the argument is internally inconsistent. We cannot simultaniously assume a kind of standpoint theory, by which there is always a posibility that a term is (objectivly) wrong, but at the same time be able to suggest an (objective) replacment for a (subjective) offense.

                                                                                                                                  A simpler understanding, that does not run into these problems is that offense is determined by intent, not by the nature or the etomology of a word.

                                                                                                                                  At the same time, I don’t think that people advocating for this change are arguing on this level. Any reference to this logic is handwaving, but the motivation appears to be something else, which I would either guess to be some kind of at best false pragmatism or at worse opportunism.

                                                                                                                                  1. 2

                                                                                                                                    (I apologize if I misinterpret your comment, English is not my first language and I am trying to understand your comment)

                                                                                                                                    a group X used a terminology to undermine/subjugate a group Y in the past, the group X is much smaller now but it still exists.

                                                                                                                                    the change happening here is removing that specific terminology because group Y today is reminded of the past treatment.

                                                                                                                                    and is your argument is that, since we don’t know that the new terminology wasn’t used to undermine any group in the past, the change is fruitless as we might need to change it again?

                                                                                                                                    or that since the terminology was also used in other contexts by people not in group X, it should be okay to continue using it?


                                                                                                                                    As I am neither a member of group X or group Y, my opinion is that if the change results in more people being comfortable using tool, we should definitely do it.

                                                                                                                                    1. 4

                                                                                                                                      First of all, and I don’t know why this has to be said: Slavery didn’t exist because it was called slavery, it existed because the society reproduced the conditions under which people were slaves.

                                                                                                                                      and is your argument is that, since we don’t know that the new terminology wasn’t used to undermine any group in the past, the change is fruitless as we might need to change it again?

                                                                                                                                      or that since the terminology was also used in other contexts by people not in group X, it should be okay to continue using it?

                                                                                                                                      I explained the further in a sibling comment, that on the terms of the argumentation, it is imposible to say that main is better than master, because perspectives cannot be compared or have any common point of reference. Since this discussion is not based on any hard evidence, we cannot derive any emperical conclusion like “this will make more people comfortable”, since we are talking about idealized, aggregated perspectives, produced by a worldview that has ever increasing problems to explain anything that is happening, hence the focus on such things like “master/main”.

                                                                                                                                  2. 6

                                                                                                                                    I find it not to be only a “thought experiment”. The questions are on point. No data (if any, I would like to see it) to back up claims that people are offended by these words results in such major changes for everyone. At least that needs to be pointed out.

                                                                                                                                    1. 3

                                                                                                                                      OP is leaning back in their armchair imagining the theoretical universe in which the broader German community is coping with the upsetting rivered associations with “main” as the new default git branch. I suggest they apply their philosophical leanings to the actual real world in which it turns out a sizeable community of real live humans prefer to dispose of master/slave language where possible in discussions with their terminal.

                                                                                                                                      1. 6

                                                                                                                                        Please re-read my comment, the “main” example was just to give an example due to limited perspectives, we cannot know what our actions or decisions mean from other perspectives. I explicity said it was harmless, but if you want something better, consider @caleb’s example.

                                                                                                                                        I suggest they apply their philosophical leanings to the actual real world in which it turns out a sizeable community of real live humans prefer to dispose of master/slave language where possible in discussions with their terminal.

                                                                                                                                        How can you know that? Where are the statistics? Where are the polls? How did we figure this out? When did we figure this out? This is just postulated, and nobody goes into it. And I have a hunch that this is because if you were to actually find out what most people belive, that it would not be what you want to think they do. But that’s just by unprooven hypothesis.

                                                                                                                                        1. 2

                                                                                                                                          I’m not going to debate you because you’re displaying a preference for thought experiment over an engagement in reality, which not only suggests a closed mind, but also that you simply don’t have sympathy for the real issue at hand. @caleb’s “example” is a much less veiled form of the same type of trolling you’re unwilling to let go of.

                                                                                                                                          You wish to model reality, but no modeling is required to understand this issue. We’re here because we’re here. This is a real conversation which is taking place in the real world for several years now. You’re attempting to place the burden of proof of the existence and size of a community on that exact community itself, which is existentially large and significant enough to make the issue stick broadly across numerous open source projects, GitHub, and now the git project itself.

                                                                                                                                          This is just completely illogical. If you want to go do your own research and develop some set of quantitative metrics in an attempt to quantize a complex social issue which is unfolding as we speak, then go ahead and do so. It’s not going to change what’s happening.

                                                                                                                                          1. 5

                                                                                                                                            As already stated, I just want to explain why the position is incoherent, and as everyone knows, ex falso, quod libet. You have already dismissed everyone who is questioning it as a troll, declare the issue as obviously setteled and then proceed to moralize it by claiming those who don’t agree have no sympathy for the real issue at hand – but of course, we are have a closed mind. I am honestly disgusted by this kind of behaviour, this dishonesty and the smug superiority you emit. Please stop and consider what you are doing, and why you feel the need to behave the way you do.

                                                                                                                                            1. 2

                                                                                                                                              You wish to model reality, but no modeling is required to understand this issue. We’re here because we’re here. This is a real conversation which is taking place in the real world for several years now. You’re attempting to place the burden of proof of the existence and size of a community on that exact community itself, which is existentially large and significant enough to make the issue stick broadly across numerous open source projects, GitHub, and now the git project itself.

                                                                                                                                              This could be accomplished by a small group of PR professionals who don’t actually care about racism, but recognize a potential upside for their company while the cost of changing a default is distributed throughout the open source community.

                                                                                                                                              The real story here is that GitHub made the change unilaterally, and git followed suit. One might consider the depth of anti-racist feeling that would drive a company to make this change while continuing to partner with ICE, DOD, and police departments around the country.

                                                                                                                                  3. 7

                                                                                                                                    i was there when we named elementary OS Isis and i was also there when we named it Freya.

                                                                                                                                    from what i remember, no one was concerned about optimizing the name, we were more concerned about not hurting people who themselves or their families had been impacted by Isis.

                                                                                                                                    I am 110% proud of our decision.

                                                                                                                                    (taking the elementary OS dev hat off)

                                                                                                                                    I found main to be a better choice, i am used to using mainline at work now (because of perforce legacy repos) and don’t even notice a difference.

                                                                                                                                    1. 2

                                                                                                                                      So how can we be sure that main won’t eventually fall our of favour

                                                                                                                                      Then we just change it again?

                                                                                                                                      1. 3

                                                                                                                                        But considering that the same would apply again, ad infinitium, we cannot say we will ever find a good name. And at then, what is the point? Either we go on forever renaming every time someone complains, at technical expense, or we claim that this renaming is more important than others, because one offended group is more important than others, which I don’t think that the people arguing for this want to argue.

                                                                                                                                        1. 5

                                                                                                                                          we cannot say we will ever find a good name

                                                                                                                                          I don’t think anyone is claiming that main will be the perfect name forever. If at some point in the future main becomes offensive, then we could change it again. I haven’t found any evidence that would lead me to believe that git would be changing the branch name on a monthly or yearly basis, so I don’t think there is a high cost here.

                                                                                                                                          forever renaming every time someone complains, at technical expense

                                                                                                                                          Uh, we work in software. Everything changes all the time at technical expense. Updating your dependencies could break your app (even if the API doesn’t change), products get deprecated, new products get created. I don’t see this much backlash against Apple changing their CPU architecture and that’s gonna cause a lot more trouble than this change.

                                                                                                                                          But that makes sense because the real issue here is ideology, wokes vs anti-wokes. We’re just pretending it’s technical. I think it’s fine to argue the ideological issue. I don’t think people are automatically racist for not liking the change. I just don’t think the technical argument holds much water.

                                                                                                                                          1. 1

                                                                                                                                            I don’t know how Apple is going to handle the migration, but I suppose they have tooling to make it easier, the kind of tooling Git lacks.

                                                                                                                                            Those conversations might also be more private.

                                                                                                                                            As for tech expenses, you’re correct in that everything comes at an expense.

                                                                                                                                            Is it therefore justified to impose more of it on others?

                                                                                                                                            Maybe that’s an important ideological question as well?

                                                                                                                                            This doesn’t have to be all about how git has a master branch to signify “the master copy”.

                                                                                                                                            See also: how master hosts usually perform more work than slave hosts (to counter American slavery connotations) or how offensive “blanket exception handling” and “collaborators” should be (in cultures treated with “less thought” than American slavery).

                                                                                                                                      2. 1

                                                                                                                                        Changing it alone is more welcoming than any harm from the word itself.

                                                                                                                                        1. 1

                                                                                                                                          This I don’t get. Could you explain what you mean?

                                                                                                                                      3. 36

                                                                                                                                        Master is more precise, traditional, doesn’t break anything, and has no negative connotation in this context, or most other contexts.

                                                                                                                                        Main does not make me feel welcome, it makes me feel like I’m being forced to bend the knee to a mob that can’t or willfully choose to not understand English. It makes me embarrassed to be in this field. Admitting that feeling means I deserve to feel bad anyway though, so whatever.

                                                                                                                                        1. 12

                                                                                                                                          Tradition should not hold back progress. There are more descriptive names out there. For example allow/deny is better than black/whitelist, parent/child is better than master/slave. I understand people are resistant to change and humans are creatures of habit (energy conservation) but this is a simple name change where there’s more advantages than not and people will get over it after a few weeks.

                                                                                                                                          1. 22

                                                                                                                                            parent/child is better than master/slave

                                                                                                                                            Not if it brings up memories of child abuse.

                                                                                                                                            1. 4

                                                                                                                                              Sorry about your child abuse, or are you simply virtue signaling? If you feel strongly about it then you can message the maintainers of the software you use to alter the names, otherwise why bring up a “whataboutism” argument.

                                                                                                                                              1. 7

                                                                                                                                                That you consider it valid shows the futility of choosing names to please everybody.

                                                                                                                                                The master slave relationship is not the same as the primary secondary relationship, nor the parent child relationship. Sometimes master slave actually describes the subject matter.

                                                                                                                                                And sometimes the master copy of some source code should live on the master branch. Many people only commit to master when they are certain of their work, while they use another branch as their main branch. Kind of presumptuous, calling the default branch the main branch, isn’t it.

                                                                                                                                            2. 17

                                                                                                                                              Sure, but it should hold this back.

                                                                                                                                              1. 1

                                                                                                                                                Sure, but it should hold this back.

                                                                                                                                                Not when there are demonstrably better names that are not, traditionally, associated with one-sided power dynamics, it shouldn’t.

                                                                                                                                                If “main” makes you feel less welcome, then there’s something wrong with your capacity for feeling.

                                                                                                                                                1. 9

                                                                                                                                                  Hold on, it’s not possible to win an argument about inclusiveness by saying that the other person is broken. Or even pretend that there is only one way to view things. We have to learn to communicate better and see the other person’s point of view.

                                                                                                                                                  1. 1

                                                                                                                                                    No, @yawpitch is quite on-point. This isn’t about “winning an argument”. Those with any decent capacity for nuance, critical thought, and self-reflection will note that “main” draws fewer negative associations than “master”. Those with unconfronted reactionary cultural/emotional anger stemming from the strawman “woke mob” fantasy will come up with a contorted bad-faith “arguments” a such as “the word ‘main’ makes me feel unwelcome”. You gotta call bullshit when you see it.

                                                                                                                                                    1. 4

                                                                                                                                                      Maybe. Or it’s also an opportunity to learn. People can have different points of view, and still, be good people. <3

                                                                                                                                                    2. 0

                                                                                                                                                      First off, this isn’t an argument about inclusiveness, it’s at best a debate about semantics, and since there’s no cognizable or remotely valid viewpoint that can distinguish “master” in the “traditional” sense being described above from its root association with human bondage, it’s not even a very sensible debate. No such valid viewpoint, with no pretense involved, exists: the word has several long-standing definitional meanings and the one involved here is fundamentally and absolutely inseparable from the notion of master / slave dynamics by which it derives any meaning whatsoever to the cause of version control. To try and empathize with any countering point of view is absurd … it’s a word, its meaning is simply a fact, and that fact is not open to meaningful and intellectually honest dispute, without descending into the interminable Hell of “alternative facts”.

                                                                                                                                                      The semantic dispute thus settled the only question, then, is is the community, right now, okay with that semantic baggage being carried further forward, or is the community prepared to make a break from that historical association? Personally I’d say that’s also a moot point … it’s been de facto settled by Github and the very reason the patch detailed above exists is because the network pressures of the downstream are driving an upstream change because YES the community is ready to not be exclusive any longer.

                                                                                                                                                      What remains is for individuals who are not comfortable with that linguistic and cultural evolution to, frankly, grow up and un-break themselves of their lack of empathy … the point of view of the “tradition” argument has been heard to death, it does not need more empathy heaped upon it.

                                                                                                                                                      I stand by my point: if you – and I’m using the most generally inclusive meaning of “you” here – feel that you’re somehow more included by “master” and less included by “main” then something is deeply and dangerously flawed with your emotional apparatus. The only colorable arguments against this minor default change are inertial, as in you either don’t want to invest the time required to update existing repos or you don’t want to engage in the effort needed to reprogram some muscle memory for future ones. Those are the available arguments. They’re just not very good ones.

                                                                                                                                                      1. 7

                                                                                                                                                        Maybe OP doesn’t know everything you do. Git is being used all over the world, in different types of cultures, and this seems like an American problem at heart. If they feel like this change is being trusted upon them, and on top of that they get vilified when they want to talk about it, it’s not really helpful to generate a common understanding. It doesn’t mean that they are broken, they just have a different context from you.

                                                                                                                                                        I feel like a better line of discussion would be to give out concrete instances where this word has been a problem. Or actually, even ask why OP feels like they do.

                                                                                                                                                        1. 4

                                                                                                                                                          OP made their context quite clear with their phrasing:

                                                                                                                                                          Master is more precise

                                                                                                                                                          … only when understood as an explicit reference to master/ slave dynamics …

                                                                                                                                                          traditional

                                                                                                                                                          … which is automatically a claim of being “inside” the dominant cultural context …

                                                                                                                                                          doesn’t break anything

                                                                                                                                                          … privileges the idea that the status quo isn’t already broken, which it is if you find the master / slave connotation at all problematic …

                                                                                                                                                          and has no negative connotation in this context

                                                                                                                                                          … no negative connotation to OP; the phraseology has an extremely negative connotation to me, and I am most certainly not alone: you keep suggesting I need to apply more empathy to someone who’s denying my very existence…

                                                                                                                                                          or most other contexts.

                                                                                                                                                          … can someone please enumerate the many and varied contexts in which master / slave has no negative connotation from the perspective of anyone who has been a slave, or whose family history was affected by slavery. I can affirm that I’ve personally got a great many friends in a great many contexts – including well outside of America – who see the problem with “master” as default.

                                                                                                                                                          I don’t need to understand why OP feels like they do … I need only identify that the feeling itself is unworthy of consideration in the political choice at hand… it is impossible for any rational being that both understands English and is armed with minimal historical context to see “main” as more exclusionary and historically problematic than “master”, hence we need not engage with any such view that happens to be espoused at all, except to point out its obvious and manifest flaws.

                                                                                                                                                          1. 3

                                                                                                                                                            I guess I didn’t get notifications for this continuing discussion. I’m on mobile and also don’t really care to keep this going, but I do want to clarify that I mean more precise in the sense of “master recording” or “master copy”, as in the source of truth from which copies are derived.

                                                                                                                                                            I can’t tell if you already read it that way, and believe that usage to itself be derived from slavery, or just think I’m directly defending the master/slave dynamic.

                                                                                                                                                            1. 3

                                                                                                                                                              Both of those usages — arguably they’re the same usage — rely in their entirety on the master / slave semantic for their meaning. Indeed no semantic value can be extracted from either without knowing that relationship exists, at least implicitly. A replication master makes no sense without duplication slaves, and that’s exactly what we called them in the bygone days of glass / nickel masters in optical pressing and tape in replication farms. Even before tape and indeed wax cylinders the master mold of foundry and pottery days was there to be used to direct the toil of those making exact copies, as it were, slavishly, with no independent freedom allowed in the work. They’re utterly inextricable from the historical institution they took as their model.

                                                                                                                                                              As I’ve said before there’s is not now, nor ever can be, any legitimate argument to be made that separates usage in version control from the historical idea of the privileged master and the slave(s) that follow.

                                                                                                                                                            2. 0

                                                                                                                                                              it is impossible for any rational being that both understands English and is armed with minimal historical context to see “main” as more exclusionary and historically problematic than “master”, hence we need not engage with any such view that happens to be espoused at all, except to point out its obvious and manifest flaws.

                                                                                                                                                              I’m totally with you, though based on the extent of some of the involved philosophical gymnastics into symbology, original intent, and sociology on the “other side” thrown in the face of the simple actual sizeable live human community looking to stop promoting “master” I’ve gotta conclude that these folks are ultimately motivated by a certain emotional bias…

                                                                                                                                                  2. 7

                                                                                                                                                    In many uses of master/slave in computer related things, it is actually a poor analogy. Often a “master” does all the work with the “slave” sitting idle waiting to step in only if needed, Other terms like prime and replica can be a better fit anyway. parent/child has a connotation of the parent spawning the child which works for, e.g. processes but not in other cases. In the case of git, there isn’t even a corresponding “slave” concept, only “branches” - In my mind, I wouldn’t even connect that use of the term master to slavery, but I’m not American. In any case, the subversion term “trunk” was better to begin with.

                                                                                                                                                    1. 4

                                                                                                                                                      Trunk is a good term. I can understand a change to Trunk.

                                                                                                                                                      In the book 1984, a major plot point is the reduction of language to reduce the complexities of expressable thought. Words meaning only one thing, like master only meaning “of a slave,” is an example of this language reduction.

                                                                                                                                                      1. 3

                                                                                                                                                        The master name in git was derived from master/slave terminology, see https://mail.gnome.org/archives/desktop-devel-list/2019-May/msg00066.html

                                                                                                                                                        The name trunk like in SVN is ok but I still think calling it main is better overall because of it’s shortness and detachment from it’s controversial origin.

                                                                                                                                                        1. 3

                                                                                                                                                          Saw, am very not convinced by his sources that it is master slave, even in bitkeeper.

                                                                                                                                                          Trunk is much better than main. One is descriptive.

                                                                                                                                                      2. 1

                                                                                                                                                        Principal/agent makes a lot more sense than parent/child for workflows.

                                                                                                                                                        1. 2

                                                                                                                                                          Not bad, certainly makes sense under certain delegation workflow contexts.

                                                                                                                                                      3. 1

                                                                                                                                                        Master is not more precise.

                                                                                                                                                      4. 15

                                                                                                                                                        As we’ve seen, you can never make people feel welcome–you can only make it more or less costly to join.

                                                                                                                                                        1. 14

                                                                                                                                                          the spanish main was the site of centuries of brutal colonialism

                                                                                                                                                    1. 43

                                                                                                                                                      To echo my thoughts: I think this change is welcome. As I see it, there’s no downside to changing this default.

                                                                                                                                                      1. 56

                                                                                                                                                        I consider the imposition of a distributed cost across the entire git-using ecosystem a downside. This is not a one-sided tradeoff.

                                                                                                                                                        1. 26

                                                                                                                                                          I know I’ve personally hard coded the word “master” in at least a few scripts. Fixing those scripts won’t just be a matter of changing “master” to “main” either; I’ll have to add a bunch of logic to figure out what the default branch name is for a particular repo. It’s also not clear what to do with old repos; do I keep the name “master” for old repos and adapt the word “main” for new repos? Or do I rename the master branch to “main” for all my old repos and possibly break things?

                                                                                                                                                          I’m not really opposed to the change. I’m usually happy to change language to move society into a less casually racist/sexist/whatever direction. But this change will make things quite a bit more difficult, on a technical level, for millions of users, so I sure do hope the benefit is worth it. (Which, to be clear, it might. I’m in no position to judge. In my native language, our word for “master” doesn’t have history it apparently has in the US.)

                                                                                                                                                          1. 25

                                                                                                                                                            change language to move society into a less casually racist/sexist/whatever direction

                                                                                                                                                            I agree, getting rid of casually racist/sexist/asshole terms is a good thing. But, this whole situation implies that the word ‘master’ is inherently racist, which it is not. To illustrate, let’s make the exact same argument about the word ‘blanket.’ I’m Native American, many of my ancestors suffered and died to the disease smallpox, sometimes believe to be intentionally spread using infected blankets now known as ‘smallpox blankets’ 0. Now, intentionally spreading disease with the intent on decimating a population is extremely racist, bordering on genocide. Whether it actually happened or not is beside the point, it’s ingrained in popular culture (in the US) as something that probably did happen to some extent. Now, for some, the word ‘blanket’ can bring up “memories” of their ancestors suffering (or even their own ongoing suffering), but does that make the word ‘blanket’ racist?

                                                                                                                                                            our word for “master” doesn’t have history it apparently has in the US

                                                                                                                                                            It doesn’t here either. The word has many uses, most of which range from neutral to positive (master copy, masters of science, etc.). Referring to someone as a master in certain contexts, such as when a student of martial arts, is a sign of respect.

                                                                                                                                                            Frankly, I have enough garbage to deal with, adding another headache on top of it just to satisfy some ‘woke’ assholes doesn’t appeal to me. Censoring language is a bad mechanism for suppressing racism, and is IMO more detrimental to society than the problems it’s seeking to solve.

                                                                                                                                                            1. 12

                                                                                                                                                              “Master” is often paired with “slave” in CS and IT (busses, DB replicas, etc.), which is why it’s on the list of exclusionary terms. Git doesn’t use “slave” in relation to its master, but given the prevalence of “master/slave” wording, why continue using a term that makes some people uncomfortable?

                                                                                                                                                              1. 15

                                                                                                                                                                why continue using a term that makes some people uncomfortable?

                                                                                                                                                                Because the shift imposes a distributed cost on the entire git-using ecosystem. Examples: every forge site needs to build out this feature instead of others, everyone needs to check their scripts, etc. Imposing distributed costs needs to be done very carefully, because even a couple of hours × a lot of people = a lot of person-hours spent.

                                                                                                                                                                This is an expensive move to make. For it to be worth doing, the benefit of the change needs to be worth the effort spent and I have seen no serious attempt to quantify this.

                                                                                                                                                                1. 21

                                                                                                                                                                  Does it actually make people uncomfortable? That’s besides the point of my argument, which is that words have flexible meanings and are extremely context dependent. Censoring a word because when used in a specific context (in this case, specifically human slavery) it can have a negative meaning simultaneously erases innocuous uses of the word, and strengthens the negative connotations. By actively trying to suppress usage of a word, you make the word more powerful in it’s negative usage.

                                                                                                                                                                  But really, all you need to do is actually read the last paragraph to know why I disagree with this. Changing 15 years of convention for something like this is needless headache.

                                                                                                                                                                  1. 5

                                                                                                                                                                    If it makes people uncomfortable, we could probably confirm that over in music performance and production, where “master” (master recording, remastered) is a frequently-used term and racial diversity is slightly less of an issue. My mediocre research skills haven’t found anything either way yet. Maybe we should just ask some Black artists.

                                                                                                                                                                    1. 5

                                                                                                                                                                      No one is suppressing anything. You can still use whatever name you want for your branch. Don’t blame software developers for adapting to a more inclusive culture. Especially when you are not part of the people affected by it.

                                                                                                                                                                      1. 16

                                                                                                                                                                        Until you end up being publicly shamed by thousands of “inclusive” virtue-signalling bullies.

                                                                                                                                                                        1. 3

                                                                                                                                                                          If you wanna complain about Twitter bullies, do that. However, “this move from the git project is bad because other people may eventually be assholes” isn’t… the greatest argument I’ve heard.

                                                                                                                                                                          1. 1

                                                                                                                                                                            Shamed for what reason? I’ve seen many people arguing against initiatives like this one and no one cares. Someone even started a petition on change.org to not change it and no one cares.

                                                                                                                                                                            1. 15

                                                                                                                                                                              If this takes, I give it a couple of years at most until someone starts yelling about a project that did not switch or even worse - gasp - started with the master branch instead of main. How insensitive and unwelcoming!

                                                                                                                                                                              A venue enabled by buying into this virtue signalling crap and actually making it a thing.

                                                                                                                                                                              1. 1

                                                                                                                                                                                Right. So you went from a thousand people publicly shaming to someone yelling.

                                                                                                                                                                                1. 11

                                                                                                                                                                                  From what I’ve seen, one person yelling leads to a tweet, leads to the eventual Twitter mob.

                                                                                                                                                                                  1. 1

                                                                                                                                                                                    Sure, but for saying what? @mordae is saying that would happen because someone decided to use “master” instead of “main”. Which seems farfetched.

                                                                                                                                                                                  2. 4

                                                                                                                                                                                    I remember Stallman.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      I think that was a bit more complicated than just naming a git branch.

                                                                                                                                                                          2. 1

                                                                                                                                                                            Does it actually make people uncomfortable?

                                                                                                                                                                            Yes. Yes it does … there is no use of the word as it relates to version control that doesn’t derive from human slavery, specifically.

                                                                                                                                                                              1. 1

                                                                                                                                                                                Fine, edited for additional clarity, though all those meanings derive from the PIE meaning of “one who has greater power”.

                                                                                                                                                                      2. 8

                                                                                                                                                                        I’ll have to add a bunch of logic to figure out what the default branch name is for a particular repo.

                                                                                                                                                                        What is a default branch? When I create a new repo, Git gives me a default branch, sure, but the moment after that command completes there’s never been a guarantee that the master branch exists.

                                                                                                                                                                        I know I’ve personally hard coded the word “master” in at least a few scripts.

                                                                                                                                                                        Unfortunately this was never quite correct, technically. My personal workflow is to always remain in a detached HEAD state and to not have any sort of “main”/“default” branch locally, so these scripts don’t quite work for me. If they were only supposed to support your workflow, you can keep using the old config setting without issue.

                                                                                                                                                                        1. 9

                                                                                                                                                                          What is a default branch? When I create a new repo, Git gives me a default branch, sure, but the moment after that command completes there’s never been a guarantee that the master branch exists.

                                                                                                                                                                          Here’s a concrete example.

                                                                                                                                                                          At work, we use this build system called bitbake, together with the yocto project, to build an embedded Linux distribution. The idea is that you build recipes which describe where to fetch some source code (usually in the form of a git URL + a commit hash + an optional branch) and how to compile and install the source code, and bitbake handles the rest.

                                                                                                                                                                          I threw together a script to go through all of our recipes and figure out which recipes are outdated. To do this, it fetches the repo and checks if there are commits since the commit hash specified in the recipe. This is no problem if a branch is specified in the recipe, but what do I do if it isn’t? Instead of looking deep into the guts of bitbake and figuring out how exactly its logic for figuring out what the “default” branch is, I just defaulted to “master”.

                                                                                                                                                                          There are obviously ways to do it “correctly”, and hopefully tools like bitbake, which are actually seriously and actively developed as a kind of product, do it the right way. However, there are loads of scripts which do things the easy way instead of the 100% correct way; essentially scripts which automate the steps which the author would’ve gone through manually just to make life a bit easier. Most likely, the solution in the case of the aforementioned script is to just keep track of whether a branch is specified, and, if it’s not, just omit the branch argument. My point isn’t that fixing these scripts is hard, but that there are loads of these scripts which will have to be fixed.

                                                                                                                                                                          1. 4

                                                                                                                                                                            I’m not the OP, but I think it’s reasonable to have, for example, a script that deploys master to an environment and is SHA-agnostic.

                                                                                                                                                                          2. 1

                                                                                                                                                                            I’ll have to add a bunch of logic to figure out what the default branch name is for a particular repo

                                                                                                                                                                            I thought so too, but I got away with just using HEAD everywhere. It’s an alias for the actual main branch, whatever it’s called.

                                                                                                                                                                            1. 4

                                                                                                                                                                              HEAD is not an alias for a branch. If you do git checkout alt-branch, HEAD will point at the last commit of alt-branch. If you again do git checkout main-branch, HEAD will point at the last commit of main-branch. If you’re in the middle of an interactive rebase, HEAD will point at a commit that in general won’t be the last commit of any branch. You can do a git checkout commit_hash which will detach your HEAD from any branch and it will only point at this particular commit. Generally, HEAD points at the commit that you have checked out locally at the moment, the one that will be the parent of the next commit you make.

                                                                                                                                                                              1. 3

                                                                                                                                                                                Works well enough for remote HEAD.

                                                                                                                                                                                1. 1

                                                                                                                                                                                  Right, so in practice (found this with a quick search):

                                                                                                                                                                                  • If you clone a fresh repo in your script, HEAD should point to the default branch, until you switch branches. This might work for some scripts, depending on the situation.
                                                                                                                                                                                  • If you want to know which branch is the default, it looks like git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/origin/@@' does the trick.
                                                                                                                                                                                  • If you want to know the default branch on a remote, you can do git remote show [your_remote] | grep "HEAD branch" | cut -d ":" -f 2.

                                                                                                                                                                                  These all feel like somewhat of a hack. With git changing this default, I wish there would also be some new built in commands. For example they could provide the default branch locally and on a remote directly, without needed to use sed or cut. Personally I’ve never written a script that needs to know the default branch name, but it sounds like some people have.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    I think that the entire issue rests with misunderstanding of git. In git, “default branch” is a matter of policy, not mechanism. It’s entirely up to the user. There is something like an “initial branch”, but that’s all. Git doesn’t mandate that a branch named so-and-so should have any special significance. So scripts trying to detect a “default branch” get it all wrong, because there is no such thing for all uses of git. Your organization may use git in one particular way where some branches have special significance and in this case, the policy of your organization should be hardcoded into your scripts. But those scripts won’t work for others. There are things like push and pull targets that may have some overlap with what people are looking for really.

                                                                                                                                                                                    1. 1

                                                                                                                                                                                      That makes sense, that’s a good description. I have never personally written a script that hard codes master, I just hear about other people doing it.

                                                                                                                                                                            2. 3

                                                                                                                                                                              OTOH I’ve seen developers notice they’ve been using hardcoded master where they should have been using HEAD, and fixed their code. master was always just a default, never a requirement, so code that assumed this particular name wasn’t robust.

                                                                                                                                                                              1. 0

                                                                                                                                                                                you can always use an alias in your shell

                                                                                                                                                                                1. 10

                                                                                                                                                                                  This is literally an instance of the “imposing a distributed cost” that I was talking about.

                                                                                                                                                                                  1. 2

                                                                                                                                                                                    Okay I understand and I am sorry I was not clear with my statement. I believe this is a direct cost of time and effort to mitigate, which in my humble opinion is an arbitrary and unnecessary syntax change to established code. However, I only meant to point out that a shell alias could be used to make it a less of a hinderance.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      I appreciate the apology, thank you.

                                                                                                                                                                            1. 3

                                                                                                                                                                              I like the layout, but I’ve gotta say that “styled after print newspapers” being immediately followed by “now with dark mode” is a brain twister.

                                                                                                                                                                              1. 7

                                                                                                                                                                                Think micro-fiche!

                                                                                                                                                                              1. 8

                                                                                                                                                                                And “faster code uses less electricity so emits less carbon” is not beyond all reasonable doubt.

                                                                                                                                                                                It doesn’t need to be, it just needs to be a measurable effect. Earlier in the post an argument is made that admits — and indeed hinges on the fact that — it is measurable, but that in the author’s mind the measure is too small to be significant. The author is an assemblage of things too small to be significant… too small to be significant in sufficiently large aggregate is significant. The moral argument, then, moves to where or not the aggregate can be sufficiently large… well people believe they’ve measured an effect and they believe a large aggregate will do manifest good and so they promote a lot of small changes in a bid to get a snowball rolling down a mountain via network effects.

                                                                                                                                                                                That attempt should be lauded, the moment you’ve admitted there’s any measurable effect at all in more efficient code. “Beyond all reasonable doubt” is a straw man and an attempt to set the goal posts vastly further ahead than they actually are or need to be. So is “faster”, but at least most readers can correct that back to “more efficient” at run time.

                                                                                                                                                                                Effectively this whole posts boils down to “I don’t like people moralizing”… which is moralizing.

                                                                                                                                                                                1. 3

                                                                                                                                                                                  The problem with “faster code uses less electricity so emits less carbon” is that it’s not beyond all reasonable doubt for the purposes of utilitarianism. There’s a reason Mill avoids trying to calculating the utility of individual actions: there’s so many second-order and third-order effects that can change the balance, and it’s all a distraction from his core ideas of how utilitarianism as a fundamental principle can guide broader society.

                                                                                                                                                                                  1. 2

                                                                                                                                                                                    Where has it been established that it must be beyond all reasonable doubt? In the passage quoted in the article Mill seemingly rejects — not avoids — the notation that such extensive pre-calculation is necessary at all, and certainly doesn’t seem to propose that anything need be established beyond all reasonable doubt. That standard appears to be a whole cloth addition by the OP… and again, it’s a straw man… a measur_able_ — as opposed to a measured — reduction in energy usage is sufficient to make writing more efficient code a utilitarian good, though there may be additional concerns with where and to what end those savings end up being spent.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      Just as one example, making something more efficient can lead to net more consumption: https://en.wikipedia.org/wiki/Jevons_paradox. Something can locally provide “more utility” but remove net utility.

                                                                                                                                                                                      Heck, most environmentalism is predicated on exactly that difference between immediate and global utility. “Faster code reduces emissions” is only moral when you recognize that excess carbon emissions, globally compounded over decades, are a problem.

                                                                                                                                                                                      1. 2

                                                                                                                                                                                        That’s just an attempt to bring “beyond all reasonable doubt” back via an end run and thereby squirm out from having to justify the inclusion of that straw man in the argument to begin with. Leaving aside the fact that Jevons was only right in the short term about coal, from a utilitarian perspective it’s moral to increase efficiency right up until the moment you realize that it’s causing more harmful increased consumption … it is perfectly reasonable for what appears to be moral good today to have been in the hindsight available to the future a moral bad. Many once accepted moral goods turned out to be wrong, in hindsight… from a strictly utilitarian perspective, the answer to that conundrum is simply to act on the moral better when and where you can find it, and to stop acting on that which has been actually revealed to be a moral worse.

                                                                                                                                                                                        And all of this hinges on the other straw man employed by the author; “clean code” and “efficient code” do not mean the same thing as “faster code”. I can write code that is more space efficient and by that means reduce its carbon footprint. I can write code that is more time efficient and by that means effect the same. I can also write code that is simply more efficient for others to use, or requires a smaller team and/or less hours of effort to maintain, and by either means give people more opportunity to spend more of their lives in pursuit of other, perhaps greater, moral goods. Sure, lots of those hours might then be spent on increased consumption, but assuming it will is an awfully craven view on humanity. Twisting “clean” and “efficient” to only mean “faster” is to have already capitulated to an (unproven) argument of economics.

                                                                                                                                                                                1. 8

                                                                                                                                                                                  It still bothers me personally, though, when they then share what they did with others as a means of inspiring others to do the same. Then more people end up doing something that doesn’t help at all.

                                                                                                                                                                                  Same. There are better things you can do than optimize your website. You can easily save much more than 47 kWh / year by turning off the lights in rooms you aren’t using. A 10 watt LED bulb on for 8 hours a day uses nearly 30 kWh / year, and your rooms probably have more than a single 10W bulb.

                                                                                                                                                                                  Looking at sources of greenhouse gas emissions in the US paints a clearer picture. The top 3 are:

                                                                                                                                                                                  • transportation (28%)
                                                                                                                                                                                  • electricity (27%)
                                                                                                                                                                                  • industry (22%)

                                                                                                                                                                                  That link has plenty more breakdowns if you take the time to read. Get a bike. Drive less. Fly less. Buy local produce. Save electricity. Contact your electricity company and see if you can opt-in to green energy only. Teach other people to do the same!

                                                                                                                                                                                  And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    There are better things you can do than optimize your website.

                                                                                                                                                                                    That’s a false dilemma… surely someone who does all those better things and optimizes their website has done more than someone who merely does all those better things?

                                                                                                                                                                                    The existence of better alternatives doesn’t exclude the good of still acting on the “less better” alternative.

                                                                                                                                                                                    1. 7

                                                                                                                                                                                      Sure. The classic “not as bad as” rhetoric: there is always a good reason not to change.

                                                                                                                                                                                      That said, low impact improvements should also be low effort, as to not compromise the ability to deal with higher impact actions.

                                                                                                                                                                                      1. 1

                                                                                                                                                                                        I’d argue that writing more energy efficient code is relatively low effort and (if that code is particularly widely used) can be relatively high impact.

                                                                                                                                                                                        1. 2

                                                                                                                                                                                          I find it interesting in that in all of these discussions “energy efficient code” is left intentionally vague. I figured it was some sort of stalking horse for Rust, but it was never explicitly stated.

                                                                                                                                                                                          1. 5

                                                                                                                                                                                            I am looking at papers like Energy Efficiency across Programming Languages, and as a language designer, this paper has prompted me to examine Pascal more closely (I’ve already looked at C and Go as well) to try to understand how I can make my languages more efficient.

                                                                                                                                                                                            1. 1

                                                                                                                                                                                              Not when I use the term … “more energy efficient code” could be in any language, and it might be as simple as adding a cache in front of a relatively costly request.

                                                                                                                                                                                      2. 7

                                                                                                                                                                                        You had me until the bit about voting. It seems out of place here. Maybe you meant “support leaders who want to reduce greenhouse gas emissions”?

                                                                                                                                                                                        1. 3

                                                                                                                                                                                          I certainly meant support leaders who want to reduce greenhouse gas emissions, especially by voting for them. :)

                                                                                                                                                                                          1. 3

                                                                                                                                                                                            It’s not at all out of place; increased participation in a democracy results in greater clarity and force behind the mandate presented to whomever gets elected.

                                                                                                                                                                                            What a “leader” wants to do is irrelevant once their electorate has spoken loudly… participation is volume.

                                                                                                                                                                                            1. 6

                                                                                                                                                                                              It’s out of place for this site, where politics are generally regarded as off-topic.

                                                                                                                                                                                              1. 8

                                                                                                                                                                                                That “generally” is doing a lot of work here; I see far less “politics” in encouraging people to vote generally than I would in encouraging them to support a particular candidate or agenda, which is what your correction would do… moreover the topic in this case is “things you can do to mitigate climate change that are (in the commenter’s eye) better than optimizing your website” and both “participate in the electoral process” and, indeed, “engage in political activism” are extremely on-that-topic. Trying to broaden this to being a meta conversation about the site generally is wandering off topic.

                                                                                                                                                                                          2. 4

                                                                                                                                                                                            You brought up a good point regarding LED-lights. Only 9% of domestic electric-usage is for illumination, and didn’t really move at all despite the push for LED instead of incandescent lamps in the last decade. Why is that?

                                                                                                                                                                                            People have become complacent. They keep their LED-lights on because they think they’re not wasting energy with it. LEDs still need roughly 15% (~1/6th) of the energy an incandescent lamp needs, and I’ve seen so many houses where people just keep their lights on in every room or have permanent garden illumination (my neighbours for instance, who never go into their garden). Back with incandescent lamps, people tended to turn them or keep them off, so if we assume a 6-fold increase of LED-light-usage, it didn’t really change anything. This might be an observation limited to Germany, but maybe somebody here can relate.

                                                                                                                                                                                            What really brings the point home, I think, is the fact that incandescent lamps still emit the superior light (CFR 100, enough said) and are much much more lightweight in resource usage than LEDs. The longer LED-lifespan of “20.000 hours” only relates to the diode itself, while often a capacitor or something else fails much more earlily. My Danish quality lightbulbs are at roughly 10.000 hours now and still working great.

                                                                                                                                                                                            Conclusion? I’ll keep using incandescent lights and see light as a luxury that is to be cerished. It’s a problem that people are getting used to “constant illumination” everywhere, because it’s wasteful.

                                                                                                                                                                                            1. 3

                                                                                                                                                                                              And most of all, VOTE! Get other people out to vote. More people voted in the US 2020 election than ever before, but nearly 100 million eligible voters still didn’t vote.

                                                                                                                                                                                              Why bring this up? Not everyone is American. Agree with the rest of your comment otherwise.

                                                                                                                                                                                              1. 2

                                                                                                                                                                                                Americans who don’t vote as a percentage of total world population appear to be roughly the same as the percentage of web users who will experience a given website without javascript (because of loading problems, or having it turned off).

                                                                                                                                                                                                I think it’s fair to discuss both groups, even though they are substantial minorities :).