1. 1

    No matter what, rust is going to be like an ‘order-of-magnitude’ more complicated to build in than Python. Not saying APIs can’t be optimized. The borrower checker and the relatively advanced type system adds that cost upfront. However, once you get going with actix or some other library for a project, it’s easy to reuse the code going forward and everything is more reliable and less buggy. Costs get amortized.

    1. 1

      For Rust, the most amazing CLI parser library you can find is Pest.

      1. 2

        Any thoughts on why Pest is better that structopt? (which seems to be the default people turn to)?

        1. 1

          What about argument-specific parsing, like clap or structopt? I haven’t actually used any of these, but I see them being commonly cited.

          1. 1

            In my experience there’s lots of good options, with slightly different tradeoffs. Pest isn’t specifically for command lines, it’s just a parser lib. For command line args specifically, there’s two main styles: ones that take a bunch of options and let you query them individually, like clap or argparse, and ones that let you just slap some annotations on a struct and parse your options into that struct, like structopt and argh. They’re all pretty good, just depends on what you want and how you want to get it.

            1. 1

              clap and structopt are both very good, but (and I think this is a big issue) they are both really substantial dependencies that in my own experience deliver a big hit to compile times. Compile times in Rust are an issue, so as powerful these libraries are, at this point I personally prefer not to use either of them.

              1. 1

                Compile times are definitely a pain, but if you plan on compiling the tool once and using it for months or years, I’d argue their flexibility and power pays off (although I’m guilty of avoiding them too, mostly because I haven’t done any serious Rust CLI…). Or even shipping the binaries to users.

                1. 1

                  Small clarification, for those not as familiar with Rust (not directed at @alilleybrinker :)). Structopt is a wrapper around clap which adds Custom Derive procedural macros to allow placing attributes on struct definitions and having the argv parser inferred from such definitions. Most of the compile time is spent on the Custom Derive procedural macros and supporting crates. I.e. clap compiled without the optional features is usually very quick and does not add any significant compile time.

                  Edit: full disclosure I am the original clap author.

                2. 1

                  I’d also checkout Seahorse.

                3. 1

                  Actually, I cannot edit my answer know, but I meant to say Nom, not Pest, and I wanted to talk about parser combinators. Plenty of options for sure!

                  1. 4

                    Neither Pest nor Nom are CLI parsers though… You might use them to implement a CLI parser, but they are not CLI parsers themselves. They are not things I’d recommend to people wanting to write a CLI tool in Rust for handling argv outside of very specialized circumstances.

                1. 34

                  How common is it to find git stash scary? I can’t recall hearing that from anyone I’ve worked with. The manpage has a clear explanation of what it’s for and how it works, with multiple examples covering common use cases.

                  1. 19

                    I think stash is an odd corner of Git.

                    • It doesn’t modify the commit graph. It’s really easy to stash stuff and forget about it. I’ve definitely rewritten code because I forgot it was stashed.
                    • It’s an optional part of your workflow. I use git stash but I know plenty of people who have used git for years who don’t touch it. This means it’s not mentioned in “Intro to Git”-type resources.
                    • git stash drop is one of the few ways to lose your work. I’ve lost more work stash drop than to reset --hard

                    I really like git stash now, but I have learned to avoid keeping important code stashed for very long.

                    1. 8

                      Yeah, my stash tends to grow with dead code-paths and I have to clean it out every so often. IMO it’s particularly useful as a method to move uncommitted changes to a different a branch. The syntax of stash save will never not confuse me though, it’s so unergonomic.

                      1. 2

                        Hmm, in what sense does it not modify the commit graph? It seems like it does to me

                        git init
                        echo hello > a
                        git add a && git commit -m "Added a"
                        echo goodbye > a
                        git stash
                        git log --decorate --all --graph --pretty=format:"%C(auto)%h %<(7,trunc)%C(auto)%ae%Creset%C(auto)%d %s [%ar]%Creset"
                        *   232e380 tom-g.. (refs/stash) WIP on master: 1a86647 Added a [2 seconds ago]
                        |\
                        | * ba5c812 tom-g.. index on master: 1a86647 Added a [2 seconds ago]
                        |/
                        * 1a86647 tom-g.. (HEAD -> master) Added a [10 seconds ago]
                        
                      2. 8

                        I don’t find it scary as such, but feel it’s messy and tends to lose me work. Typically, by running into conflicts that I can’t resolve with git stash pop (possibly by accidentally popping the wrong change). I expect there might be a way to recover, but that’s where it typically ends and I start over from scratch.

                        1. 2

                          Makes sense. Popping the wrong change by mistake and thus losing it would hurt. I almost always use git stash apply instead of git stash pop, though obviously sticking with apply has the side effect of the stash list growing over time.

                        2. 3

                          How many here learned git with a GUI? I use git stash all the time without thinking about it but I remember avoiding it for a couple years after I somehow shot myself in the foot with it using a GUI. I only use the cli and scripting at the moment.

                          1. 2

                            I wouldn’t call it scary, however it’s common for guides to caution against it, and advocate replacing it with temporary commits.

                            The potential for merge conflicts and subsequently losing work when doing git stash pop are the one part I might call scary.

                            1. 2

                              I find stash scary because if you make a mistake with it you cannot fix it with the reflog. I use it very gingerly and only when I know my editor is also making backups.

                            1. 55

                              We need a postmortem on how a small group of wokes were able to force millions of hours of toil on the entire software industry. Think of all the repos and scripts that have to be updated… my god.

                              The connection between master branches and slavery is suuuuuch a stretch: git has no concept of slave branches, but BitKeeper, the version control system git was based on did. In woke logic, being descended from something offensive makes you offensive, therefore git is offensive.

                              As crazy as this is, there’s no way I’m going to fight this one. The mobs of self-righteous wokes that police the software industry are too strong, so I will update my repos and double-check my scripts like a good little worker bee.

                              1. 46

                                Here’s your postmortem: the “small group” of “wokes” appears to be the majority of our industry, just people trying to be kinder to one another. Personally I find the change heartening.

                                1. 21

                                  I agree that this is true for a lot of things but I find this one a bit of a stretch. For example, I fully support avoiding the terms ‘blacklist’ and ‘whitelist’ because they provide a narrative that white == good, black == bad, which is not something I want to perpetuate in a society where ‘black’ and ‘white’ are adjectives applied to people independent of any personal choice on their part.

                                  The discussions I’ve seen around renaming the branch name have had white Americans leading the charge for this change and black people either saying nothing or that they don’t personally feel a negative connection with the word ‘master’ and they’d rather white folks spent more time addressing structural racism and less time addressing words with a tenuous connection to some awful bits of history. The word ‘master’ in the absence of ‘slave’ crops up in so many other contexts (in degree titles, master of martial arts, master chef, and so on) and, if anything, this narrative is pushing the idea that black people can’t (or shouldn’t) self-identify with the word ‘master’ in any context, which is pretty harmful.

                                  That said, on a personal level, I recently followed some advice in another article to put the current Git branch name in my command prompt and main gives me two extra characters of space before I wrap lines than master, so I do see a small concrete benefit to this.

                                  1. 15

                                    My own anecdata tells me that the number of black people who are uncomfortable with master/slave terminology in tech isn’t zero. I’m with you 100% on this not being the most important thing to tackle, but I fail to see why we shouldn’t do this as well as address the larger systemic problems.

                                    The default branch in git seems like such a silly thing for people to object to changing (to me, at least) as branch names have no special meaning. All these scripts that need changing have the same bug: they hard-coded a value which was never guaranteed to be static.

                                    This isn’t directed at you, but I read through threads like these and find myself wondering about the folks who argue strongly that this change, of all things, is simply too much to bear.

                                    1. 9

                                      The default branch in git seems like such a silly thing for people to object to changing (to me, at least) as branch names have no special meaning. All these scripts that need changing have the same bug: they hard-coded a value which was never guaranteed to be static.

                                      It was never guaranteed, no, but it was the de-facto default for the overwhelming majority; probably above 99%. I’m a big fan of “convention over configuration”, and that has now been kind of lost. I also have 70 git repos or some such I now need to rename (or stick to “master” which might be misconstrued as making some political point) and probably a script or three.

                                      At my last job we had even more repos, and a bunch of scripts floating left and right on people’s machines. Changing all of this for a group of ~100 devs and making sure everyone is up to date would be quite a task. Life is short; and there are real problems everyone agrees on. It just seems to me it would be much better if all that time and money was spent on more important issues.

                                      At any rate, I think why people object so strongly is a resentment over being told what to do. No one really likes that, and a lot of people have the feeling this change is being imposed upon them. Hell, I feel this change is being imposed on me, because I now need to spend time on something I don’t see the point of. It’s not a “passive change” like a project renaming some terminology which doesn’t affect much outside of some documentation or popup.

                                      Personally I think all of this is wasting a lot of political capital on something that’s … just nowhere near the top of the priority list, even if you agree it’s a problem in the first place. This seems to be a pattern I’ve seen over the last few years; this lack of focus, prioritisation, stubbornness, and tendency to divide people in camps is why I find American liberals so incredibly frustrating to deal with 🤷‍♂️

                                      1. 5

                                        At my last job we had even more repos, and a bunch of scripts floating left and right on people’s machines. Changing all of this for a group of ~100 devs and making sure everyone is up to date would be quite a task. Life is short; and there are real problems everyone agrees on. It just seems to me it would be much better if all that time and money was spent on more important issues.

                                        My expectation is that when/if this change lands we’ll all be even more bored with it. It’s just a change to the default, I don’t see why much at my work or in my personal projects would need to change. Either we’re using 3rd-party generic tooling which definitely has the ability to specify branches and better not have hardcoded assumptions by the time this actually happens, or it’s just some in-house tooling which only needs to work on our own repos.

                                        At any rate, I think why people object so strongly is a resentment over being told what to do. No one really likes that, and a lot of people have the feeling this change is being imposed upon them. Hell, I feel this change is being imposed on me, because I now need to spend time on something I don’t see the point of. It’s not a “passive change” like a project renaming some terminology which doesn’t affect much outside of some documentation or popup.

                                        I think you’re spot on when you say folks are mostly objecting to being told what to do. I think our perception of the people who (we believe) are telling us what to do is also at play here.

                                        Personally I think all of this is wasting a lot of political capital on something that’s … just nowhere near the top of the priority list, even if you agree it’s a problem in the first place. This seems to be a pattern I’ve seen over the last few years; this lack of focus, prioritisation, stubbornness, and tendency to divide people in camps is why I find American liberals so incredibly frustrating to deal with 🤷‍♂️

                                        I’m not sure I deal with American liberals much (I honestly don’t know the political leanings of the few American colleagues I have), so I defer to you here. My staggeringly obvious observation is that lately there’s a whole lot more dividing people into camps going on, by seemingly everyone.

                                        Thank you, sincerely, for taking the time to reply to me. What started as an off-the-cuff comment while I ate my sandwich has snowballed into quite the thread (by Lobsters standards anyway). I’ve spent more time thinking about this topic in the last 24h than I ever have before, that’s for sure :-) I think I’m done with this thread; my guess is most folks reading this, regardless of their thoughts on git’s default branch name, think it’s a garbage fire.

                                        1. 4

                                          I also have 70 git repos or some such I now need to rename (or stick to “master” which might be misconstrued as making some political point) and probably a script or three.

                                          This reads to me as emblematic of a certain paranoia in the id of this community that I really think we ought to call attention to (not you specifically, but this fear more broadly). This type of fear is a counter productive projection that we need to let go of because it prevents us from making real progress.

                                          I guarantee you that nobody is going to come across one of your git repos and call you out as a racist/colonizer/white supremacist/you name it. The vast majority of people calling for a better default branch name are reasonable and morally centered people who simply want to speak to their terminal without unnecessarily charged metaphors. They themselves almost certainly have git repos that will continue to use the branch master. People are not the personification of the “wokes” that the OP feels the need to fabricate.

                                          People all over this thread are afraid of the scary “woke mob” bogeyman, but if they were to get off of twitter and have an actual conversation with real antiracist people, they’d probably realize they’re normal people with strong moral values who spend energy on constructing a more just world. What’s funny to me about this whole “master” debate is that I think the folks making the most noise are the ones fighting against the change. Those pushing for it have bigger fish to fry.

                                          1. 8

                                            In this particular case I don’t expect people to come in and start accusing me of anything, but they might see “master” and misconstrue that to mean something even though it doesn’t. Of course, if I do change it then other people might also misconstrue it to mean something. I kind of feel a bit stuck here; as this politicisation of a bloody branch name is forcing me to take a position where I don’t really feel comfterable with either side (you can’t really inject nuance in a branch name). Although I obviously feel significantly less comfterable with all the “SJW cultural marxists!!!” idiocy, that doesn’t automatically mean I feel comfterable with the other side.

                                            I also don’t think that the “woke mob bogeyman” is quite as paranoid as you make it out to be; I’ve definitely seen quite a few incidents first-hand – and even been subjected to some – where people were beleaguered over a triviality, which sometimes resulted in some downright bullying. I know this isn’t the majority of people, but as the same time there definitely is a subgroup of what we might call “toxic SJWs”, for lack of a better term, which reflects really badly on the entire cause.

                                            What’s funny to me about this whole “master” debate is that I think the folks making the most noise are the ones fighting against the change. Those pushing for it have bigger fish to fry.

                                            I think that’s kind of a strange sentiment; do you expect people to just accept anything uncritically? And if there are bigger fish to fry, then why not fry them instead of wasting all this goodwill and political capital on this?

                                            1. 3

                                              I think that’s kind of a strange sentiment; do you expect people to just accept anything uncritically?

                                              Of course not. Critical thinking is required to reflect on the value of language in this context. It’s precisely a lack of critical thinking that leads to knee-jerk reactions, projections, straw men, overemphasis of the technical implications and these wacky slippery slope arguments I am seeing up and down the thread.

                                              And if there are bigger fish to fry, then why not fry them instead of wasting all this goodwill and political capital on this?

                                              Because people who care about social progress are pretty good at walking and chewing gum at the same time. You can go to the local DSA meeting, take part in a protest, read books from the library, and also send emails about git. You yourself mentioned having 70 git repos. Is it hard to imagine that a large group of people are capable of multitasking?

                                              1. 4

                                                And if there are bigger fish to fry, then why not fry them instead of wasting all this goodwill and political capital on this?

                                                Because people who care about social progress are pretty good at walking and chewing gum at the same time. You can go to the local DSA meeting, take part in a protest, read books from the library, and also send emails about git. You yourself mentioned having 70 git repos. Is it hard to imagine that a large group of people are capable of multitasking?

                                                A day still has 24 hours, so there really is a hard limit on things, and more importantly, because you’re asking other people to change with you, you also need to factor in that not everyone is willing to spend the same amount of time on this kind of stuff. This is what I meant with “wasting all this goodwill and political capital”.

                                                There are also plenty of far bigger issues that see hardly any attention, often because there is far too much focus on much less important matters. I’ll avoid naming examples so this doesn’t turn too political, but the whole “walking and chewing gum” multitask theory is a bit misguided IMHO. It annoys (even angers) me because all of this is standing in the way of actual progress.

                                            2. -1

                                              People all over this thread are afraid of the scary “woke mob” bogeyman, but if they were to get off of twitter and have an actual conversation with real antiracist people, they’d probably realize they’re normal people with strong moral values who spend energy on constructing a more just world.

                                              Is it even possible to have a conversation with these Enlightened Ones, whose moral values are so much stronger than the rest of us?

                                          2. 4

                                            You’re not black and represent exactly zero black people in tech.

                                            1. 2

                                              Very true.

                                        2. 7

                                          Or, perhaps, they are the majority of people who care. Most people don’t care too much about what to call the default branch. For the average person, this is probably a small bit of trivia. The people who care (in either direction) are probably the minority. Of course, the people are care are the people who choose.

                                          1. 4

                                            I suspect you’re correct; I’m looking at discussions like this and mistakenly assuming most people are “in the room”, but of course it’s only the people who care either way who bother to chime in. Thanks for reminding me of that :-)

                                          2. 5

                                            You you mean the majority of the leaders of large, influential entities in the industry.

                                            1. 5

                                              It’s kind of a difficult conversation to have; I think that all things considered, there are very few people who want to be unwelcome, much less (subtly) racist, but once you argue “this is a pointless change” it’s very easy to have the optics of that. This is made even worse by all the “zomg, another example of cultural marxist feminazi SJWs destroying civilisation!!!!111” idiots.

                                              Most people that I know respond to this with “sigh 🙄”, but don’t really say much about it, and a very small amount of people I know are in favour of this. This is not a very scientific opinion poll of course, but as far as I can see it’s really quite a small minority.

                                              As I argued last time, I’d personally rather not comment too much on this to give people who are actually affected by this a chance to speak without being drowned out, and in the 5 months since I placed that comment I still see mostly white people (including myself) discus issues that don’t affect them, which makes me kind of uncomfortable.

                                              1. 4

                                                How is the master branch unkind? Do you think everyone using git was being unkind until this change?

                                                1. 2

                                                  It’s not, and I certainly don’t think everyone using git is being unkind either.

                                                  I think that changing the default branch name to not reference master/slave terminology (a common thing in IT which I know has made at least one of my friends uncomfortable) shows kindness and empathy. It is a tiny, minuscule such act, to be sure.

                                                  Not making this change is not an act of unkindness. Using the branch name “master” in your repos is not an act of unkindness. An unkind act would be renaming the default branch to a racial slur. That’s my view on it, at least: not being kind isn’t the same as being unkind.

                                                  I regret my pretty barbed initial reply to you, and I apologise. Reading it back, I made distinctly unkind assumptions :-)

                                              2. 36

                                                Worth to read: The Most Intolerant Wins: The Dictatorship of the Small Minority

                                                It explains the logic behind it. The funniest part of this is that master as a word predates slavery in the US.

                                                c. 1200, maistren, “to get the better of, prevail against; reduce to subjugation,” from master (n.) and also from Old French maistriier, Medieval Latin magistrare. Meaning “acquire complete knowledge of, overcome the difficulties of, learn so as to be able to apply or use” is from 1740s. Related: Mastered; mastering.

                                                https://medium.com/incerto/the-most-intolerant-wins-the-dictatorship-of-the-small-minority-3f1f83ce4e15

                                                UPDATE: tadzik’s was correcting me on the missing qualifier for which slavery i am talking about

                                                1. 19

                                                  master as a word predates slavery

                                                  I’m pretty sure slavery existed long before the 1200s ;) Did you mean “american slavery”?

                                                  1. 12

                                                    Yes, sorry, I mean the slavery why the mob is upset now. Slavery outside of the context of USA is irrelevant to them because it does not fit their narrative. Thomas Sowell writes a lot about this.

                                                    1. 3

                                                      No worries, thanks for clarifying – and for the reading links :)

                                                  2. 6

                                                    This was an entertaining read, thanks. This should actually be the top comment, since it gives more insight on what’s going on than any ideological comment in this thread (on lobsters, but on other sites as well).

                                                  3. 45

                                                    Not only you can’t fight this one, but not actively participating in woke’s narration makes you their enemy. Even expressing dislike about this patch risks being taken as a person who is pro-slavery, which is an obvious BS. But indeed, you can’t fight with angry mob alone.

                                                    1. 13

                                                      You misunderstand the primary ‘woke’ argument.

                                                      The primary argument is that encountering the word ‘master’ reminds people of the enslavement of their ancestors, the related stories of suffering and the discrimination and oppression they are still being subjected to. It’s what is called a micro-aggression: something that isn’t a problem in small doses, but that adds up when experienced over and over again. Death by a thousand cuts.

                                                      What this change, and others like it, intend to accomplish is not unnecessarily subjecting people to such reminders.

                                                      1. 13

                                                        Guess we gotta remove it from the dictionary too, lest they chance upon it and feel hurt.

                                                        1. 6

                                                          That would be the logical conclusion from the argument, save for the word ‘unnecessarily’.

                                                          The question is when it is appropriate to not be accommodating to those that claim being hurt, because the cost of accommodating them is too high. And it bears mentioning that the cost effectively, indirectly, causes others to suffer.

                                                          It’s not all or nothing. You don’t have to reject the argument to reject the conclusion, as it hinges on costs and thus trade offs. There should be a few Schelling points here and I agree that it seems unreasonably difficult to defend some of those points.

                                                        2. 12

                                                          Well, my homeland has suffered a communist dictatorship and invasion for decades. Reading the cultural marxism here and there reminds me of the terrors my people, and specifically my family has suffered from communism in the last hundred years.

                                                          What could be changed, to unnecessarily subject me to these micro-agressions?

                                                          1. 12

                                                            cultural marxism is a conspiracy theory invented by the american far right. Go complain to them.

                                                            1. 7

                                                              Actually it’s reinforced by former USSR KGB agents ;).

                                                              1. 4

                                                                totally a reputable and unbiased source on this topic

                                                                1. 5

                                                                  Well, can’t deny that they actually had much experience with it (Stalin, Lenin), unlike USA

                                                              2. 9

                                                                sure, whatever different opinion appears it is fake news, conspiracy theory, or simply wrong, not worth consideration or discussion.

                                                                1. 9

                                                                  When there is:

                                                                  • kids being threatened
                                                                  • jews in disguise
                                                                  • any flavor of progressive agenda threatening the lifestyle of conservative or reactionary white people
                                                                  • loose attacks on intellectuals

                                                                  Yep, it’s probably a conspirancy theory. QAnon is the same, just more loud and with sweatpants instead of cheap fedoras.

                                                                  1. 4

                                                                    nah, you’re just wrong. the origins of cultural marxism

                                                                2. 2

                                                                  That one group was lucky enough to get their cause taken up by a larger group of activists doesn’t entitle any other group to get their cause taken up as well. But the arbitrariness doesn’t imply anything about the reality and worthiness of the cause (neither in the positive nor in the negative direction).

                                                                  You could start a movement to try and get your cause taken up by as many fellow activists as you can find to spread awareness so broadly that it leads to changes like the one we are discussing here. An outcome could be that promoting communism becomes something that is considered shameful.

                                                                  1. 1

                                                                    Frankly, comparing the suffering of the victims of Communism to having to make a minor change in a software workflow strikes me as wildly hyperbolic.

                                                                    1. 11
                                                                      1. If I was comparing the suffering of victims of communism to anything that would be the suffering of the victims of slavery in the USA in the context of my comment.
                                                                      2. What I was comparing is that the micro-agressions I am subjected to by some comments on the internet, are of the same category, as the micro-agressions one has to take when reads the master word while working with version control.

                                                                      If you think I should not be reminded of that, and the above is a hyperbole (not what you said), that is an opinion some share about the case about the push to remove the word master.

                                                                      1. 3

                                                                        Thanks for clarifying your position.

                                                                3. 17

                                                                  I think you can make this point without using such charged language.

                                                                  I happen to agree with the change, but I don’t consider myself a “self-righteous woke”. I read your post and felt uneasy.

                                                                  1. 4

                                                                    The obvious solution is to fork git, keep master as the default name, and give it a nice new name, like… Consolidated Source Association, or similar…

                                                                    1. 3

                                                                      So in summary, you think that master in git is not offensive, and you think that people who do find it offensive are ridiculous. Curious, how many of your coworkers are black?

                                                                      1. 71

                                                                        Curious, how many of your coworkers are black?

                                                                        This feels a bit like “what do you even know about being offended”. I share /u/y0ssar1an’s viewpoint, so let me tell you how it looks from my perspective. I have zero black coworkers as I live in a country that barely has any black people in it at all (Poland). The word “master” doesn’t hold have any negative meaning to people around here. But there is another: “Collaborator”. Used very widely in VCS-related software, in our cultural context it immediately reminds people of the old meaning: “the one who collaborated with the nazis during WW2”.

                                                                        My ancestors fought in WW2. Am I now smearing their name because I have myself become a collaborator? Should I now feel uncomfortable because someone on the other end of the world came up with a word that makes me slightly uncomfortable? No, that’d be absolutely ridiculous. Every cultures has words that make some people uncomfortable, and trying to please everyone by making the subset of the language we use smaller and smaller is not just futile imo – it’s also pointless, and arguably a detriment to diversity by itself.

                                                                        The implication that slavery is somehow inherently connected to racism is by itself an ameri-centric idea. This whole master->main “diversity theater” feels like a symptom of a particular culture being unable to deal with their past (or largely their present, afaict) and thus resorting to empty gestures rather than trying to deal with real problems – last I checked, Github, the champion of the “master bad” movement was still working with ICE who’s basically building concentration camps for minorities. But I guess it doesn’t bother people as much since it’s not so well entrenched in american culture.

                                                                        1. 1

                                                                          The implication that slavery is somehow inherently connected to racism is by itself an ameri-centric idea.

                                                                          I could not imagine what exactly it is that make America, slavery, and racism so connected! Words have meaning which are inherently connected to history. Just because you want to pretend that they always mean what makes you feel best doesn’t mean everyone is going to harbor the same narrow viewpoint as you.

                                                                          1. 10

                                                                            Outside of the USA slavery has been a think before, and at some unlucky places after the abolition in the USA. It did not generally have a racist motivation: debtors could sell themselves as slaves, prisoners of war were sold as slaves, and in many feudal states serfs had so few rights and possessions, that they were basically slaves.

                                                                            It is ironic, but in Tibet actually the invading communist chineese have abolished slavery, where it had no racist character.

                                                                            In the USA, and the Americas generally slavery did have a racist character, as the slaves sold by the Netherlander, English and Arabic slavers were mostly of African origin.

                                                                            1. 5

                                                                              Totally correct. Historians very regularly caution against comparing the brutality and sheer scale of the transatlantic slave trade to earlier forms of slavery. A great way to understand why is to go back to the fall of the Songhai Empire for it is through the unfolding of that empire and the colonial fire that engulfed its ruins that the taking and trading of slaves exploded violently and grew to dispossess, dislocate, and traumatize millions of families.

                                                                          2. 1

                                                                            The use of the (American) English language can be seen as a form of cultural imperialism, but it also allows people like you (not native English speakers, but part of the global computing community) to reach markets previously unimaginable. I think putting up with the occasional linguistic disruption that emanates from the dominant market should be worth it.

                                                                          3. 34

                                                                            I wonder how many of them have MSc degrees. You know, Main of Sciences degree.

                                                                            1. 12

                                                                              The two definitions of the word “master” for “owner” and “teacher” are a doublet, they come from different etymological paths that converged. Git derives its use from the former.

                                                                              1. 7

                                                                                And where they keep the main copy of their diplomas.

                                                                          1. 3

                                                                            Nearly 1/3 of all internet traffic is pornography. Maybe we should focus on the lowest-hanging fruit.

                                                                            1. 4

                                                                              I can imagine that needless video-conferencing is also a contributing factor, especially with all the online classes/lectures/meetings over the last few months.

                                                                              1. 2

                                                                                I guess needless video-conferencing is much better than needless in-person meetings (by car, train or airplane). Can porn similarly be replaced be actual sex to reduce the carbon footprint? Maybe just replace video porn with still pictures or written erotica (read on eink, like kindle).

                                                                                1. 2

                                                                                  Video-conferencing can at least more often than not be replaced by auto-conferencing, and perhaps a slide-show that isn’t transmitted in a video format.

                                                                              2. 2

                                                                                Got a source for that? As far as streaming entertainment goes, YouTube and Netflix seem to make up the plurality. As of 2018, YouTube and Netflix combined make up about 26.4% of all global internet traffic.

                                                                                1. 1

                                                                                  Various pornographic websites are certianly visited more frequently than Netflix, but the statistics seem to vary. I found this estimate claiming somewhere between 4%-30%. But either way, there are more problems than just bandwidth usage.

                                                                              1. 1

                                                                                If that was true, then by this day and age a random person that started coughing on one side of the world could within days set cobol machines on fire on the other side.

                                                                                1. 2

                                                                                  During Y2K, I heard some fortran programmers came out of retirement. The author is saying COBOL, this time around. Which programmers will be called out of retirement a few decades from now?

                                                                                  1. 13

                                                                                    Perl, there is a lot of it out there but the pool of people willing to work on it is shrinking.

                                                                                    1. 3

                                                                                      Having written quite a bit of Perl and knowing some of the systems that are written in it, I think that it will be deprecated or replaced before I reach retirement because of changes in the business environment, upgrades to the underlying products, changes in process, or just after doing a risk analysis. That some of that stuff is already from the late-90’s and early 2000’s and still going is impressive (or disappointing, depending on your POV).

                                                                                      1. 2

                                                                                        Yeah, this. There was a lot of Perl written for an eight year or so stretch, and a lot of that is in places we wouldn’t expect.

                                                                                        1. 2

                                                                                          There will always be money for people who can suspend their sense of smell!

                                                                                          1. 9

                                                                                            I’ll take clean Perl code over dirty Java or C# any day of the week.

                                                                                            1. 2

                                                                                              Sure, but how many companies trying to lure Perl programmers out of retirement are going to be in possession of a clean codebase?

                                                                                              1. 1

                                                                                                I think if you’re luring programmers out of retirement to work on something, the odds of it being clean are fairly minimal, regardless of language.

                                                                                                1. 2

                                                                                                  Absolutely. That’s what I meant. I didn’t mean to imply anything specific about Perl.

                                                                                        2. 7

                                                                                          Ruby, I think

                                                                                          1. 1

                                                                                            Really? I would think that there’s a lot more legacy business-logic Java code in production than Ruby. Of course, I don’t have any hard data to back up my intuition.

                                                                                            1. 5

                                                                                              Yeah, but I see Java sticking around, like C or C++ have. Ruby is more niche than Java, but still gets used by a lot of companies. There is a possible future where it’s a legacy skill in 30 years.

                                                                                              Though, thinking about this more, I suspect VBA, FOXPRO or MUMPS are probably better candidates.

                                                                                              (And yes, I see the irony of posting this on a forum powered by Rails)

                                                                                              1. 2

                                                                                                TBH, the best thing to “reviwe” Ruby (which is IMO already done in Crystal but nevermind) is to actually kill Rails.

                                                                                                It’s completely opposite to what Ruby is, denies its values and throws many of its nice aspects into the window. And then, most people who don’t know Ruby at all are looking at it from the RoR lenses, thinking it’s a huge mess.

                                                                                                And, in the meantime, Sinatra sits there like nothing ever happened.

                                                                                                1. 3

                                                                                                  Sinatra at least did influence Go and Node.js/Express a bit.

                                                                                                  Doesn’t Crystal have exponentially growing compile times due to all of the type inference? At least, I had heard that can be a problem.

                                                                                                  I don’t see Ruby truly dying any time soon, just becoming progressively more niche over time, kinda like Perl has.

                                                                                              2. 4

                                                                                                I think the difference is that Java will be alive and well in 20 years … but Ruby? Not sure.

                                                                                                • Programming for non-programmers is now largely done in Python (scientists) or Go (infrastructure).
                                                                                                • Other languages closed the gap in terms of productivity in the web space, also NodeJS exists.
                                                                                                • Learning to program now often happens In JavaScript, thanks to browsers shipping it.
                                                                                            2. 3

                                                                                              Perl maybe?

                                                                                              1. 1

                                                                                                I see Perl getting there in the next 10 years, not the next 20-40, if it is going to get there at all.

                                                                                            1. 2

                                                                                              I am working on a productivity/tasks/notes tracking application. I have tried everything out there but none of them are versatile enough. I am going to scratch my own itch and will see if I am able to scratch it for others too.

                                                                                              1. 4

                                                                                                Not to be the guy who suggest the solution I’ve found to a be a panacea for all worlds ails, but have you checked out Org-Mode in Emacs? Its incredibly flexible, in both the good and bad ways.

                                                                                                1. 1

                                                                                                  Have you tried just using git issues? The cli

                                                                                                  1. 1

                                                                                                    Do you mean https://github.com/dspinellis/git-issue or https://github.com/stephencelis/ghi? CLI workflows tend to work well for me, but I never thought to look up cli issue managers.

                                                                                                    1. 1

                                                                                                      Yes. I just push issues to a remote server (in my apt). Then I use jrnl for notes. I can find stuff by tag. I’ll even reference jrnl tags in my git-issues. I use it for everything, not just coding projects.

                                                                                                      Edit: I use dspenelli’s. I also version my jrnls and push to a remote server.

                                                                                                1. 7

                                                                                                  One thing that I find beautiful (though maybe it’s not good) it’s that the web is very much nature-like, like nature evolution like it’s a living being. Their mess is like the real world, look at the thousands of different species of spiders in real world. An intellligent design would have never created so many species, yet so difficult to differentiate. It has more in common with natural languages with all its exceptions and shorthands. For math-people this is a disaster. But I find it beautiful somehow.

                                                                                                  1. 3

                                                                                                    I don’t see what’s beautiful about the average news website requiring megabytes of tracking javascript and shitty ads to be downloaded before I can read simple news articles.

                                                                                                    1. 2

                                                                                                      I like how you appreciate the complexity of the web. In any case, spiders are a natural resource: producing materials (e.g. silk), engineering inspirations (exo-skelotans), medicine (venom), food (e.g. birds), and bug population control and so forth, in a wide range of environments. We don’t fully understand. We can barely make a web browser. Some my find it odd there are millions of different restaurants. Or software companies. Or Unix versions. But I agree, the Chrome Browser randomly evolved from a bash script without intelligent intevention. And Unix formed by chance after an explosion in Bell Labs. Joking aside, it is beautiful.

                                                                                                      1. 1

                                                                                                        And another thing they both have in common: humanity’s involvement in their development will be their downfall.

                                                                                                      1. 2

                                                                                                        Good advice. Suprised the article or commentors didn’t mention jrnl.sh. May I recommend version controlling the jrnl file (or whatever files your solution generates) and pushing changes to a private remote git repo. Make an alias to quickly commit and push. Now you can read and write to your journal no matter where you are. And no overwrites from complex file syncing.

                                                                                                        1. 2

                                                                                                          Anyone using Nix to cut down on the number of services in their docker-compose.yml? Or is everyone going into camps?

                                                                                                          1. 11

                                                                                                            I have been using NixOS exclusively on my computer for 2 years now (see my NixOS config). I also write Haskell, both at work and as hobby, using Nix instead of stack (more on that here). Ask me anything!

                                                                                                            1. 3

                                                                                                              So if I start with your NixOS config, can I get staarted with NixOS and adapt it to my needs? Is it possible to combine it with Guix?

                                                                                                              1. 4

                                                                                                                Is it possible to combine it with Guix?

                                                                                                                Partially. Guix is basically a fork of Nix with Scheme implanted instead of the Nix expression language. Both package managers use the same fundamental unit (Nix’s derivation), and derivation (.drv) files produced by Guix can be imported in Nix. There’s no easy way of bridging that gap though, currently. I’m also not sure if both can run off the same store.

                                                                                                                As for running Guix on NixOS, work is being done (albeit slowly) to enable this via a NixOS module.

                                                                                                                In general I’d recommend learning the Nix language instead. Even as a Lisper, I find it to be quite pleasing to work with once you get the hang of it. There’s a one-page overview over the language that I wrote a while back to help people get started, which you might find useful.

                                                                                                                1. 1

                                                                                                                  Thanks for this. Your one-pager is really useful; perhaps the most accessible intro to the lanauge I’ve read. But I have to say that the Nix language makes me yearn for the clean semantics and constructs of Scheme. Rather than running Guix on Nix, wouldn’t it be easier and cleaner to write Nix on Guix? I don’t mean to start a language war here but if you put a gun to my head and asked me to unify the two approaches then i know which route I would choose.

                                                                                                                  1. 1

                                                                                                                    Glad to hear nix-1p helps!

                                                                                                                    Nix has a few warts (such as the ? operator and some of its builtins), but overall seems like a fairly clean language to me.

                                                                                                                    There’s pros and cons to each of the two approaches here. For example, Guix gets namespaces for free from Guile, which means there is a defined and queryable package set (whereas Nix just has one big attribute set that you traverse).

                                                                                                                    The downside of this is that you now have a namespace, and declaring things into them becomes a side effect. In Nix it’s very easy (for people experienced with the language & tooling) to understand exactly which code is relevant, this becomes less clear once you have sequential execution, mutability and so on.

                                                                                                                    My ideal setup would probably be a language with the exact semantics of Nix (purely-functional, lazy) but an S-expression syntax. That’s easy to implement, but at the moment there’s more important things to work on in the ecosystem.

                                                                                                                2. 2

                                                                                                                  So if I start with your NixOS config, can I get staarted with NixOS and adapt it to my needs?

                                                                                                                  The first step would be to make a fresh install of NixOS on your machine. And then, yea, you can fork and use my config per the instructions in README; although you don’t really need to. You can start from the NixOS base configuration.nix, and then customize it based on the tips from https://nixos.wiki/

                                                                                                                  Is it possible to combine it with Guix?

                                                                                                                  Nope. Guix does not even use Nix.

                                                                                                                3. 1

                                                                                                                  Have you used docker inside NixOS? And if so, why?

                                                                                                                  1. 2

                                                                                                                    To run an one-off image from Docker registry, like mysql or redis, specific to a project. Docker is generally not required on NixOS for creating reproducible environments.

                                                                                                                1. 1
                                                                                                                  • Thinkpad x220 for coding, upgraded with 16GB RAM and a 256GB SSD, running NixOS. It’s kinda old and not very fancy, but with the upgrades it boots up in a couple of seconds and never hangs, so it’s more than good enough.
                                                                                                                  • Self-built desktop for gaming: i7 9700k, 16GB RAM (I might buy another 16GB stick soon), 1TB m.2 SSD, RTX 2060.
                                                                                                                  1. 1

                                                                                                                    Just curious. Do you use NixOS because of strictly professional demands or is it more of a personal preference? FYI I don’t have a pressing need to use NixOS but I’m pretty sold on the concept.

                                                                                                                    1. 2

                                                                                                                      Personal preference. I hate dealing with users and groups, and systemd units, and digging into /etc to edit config files and then forgetting which ones I’ve edited and what I’ve changed, and then moving to a new computer and having to learn to do it all over again. I like how in NixOS that’s all in a single documented config file.

                                                                                                                      Also nix-shell is really neat, I like keeping my environment clean so being able to open a shell with a program or library I need in a specific moment (or when I’m developing) and knowing it won’t be there anymore when I close it is great.

                                                                                                                      Only wart is that if you download a random binary and try to run it chances are it won’t work and you’ll have to mess with patchelf to make it run.

                                                                                                                      1. 1

                                                                                                                        Okay I may just have to get started sooner than later. Thanks for the caveat about ‘patchelf’.

                                                                                                                  1. 2

                                                                                                                    The world needs another open-source shared-memory IPC library. Getting the locking right is no easy task. There is a ton of use for this and you’d think there would be more open-source ones than there are, which leads me to believe there are a lot of proprietary solutions walled off. Hopefully, others will help out with the cause here. Definitely going to play with this when I can. I need that walk-thru in the article because I’m not a C++ programmer. I shelved a project because I couldn’t find a shared-memory IPC library that worked for my use case and was understandable.

                                                                                                                    1. 3

                                                                                                                      Hey, I’m the author of the post. Currently working on ironing out a few bugs in the library and improving performance. I’ll write a detailed post about the library soon. You can check out the library here. It currently supports pubsub transport of C++ object using msgpack, and I’m working on adding RPC support. Let me know if you run into any trouble.

                                                                                                                      In the meantime, if you want a great IPC lib for Windows, you can check out Microsoft’s IPC, and for Linux I found YAIL.

                                                                                                                      1. 2

                                                                                                                        I’ll keep my ear to the ground. Thank you.

                                                                                                                    1. 8

                                                                                                                      The writer’s ability to reasonably explain this in very simple terms for everyone is remarkable. It’s a sign of having a good understanding of the domain. Seems obvious now but someone could have made that way more complicated.

                                                                                                                      1. 9

                                                                                                                        Yeah Steve Klabnik is awesomely good at this. I’m pretty sure he wrote or co-wrote the original “Rust for Rubyists” as well.

                                                                                                                        1. 5

                                                                                                                          Yes he did and that turned into the official Rust book, which he co-authored with Carol Nichols.

                                                                                                                      1. 2

                                                                                                                        Another point is that StackOverflow answers in functions, methods, or snippets. We generally code in modules. At best, user will provide stripped down modules into a minimal viable example that can be ran (like on a code playground). However, you can’t precisely match your module with that. Hence we must search. That mismatch fundamentally drives duplicates in perpetuity. Other than that, I 100% agree with the author.

                                                                                                                        1. 1

                                                                                                                          Maybe start asking “What’s a more up-to-date way of doing X?” or “What’s an alternative way to doing Y?”.

                                                                                                                          1. 4

                                                                                                                            The author is very passionate about his work. And I like the chart of loc in languages that the author wrote over the years. I think it’s a trajectory that many GenX and late millennial functional coding converts share. Curious, are there any Clojure lovers that work concurrently in a non-functional language that they also love? Like the loc chart shows, my experience is that most don’t willingly code in more than one major language in general.

                                                                                                                            1. 3

                                                                                                                              Having used Clojure for years (and Java before that), I’ve rather been enjoying Kotlin. It has enough functional coding constructs (and embraces immutability) that it feels rather similar, in some ways.

                                                                                                                              I use both languages at home and at work.

                                                                                                                            1. 4

                                                                                                                              It’s the age old debate between Socratic thinkers and Aristotelians. Functional programmers impose their model on to a computer and the world. Pure functions, ideally, with no regard to actual hardware if they can help it. Aristotalians put the hardware first, making abstractions to model the hardware for human use.

                                                                                                                              1. 7

                                                                                                                                This analogy only works if you consider computer architecture to be somehow “natural”. Only software people could ever think that way; computer engineers would find that perspective quite amusing. They generally optimize their designs for existing software, so there’s a feedback loop in place. Computer architectures specifically designed for functional abstractions have been proposed, but the economics of hardware manufacture are not favorable for experimentation. So functional language designers have, quite consciously, mapped their abstractions onto features provided by available hardware. A couple of links:

                                                                                                                                1. 1

                                                                                                                                  Good point about the feedback loop. I meant it more in the way that electrical engineers must optimize by caching memory to reduce latency for read/writes. Alan Turing or Von Neumann didn’t invent latency as a design choice. Ideally, there would be no latency anywhere in computer hardware. Abstractions such as async are invented to work with the nature of latency. Working with the ‘cards we were dealt’.

                                                                                                                                  Thanks for sharing the links.

                                                                                                                                  EDIT: To drive home my point, I envision some lisp or some functional language of today useable on hardware of today and the future. Uncle Bob has a good point about Clojure. I can’t say that about Python and others. Look how many environments lisps can live on, all while giving you powerful high level tools. Functional languages are more ‘eternal’ in form than procedural languages. Hence my comparison of Socrates and Aristotle.

                                                                                                                              1. 2

                                                                                                                                Doing some coding exercises - and some mentoring - on exercism.io

                                                                                                                                Still not having fun with Rust. Does it ever become fun?

                                                                                                                                1. 2

                                                                                                                                  My take: (NOT a Rust fanboy!) - it depends on whether or not the problems you enjoy solving are the kinds of problems that benefit from ultra fine grained control and the performance wins you get from being much closer to the metal in terms of memory management.

                                                                                                                                  I don’t personally find it all that enjoyable to work in, but that’s not an indictment of it at all, it’s about me. I enjoy working in programming languages with a much higher level of abstraction like Python, Ruby, and the like.

                                                                                                                                  1. 2

                                                                                                                                    It was kinda painful for me just doing excercises and reading the rustbook and whatnot. It’s enjoyable now. Working on actual projects made it sink in for me.