1. 29

    Is fish amazing or is it just that bash is so primitive that we are are easily impressed by simple features?

    1. 40

      Fish’s slogan is “finally, a command line shell for the 90s” for a reason

      1. 11

        I love it. This kind of attitude actually makes me more inclined to try it.

        1. 7

          It’s a bit optimistic, given that fish is still not as good as the transcript panel in Smalltalk-80, running on an Alto in 1980s. There’s a similar reason that I’ve used ‘dragging the computing industry kicking and screaming into the 1980s’ as a subtitle for a lot of talks I’ve given in the last few years.

          1.  

            “The 1980s are here. They’re just not evenly distributed.”

        2. 2

          Yes?

        1. 110

          Independently of what burntsushi decides, I think that the following concrete actions would be in order:

          1. Remove the last half-sentence of the banner that explains how to delete your account. Having it as the last part of the message adds a lot of weight ot it: after you read the banner it’s the main thing you remember, the oddly detailed explanation of how to erase yourself.

          2. Reformulate the rest of the banner to indicate that this is a heuristic that may be wrong. It’s important when providing hints from data to tell people explicitly that we know the hints may be wrong. Otherwise it feels very different.

          Let’s rephrase this banner with the explicit goal of doing no harm (better, doing good) when it is wrongly displayed, instead of thinking about the formulation when its assessment is correct.

          1. 59

            Speaking as somebody who’s gotten that banner basically permanently on their account, I think a lot of folks here may be missing important context:

            • The call to delete your account makes a lot of sense if you have to handle users dramatically declaring, in DMs/IRC/elsewhere “One more and [clutches pearls] I shall leave, forthwith!”. This is tiresome from a moderation standpoint and annoying for a community, and if one can nudge somebody into removing their account–in the common case!–rather than continue to engage in a community they don’t fit into (for whatever reason), it’s a win for both parties.
            • This isn’t some randy sketchy heuristic–the warning links directly to a histogram that shows where you are in the flaggings. It’s deterministic, it’s impartial, and if you’re getting flagged a lot there’s something going on with either your posting or the community.
            • Moderation team here is currently basically just @pushcx. It’s a large community with real, actual bad actors, and asking for any sort of increase in manual moderation is a very real burden.
            • One of the biggest reasons for Lobsters coming from the orange site was @jcs being annoyed at opaque moderation. While I might disagree certain particular actions, there is a public log. The thing here being complained about? It’s in the source code, it’s very clear how it works, and it provides impartial, statistical feedback about what’s going on.
            • There’s a trend for folks to go on IRC, Twitter, or wherever and talk trash about our community, about how @pushcx is powertripping, or whatever. This behavior probably plays well with the circles they’re familiar with and probably feels like punching up, but it’s gotta suck for the person who manages the community to have people he’s tried to work with and accomodate throw it back in his face.
            • People are really flag-happy, and this is what happens when you are.

            (Minor annoyance: we used to have a very good explanation of how to use flags, what borderline cases looked like, and so forth, but that was purged for whatever reason. I’ve seen a lot of bad flagging by either new folks who don’t know better or users with an axe to grind.)

            1. 35

              Moderation team here is currently basically just @pushcx. It’s a large community with real, actual bad actors, and asking for any sort of increase in manual moderation is a very real burden.

              This bit deserves signal boosting IMO.

              Lobsters doesn’t cost anything to join or participate in. The people who run it are clearly doing it for love, not money.

              Speaking for myself I’d much rather get past the momentary ouch of having a red warning message attached to my account than have the owners or moderators rage quit as a result of feeling UTTERLY drained by the experience.

              I’m watching the life get sucked out of some very stalwart well meaning people in another community I care about simply due to the sheer VOLUME of constant negative feedback, so I think we all owe it to the mods to suck it up and cut him/them some serious amounts of slack.

              1. 22

                <3 Thank you very much.

              2. 24

                (Minor annoyance: we used to have a very good explanation of how to use flags, what borderline cases looked like, and so forth, but that was purged for whatever reason. I’ve seen a lot of bad flagging by either new folks who don’t know better or users with an axe to grind.)

                I would love to see this come back in some form. As someone who joined after that was removed, I feel there isn’t enough information about flags. Every single time I’ve ever flagged something, I’ve been really hesitant because I wasn’t able to find any guidance on what qualifies to be flagged.

                1. 3

                  I agree. I actually don’t think this is so minor on its own though I can see why you phrased it that way in its original context.

                2. 23

                  I realize I’m not as active as I might be - I’m bipolar, my ability to spend time on things comes and goes - but I promise that I do still pay active attention to the site and step in when it seems warranted. Also, the mod team has lots of discussions behind the scenes. Just because @pushcx is the face of a decision doesn’t mean the rest of us aren’t involved.

                  I felt I should address that, since you mentioned it.

                  Edit to add: Thank you for the kind words, overall. It’s helpful to know that you and others do see the point of the banner.

                  1. 22

                    People are really flag-happy, and this is what happens when you are.

                    Speaking from experience as someone who’s moderated some decent-sized subreddits – where reddit has both the ability to downvote, and a separate ability to “report” for posts/comments that break subreddit or site-wide rules – this is absolutely the case. The number of people who just spam-click the “report” button thinking it’s some sort of super-downvote that will remove the thing they dislike is astounding. Same with people who periodically decide they just don’t like some type of content even if the subreddit generally allows it, and go mass-report a hundred posts to express their displeasure.

                    1. 11

                      Yeah, this is what I think is fundamentally the issue. A lot of people simply have no emotional control. They have strong believes but no ability to defend them. With that, when they see opinions they dislike, instead of engaging with a retort, they will use the report button. Perhaps in their mind, if the post was deleted, then the opinion no longer exists or is somehow invalid???

                      I have gotten the banner too. I thought the words were harsh. But over the years I have noticed that some of my posts will follow the pattern of (+10 upvote, -8 troll), except the troll downvote count has increased over time. Based on this I assume that the general ratio of people on this site who like to report opinions they don’t like as troll versus people who are willing to engage in intelligent discussion has increased.

                      People simply think people who disagree with them are either stupid, or trolling (deliberately saying stupid things hoping for a reaction) or both.

                      1. 12

                        A lot of people simply have no emotional control. They have strong believes but no ability to defend them. With that, when they see opinions they dislike, instead of engaging with a retort, they will use the report button.

                        It’s also true that people sometimes repeatedly post tired nonsense, and that merely (and at obviously low cost) repeating something that’s poorly researched, or broadly offensive, doesn’t entitle the poster to a vigorous debate. Sometimes the use of a flag is the only viable option.

                        1. 4

                          If somebody posted some tired nonsense then it should be very easy to dispute.

                          doesn’t entitle the poster to a vigorous debate

                          You don’t have to reply. The issue here isn’t whether or not to reply but whether or not reporting is an appropriate response to somebody saying something that you think is wrong and the answer is no.

                          Sometimes the use of a flag is the only viable option.

                          Anybody could deem all your posts ‘tired nonsense’ and just report all of them? That is as legitimate as when you do it. Do you somehow think that your idea of what is tired nonsense is universal and therefore a good metric for when a post should be reported?

                          1. 8

                            If somebody posted some tired nonsense then it should be very easy to dispute.

                            In the case of trolling, the whole point is to trick people into taking the bait, which I believe moves the subthread higher up in the scoring ranks.

                            You don’t have to reply. The issue here isn’t whether or not to reply but whether or not reporting is an appropriate response to somebody saying something that you think is wrong and the answer is no.

                            I think that detecting trolling is a skill that’s pretty key to the survival of a community, but a good troll will make it quite difficult to resist engaging. Trolling isn’t commonly overt, over the top rudeness. Way more often it is an attempt at looping other community members into a “debate” that ends up in people pointing edgy and charged hot takes at each other.

                            In its worst form, it will promote socially harmful conclusions through pseudo-from-first-principles lines of reasoning that are aesthetically attractive to the type of people that visit tech forums. To dispute requires dissecting phony arguments, which at a glance, appears to legitimize the “debate” and grant the troll a certain level of community approval, especially if they’re good at giving off the appearance of rationalism. IMO ignoring and flagging this type of content is nowhere near what’s required fully address it.

                            1. 3

                              How are you not using an accusation of trolling as a free ‘You lose’?

                              How do you know that something is true? It is via putting your ideas up for others to engage and debate. But you want to simply circumvent that by calling opinions you don’t like trolls, and then saying that those opinions don’t even need to be debated or engaged because that will legitimise it.

                              Sooner or later instead of having attacking each other’s ideas so we can improve then, all we will end up doing is claiming the other side is ‘trolling’ so they are immediately wrong and don’t even need to be disproven.

                              Why even bother defending your ideology against opposition, when you can simply claim the opposition is a foreign spy or a mentally ill person and then getting rid of them?

                        2. 5

                          I have gotten the banner too. I thought the words were harsh. But over the years I have noticed that some of my posts will follow the pattern of (+10 upvote, -8 troll), except the troll downvote count has increased over time. Based on this I assume that the general ratio of people on this site who like to report opinions they don’t like as troll versus people who are willing to engage in intelligent discussion has increased.

                          Or maybe you’ve gotten more and more trollish over time.

                          1. 5

                            Or maybe we have too many politically driven ideologues who are not interested in communication and they simply throw the word troll around to avoid having to engage with their opposition on the idea plane.

                            1. 9

                              Nah, I’ve been around just about as long as you have, I can count on one hand the number of times I’ve not seen you be a troll in a thread. I don’t even know what technical subjects you have expertise in, since I’ve never seen you contribute technical insight to a thread. Pretty much all you do is get into fights around here.

                              1. 3

                                Devil’s Advocate: Perhaps @LibertarianLlama is among a new breed of Lobsters who are also concerned with the human side of things, not just the technical one.

                                1. 2

                                  I’ve not seen you be a troll in a thread

                                  I suppose you are one of those people who have a very low margin for what constitutes ‘trolling’.

                                  I don’t even know what technical subjects you have expertise in, since I’ve never seen you contribute technical insight to a thread.

                                  I didn’t realise technical expertise in a subject is a requirement of using this website. Regardless you can just assume that I have no expertise in any subject.

                          2. 6

                            I wonder if a literal “super downvote” button would work as a psychological trick. It would act as a normal downvote, but just look like a bigger, angrier button that would absorb more anger from whoever clicks it. (At the same time, possibly rate-limit the actual report button per user…)

                            1. 8

                              That’s a pretty cute idea. I’m tempted to say that, for people who have the self awareness to realize that what they mostly need is catharsis, I recommend getting it from their favorite action videogame, or a trip to the gym or whatever… I don’t want to dismiss your idea though, it’s true that it could help to have some sort of reminder or prompt to seek catharsis.

                              1. 3

                                Edit: someone has looked at the system and much of this is actually already automated(!): https://lobste.rs/s/zp4ofg/lobster_burntsushi_has_left_site#c_qiipbc

                                Previous:


                                OK, another cute - or hopefully even better - useful idea:

                                I think HN has a pr account setting that ignores flag from that user, I’m fairly certain dang has mentioned at some time that one should be careful with flags. (Now that I think about it it might have been the vouch option he was writing about.)

                                I’m not really sure how it would work with perfectly transparent moderation:

                                • would the user get a warning?
                                • or would it just show up in the moderation logs?
                                • maybe it is a fraction so if a user has 1/5 flag weight it takes more than 5 such users to flag before it counts as one ordinary user? Then the moderation log could still say “flagged based on user feedback” or whatever it say but omit the details about there being 10 flag abusers counting as two full votes and 3 ordinary users?
                                1. 11

                                  Good thoughts. On Lobsters, if I know that a user is going to continue using flags vindictively, I would rather just ban them… of course, I’d talk to them first.

                                  Automation in this sort of thing can be a false savings because if we set up a certain automated rule, we are implicitly sending the message that any behavior that falls within the rule is allowed. So in your example, I would expect to see users who intentionally stay just below the threshold for having their flags de-valued, as well as users who intentionally go past the threshold and flag in a wanton manner because they know that the punishment for doing that is just that their flags will have less numeric weight. Having it be a socially enforced rule, counterintuitively, can often lead to better behavior overall compared to having a technical enforcement mechanism.

                                  1. 1

                                    Good thoughts. On Lobsters, if I know that a user is going to continue using flags vindictively, I would rather just ban them… of course, I’d talk to them first.

                                    Automation in this sort of thing can be a false savings because if we set up a certain automated rule, we are implicitly sending the message that any behavior that falls within the rule is allowed. So in your example, I would expect to see users who intentionally stay just below the threshold for having their flags de-valued, as well as users who intentionally go past the threshold and flag in a wanton manner because they know that the punishment for doing that is just that their flags will have less numeric weight. Having it be a socially enforced rule, counterintuitively, can often lead to better behavior overall compared to having a technical enforcement mechanism.

                              2. 5

                                The moderators of r/TheMotte (a subreddit which has the best moderation IMO) observed pretty much the same:

                                No one who has seen a mod queue would be surprised by this. Even those of you who are always very calm and nonconfrontational, with middle-of-the-road opinions, might be shocked how often your posts are reported. Some of the most reasonable, unspicy posts get marked as “It’s targeted harassment.” Some people will report “Inflammatory claim without evidence” just because they don’t agree with the post.

                                I pretty much started brushing aside (like several other users reportedly do) the red warning that lobste.rs throws in your profile for this reason, as well as for that condescending final phrase “Reconsider your behaviour or take a break” which rests on the erroneous assumption of there incontrovertibly being sound rationality in this community’s flagging behaviour.

                                I have a theory that this became worse after the site removed the downvote functionality thus removing a potential anger-outlet for users, who have now shifted to channel that affective energy via flagging. This theory however can only confirmed by doing a simple analysis of the data (was there an increase in flagging right after disabling downvoting?)

                              3. 12

                                It’s irrelevant that it is impartial if it is exploitable. Which it very much is.

                                So the system allows for a mob to harass an user into leaving the site, but you claim that it is important to note that anyone can be harassed. That is the matter subject to challenge here, not “important context”.

                                Yes people are trigger happy, for that reason, the flagging feature might be counter productive.

                                1. 5

                                  you claim that it is important to note that anyone can be harassed.

                                  I’m not sure I see where you got that from my post.

                                  The ability of the mob to harass users here exists, and is exploited, at scale and quite apart from this notice that “yo, you’re getting a significant number of flags.”

                                  It doesn’t make sense to optimize for people who run away when told others disagree with them.

                                  1. 21

                                    No one wants to be told they don’t belong here. I really enjoy Burntsushi and a system that is constructed that make it so people like that dont want to be here is a system that needs to be fixed.

                                    Your response of “I don’t want people with a thin skin”, is itself thin skinned in the opposite direction.

                                    1. 6

                                      OK I see an important distinction here. I tried to point this out to burntsushi on Twitter.

                                      If you read the message he got VERY carefully, it sets forth a very specific sequence of potential and suggested routes to mitigation. They are:

                                      1. Take a breath. Take a break. Step away for a bit and think about whether maybe the problem might exist at least partly in your head and the resultant behavior you’re exhibiting in the community.

                                      2. Talk to a moderator about the situation.

                                      3. Then, and ONLY then, does the message point out that you can if you so choose also delete your account.

                                      Having gotten the big red warning myself a ways back, I DO sympathize that it’s an ouchy thing to have happen in the moment, but I strenuously believe that the intent here isn’t to make anyone feel unwelcome. Just the opposite, my read of the intent is an earnest attempt on the part of the community to help people moderate their behavior, and if that’s not possible or applicable, to seek other options for mitigation.

                                      1. 11

                                        No one wants to be told they don’t belong here.

                                        I’d agree, but we have done very poorly by some of our users in that regard already and the mob likes it that way. Remember that time recently the mods banned one of (if not the) current expert on evidence-based software engineering because of an off-hand comment touching culture war stuff? Peppridge farm remembers.

                                        There are no shortage of Lobsters who will clack and freak out if made aware of anybody who doesn’t appear to be in their political tribe–and they’ll get even angrier if you suggest that maybe, possibly, we should focus on something else.

                                        So, while I agree in principle with you, the community has through its actions demonstrated that it does not care.

                                        Your response of “I don’t want people with a thin skin”, is itself thin skinned in the opposite direction.

                                        I don’t believe that it is. You are, of course, welcome to your own interpretation.

                                        1. 14

                                          Remember that time recently the mods banned one of (if not the) current expert on evidence-based software engineering because of an off-hand comment touching culture war stuff?

                                          IIRC he had a pattern of problematic behavior, and also I’m not sure how much of an expert in ESE he actually is: his book is overwhelming, but keeps giving me bad vibes. I’m struggling to explain what it actually is, but I’m really suspicious that there are serious problems with it.

                                          1. 1

                                            I’d definitely be interested to hear more.

                                            I’m struggling to explain what it actually is

                                            Mind giving it a try? I couldn’t see anything particularly bad (relatively speaking) in their comment history, nor anything related to the ban rationale. Seems like you’ve been paying more attention, haha

                                          2. 14

                                            There are no shortage of Lobsters who will clack and freak out if made aware of anybody who doesn’t appear to be in their political tribe

                                            The basic problem with statements like this is that nearly everyone can feel it applies to the angry mob that’s disagreed with them.

                                            Personally I’m on record as believing that there is no way to separate “politics” from what we do (simple example 1, simple example 2) or to write software without considering the impact it will have on people.

                                            But I also see plenty of “oh woe is me, the cancel culture and the woke and the leftist and the SJW are taking over” stuff that gets left in place and even highly upvoted, which says to me that it’s not that people don’t want “politics”, it’s that their definition of what is and is not “politics” is at issue. The hypothetical guy (example 2 above) with no criminal record who can’t get bail because the system could only store his name as a bunch of “aliases” is “politics” to me, but apparently not to many other people (it’s just “falsehoods programmers believe about names”), while holding a software project’s leader accountable for misbehavior is “politics” to many of those people and common sense to me. A staggering percentage of actual “political” fights really are that sort of thing.

                                            1. 3

                                              But I also see plenty of “oh woe is me, the cancel culture and the woke and the leftist and the SJW are taking over” stuff that gets left in place and even highly upvoted, which says to me that it’s not that people don’t want “politics”, it’s that their definition of what is and is not “politics” is at issue.

                                              I mean the proof is at hand right? A “let’s not discuss politics” non sequitur as successful troll.

                                              1. 0

                                                But I also see plenty of “oh woe is me, the cancel culture and the woke and the leftist and the SJW are taking over” stuff that gets left in place and even highly upvoted

                                                I don’t think I’ve ever seen this on Lobsters, only on others sites. Do you have any examples?

                                              2. 1

                                                I think we disagree about what it means to be thin skinned. I thought you were admonishing the people who leave into toughening up. If that is the case, I think it will lead to either an echo chamber or a dungeon of trolls or both.

                                                But based on your other comments, I don’t think you meant what I interpreted.

                                                You in this context means, us, or the offended user that flags people into quitting. How about we make flags public and you can only spend them in certain ways? Do comment points even mean anything? There is a huge distinction between “this person is harmful” and basically anything else. if someone is harmful, they should be removed. Otherwise … if you don’t want to see their posts, then that would be a personal choice.

                                                1. 2

                                                  Making flags public is a terrible idea.

                                                  1. 2

                                                    I agree. I DO think that people here are overly trigger happy with the flagging, but given other comments in this thread I’m willing to believe this is simply human nature at plan and unavoidable. Making flags public would be in effect shaming someone for trying to make a small contribution to the community by flagging a post.

                                                    1. 2

                                                      I feel that maybe 60% of flags are not trying to contribute to the community, but rather to avenge themselves, or to have an outlet for disagreement without having to engage. It’s part of the problem with the Internet at large: for digital natives, disengagement is no longer an option. People can’t just ignore stuff they disagree with; they have to respond to it, and if it’s a troll, they shouldn’t engage directly, so they instead engage indirectly by flagging. There’s a reason why Twitter’s first option when reporting is “I disagree with this”. It’s just human nature.

                                                    2. 1

                                                      Because? Without justification your statement is opinion, what am I to do with that?

                                                      1. 1

                                                        Because it can lead to retaliatory, tit-for-tat flagging of the flagger’s comments. Mods can already see who flags what and can take action against those who misuse it.

                                                2. 2

                                                  a system that is constructed that make it so people like that dont want to be here is a system that needs to be fixed.

                                                  Who are “people like that”? To me, this sentence seems to extrapolate based on a single data point, which is based on some observations of another person. That is to say, we don’t know Burntsushi well enough, and maybe no matter how we setup the system, he would find something to quit. And striving to optimize for one would put burden and alienate others.

                                                  1. 5

                                                    people like that

                                                    Hardworking, smart, helpful, writes a lot of great Rust. Reddit and github

                                                    I am talking about specifics not a generalized idea of a Lobste.rs user.

                                                  2. 0

                                                    Since that person left, I’m not getting a flag on every single of my comments anymore.

                                                    An interesting coincidence. ¯\_(ツ)_/¯

                                                    1. 0

                                                      Obligatory “correlation is not causation”.

                                                  3. 5

                                                    That is the problem right there. It.s not a “disagree” link, it’s a “flag” link. Obviously, looks like there are people abusing it because they disagree with something rather than unacceptable behaviour being reported.

                                                    Personally, I wouldn’t take it too seriously much less posting on other websites about it. But it is rather shitty to be told to take a chill pill just because one’s opinion is not widely accepted.

                                                    1. 1

                                                      Accounts with low “karma” can’t downvote but can flag. Perhaps this needs to be looked at..

                                                      1. 6

                                                        There are no downvotes, only flags.

                                                        1. 2

                                                          TIL. I stand corrected

                                                          1. 1

                                                            Thanks for clarifying this. I was wondering where the downvote links were.

                                                            1. 4

                                                              iirc the downvotes were the flags, just with a downvote arrow instead of being hidden.

                                                      2. 3

                                                        It doesn’t make sense to optimize for people who run away when told others disagree with them.

                                                        I think discourse is improved when all participants feel safe. Then instead of spending energy in handling negativity emotionally, they can make better arguments. Moreover I don’t want to see valid viewpoints shut down due to mob shouting. I think human discourse works well with a variety of opinions.

                                                        1. 16

                                                          I think human discourse works well with a variety of opinions.

                                                          I agree!

                                                          I think discourse is improved when all participants feel safe.

                                                          The problem we’re seeing in the last several years is that there are people who will never feel safe, at least not without massive sacrifices from everybody else in a community, often including systematic self-censorship and topic avoidance. The great online community question of the age is how to strike a balance between being welcoming and letting your demographics become taken over by–for lack of a better way of putting it–people who are not robust enough to survive or flourish in a sufficiently diverse/hostile memetic ecosystem.

                                                          1. 9

                                                            people who are not robust enough to survive or flourish in a sufficiently diverse/hostile memetic ecosystem

                                                            I’m not sure what kind of online future you’re envisioning but I don’t want any part of it.

                                                            1. 15

                                                              An (only slightly contrived) example:

                                                              You run a message board that hosts tech content.

                                                              On one extreme, you tell everybody “hey, we want you here! everybody is super nice and you’ll never be criticized!”.

                                                              After some period of time, you end up with a bunch of users of C and a bunch of users of Rust.

                                                              Some of those users cannot bear any perceived slight of their chosen language. There are C people that go off in a tizzy if anybody points out the memory safety issues in C, and there are Rust users that freak out if anybody complains about long compile times. The house rules–because remember, we’re optimizing for welcoming and that means supporting everybody, no matter how thin-skinned they are!–end up including “Never talk about shortcomings of another language.”

                                                              Since engineering is all about tradeoffs, and since no language is actually good for all things, strict adherence to this rule ends up with only the most optimistic and vapid discussion–worse, it infects other topics. It’s really hard to explain why you might like immutability for concurrency if you can’t talk about memory safety issues because you’ll trigger the C programmers. It’s really hard to explain why you like dynamic or interpreted languages if you can’t talk about how much long compile times suck because you’ll trigger the Rust programmers.

                                                              On the other extreme, you tell everyone “hey, we talk about tech and things on their own merits here, and if you can’t stand commentary that offends, fuck off!”.

                                                              Our C users and Rust users come in.

                                                              Some of these users are just assholes. There are C programmers that strictly use bizarre sexual analogies for anything involving pointers, there are Rust coders that sign all of their posts with Holocaust denial, frequently threads devolve into seeing who can outlast who in massive shit-slinging, and in general a sport is made of making miserable and hazing anybody who won’t stick around.

                                                              Obviously, there will be users who would be knowledgeable assets to this community but who are squicked out by this stuff and leave. There are other users who can put up with the rampant nonsense but who don’t want to spend the cycles required to weed through the bullshit to talk about what they want. Over time, the community stagnates unless it can find a way of attracting and retaining new users, and odds are that’ll be based on its reputation for no-holds-barred “discussion” rather than actual technical insight…this userbase will also skew towards younger folks who have a deficit of experience and all of the time in the world to share it. This is, incidentally, how /g/ works.

                                                              ~

                                                              I’m not sure what kind of online future you’re envisioning but I don’t want any part of it.

                                                              My point isn’t to advocate for one or the other, but to point out that it’s a central question of community.

                                                              It’s also a question whose answer shifts over time, as groups tweak the trajectory of their tribe.

                                                              1. 8

                                                                Some of these users are just assholes. There are C programmers that strictly use bizarre sexual analogies for anything involving pointers, there are Rust coders that sign all of their posts with Holocaust denial, frequently threads devolve into seeing who can outlast who in massive shit-slinging, and in general a sport is made of making miserable and hazing anybody who won’t stick around.

                                                                And there’s a pretty easy way to fix that – kick ’em out. There are communities which do that.

                                                                Because as the saying goes, there are two ways to be a “10x programmer” and one of them is to have such an awful effect on people around you that they drop to 0.1x their prior productivity while you stay average. And even if someone really is “10x” (whatever that means) on some aspect of technical skill or knowledge, it’s still likely to be a net loss to put up with “asshole” behavior from them.

                                                                1. 2

                                                                  This is good advice and knowledge for me as I try to build one or more Open Source communities. I think you are correct that such communities should have no room for such users.

                                                                  1. 1

                                                                    For the purposes of that thought experiment, we take the position in the second case where we do not eject members for being assholes.

                                                                2. 3

                                                                  I saw another attempt at creating a HN clone go down a few years ago, not because of flaming or lack of interesting users but because some early users decided they and everyone else decided they needed to be much nicer than HN.

                                                                  I quit commenting soon after.

                                                                  You can check my comment history, I’m not at rude person but those rules made me feel unsafe. I started carefully considering each word. Then stopped posting,

                                                                  I wasn’t the only one. The “super nice” crowd didn’t have anything else to contribute and the site was down a few months later.

                                                                  1. 8

                                                                    Honestly, one of my main issues with HN has always been the focus on superficial civility. You can be an absolute horrendous awful drive-others-away-in-droves trainwreck of a poster there so long as you do it the “right” way. And you will be valued and rewarded for it.

                                                                    A real “anti-HN” would care less about those superficial aspects and more about dealing with the actual trolls and assholes.

                                                                3. 4

                                                                  people who are not robust enough to survive or flourish in a sufficiently diverse/hostile memetic ecosystem

                                                                  Perhaps I don’t see this as an issue. I believe, in my ideal community (where I’m stressing “ideal” because it’s probably not practically realizable), that any commenter with a good-faith argument should feel empowered to make that comment, even if others in the community viscerally disagree. There are two problems at hand here, one is defining what “good-faith” mean and the other is protecting arguments from being shouted out. When it comes to “good-faith”, due to the nature of human ideology, there will be disagreements. In my mind, the easiest way to come to a consensus on what “good-faith” means is to clearly define it. This is why I’m a fan of Code of Conducts. They lay bare what a community considers “good-faith”, so the minimum bar of participation is met. Ideally the CoC would change infrequently and have community buy-in so that it acts as a minimum bar to entry.

                                                                  Ideally (again the ideal here not the practice, probably), we can create a community where there is no hostility after agreeing to “good-faith” rules. It’s one thing to enter heated discussion, but I’m hopeful that a community can use its own moderation tools to ensure that a heated discussion does not turn hostile.

                                                                  I just don’t see a world where diversity and hostility are equivalent.

                                                                  1. 1

                                                                    When it comes to “good-faith”, due to the nature of human ideology, there will be disagreements.

                                                                    I make good-faith arguments all the time that seem to fall into the class of bad-faith arguments that @bitrot points out, so I get what you’re saying.

                                                                    I just don’t see a world where diversity and hostility are equivalent.

                                                                    In the interest of naming things, it seems what’s under discussion is the paradox of tolerance. I’d link to Wikipedia, but it seems it’s a Marxist idea, which I know not everyone would be comfortable with 😄


                                                                    At some point, I think you just have to go by how things seem. Which is a shame, because that makes it a game of “survival of the fittest”, where those who are best at branding, or putting things “the right way” to seem good to other people, survive; while those who are prone to misrepresenting themselves, or discussing “untouchable subjects” such as the example in @friendlysock’s comment, are booted out.

                                                                    1. 2

                                                                      In the interest of naming things, it seems what’s under discussion is the paradox of tolerance. I’d link to Wikipedia, but it seems it’s a Marxist idea, which I know not everyone would be comfortable with 😄

                                                                      Indeed, I am familiar with the Paradox of Tolerance. My hope is that a CoC or otherwise similar guiding document or constitution would provide a floor on tolerance, but everything beyond that would be tolerated. Not only does that set community baseline rules but it keeps rules distinct, clear, and constant. There’s a reason many real, representative governments go through due process to change laws.

                                                                      At some point, I think you just have to go by how things seem. Which is a shame, because that makes it a game of “survival of the fittest”, where those who are best at branding, or putting things “the right way” to seem good to other people, survive; while those who are prone to misrepresenting themselves, or discussing “untouchable subjects” such as the example in @friendlysock’s comment, are booted out.

                                                                      Perhaps the conclusion I should arrive to is that direct democratic (e.g. “upvote” and “downvote”) discussion sites just lead to dynamics that create and sustain echo chambers. I’m not sure, it’s certainly something I’m mulling about myself.

                                                              2. 2

                                                                when told others disagree with them.

                                                                But that’s not what flagging tells you… If you’ve been doing everything alright, it tells you that others who disagree with you have leveraged a system unrelated to disagreement to make you look unreasonable, unkind, and/or trollish.

                                                              3. 4

                                                                I’d be interested in learning if mods have any way to detect brigading, possibly such as by looking at correlations in users who consistently flag the same comments.

                                                                1. 13

                                                                  Yes, we do. If you look at the mod log you will see that people are banned for this practice now and then. Don’t do it.

                                                                  1. 1

                                                                    I’m not sure why you needed to admonish me like that at the end. I wasn’t probing your defenses. I was merely going to suggest this if you didn’t have it.

                                                                    No need to reply, I know this is a tough time for all the staff.

                                                                    1. 7

                                                                      Sorry, I should have been clearer that I wasn’t directing that at you in particular. I know you were trying to help.

                                                              4. 8

                                                                Preface: I don’t have his comments handy and am just looking at the system. Despite this I will be embarrassed if it turns out he was actually making an enormous mess 🤣

                                                                Also want to add whoever worked on the existing system clearly put a lot of thought into it (e.g. factoring in flags on multiple stories, percent-flagged, and limiting to N users all seem wise, and thought went into the message). Probably no fun to see someone armchair quarterbacking with much less time thinking about the problem space than they have. Hope this at least crosses the threshold of possibly useful.

                                                                The thing here being complained about? It’s in the source code, it’s very clear how it works, and it provides impartial, statistical feedback about what’s going on.

                                                                It looks like this is it. My guess is if you’re prolific, it’s inevitable you’ll pop over the hard numerical thresholds sometimes and the 10% of comments is the biggest barrier, followed by the top-30 ranking.

                                                                10% of comments seems not that unlikely if 1) your recent comments are seen by lots of people (upvoted, early, etc.), 2) they address things a lot of people disagree about, and 3) some % of folks who disagree will flag, which seems likely as long as flagging is one of the easier ways to express disagreement (more below). You could do something like subtract the upvotes/N from the flag count (lots of fiddly options), just because there isn’t a number that represents visibility directly.

                                                                The top-30 ranking has has the same considerations as flag count, and also if discussion is going well enough, the 30th “worst” person might not be that bad. (Somebody’s the least polite person in a group of absolute diplomats.) The histogram/rank data does seem interesting to expose to the more flagged folks. Given all that, I’m not entirely sure what I think about the wording of the message–definitely already phrased to aim for “stop and consider this” not “you’re a bad actor”, but I can also see how humans get defensive.

                                                                People are really flag-happy, and this is what happens when you are.

                                                                (Added clarifications here in [brackets] after friendlysock’s comment.)

                                                                A nice thing about [the idea of downvotes for simple disagreement, as used on some other sites, is that it lets] people who simply don’t like something say “I don’t like this” without putting noise in the channel that’s used to catch abuse, spam, and so on. I think the dream behind the current system is that not having [no-reason] downvotes leads to a very pluralist site where many people disagreeing (or fewer disagreeing strongly) doesn’t count against a comment as long as there’s no objective problem with the phrasing/on-topicness/etc. Realistically it seems as if without another outlet, some fraction of disagreement will get funneled into the flag system (even just through people looking hard for technically valid reasons to flag) even if you try to discourage it.

                                                                Just as a random thought, you can offer downvotes without treating them as -1 upvote (-0.5 or -0.25 or whatever in a ranking algorithm), or disagree flags that you treat differently from others.

                                                                tl;dr if I guessed at possible tweaks they might be allowing [no-reason] downvotes or disagree flags that have less impact than existing flags, just to keep that self-expression out of the flagging system; look for a way to factor in that being more-read will get your comments more negative attention; and maybe there’s something to do with the message wording, though it’s clearly already had a good amount of thought put in it.

                                                                1. 16

                                                                  A nice thing about downvotes is it lets people who simply don’t like something say “I don’t like this” without putting noise in the channel that’s used to catch abuse, spam, and so on.

                                                                  Yes, I very much agree with this. On Reddit and Hacker News, which lobster.s is modelled after, I think of as:

                                                                  • upvote: “I would like this to appear higher on the page”
                                                                  • downvote: “I would like this to appear lower on the page”

                                                                  Flag is a totally different thing than downvote – it means that the user is abusing the site, and continuing that behavior SHOULD result in getting banned from the site.

                                                                  But expressing minority opinions (thoughtfully) may result in downvotes (*), but it should NOT result in getting banned or encouraged to leave.


                                                                  As far as I can tell, the burntsushi warning was a result of mixing up these signals. I only read a portion of the Rust threads, so I haven’t followed everything, but from what I understand he was probably just expressing some opinions that people disagreed with, not actually abusing the site.

                                                                  So I think you have diagnosed it correctly – the lobste.rs UI is sort of mixing these 2 signals up by omitting downvotes. The “flag” button has 5 reasons, and “off topic” and “me too” should be a downvote, not a flag IMO.

                                                                  Again, the difference between the two is whether continuing the behavior should lead to a ban, and that’s a very important distinction.

                                                                  (Honestly I am surprised that I haven’t gotten this banner ever, given that there is a minority of people who disagree with my opinions on shell. Since I’m writing a new one, I’m opinionated about it, but also invite disagreement)


                                                                  (*) Some people may want opinions they disagree with to appear lower on the page, and some people might not. In my view it’s up to person to exercise that discretion – that’s why you get one vote :)

                                                                  1. 3

                                                                    upvote: “I would like this to appear higher on the page” downvote: “I would like this to appear lower on the page”

                                                                    That’s not actually what they mean on Reddit:

                                                                    Vote. If you think something contributes to conversation, upvote it. If you think it does not contribute to the subreddit it is posted in or is off-topic in a particular community, downvote it.

                                                                    ‘I would like this to appear higher/lower on the page’ is so ambiguous that it leads to different people misunderstanding it and applying it differently.

                                                                    1. 6

                                                                      I’d say that’s a prescriptive definition, but a descriptive one is more useful [1], and thinking about it that way will be more likely to solve the problem.

                                                                      That is, “users don’t read documentation”, and it means whatever the users think it means, and it changes over time. FWIW I’ve been using Reddit since 2007, and HN since 2011 or so, and there’s never complete agreement on what these things mean.

                                                                      I’ve seen the debate about downvote vs. disagree several times over the years on the sites. I choose to sidestep it with the vague definition – that’s a feature! :) It’s OK to be vague sometimes.

                                                                      In cases like this, where the number of flags leads to either banning or encouragement ot leave, I think it’s better not to be vague, and have 2 distinct mechanisms. This isn’t a big change, as lobste.rs had both downvoting and flagging until very recently.

                                                                      [1] https://amyrey.web.unc.edu/classes/ling-101-online/tutorials/understanding-prescriptive-vs-descriptive-grammar/

                                                                      1. 2

                                                                        This isn’t a big change, as lobste.rs had both downvoting and flagging until very recently.

                                                                        I don’t think it had both, rather the flag button just looked like a “downvote” button. You still selected from the same reasons that flag presented. This change is the one that altered the styling I believe. There’s plenty of places that refer to it as “voting” in the code still, but unless I am mistaken there was only ever the one mechanism.

                                                                  2. 7

                                                                    A nice thing about downvotes is it lets people who simply don’t like something say “I don’t like this” without putting noise in the channel that’s used to catch abuse, spam, and so on.

                                                                    So, the purpose of downvotes was emphatically not to express disagreement…it was to signal one of a handful of error conditions (bad information, factual inaccuracy, etc.). There is very little utility in seeing how many people merely disagree about something, especially given how fast people are to be mean to each other.

                                                                    As a historical point, @jcs at one time disabled downvotes. It did not last more than a week or two before it was brought back.

                                                                    1. 11

                                                                      Sorry, I see how it was worded unclearly. I understand that the intention currently is to have no “disagree” button. I’m saying that having that button could reduce how often people flag comments they disagree with as having one of the error conditions, which they might do by by stretching definitions, picking a random reason, or just preferentially noticing real flaggable issues when they happen to dislike the content. (I think the unclarity comes from me using “downvotes” to mean “a no-reason downvote button” as opposed to flags as they exist–I edited to clarify above.)

                                                                      It may be useful to let people push a button for disagreement even if your algorithms assign a low weight to those clicks. I say low weight rather than zero because having a 100%-placebo button in the UI raises other issues, even if moderators give zero weight to an easy expression of disagreement. I’d probably give a no-reason-given downvote nonzero weight in my head but I don’t expect others to adopt my weights.

                                                                      Shorter, the idea is that people sometimes find a way to “downvote” for disagreement however you set up your UI, and you might get a net harm reduction by just giving them the button they want and then deciding what to do with the data.

                                                                      1. 6

                                                                        Ah, so kind of like the buttons on crosswalks?

                                                                        Anyways, thank you for elaborating further. :)

                                                                        1. 4

                                                                          Very well said. Even if the system is not equipped with a “disagree” button, some users may desire one and use whatever means are at hand to express themselves. The phrase, “the purpose of a system is what it does,” comes to mind.

                                                                          If existing mechanisms are not meant for use in disagreements, then we might ask if that is actually how they are being used.

                                                                        2. 4

                                                                          That’s nice, but you can’t make users behave the way you want them to behave, if you’re not going to actively act against it. People not only downvote because they disagree, but they’ll also flag things as spam or off-topic or “troll” just because they disagree, or feel you’ve insulted their particular religious (as in vimacs-vs-spaces) beliefs.

                                                                          1. 6

                                                                            I think I’d prefer a system that discourages misuse of flags. Maybe a similar message for people who flag a lot

                                                                            1. 3

                                                                              Sure, folks determined to game things would still flag. My theory is decently many who flag today are not determined to game things, and would click a down arrow for “just no” given the option. That’d reduce noise in the flag system even though it wouldn’t eliminate it. (And not saying you couldn’t do other changes too.)

                                                                          2. 4

                                                                            in fact, you can have placebo downvotes that show up for the person doing the downvoting but do not affect the vote count otherwise. that would keep (almost) everyone happy, i think.

                                                                          3. 6

                                                                            Agreed.

                                                                            I think it’s fair to discuss whether the wording of the warning message can be improved, but various comments here that pretty much amount to “person X is popular, he should be exempt from the rules” are just tiring.

                                                                            1. 8

                                                                              How is being flagged a rule? It’s not a rule. That is the whole problem.

                                                                              Anyone can flag any comment any time.

                                                                              1. 2

                                                                                Receive too many flags, get a notice. That’s the rule.

                                                                                1. 9

                                                                                  That is not a rule in the sense of rule that can be followed by users. I did’t read a single comment suggesting that shouldn’t apply to some user because of its popularity, but rather many people pointing out that this is a clear case illustrating that such system is broken and should be fixed for all users.

                                                                            2. 5

                                                                              rather than continue to engage in a community they don’t fit into

                                                                              Is lobster a community that accepts a plurality of opinion? If it is, then you will always have people disagreeing with you and therefore be liable to be reported by some of these people.

                                                                              Democracy leads to lynching. Mass reporting is basically the lynching of internet persona. Any kind of automatic penalty that can be initiated via reporting is simply giving power to the angry mob. Autoban and autosuspend based on reports have always been abused.

                                                                              1. 3

                                                                                You’re still here, so evidently the suggestion doesn’t apply to you. You’re glad to contribute.

                                                                                Why not show the warning to flag-happy people? I don’t have stats but I feel like that could be a better indicator of who doesn’t want to be here.

                                                                              2. 21

                                                                                Why do we need this passive aggressive banner anyway? It looks bad for Lobster, not for the person seeing it, and it’s not clear what problem it’s supposed to solve.

                                                                                1. 19

                                                                                  We consistently see the vast majority of bad behavior come from the same few users. There’s a phenomenon, called the normalization of deviance, whereby people whose behavior is far away from the norm often genuinely don’t realize just how far it is. The banner, and the histogram that it links to, are intended as a way for people to self-correct. I personally am a big believer in giving people opportunities for redemption, and the histogram makes the point in a way that mere words can’t.

                                                                                  1. 6

                                                                                    far away from the norm

                                                                                    Far away from the norm doesn’t mean bad. You seem to be assuming that it is.

                                                                                    1. 8

                                                                                      I appreciate you raising that. On the contrary, I agree that sometimes people’s behavior is far from the norm for positive reasons. I do think that, even in those cases, everyone can benefit from a heads-up and a chance to reflect about whether it’s what they want.

                                                                                      1. 3

                                                                                        As in reflecting on do you want to be good when everybody else is bad?? Am I reading that right?

                                                                                        1. 7

                                                                                          Well, yeah. I know for a fact that people have left Lobsters for that reason (or at least, that’s how they see it). While I am sad when people leave, I don’t think anyone is obligated to stay somewhere that doesn’t make them happy. It would be wrong of me to try to trick or coerce people into staying when their free choice, with all the facts available, would be to leave.

                                                                                          I’m not really sure why you’re asking this, though. The flagging system doesn’t have the ability to determine who’s right and who’s wrong. Even if I wanted to take my personal concept of “good” and write code that ignores flags that aren’t “good”, there is no existing technology that can do anything like that. If that’s what you’re advocating for, feature request noted but I’m not able to do it.

                                                                                          1. 3

                                                                                            I’m not really sure why you’re asking this, though

                                                                                            I am not asking anything. I was commenting on an implicit bad argument you made (the implication that the norm is correct). You decided to double down by arguing that even if somebody was correct, they should ‘reflect about whether it’s what they want’. I simply then pointed out that this doesnt reinforce your original argument, because it itself is bad, because having a bad feature (aggressive warning about being reported) is not validated by having that feature also be useful to do useless thing (letting people reflect on whether they should be good, because the answer is always yes).

                                                                                            I don’t think anyone is obligated to stay somewhere that doesn’t make them happy.

                                                                                            Of course not. The point is that assuming that lobsters want a community that engage in meaningful discussion, then it should make people want to stay and be happy, that is a worthy goal. all of this is following your argument for the banner, the argument which I consider to be invalid, as pointed out.

                                                                                            1. 5

                                                                                              Being distant from the norms can hold little moral judgment and yet be relevant when operating in a constructed community.

                                                                                              1. 2

                                                                                                Okay, I guess that’s fair.

                                                                                                I think we disagree about something in there, but it sounds like figuring out what isn’t a high priority for either of us? I appreciate the discussion, anyway.

                                                                                        2. 1

                                                                                          I at least didn’t read that implication into the post. Not all ways of being far from the norm are likely to result in seeing the banner. It isn’t a perfect system but it’s definitely not symmetric, so that assumption isn’t necessarily required.

                                                                                        3. 2

                                                                                          Thanks for clarifying. But I still think it doesn’t make Lobster looks good because this feature implies that “deviant” behaviour should be corrected and can be automatically detected, and I expect most people (especially in tech) aren’t comfortable with either of these.

                                                                                          I’m wondering what’s the worse that could happen if the banner is not displayed? Maybe the person who’s being flagged all the time will get the point and adjust their behaviour, or maybe they don’t need to adjust anything and it’s other people that will start seeing that perhaps that person has a point. I also believe in giving people a second chance but I don’t think the solution to everything has to be algorithms, sometimes simple human interactions are preferable.

                                                                                          1. 4

                                                                                            The hypothesis that motivates the banner and histogram is that, by displaying them, those conversations about what to adjust will happen sooner and be more productive. The goal is to head off situations where somebody doesn’t believe mods when we tell them something needs to change, and they ultimately leave the site. It may be right or wrong but that’s the motivation.

                                                                                          2. 1

                                                                                            Do you think that the banner has an observable positive effect? Do you see a change in behavior from the few users you say produce the majority of bad behavior? As friendlysock says above, they see the banner nearly all the time. Do you think they have been falsely-flagged by this system? If so, can you estimate how high the false-positive rate of showing this banner? If friendlysock has been appropriately warned by this system, have you seen any change in their behavior onsite?

                                                                                            If it is truly only a few users producing undesirable behavior, could it be more effective to simply reach out to those users personally?

                                                                                            1. 4

                                                                                              I’m not going to publicly discuss my personal feelings about specific community members. It wouldn’t be fair to anyone.

                                                                                              I don’t have a methodology to conclusively determine how much influence the banner has had, but the site has a lot less flagging in general than it did a couple years ago. I take that to be an indicator that things have calmed down significantly, and I do think that’s good.

                                                                                              I do reach out to people personally from time to time, as do the other mods. The banner and histogram were created to address a shortcoming in that approach, where sometimes people aren’t willing to listen to criticism unless they’re presented with data that validates it. I’m skeptical of going fully data-driven for everything, but I think it’s nice to have at least this one particular metric for those who find it easier to take concerns seriously when there’s a metric.

                                                                                        4. 20

                                                                                          Additional suggestion to all the previous improvements: make that banner a thing that’s moderator-initiated. I of course don’t have statistics on how many people see it (I never got it, so I just learned about it now, anecdotally) but I could imagine that this is rare enough that moderators could just evaluate sending this message to users by hand after the system flags the user internally.

                                                                                          1. 6

                                                                                            I of course don’t have statistics on how many people see it

                                                                                            I don’t have that statistic either, but as I posted elsewhere, only 13 people have been flagged more than me in the last month and I haven’t seen it. Only 7 people have been flagged 10 or more times. I’d therefore expect that trimming it down to 5 people that moderators need to take a look at per month is quite feasible.

                                                                                            If even that is too much of a load for the moderators, then it might be possible to select a dozen people who have been active recently but not participated in any of the flagged threads to do a triaging pass. At that point, having someone reach out to the person and say ‘you’ve had a lot of things flagged recently, is there anything going on in your life that you want to talk about?’ would be a fairly low load.

                                                                                            1. 3

                                                                                              You can a chart that gives you a clear idea how many people see it at /u/you/standing. So you can see it at /u/david_chisnall/standing and I can see it at /u/hoistbypetard/standing. The red Xs should represent users seeing the warning.

                                                                                              I’d never suggest that someone else should just add a thing to their plate, but it does seem like the kind of thing where, if there were a few active moderators, requiring someone to approve the red box might be an improvement for a relatively low effort. That feels like the kind of statement I should only make if I’m accompanying it with a patch, though, and I can’t offer that right now.

                                                                                          2. 15

                                                                                            Yep, I think the current wording will probably trigger exactly the wrong people “have I overstepped a border? Probably” and the people who are actively engaging in a little bit of flaming won’t be bothered.

                                                                                            1. 7

                                                                                              Following on the “let’s get shit done” vibe, is there an open issue for discussing this in more detail on github? I did a quick lookup and didn’t find any, would be cool if it was posted here (even better if as a top comment)

                                                                                              1. 5

                                                                                                Good idea, thanks! (Obvious in retrospect, like many good ideas.) I created an issue.

                                                                                              2. 4

                                                                                                I mildly agree with both of those things, but I also think that the suggestion further down the thread to re-introduce downvoting as “non-bannable feedback” could address the issue more directly.

                                                                                                https://lobste.rs/s/zp4ofg/lobster_burntsushi_has_left_site#c_padx5h

                                                                                                Some people may misuse flags and downvotes, but overall I think these guidelines are intuitive and easy to remember:

                                                                                                • upvote: this should go higher on the page
                                                                                                • downvote: this should go lower on the page
                                                                                                • flag: if the user continues this behavior, they should eventually be banned
                                                                                                1. 2

                                                                                                  In my post I’m trying to focus on an easy thing to do to help reduce this problem. I have the impression that rewording the banner is something that’s reasonably easy, while “let’s reintroduce downvotes” or “the banner should be approved by moderators before being shown” are important change in process that require a lot of discussion. They may be excellent ideas, but it’s a lot more work to discuss and turn them into action, so I think it’s best not to mix the two kind of suggestions if we want to change anything at all in the short term; they should be discussed separately, and maybe differently. (I could just send a PR to rephrase the banner; any of the other suggestions requires more discussion with contributors, etc.).

                                                                                                  1. 1

                                                                                                    Yes, it makes sense to do the easy things first. My impression was that we had downvotes several months ago, so it shouldn’t that big a change to restore them, but I’m not involved so I could be wrong.

                                                                                                    I was mystified by the removal of downvotes, and never saw the rationale for it. I saw one thread discussing it 3 or 6 months after they were removed, which still didn’t answer my questions about why they were removed. It made the site worse for me, but not enough to really complain about it. I know this is an all-volunteer effort and I didn’t have time to look at it myself.

                                                                                              1. 28

                                                                                                Rust’s style of borrow checking is a revolutionary idea because it makes practical things that were impossible before, outside of research languages. I don’t think that will go away any time soon.

                                                                                                Whether Rust itself is “the wave of the future” or not is still undecided, and frankly irrelevant. Maybe it is, or maybe it will become a Simula or SNOBOL that is mainly important for the ideas it pioneered and inspired in later languages. If I’m using something else as my main language in ten years it will be because it’s better than Rust. It’s a high bar, but certainly a conceivable one.

                                                                                                1. 27

                                                                                                  I think Rust is way past the infancy stage, and is here to stay.

                                                                                                  • Rust has a lot of momentum and is gaining popularity quickly. About 3 years ago number of Rust users and projects has surpassed Scala, D, Nim, and Haskell, and it’s way ahead them now, and growing. crates.io is growing faster than rubygems.org, and is already 40% of its size. Because of it’s niche Rust will never be as popular as mainstream GC languages, but it’s not an “alt-lang” anymore either.

                                                                                                  • Rust has been explicitly designed as a practical language, not an experiment. It’s used in production. I know big companies where Rust is now a hard dependency for critical components, maintained by entire teams (not one dev’s side project any more).

                                                                                                  • Rust is based on a lot of pre-existing research languages. In terms of rough syntax and post-ALGOL features there’s already some convergence between Rust, Kotlin, Swift, and TypeScript. The latter two are probably here to stay too, so they’ll keep Rust looking normal.

                                                                                                  • In Rust’s niche of systems programming + safety there’s no competition. There’s lots of competition in easy GC languages, but that’s not Rust’s niche. There are other systems languages, some of which are nice, but without equal safety guarantees they don’t have the same hook that Rust has (e.g. Rust is getting into Linux because it’s safer, not because it’s nicer).

                                                                                                  • There’s no obvious flaw (known yet) that a potential Rust-killer could address to displace Rust. New Rust users suffer learning the borrow checker, but it’s not a big issue for experienced users. Rust users are very satisfied with the language.

                                                                                                  • Rust 1.0 has been released 6 years ago. Even if a Rust-killer was released tomorrow, Rust already has a significant head start and a track record. Rust is still being developed and evolving, so it can put up a fight by copying features from potential Rust-killers (and use the editions to delay ending up like C++).

                                                                                                  Oops, my comment is longer than the article now :)

                                                                                                  1. 15

                                                                                                    Rust can still suffer from feature creep and long compilation times for large projects. These are things that takes a couple of years to see how they pan out.

                                                                                                    1. 4

                                                                                                      I think you’re probably right, I just also remember when Java was The Next Killer Thing and am not about to jump to any conclusions.

                                                                                                      1. 17

                                                                                                        Did that really end up being wrong? The initial imagined usecase for it (Applets) didn’t pan out, but a quarter of a century later it’s still the #5 programming language on Stackoverflow (really, number #3 if you accept that SQL and HTML/CSS aren’t so much competing with it as working in concert with it) and it’s probably still #1 in corporate circles.

                                                                                                        It’s not my idea of a killer programming language, but the prediction that it was going to eat the world does seems to have largely bore out, just differently than the initial expectation.

                                                                                                        1. 7

                                                                                                          And indeed java was the next big thing, look at how popular it is nowadays :-). It made garbage collection as mainstream as it could be.

                                                                                                        2. 2

                                                                                                          In Rust’s niche of systems programming + safety there’s no competition

                                                                                                          You don’t hear much about it, but Ada has been in this space for 40 years.

                                                                                                          There’s no obvious flaw (known yet) that a potential Rust-killer could address to displace Rust

                                                                                                          Rust is good, but it has trouble enforcing large scale constraints on programs, which often show up in Real-Time systems, for which Ada was designed. For example, Ada’s Ravenscar profile detects behavior at compile-time in your program which will lead to unpredictable behavior in high-integrity applications.

                                                                                                          1. 4

                                                                                                            I deliberately haven’t mentioned Ada, because the metrics I have are biased towards open-source, and by these metrics Ada is dead.

                                                                                                            1. 3

                                                                                                              If your point is open source specific, you should say that, but deliberately ignoring a language because it historically been used for closed source systems is misleading.

                                                                                                              EDIT: I realized I probably came off as combative, which wasn’t my intent. I just don’t think those metrics capture really what’s happening since there’s a lot of closed source development. I just know for sure that OCaml is actively used for some companies critical systems but it doesn’t show up well on those metrics.

                                                                                                              1. 4

                                                                                                                I mean other langues have public package repositories and online communities, so they’re comparable this way. Ada isn’t, so I didn’t compare it.

                                                                                                                Back to the original point: the fact that Ada is used so differently — closer to DoD than GitHub – also means it’s not a direct Rust competitor. Rust’s openness, vendor-neutrality, community, and availability of open-source libraries are its assets too.

                                                                                                                1. 4

                                                                                                                  means it’s not a direct Rust competitor. Rust’s openness, vendor-neutrality, community, and availability of open-source libraries are its assets too.

                                                                                                                  Your point was that there was no safe systems programming equivalent to Rust, my point is that there is, it’s just not well known or used publicly. Ada may have originated from the DoD, but the major Ada implementation, GNAT and a lot of tooling and libraries are GPLv3 or a limited form with a runtime exception. I agree that there’s not really a well established Ada community and it’s just now providing a similar solution to Cargo or CPAN. There’s a lot more than you’d expect, but it’s sort of distributed right now (Ada Utility Library, GNATColl, GNAT, etc.) However, if people feel like they missed getting in on the ground floor of a major programming language and open source library development, there’s huge opportunity on a mature language available.

                                                                                                                  I’m unsure how Rust has vendor-neutrality though when there’s only one main Rust implementation, whereas Ada is an ISO standard and has a full public battery of compiler tests for implementers.

                                                                                                                  The DoD vs Github thing may have been true a few years ago, but there’s been a major push from the main Ada vendor, AdaCore, to split off and open source as much as possible, in a eerily similar way to what Mozilla has done (disclaimer: I’m not involved with AdaCore, so I don’t know how far this goes, or what their long term plan is).

                                                                                                            2. 1

                                                                                                              Can you tell me more about these large scale constraints? Are we talking like, latency/memory constraints?

                                                                                                              1. 3

                                                                                                                Just to give a few examples, there’s per-package (module) constraints like the Pure aspect, which ensures a module has no state and depends on none that has state. There’s also a pragma called “Restrictions” which can do various things like prohibit all or various types of dynamic allocation, prohibit floating point, prohibit the use of recursion, ensure no dependence on other specific modules of code, and so on.

                                                                                                                1. 1

                                                                                                                  Those all sound like things that could be written as rustc lints. If an industry or organization had such requirements they could maintain lints that do exactly that, and enforce them via #[foo] attributes. Of course, there may be points I’m not thinking of that wouldn’t be possible as a lint as well.

                                                                                                                  1. 2

                                                                                                                    It really doesn’t sound like something that can be done with rustc lint. It sounds most similar to Safe Haskell to me. At the very least, cargo will be involved in addition to rustc.

                                                                                                          2. 5

                                                                                                            I 100% believe that Rust is the beginning of a new generation of programming languages. I don’t suspect that Rust will be popular in 10 years, but I’d be willing to bet money that there WILL be at least a few statically typed languages in 10 years that will have obvious roots in Rust.

                                                                                                            Don’t misunderstand my next sentence- I’m not saying that Rust invented anything. But, look at how many languages are implementing things like enums/ADTs and pattern matching “all of a sudden” (Python?! Are you for real?!). Look at Swift (which came out after Rust) looking to switch to a Rust-like lifetime/borrow mechanism. Look at ranges in C++.

                                                                                                            1. 8

                                                                                                              I think it’s likely that many languages will be influenced by Rust, since there are already dozens of such projects over at /r/ProgrammingLanguages and other places.

                                                                                                              But if there’s any one that will be popular in 10 years, it already exists now and you might have heard of it! That is, Rust itself took 8-9 years to become 1.0 and it’s existed for close to 15 years now! Languages just take a long time, so I think in 10 years Rust will still be the top choice … for people who want a “Rust-like” language :)

                                                                                                              I made a similar argument when someone was asking about alternatives to Matlab that are not Julia. If you haven’t heard of it already, it’s not likely you’ll be using it in production in 10 years!

                                                                                                              1. 6

                                                                                                                It is wild how long it takes the average language to gain mainstream popularity. For example, Python is one of the “new” hot languages of the last decade, but it is older than Linux!

                                                                                                                1. 2

                                                                                                                  Python is a weird story, IMO. I don’t know anything about the language’s actual history, so my perception could be wrong. But I feel like it really just had a huge surge for some reason around 2005-2010-ish. I don’t exactly know what caused it or why it wasn’t very popular before then, but it’s really interesting that people just suddenly “discovered” it many years after it had been around. For a while, it seemed like everything was written in Python: desktop applications, CLI tools, server backends, data science code, etc.

                                                                                                                  To be fair, the other viable languages for doing apps in 2005-ish were probably C++, Java, and whatever was in Microsoft land - C# I guess? I can see why Python would be appealing in that environment.

                                                                                                                  1. 3

                                                                                                                    I started using Python in 2003, and I agree it had a bump in popularity in the 2005-2010 era (although it still grew enormously in the last decade).

                                                                                                                    I think it just takes that long to build a useful language – especially the libraries. I don’t think it was just “discovered” – the key is that it gained a lot of critical functionality.

                                                                                                                    For example Travis Oliphant was beating the drum hard for NumPy and array programming in the 90’s and early 2000’s (writing a ton of code, documentation, explaining it at PyCon, etc.). And 10 or 15 years later that led to Pandas, Torch, Tensorflow, etc. which are a big part of why Python is popular now. (Ruby, JavaScript, PHP, and Perl all pretty much lack this functionality.)

                                                                                                                    Guido had almost nothing to do with this! (although obviously he had his hand in so many other critical Python features)

                                                                                                                    And I remember in 2005 or 2006, Python web programming was immature. I used CherryPy, and there was Twisted. It seems like the ecosystem has converged on Flask and Django to some extent. So it just took effort to build all of that. Ruby also seemed to lack web programming until Rails (afaik).

                                                                                                                    In 2003, the meme was that Python was a cleaner Perl, but it lacked libraries. People said Perl was a better choice because it had CPAN. Fast forward a few years and now everyone talks about how Python has more bindings for libraries than say Go or Rust! It just takes time.

                                                                                                                    1. 2

                                                                                                                      Thanks for the insight. As I said, I was kind of passive observer, as I was just barely learning to program in 2007-ish.

                                                                                                                  2. 1

                                                                                                                    Yup, Python and Ruby are of a similar vintage, and they both took more than a decade before getting popular. I hadn’t heard of Python before 2003, and it started in 1990 or so. I agree it had a big bump in popularity in the 2005-2010 era.

                                                                                                                    I think it just takes that long to make a useful language.

                                                                                                                    JavaScript was arguably not very popular before 2005 or so, about a decade after its creation. And it really got popular in 2009 with node.js.

                                                                                                                    Ditto for R – it started in 1995, and I started using it in 2009 or so, and a lot of people still haven’t heard of it.

                                                                                                                    PHP and Perl seem to have gotten fairly popular out of the gate. It would be interesting to know why that is. I think one reason is that PHP was basically a bunch of libraries at first, and not a programming language! It was tightly coupled to Apache, which was becoming huge because people wanted an open source web server.

                                                                                                                  3. 1

                                                                                                                    Yes, that’s a good point, of course. The probability of a language surviving increases as it continues to survive. That sounds almost tautological, but it isn’t.

                                                                                                                  4. 3

                                                                                                                    I don’t suspect that Rust will be popular in 10 years

                                                                                                                    Out of interest, why do you say this? Is there a specific reason/reasons why you think its popularity will plateau/wane?

                                                                                                                    1. 3

                                                                                                                      It’s mostly a hunch, but there are a couple of half-baked reasons:

                                                                                                                      • Statistically speaking, it’s just a safe bet, because there are tons of languages at any given time, but only a few that have lived and thrived for 20+ years (probably single-digits: C, C++, Java, Python, PHP, C#, JavaScript… that’s it? Unless you count LISP, Fortran, Haskell, and Perl as “living and thriving” which I don’t).
                                                                                                                      • Error handling. I mostly like Rust’s error handling mechanism, but I suspect that it’s too tedious for most people and I think there’s room for languages to try other things that may end up being better. Tangentially, my controversial opinion is that checked exceptions deserve another attempt besides how they were implemented by Java. Rust’s approach would be improved (ergonomically) by either ad-hoc enum types or actual inheritance.
                                                                                                                      • Async and Futures, etc. I have a feeling that async/await syntax is a fad for this decade-ish and that in 10 years we’ll all think it was sooo stupid and that “concurrency hoobajoobs” is clearly the right way to do concurrency/async. I don’t have any particular complaint about async, colored functions, Futures, etc- I just see that it’s been very cargo-culty across the entire programming language ecosystem- very similar to OOP in the 90s and similar to FP and monad-all-the-things today.
                                                                                                                      • I also have a hunch that structural typing will become more popular for statically typed languages. That may or may not affect Rust depending on how soon that happens and how cemented Rust is in particular niches.
                                                                                                                      1. 2

                                                                                                                        Not GP, but I think other languages could improve upon Rust.

                                                                                                                        C identified the high-level patterns that assembly programmers were using: if statements, loops… and it gave us constructs to speak in those higher-level terms.

                                                                                                                        I think a language could identify the common patterns that Rust programmers often use, and then offer those more directly, with less complexity.

                                                                                                                        Some other promising avenues: https://cone.jondgoodwin.com/ is making borrow checking easier by complementing it with other memory management strategies, and http://strlen.com/lobster/ is pushing static analysis to be near the borrow checker’s speed.

                                                                                                                        1. 15

                                                                                                                          Replacing languages is an infrequent event. Programming languages are very often invented and designed, but mustering the resources to bring a language of the scope of Rust to industry adoption is really hard and needs a lot of dedication and sweat.

                                                                                                                          Programming languages are very hard to argue for, spending-wise. And given that Rust is one of the only languages currently being adopted by all the major companies, they will think hard about the delta that languages following it will bring.

                                                                                                                          1. 2

                                                                                                                            I could agree with your phrasing of “adopted by all the major companies”, though I might have phrased it like “adopted by some parts of a lot of major companies, for some things”.

                                                                                                                            I’m probably speaking from my own bubble, but I don’t really see that Rust has taken off yet. In my day to day job, I see these very clear trends: Obj-C to Swift, Java to Kotlin, Javascript to Typescript. For most actively developed projects where I work, that migration is either underway or in the plans. But I’m not seeing the C++ to Rust transition I would have hoped for. It’s not really even considered that seriously.

                                                                                                                            From experience, I can only guess that, while Rust is perfect on paper, its difficult learning curve and complexity is what’s holding it back. With that in mind, I wouldn’t be surprised if Rust keeps growing but some other systems language surpasses it in a decade or so, probably one that has the safety and speed of Rust but without the complexities.

                                                                                                                          2. 4

                                                                                                                            C didn’t come into a world where everyone was writing in assembly; its creators had already been involved in Multics, which was programmed in PL/1, for instance. Burroughs had been using ALGOL as its systems language, as had many others, etc.

                                                                                                                      2. 6

                                                                                                                        Ada has had accessibility checks since 1995, through it’s system of making its pointer-like types into actual types which depend on the lifetime in which they’re declared.

                                                                                                                        1. 4

                                                                                                                          I really have to check Ada out, even if only for the historical context. I keep hearing all kinds of interesting things about it. The cynic in me feels like there must be a huge catch, like it must have something that just makes it horrible to work with…

                                                                                                                          1. 12

                                                                                                                            The catch is verbosity due to no macros or preprocessor, and then eventually you figure out that verbosity is a signal from the language that you’re going about your problem in the wrong way.

                                                                                                                            In general it feels like finding a old but super advanced spaceship crashed in your yard that works just fine, but if you tell anyone you’re using it they think you’re just crazy.

                                                                                                                            1. 2

                                                                                                                              What’s the concurrency story like?

                                                                                                                              (Yes I keep popping up on your comments and no I still haven’t managed to really crack ada open. Maybe I should, and should look at how to link it to other stuff with more active library communities)

                                                                                                                              1. 5

                                                                                                                                Built into the language you have “protected objects” which provide mutual exclusion to shared resources, and “tasks” which provide the ability to spin off work. You coordinate (rendezvous) with a task by calling one of its “entries”, which are sort of like a procedure call version of “await aTask.asyncFunction();” but “protected objects” can also add guards to these to cause a task to wait in a queue until specific conditions are fulfilled.

                                                                                                                                Queueing is handled by the language, and as part of these features is a construct called “select” which lets a task “accept” one of multiple entries another flow of execution is waiting on. Since this is built into the language, you also get time-outs waiting on conditions for free, as well as a form of select which will execute a different flow if an entry on a task or protected object would block or if one of the flows exceeds a time limit, like it a calculation takes too long.

                                                                                                                                What’s super helpful is that because Ada features are opt-in rather than opt-out, you can ignore tasks and protected objects until you understand more of the language, and then define tasks within your functions to split work later on.

                                                                                                                                active library communities

                                                                                                                                You can get super far with just the standard library defined by Ada itself, and also the freely available GNAT and GNATCOLL libraries.

                                                                                                                                1. 2

                                                                                                                                  That’s cool. It sounds kind of like an actor model, and should be easy to build the necessary functionality on top if one wanted “proper” actors.

                                                                                                                      1. 21

                                                                                                                        I forgot: there’s no reason to make a language in the 2000s without named arguments as default.

                                                                                                                        1. 12

                                                                                                                          I don’t want to disagree, but I want to share my experience. Before Rust, my primary language was Python, which is build around named arguments. I also used a lot of Kotlin, which has named arguments as well (although not as enshrined as in Python). I would expect that I’d miss named arguments in Rust, but this just doesn’t happen. In my day-to-day programming, I feel like I personally just never need neither overloading nor named parameters.

                                                                                                                          1. 5

                                                                                                                            I come from Swift, and I also (again, surprisingly to me) feel this way.

                                                                                                                            1. 1

                                                                                                                              Well, Swift has its own weird parameter naming that it inherited from ObjC.

                                                                                                                              1. 2

                                                                                                                                It’s definitely weird. But once you get used to writing function signatures and calls like

                                                                                                                                func set<K, V>(key: K, to value: V) {}
                                                                                                                                
                                                                                                                                table.set(key: "foo", to: "bar")
                                                                                                                                

                                                                                                                                …it starts to feel pretty natural. My expectation was that the transition to

                                                                                                                                fn set<K, V>(&mut self, key: K, val: V) {}
                                                                                                                                
                                                                                                                                table.set("foo", "bar");
                                                                                                                                

                                                                                                                                …would feel really unnatural. But somehow (in my experience) other aspects of Rust’s design come together to mean that I don’t miss the added clarity of those parameter labels.

                                                                                                                                1. 2

                                                                                                                                  I find the Swift approach appealing in theory, but it’s hard to do well in practice. Maybe it’s just me, but I can never wrap my head around the conventions. I can read this 100 times and still struggle with my own functions: https://swift.org/documentation/api-design-guidelines/#parameter-names

                                                                                                                                  For example, why isn’t your example func setKey<K, V>(_ key: K, to value: V) ?

                                                                                                                                  When we get to the final bullet point in that guideline “label all other arguments”, how should we label them? So that the call site reads like a sentence? That doesn’t seem possible. So just name them what they represent? Is this right: func resizeBox(_ box: Box, x: Int, y: Int, z: Int)? Then the call site is way less cool than your example: resizeBox(box, x: 1, y: 2, z: 3).

                                                                                                                                  1. 2

                                                                                                                                    For example, why isn’t your example func setKey<K, V>(_ key: K, to value: V)?

                                                                                                                                    After reading the API guidelines again, I think you’re right, it should have been that :)

                                                                                                                                    So just name them what they represent? Is this right: func resizeBox(_ box: Box, x: Int, y: Int, z: Int)?

                                                                                                                                    Yes and yes, as far as I know.

                                                                                                                            2. 1

                                                                                                                              I agree that, in practice, I don’t often miss either feature. But it does happen sometimes.

                                                                                                                              Every once in a while I do miss overloading/default-args. Sometimes you have a function that has (more than one!) very common, sane, default values and it sucks to make NxN differently named functions that all call the same “true” function just because you have N parameters that would like a nice default.

                                                                                                                              Then there’s the obvious case for named parameters where you have multiple parameters of the same type, but different meaning, such as x, y, z coordinates, or- way worse- spherical coordinates: theta and phi, since mathematicians and physicists already confuse each other on which dimension theta and phi actually represent.

                                                                                                                              It’s not terrible to not have them, but it seems like it would be nice to do it the Kotlin way. Default params are always a code smell to me, but just because it smells doesn’t mean it’s always wrong and I do use them in rare circumstances.

                                                                                                                            3. 6

                                                                                                                              I’d like to disagree, I really think functions should be as simple as possible, so that you can easily write higher order functions that wrap/transform other functions without worrying about how the side-channels like argument names will be affected. I really like the Haskellism where your function arguments are unnamed, but you recover the ergonomics of named arguments by defining a new record just for a single function, along with potentially multiple ways of constructing that record with defaults.

                                                                                                                              I’m not saying this pattern would work for every language, I just want to point out that named arguments aren’t necessarily a good thing.

                                                                                                                              1. 4

                                                                                                                                I forgot: there’s no reason to make a language in the 2000s without named arguments as default.

                                                                                                                                Named arguments make renaming parameters a breaking change; this is why C# didn’t support them until version 4. If I ever design a language, I’ll add named arguments after the standard library is finalized.

                                                                                                                                1. 12

                                                                                                                                  Swift has abi stable named parameters, it just defaults to the local parameter name being the same as the public api name

                                                                                                                                  1. 10

                                                                                                                                    Yeah, I think Swift nailed it. Its overloading/default args aren’t even a special calling convention or kwargs object. They are merely part of function’s name cleverly split into pieces. init(withFoo:f andBar:b) is something like init_withFoo_andBar_(f, b) under the hood.

                                                                                                                              1. 15

                                                                                                                                There should be formal semantics for the borrow checker.

                                                                                                                                Rust’s module system seems overly complex for the benefit it provides.

                                                                                                                                Stop releasing every six weeks. Feels like a treadmill.

                                                                                                                                The operator overload for assignment requires generating a mutable reference, which makes some useful assignment scenarios difficult or impossible…not that I have a better suggestion.

                                                                                                                                A lot of things should be in the standard library and not separate crates.

                                                                                                                                Some of the “standard” crates are more difficult to use than they should be. I still can’t figure out how to embed an implements-the-RNG-trait in a struct.

                                                                                                                                Async is a giant tar pit. The immense complexity it adds doesn’t seem to be worth it, IMHO.

                                                                                                                                Add varargs and default argument values.

                                                                                                                                1. 12

                                                                                                                                  I genuinely do not understand what people find complex about the module system. It’s literally just “we have a tree of namespaces”.

                                                                                                                                  1. 8

                                                                                                                                    “We have a tree of namespaces. Depending on how you declare it the namespace names a file or it doesn’t. Namespaces nest, but you need to be explicit about importing from outer namespaces. Also, there’s crates which are another level of namespacing with workspaces.”

                                                                                                                                    Versus something like Python: There is one namespace per file.

                                                                                                                                    (Python does let you write custom importers and such but that’s truly deep magic that is extremely rarely used.)

                                                                                                                                    I’m not saying there aren’t benefits to the way Rust does it. I’m saying I don’t feel like the juice is worth the squeeze.

                                                                                                                                    EDIT: @kornel said it better: https://lobste.rs/s/j7zv69/if_you_could_re_design_rust_from_scratch#c_3hsii6

                                                                                                                                    1. 5

                                                                                                                                      I mean … it feels like this takes 30 minutes to understand. Maybe the problem is the docs? Or maybe it just already mapped to my pre-existing mental model of namespaces, but this was one of the least surprising parts of rust to me

                                                                                                                                      Depending on how you declare it the namespace names a file or it doesn’t.

                                                                                                                                      New file means a new namespace (module), new namespace (module) doesn’t mean a new file.

                                                                                                                                      1. 4

                                                                                                                                        I mean … it feels like this takes 30 minutes to understand. Maybe the problem is the docs? Or maybe it just already mapped to my pre-existing mental model of namespaces, but this was one of the least surprising parts of rust to me

                                                                                                                                        It was the opposite for me, for whatever reason; it feels like there’s active friction between my mental model of namespaces and the way Rust does it. It’s weird.

                                                                                                                                        You know, I kinda got the same mental friction feeling with namespaces in Tcl. I couldn’t tell you why. Maybe I just hate nested namespaces…

                                                                                                                                        1. 2

                                                                                                                                          I’ve over and over and over again heard from beginners that the docs do a notably bad job communicating how it works, in particular those that are the easiest to get your hands on as a beginner (the rust book and by example). They deal almost exclusively with submodules within a file (i.e. mod {}), since it’s difficult to denote multiple interrelated files in the text, playground example, text, playground example idiom they decided to use.

                                                                                                                                          When they briefly do try to explain how the external file / directory thing works they say something like “you used to need a file named mod.rs in another directory but now in Rust 2018 you can just make a file named (the name of the module).rs” which is a really poor explanation of how that works and is also literally incorrect. Like, you can go without mod.rs but if you want to arrange your code into a directory structure you still need mod.rs. There have been issues on the Github for the rust book about making the explanation coherent (or more trivially making it actually true) but the writers couldn’t comprehend that it isn’t immediately intuitive to beginners and have refused to make very basic changes like having it just say something like “when you write mod foo, the compiler looks in the current directory for either foo.rs or foo/mod.rs”. A lot of the problem here is the mod.rs -> modname.rs addition. It’s an intuitive QOL improvement to people already familiar with the modules system but starting from no understanding of the modules system it makes it infinitely more difficult for newbies to understand.

                                                                                                                                        2. 5

                                                                                                                                          Hmm, I feel like the following set of statements covers the way the module system works:

                                                                                                                                          • We have a tree of namespaces, which is called a crate
                                                                                                                                          • Declaring a module…
                                                                                                                                            • …with just a name refers to a file in a defined location relative to the one containing the declaration
                                                                                                                                            • …with a set of curly braces refers to the content of those curly braces
                                                                                                                                          • You have to explicitly import anything from outside the current module (file or mod {} block)

                                                                                                                                          In practice, modules are almost always declared in separate files except for test modules, so it ends up being “there is one namespace per file” most of the time anyway.

                                                                                                                                          I don’t really see what about that is all that complicated.

                                                                                                                                        3. 6

                                                                                                                                          As someone who just dabbles with rust, it still confuses me. I know I’d get it if I used it more consistently, but for whatever reason it just isn’t intuitive to me.

                                                                                                                                          For me, I think the largest problem is that it’s kind of the worst of both worlds of being neither an entirely syntactic construct nor being filesystem based. Rather, it requires both annotating files in certain ways and places, and also putting them in certain places in the file system.

                                                                                                                                          By contrast, Python and Javascript lean more heavily on the filesystem. You put code here and you just import it by specifying the relative file path there.

                                                                                                                                          On the other end of the spectrum you have Elixir, where it doesn’t matter where you put your files. You configure your project to look in “lib”, and it will recursively load up any file ending in .ex, read the names of the modules defined in there, and determine the dependency graph among them. As a developer I pop open a new text file anywhere in my project, type defmodule Foo, and know that any other module anywhere can simply, e.g., import Foo. For my money, Elixir has the most intuitive system out there.

                                                                                                                                          Bringing it back to rust, it’s like, if I have to put these files specifically right here, why do I need any further annotation in my code to use those modules? I know they’re there, the compiler knows they’re there, shouldn’t that be enough? Or conversely, if I’m naming this module, then why do I have to put it anywhere in particular? Shouldn’t the compiler know it by name, and then shouldn’t I be able to use it anywhere?

                                                                                                                                          I’m also not too familiar with C or C++ which is what it seems to be based on. I get that there’s this ambient sense of compilation units, and using a module is almost like a fancy macro that text substitutes this other file into this one, but that’s not really my mental model of how compilation has to work.

                                                                                                                                          1. 1

                                                                                                                                            Hey, thanks, this is some interesting food for thought!


                                                                                                                                            I’m also not too familiar with C or C++ which is what it seems to be based on.

                                                                                                                                            I think they’re actually based on ML modules. They’re not really similar to C/C++… I’d actually describe it as more similar to python than C/C++ (but somewhere in the middle between them).

                                                                                                                                            and using a module is almost like a fancy macro that text substitutes this other file into this one,

                                                                                                                                            I think the mod module_name; syntax is actually exactly a fancy macro that does the equivalent of text substitution (up to error messages and line numbers). Of course it substitutes into the mod module_name { module_src }` form so module_src is still wrapped in a module.

                                                                                                                                          2. 8

                                                                                                                                            Rust’s module model conceptually is very simple. The problem is that it’s different from what other languages do, and the difference is subtle, so it just surprises new users that it doesn’t work the way they imagine it would.

                                                                                                                                            Being different, but not significantly better, makes it hard to justify learning yet another solution.

                                                                                                                                            1. 2

                                                                                                                                              Do i need to declare my new mod in main.rs or in lib.rs? What about tests? Why am I being warned about unused code here, when I use it? Why can I import this thing here but not elsewhere?

                                                                                                                                              I think the way all the explicit declaration stuff is really un-nerving coming from Python’s “if there’s a file there you can import it” strategy. Though I’m more comfortable with it now, I still wouldn’t be confident about answering questions about its rules

                                                                                                                                            2. 9

                                                                                                                                              What benefit is there to releasing less often?

                                                                                                                                              1. 11

                                                                                                                                                Another user on here (forgive me, I can’t remember who) said it well: if I cut my pizza into 12 slices or 36 slices, it’s the same amount of pizza but one takes more effort to eat.

                                                                                                                                                Every six weeks I have to read release notes, decide if what’s changed matters to me, if what counts as “idiomatic” is different now, etc. 90% of the changes will be inconsequential, but I still gotta check.

                                                                                                                                                Bigger, less frequent releases gives me the changes in a more digestible form.

                                                                                                                                                Note that this is purely a matter of opinion: obviously a lot of people like the more frequent releases, but the frequent release schedule is a common complaint from more than just me.

                                                                                                                                                1. 3

                                                                                                                                                  This would be purely aesthetic, but would bundling release notes together and publishing those every 2 or 3 releases help?

                                                                                                                                                  1. 8

                                                                                                                                                    Rust tried to do it with the “Edition Guide” for 2018 which — confusingly — was not actually describing features exclusive to the new 2018 parsing mode, but was a summary of the previous couple of years of small Rust releases.

                                                                                                                                                    The big edition guide freaked some people out, because it gave impression that Rust suddenly has changed a lot of things, and there were two different Rusts now. I think Rust is damned here no matter what it does.

                                                                                                                                              2. 2

                                                                                                                                                Not sure the issue you’ve hit with embedding something that implements the Rng trait in a struct. Here’s an example that does just that without issue.

                                                                                                                                                1. 1

                                                                                                                                                  Replying again just for future reference.

                                                                                                                                                  I don’t remember exactly what I was doing but I ended up running into this:

                                                                                                                                                  for a trait to be "object safe" it needs to allow building a vtable to allow the call to be resolvable dynamically; for more information visit <https://doc.rust-lang.org/reference/items/traits.html#object-safety>
                                                                                                                                                  

                                                                                                                                                  Point is, I got to that point trying to have an Rng in a struct and gave up. :)

                                                                                                                                                  My solution was to put it in a Box, but that didn’t work for one of the Rng traits (whichever one includes the seed functions), which is what I wanted.

                                                                                                                                                  Either way, I obviously need to do more research. Thanks.

                                                                                                                                                  1. 1

                                                                                                                                                    Thank you, I appreciate that. My problem boils down to not knowing when to use Box and when to use Cell, apparently.

                                                                                                                                                    1. 3

                                                                                                                                                      Box is an owned pointer, despite being featured so prominently it doesn’t have many uses. It’s basically good for

                                                                                                                                                      • Making unsized things (typically trait objects) sized
                                                                                                                                                      • Making recursive structs (otherwise they’re infinite sized)
                                                                                                                                                      • Efficiency (moving big values off of the stack)
                                                                                                                                                      • C ffi
                                                                                                                                                      • (Probably a few things I forgot, but the above should be the common cases)

                                                                                                                                                      RefCell is a single threaded rw-lock, except it panics where a lock would block because blocking on a single threaded lock would always be a deadlock. It’s purpose in life is to move the borrow checkers uniqueness checks from compile time to runtime.

                                                                                                                                                      In this case, you don’t really need either. We can just modify the example so that make takes a mutable reference, and get rid of the Refcell. See here: https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=6f64a7192a1680181200bf577c285b9d

                                                                                                                                                      1. 2

                                                                                                                                                        Yup, I used RefCell here because I don’t think the changing internal state of the random number generator is relevant to the users of the CharacterMaker, so I preferred make to be callable without a mutable reference, but that’s an API design choice.

                                                                                                                                                1. 5

                                                                                                                                                  Probably my five largest pain points:

                                                                                                                                                  • Fix generics (<> is wrong and broken, use []).
                                                                                                                                                  • Fix the broken Eq/PartialEq, Ord/PartialOrd design.
                                                                                                                                                  • Throw out the useless semicolon rules.
                                                                                                                                                  • Replace -> in function declarations with :.
                                                                                                                                                  • Remove ! syntax for macros (creates the wrong incentives).

                                                                                                                                                  Runner ups:

                                                                                                                                                  • Fix/remove the horribly broken Path::join. (Or rather replace Path/PathBuf with an abstraction where you don’t have to decide how to implement the method, because it simply won’t compile.)
                                                                                                                                                  • Fix env::home_dir.
                                                                                                                                                  • Lack of a grown-up deprecation/removal policy.
                                                                                                                                                  1. 12

                                                                                                                                                    Throw out the useless semicolon rules.

                                                                                                                                                    I seem to remember you and I have debated this before, but I don’t think it makes any sense to call the semicolon rules useless. Semicolons convert expressions into statements, and quite apart from the fact that there needs to be some syntax to do that, because Rust is an expression-based language, the visual distinction that you get from a line ending in a semicolon or not allows you to tell at a glance whether something is an expression or a statement.

                                                                                                                                                    1. 1

                                                                                                                                                      The problem with this kind of argument is that languages exist that work without mandatory ; and have none of those made-up issues.

                                                                                                                                                      1. 11

                                                                                                                                                        With semicolons this works fine:

                                                                                                                                                        let foo = 5
                                                                                                                                                          - 3;
                                                                                                                                                        

                                                                                                                                                        But this wouldn’t:

                                                                                                                                                        let foo = 5
                                                                                                                                                          - 3
                                                                                                                                                        

                                                                                                                                                        Because - 3 is a perfectly valid expression on its own. This is just one of the simplest examples I can imagine where “no semicolons” falls apart.

                                                                                                                                                        JavaScript has similar issues when semicolons aren’t used and can lead to unexpected behaviour, so the problem isn’t new. Python side-steps this issue by requiring either being within ( or adding a \ at EOL.

                                                                                                                                                        1. -5

                                                                                                                                                          The problem with this kind of argument is that languages exist that work without mandatory ; and have none of those made-up issues.

                                                                                                                                                          1. 11

                                                                                                                                                            You’re an asshole. I’ve never seen you argue languages with people without acting like an asshole.

                                                                                                                                                            1. 6

                                                                                                                                                              What do you think you’re accomplishing here? Toddlerized argument via repetition pollutes conversations, demonstrates bad faith, and literally makes this site less valuable to others. I’d suggest that you follow the moderators’ advice: step away from the keyboard for a while until you can engage in mutually respectful discussions.

                                                                                                                                                          2. 8

                                                                                                                                                            The issues are not made-up. Please accept that people may disagree with your opinions for other reasons than losing grip on reality.

                                                                                                                                                            Other languages have just chosen different trade offs in complexity of parsing, flexibility of the syntax, and risk of semantic changes caused by line wrapping.

                                                                                                                                                        2. 9

                                                                                                                                                          If 4 out of 5 of your top 5 complaints are just syntax, that’s pretty damn good IMHO.

                                                                                                                                                          1. 2

                                                                                                                                                            That’s what they say about BF too

                                                                                                                                                            1. 2

                                                                                                                                                              I don’t have 5 complaints about Brainfuck. I have one: Lack of semantic richness.

                                                                                                                                                              It’s syntax is actually pretty good, considering what its semantics are. Other languages with the same semantics and different syntax exist, and they also suck.

                                                                                                                                                          2. 4

                                                                                                                                                            Fix generics (<> is wrong and broken, use []).

                                                                                                                                                            I’ve heard this been said generally, but I never found out what the issue is. Isn’t this overloading array/map indexing?

                                                                                                                                                            1. 8

                                                                                                                                                              In Verona, we’re doing the same thing as Pony: [] is for generics, () is call syntax, array access uses call syntax on array objects. It’s a slightly odd decision in C-family languages to have separate syntax for them because C doesn’t have anything that is both indexable and callable (you can’t use array indexing on function pointers), but it’s a necessary hack if you want to write a single-pass compiler that runs on a system with 128 KiB of RAM. A lot of earlier languages used the same syntax because an array is, at the abstract level, just a map from integers to some other value. C doesn’t think of the abstraction like this and thinks of an array as syntactic sugar for pointer arithmetic. C++ keeps this distinction for standard library collection types, but I don’t think I’ve ever seen a C++ class that overloaded both operator() and operator[].

                                                                                                                                                              The big issue with <> for generics (or anything else) is that < and > are both allowed in your program as stand-alone identifiers. This means that you can’t spot a missing angle bracket until you’ve done type checking, whereas you can spot a missing other kind of bracket / brace after tokenisation, before you even parse.

                                                                                                                                                              1. 4

                                                                                                                                                                it’s not overloading array indexing, because [] for generics is in types, and [] for indexing is in expressions. As far as I can tell, rust grammar is sufficiently well designed that these are never ambiguous.

                                                                                                                                                                1. 7

                                                                                                                                                                  Counterexample: foo[X](). Is this calling a generic function foo with X as a type argument, or is this calling the Xth element of the foo array?

                                                                                                                                                                  1. 5

                                                                                                                                                                    surely you mean foo::[X]() ? :-)

                                                                                                                                                                    edit: that was snarky. It’s not worse than <>, we’d just have the turbo hammershark or something like that instead of turbofish, but you do have a point. D uses foo!(bar)(baaz) to separate template and regular arguments, for example.

                                                                                                                                                                    1. 3

                                                                                                                                                                      I might be wrong, but I think the main motivation behind using [ rather than < is exactly to get rid of the need to disambiguate expressions vs types via ::

                                                                                                                                                                      If we are fine with replacing turbo-fish with turbo-snail, than yes, just switching the sigils works.

                                                                                                                                                                    2. 1

                                                                                                                                                                      Both!

                                                                                                                                                                      Ok, foo isn’t an array, but indexing works for all sorts of types in rust not just arrays. It’s calling the Xth element of the collection foo, where foo happens to be a generic-function collection type.

                                                                                                                                                                      1. 4

                                                                                                                                                                        Yeah, using the same grammar for type references and expressions and disambiguating on semantic level might work. But that’s a way bigger change than just using [].

                                                                                                                                                                        I wonder if optionality of type arguments would prevent this? Like, foo[()][()] where the first indexing with type () seems like it can be ambiguous. As it, is foo[()] a type argument, or a value argument with an inferred type argument?

                                                                                                                                                                        My gut feeling is that this might not be a huge problem. It seems like “syntax unambiguously classifies the role of expression” property is already lost in Rust in minor way (the prime example would be constant ambiguity in patterns). So perhaps treating the language as a homogeneous tree of things, and classifying then according to semantics later would actually be a clearer model?

                                                                                                                                                                  2. 2

                                                                                                                                                                    The issue is that < and > are already used for less than and greater than signs, so Foo(baz) can either be (Foo less than bar) greater than baz or Foo instantiated with bar applied to baz.

                                                                                                                                                                    Overloading indexing is fine, because it really is a kind of indexing. Indexing is a function (Container, Index) -> Value, and this is a function (GenericType, ConcreteType) -> ConcreteType. I.e. Container = Type and Index, Value = ConcreteType. As a result it doesn’t lead to the same kind of ambiguities.

                                                                                                                                                                    1. 1

                                                                                                                                                                      Wouldn’t that make AST construction dependent on types, and thus a chicken-egg problem similar to what C has with typedefs?

                                                                                                                                                                      Forbidding uses of types in expression contexts world be limiting, e.g. you couldn’t “simply” use static methods or associated constants, because they’re expressions, but start with a type name.

                                                                                                                                                                      1. 1

                                                                                                                                                                        It would [1] if you need to represent Type[Type] and Expr[Expr] as different types of ast nodes. I don’t believe that you actually need to though.

                                                                                                                                                                        [1] You could probably hack around this by checking what symbols are in scope too, but that’s ugly and would probably lead to poor handling of special cases and poor error messages.

                                                                                                                                                                    2. 1

                                                                                                                                                                      The argument I’ve heard is that it makes the grammar more complicated, and leads to some ambiguity issues, which results in things like Rust’s turbofish syntax (::<> iirc) or C++’s .template syntax.

                                                                                                                                                                      A different approach, Ada uses neither <>, nor [], and instead requires associating a new name to a function-call like explicit instantiation of a type or generic function. It seems like it leads to a proliferation of types, but is an approach I haven’t heard much about.

                                                                                                                                                                      1. 0

                                                                                                                                                                        No. A side benefit of using [] for types is that it makes it unlikely that [] will be abused for array/map syntax.

                                                                                                                                                                        1. 13

                                                                                                                                                                          Why do you frame everything in such an antagonistic hyperbole?

                                                                                                                                                                          You may not like [] for array indexing, but calling it “abuse” just brings down the discussion to shit-slinging level.

                                                                                                                                                                          1. -2

                                                                                                                                                                            Do you have an actual argument? (Because tone policing isn’t one.)

                                                                                                                                                                            1. 21

                                                                                                                                                                              No, that’s my job. Take a break from this thread and come back way kinder in the future. Feeling like you’re right doesn’t make it OK to heap scorn on people.

                                                                                                                                                                          2. 2

                                                                                                                                                                            What makes using [] for array/map syntax an “abuse”? What distinguishes it from literally any other syntax choice? I could claim that using () to surround function arguments is an abuse of those symbols, but I have absolutely nothing to back that up.

                                                                                                                                                                        2. 2

                                                                                                                                                                          creates the wrong incentives

                                                                                                                                                                          What are the right incentives?

                                                                                                                                                                          1. 1

                                                                                                                                                                            ! gives macro authors a card blanche to do arbitrary stuff because “the user sees it’s a macro, right?”.

                                                                                                                                                                            Instead, macros should be so well-behaved that users shouldn’t even need to know whether something is a macro or not.

                                                                                                                                                                            1. 4

                                                                                                                                                                              On the flip side, though, if macros aren’t distinguished with a !, then if the author of a macro does do something that isn’t “well-behaved”, the user has even less warning that it’s going to do that.

                                                                                                                                                                              1. 0

                                                                                                                                                                                See comment above.

                                                                                                                                                                                1. 5

                                                                                                                                                                                  Which comment? I’ve read all of your replies in this thread and I haven’t seen anything that refutes the assertion that removing ! would just make the developer experience worse if a macro does choose to do crazy things.

                                                                                                                                                                                  1. 1

                                                                                                                                                                                    Instead, macros should be so well-behaved that users shouldn’t even need to know whether something is a macro or not.

                                                                                                                                                                                    Imagine that Rust users would keep filing bugs about stupid macros until the issue is resolved, just like they successfully did with unnecessary unsafe blocks.

                                                                                                                                                                                    1. 4

                                                                                                                                                                                      So your solution to this problem is to make Rust developers waste a bunch of extra time filing issues? Instead of the current state of play, which is that every user of these hypothetical macros has at least a measure of pre-warning that the thing they’re calling is a macro and therefore might perform some crazy AST transformation on its input? I haven’t run a survey, but I would hazard a guess that this “macros do arbitrary stuff” problem is not actually a real problem that Rust developers have, partly because the intention of macros is to allow you to do arbitrary stuff.

                                                                                                                                                                                      1. 7

                                                                                                                                                                                        Rust macro syntax is informed by experience from C where macros have a function-like syntax, and still do surprising arbitrary stuff.

                                                                                                                                                                                        In C this syntax hasn’t stopped people from doing weird stuff with macros, but is stressing users who can’t be sure that everything that looks like a function call is just a function call.

                                                                                                                                                                                        It’s also worth noting that in C it’s considered a good practice to use all-caps for macro names, because even though macros could look just like functions, users don’t want that.

                                                                                                                                                                              2. 2

                                                                                                                                                                                Yes, except macros do things that functions literally cannot, such as ye olde try!().

                                                                                                                                                                                1. 0

                                                                                                                                                                                  Worked out great, didn’t it?

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    You’re advocating for try() syntax, not removal of macros.

                                                                                                                                                                            1. 29

                                                                                                                                                                              Weird, I definitely disagree on expanding this. It just wastes horizontal space and keystrokes for no benefit.

                                                                                                                                                                              Maybe I32 and Str instead of i32 and str, but abbreviations for commonly used things are good. You’re not even getting rid of the abbreviation, Int is after all short for Integer.

                                                                                                                                                                              1. 9

                                                                                                                                                                                I agree with this (I think lowercase would be fine, too, though).

                                                                                                                                                                                I think that Rust overdoes it a little bit on the terseness.

                                                                                                                                                                                I understand that Rust is a systems language and that Unix greybeards love only typing two or three characters per thing, but there’s something to be said for being descriptive.

                                                                                                                                                                                Examples of very terse things that might be confusing to a non-expert programmer:

                                                                                                                                                                                • Vec
                                                                                                                                                                                • fn
                                                                                                                                                                                • i32, u32, etc
                                                                                                                                                                                • str
                                                                                                                                                                                • foo.len() for length/size
                                                                                                                                                                                • mod for module
                                                                                                                                                                                • mut - this keyword is wrong anyway
                                                                                                                                                                                • impl

                                                                                                                                                                                None of the above bothered me when I learned Rust, but I already had lots of experience with C++ and other languages, so I knew that Vec was short for “vector” immediately. But what if I had come from a language with “lists” rather than “vectors”? It might be a bit confusing.

                                                                                                                                                                                And I’m not saying I would change all/most of the above, either. But maybe we could tolerate a few of them being a little more descriptive. I’d say i32 -> int32, Vec -> Vector, len() -> count() or length() or size(), and mut -> uniq or something.

                                                                                                                                                                                1. 11

                                                                                                                                                                                  mut -> uniq

                                                                                                                                                                                  Definitely this!

                                                                                                                                                                                  For the context of those who aren’t familiar, &mut pointers are really more about guaranteeing uniqueness than mutability. The property &mut pointers guarantee is that there is only one pointing at a given object at a time, and that nothing access that object except through them while they exist.

                                                                                                                                                                                  Mut isn’t really correct because you can have mutability through a & pointer using Cell types. You can have nearly no mutability through a &mut pointer by just not implementing any mutable methods on the type (though you can’t stop people from doing *mut_ptr = new_value()).

                                                                                                                                                                                  The decision to call this mut was to be similar to let mut x = 3… I’m still unconvinced by that argument.

                                                                                                                                                                                  1. 4

                                                                                                                                                                                    Not to mention the holy war over whether let mut x = 3 should even exist, or if every binding is inherently a mutable binding since you aren’t actually prevented from turning a non-mutable binding into a mutable one:

                                                                                                                                                                                    let x = 3;
                                                                                                                                                                                    let mut x = x;
                                                                                                                                                                                    // mutate the ever living crap out of x
                                                                                                                                                                                    
                                                                                                                                                                                    1. 4

                                                                                                                                                                                      My favorite is {x} allowing mutability, because now you’re not accessing x, but a temporary value returned by {}.

                                                                                                                                                                                      1. 2

                                                                                                                                                                                        I never knew about that one! Cute.

                                                                                                                                                                                  2. 11

                                                                                                                                                                                    For an example, check out some Swift code. Swift more or less took Rust’s syntax and made it a little more verbose. fn became func, the main integer type is Int, sequence length is .count, function arguments idiomatically have labels most of the time, and so on. The emphasis is on clarity, particularly clarity at the point of use of a symbol — a function should make sense where you find a call to it, not just at its own declaration. Conciseness is desirable, but after clarity.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      Yep. I also work with Swift and I do like some of those choices. I still think the function param labels are weird, though. But that’s another topic. :)

                                                                                                                                                                                    2. 4

                                                                                                                                                                                      I think this mostly doesn’t matter - I doubt anyone would first-try Rust, given its complexity, so it’s not really that much of an issue. Keywords are all sort of arbitrary anyway, and you’re just gonna have to learn them. Who’d think go would spawn a thread?

                                                                                                                                                                                      I, for one, think these are pretty nice - many people will learn Python so they expect len and str, and fn and mod are OK abbreviations. I think the terseness makes Rust code look nice (I sorta like looking at Rust code).

                                                                                                                                                                                      Though I’d agree on mut (quite misleading) and impl(implement what?).

                                                                                                                                                                                    3. 2

                                                                                                                                                                                      Oh, true.

                                                                                                                                                                                      I don’t care about the exact naming conventions, as long as it is consistent. (This is in fact exactly how I named types in my project though, what a coincidence. :-D)

                                                                                                                                                                                      In general the random abbreviations of everything, everywhere are pretty annoying.

                                                                                                                                                                                      1. 3

                                                                                                                                                                                        It’s the consistency, yes. Why should some types be written with minuscles?

                                                                                                                                                                                        1. 4

                                                                                                                                                                                          Lowercase types are primitive types while camelcase are library types. One has special support from the compiler and usually map to the machine instructions set while the other could be implemented as a 3rd party library.

                                                                                                                                                                                          1. 4

                                                                                                                                                                                            Because they are stack-allocated primitive types that implement Copy, unlike the other types which are not guaranteed to be stack-allocated and are definitely not primitive types.

                                                                                                                                                                                            1. 1

                                                                                                                                                                                              And how does the lower-case letter convey this fact?

                                                                                                                                                                                              1. 4

                                                                                                                                                                                                How does anything convey anything? It’s a visual signal that the type is a primitive, stack-allocated type with copy semantics. As much as I hate to defend Java, it’s similar to the int/Integer dichotomy. If they were Int and Integer, it wouldn’t be quite so clear that one is a primitive type and the other is a class.

                                                                                                                                                                                                1. 3

                                                                                                                                                                                                  I just searched for “Rust stack allocation lower-case” but couldn’t find anything. Do you have a link that explains the connection?

                                                                                                                                                                                            2. 2

                                                                                                                                                                                              Because they are used more than anything else :)

                                                                                                                                                                                              (and really it should be s32 to match u32)

                                                                                                                                                                                              1. 1

                                                                                                                                                                                                Not a good reason. Code is read way more often than it is written.

                                                                                                                                                                                                1. 4

                                                                                                                                                                                                  I don’t see how i32 is less readable. It makes the code overall more readable by making lines shorter and looks better.

                                                                                                                                                                                        1. 31

                                                                                                                                                                                          If the author is here and open to changing the post title, Rust is for everyone, and good for professionals too! The title as is sounds like it may be exclusionary toward people who don’t identity as professionals, or feel intimidated by Rust, which is contrary to Rust’s core goal of opening up systems programming to everyone!

                                                                                                                                                                                          1. 39

                                                                                                                                                                                            I, the author, am here.

                                                                                                                                                                                            I appreciate the constructive feedback and can see your point. Choosing titles is hard. I too was concerned about the exclusionary potential for the title. However, I thought I had it sufficiently mitigated by the introduction paragraphs. Apparently I could have done better.

                                                                                                                                                                                            I’m not going to change the title of this post because I don’t want to deal with the hassle of rewriting URLs. However, I will try to consider your feedback for future posts I author.

                                                                                                                                                                                            1. 6

                                                                                                                                                                                              I appreciated the way you took the feedback. Just wanted to say thanks for listening and considering it.

                                                                                                                                                                                              1. 3

                                                                                                                                                                                                I’ve programmed in the following languages: C, C++ (only until C++11), C#, Erlang, Go, JavaScript, Java, Lua, Perl, PHP, Python, Ruby, Rust, shell, SQL, and Verilog.

                                                                                                                                                                                                To me, Rust introduced a number of new concepts, like match for control flow, enums as algebraic types, the borrow checker, the Option and Result types/enums and more.

                                                                                                                                                                                                How did you use Erlang without pattern matching?

                                                                                                                                                                                                1. 2

                                                                                                                                                                                                  I think the order is alphabetical so its possible that author used Erlang after he learned Rust.

                                                                                                                                                                                                  Have a nice day!

                                                                                                                                                                                                  1. 1

                                                                                                                                                                                                    Doesn’t add up, he says that Rust introduced pattern matching to him :-)

                                                                                                                                                                                                2. 3

                                                                                                                                                                                                  My usual way of framing it is “Rust is an industrial programming language”. That leaves the door open for practitioners of all kinds. It’s more like a cars are (in general) a utility and not a plaything or research endeavor, but are open to enthusiasts and amateur practitioners as well.

                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                    Thanks! I liked the disclaimer, and think predicting how people will respond can be tough. Appreciate you putting in the time to write this, and agree that Rust can be used in professional / production environments successfully, and that it can feel like a breath of fresh air for many!

                                                                                                                                                                                                  2. 22

                                                                                                                                                                                                    Or, alternately, when someone writes 13,000 words about how nice Rust is, how ergonomic and human-centric and welcoming and humane the language and tooling and community are, they can keep the title without someone telling them they’re maybe being exclusionary.

                                                                                                                                                                                                    1. 16

                                                                                                                                                                                                      It’s constructive criticism. If you post something on the public web, it’s fair game to criticize it- especially if done in a polite manner.

                                                                                                                                                                                                      1. 23

                                                                                                                                                                                                        It’s criticism, but just because it’s delivered politely does not mean it is constructive. There is a cost to spending the effort to write a thirteen thousand word love letter to a language, just to have someone nipping at your ankles about how the first four words might exclude someone. Objectively speaking, this is a blogger that Rust would benefit from sticking around – but what is the signal they’ve received here?

                                                                                                                                                                                                        1. 11

                                                                                                                                                                                                          Agree 💯.

                                                                                                                                                                                                          Recently a friend submitted his static site generator which is optimised for math heavy sites on HN.

                                                                                                                                                                                                          He made the fatal mistake of calling it “beautiful” in the description and the amount of hangups that people had. It was done in a mostly polite manner, but the amount of time and energy wasted in discussing just the first sentence with barely any technical discussion of the internals, was a form of pathological bikeshedding that I was surprised to see. It was just that “nipping at his ankles” as you’ve described, which can take its toll.

                                                                                                                                                                                                          Vowed to never take that site seriously again.

                                                                                                                                                                                                          1. 1

                                                                                                                                                                                                            It was done in a mostly polite manner, but the amount of time and energy wasted in discussing just the first sentence with barely any technical discussion of the internals, was a form of pathological bikeshedding that I was surprised to see. It was just that “nipping at his ankles” as you’ve described, which can take its toll.

                                                                                                                                                                                                            Agreed. Yet here we are- arguing about arguing. I need a life… xD

                                                                                                                                                                                                            1. 1

                                                                                                                                                                                                              Right, in my experience, HN often attracts uninteresting, unhelpful, or even mean-spirited commentary. Sometimes I am surprised by the opposite, though. In any case, understanding the dynamic really helps. A lot of commentary, seems to me, are upset at some level in some way and take it out in their commentary.

                                                                                                                                                                                                            2. 3

                                                                                                                                                                                                              The author thanked them and described the feedback as constructive. So if they feel like they’ve taken something away from it, who are we to decide otherwise? My own hopefully constructive feedback here is that this subthread strikes me as projecting conflict into an interaction between two parties who themselves seem to have had a positive experience with it.

                                                                                                                                                                                                              1. 2

                                                                                                                                                                                                                Yeah, I get where you’re coming from and I don’t really disagree.

                                                                                                                                                                                                                But I also think that the person who offered the criticism is just trying to help the author get more views.

                                                                                                                                                                                                                It’s fair to suggest that we all should consider our criticisms carefully, though. Because you’re right- if the criticism isn’t that important, we may just be disincentivizing someone from future contributions.

                                                                                                                                                                                                                I also wonder if you’re maybe reading a little too hard into the choice of the word “exclude” used by the criticizer, though… I think that term has a little bit of extra charge and connotation in today’s social environment and I don’t believe the criticizer meant it in that way. I think they simply meant that a person who isn’t writing enterprise software might pass over the article because they believe they aren’t the target audience. I agree with that conclusion as well, because I do write enterprisey software and I thought the article was going to be about that specific point of view- I thought I would see arguments about productivity and developer costs and cross-platform support and other less-sexy stuff. But, it was really- as you said, just a love letter to everything about Rust.

                                                                                                                                                                                                            3. 8

                                                                                                                                                                                                              I felt this lead-in made it a friendly suggestion and not harsh:

                                                                                                                                                                                                              If the author is here and open to changing the post title

                                                                                                                                                                                                              1. 4

                                                                                                                                                                                                                FWIW first third of those thousands of words is irellevant chitchat. The First actual claim on why is rust good is rust makes me giddy. I’m not sure “giddy” describes profesionals. It’s not no, but for me definitely not a yes either - giddy is just…giddy. Then all the technical points, borrow checkers, race conditions and whatnot - none of that tells me why is it a thing for professionals.

                                                                                                                                                                                                                What I mean is, I don’t know if rust is for pros or not, I just think that the title is a bit click-baity, and “rust is good for everyone, even pros” like alilleybrinker suggested would work much better.

                                                                                                                                                                                                                1. 7

                                                                                                                                                                                                                  The First actual claim on why is rust good is rust makes me giddy. I’m not sure “giddy” describes profesionals.

                                                                                                                                                                                                                  There’s a layer of extra irony here in that the word “amateur” comes from a root meaning “love”; in other words, amateurs are people who do something because they love it. So taken literally, this is very unprofessional!

                                                                                                                                                                                                              2. 18

                                                                                                                                                                                                                It seems relevant to note that the author does address this in the post itself:

                                                                                                                                                                                                                The statement Rust is for Professionals does not imply any logical variant thereof. e.g. I am not implying Rust is not for non-professionals. Rather, the subject/thesis merely defines the audience I want to speak to: people who spend a lot of time authoring, maintaining, and supporting software and are invested in its longer-term outcomes.

                                                                                                                                                                                                                1. 10

                                                                                                                                                                                                                  Yes, except the title doesn’t have a disclaimer, and will be taken in the way they say they don’t want. Rather than leaving it ambiguous, they could change the title to remove the ambiguity.

                                                                                                                                                                                                                  1. 28

                                                                                                                                                                                                                    This side-steps the issue “people don’t read past the title” - which is the real problem. It’s bad, and unrealistic, to expect every person who writes on the internet to tailor each individual sub-part of an article (including the title) to an audience that is refusing to read the (whole) article itself before making judgements or assumptions. That’s purely the fault of the audience, not the writer, and changing the article title is merely addressing the symptoms, instead of the root problem, which will allow it to just become worse.

                                                                                                                                                                                                                    We have an expression “judging a book by its cover” specifically for this scenario, and in addition to that, any reasonably-thoughtful reader is aware that, once a sufficient amount of context has been stripped away, any statement loses its meaning - which logically implies that full context must be absorbed before the reader has any chance of understanding the author’s intended meaning.

                                                                                                                                                                                                                    People should not have to write hyper-defensively on the internet, or anywhere, because civil discussion collapses when your audience isn’t acting honestly.

                                                                                                                                                                                                                    Reading the title and judging before reading the content itself is not acting honestly.

                                                                                                                                                                                                                    1. 4

                                                                                                                                                                                                                      Thank you for writing this. I’m sick of how much culture is warped by toxic social media sites.

                                                                                                                                                                                                                    2. 7

                                                                                                                                                                                                                      Agreed. It’s a poor choice for a title, even with a disclaimer. In fact, that he knew he needed a disclaimer should have been a big clue that it wasn’t a good title.

                                                                                                                                                                                                                      A better title would be: “Professional devs should love Rust”, or “Rust isn’t just for enthusiasts and hipsters”

                                                                                                                                                                                                                      1. 0

                                                                                                                                                                                                                        I don’t disagree.

                                                                                                                                                                                                                    3. 18

                                                                                                                                                                                                                      Responses like this make me hesitant to try Rust, because they make me feel that I’d have to tiptoe around every word I put into a chat room, issue tracker, or mailing list.

                                                                                                                                                                                                                      1. 10

                                                                                                                                                                                                                        I’m not sure this is a Rust issue as much as a general issue of recent years. Be delicate and excessively sensitive about everything because everyone’s an egg shell. It’s contrary to anti-fragility which I would suggest is a far better approach; and the opposite approach. “Rust is for professionals” would have had me targeting Rust so that I could level up, not scare me away. Show me a challenge,

                                                                                                                                                                                                                      2. 5

                                                                                                                                                                                                                        I used rust for three years outside of work, but I’m afraid I stopped last year because I find it too big for a hobbyist. If I used it all day every day - no problem. It’s a great language, but I agree with the title.

                                                                                                                                                                                                                        1. 2

                                                                                                                                                                                                                          This was my first thought, as well, before even reading the article. Obviously I should read before judging, but the author may want to consider that the title could turn away potential readers.

                                                                                                                                                                                                                          I made the same mistake in my own My staff engineering reading list. There was no reason for me to needlessly exclude people earlier in their careers from my list.

                                                                                                                                                                                                                          And it’s good feedback that the author of this piece may not want to unintentionally exclude people from their article.

                                                                                                                                                                                                                        1. 5

                                                                                                                                                                                                                          asdf, or if one already exists with that name and the same extension, asdfasdf

                                                                                                                                                                                                                          1. 2

                                                                                                                                                                                                                            Yes, or some variation, like asasasdf.txt or asasasasaa.org

                                                                                                                                                                                                                          1. 57

                                                                                                                                                                                                                            You don’t need to put random files somewhere, the ext filesystems have had a “reserved percentage” and set it to 5% for exactly this reason. If you ever run out of space on a partition, just

                                                                                                                                                                                                                            tune2fs -m 0

                                                                                                                                                                                                                            clean up fs

                                                                                                                                                                                                                            tune2fs -m 5

                                                                                                                                                                                                                            and you’re done.

                                                                                                                                                                                                                            • NB, this doesn’t work if the thing that is using all the disk space is run as root, but that is one of the many reasons why you don’t run services as root.
                                                                                                                                                                                                                            1. 10

                                                                                                                                                                                                                              I can already see myself forgetting to do the second part.

                                                                                                                                                                                                                              1. 11

                                                                                                                                                                                                                                Yeah, I prefer the “8GB empty file” approach more. If I’m in a panic trying to fix a server which fell over, I’m much more likely to remember how rm works than how tune2fs works.

                                                                                                                                                                                                                                1. 15
                                                                                                                                                                                                                                  alias uhoh='tune2fs -m 0'
                                                                                                                                                                                                                                  alias phew='tune2fs -m 5'
                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                  1. 8

                                                                                                                                                                                                                                    You’re almost never going to use those aliases. If you’re lucky, you’ll still have them in your shell rc file in 5 years when you run out of space. You’ll certainly have forgot about them by then.

                                                                                                                                                                                                                                    1. 3

                                                                                                                                                                                                                                      I was being somewhat facetious :) my point is that now you know about the trick, there are ways to make it easier to remember and use if you ever need it.

                                                                                                                                                                                                                                  2. 2

                                                                                                                                                                                                                                    I think the trick is knowing that the fs saves 5% of the drive for exactly this situation. The exact command can be googled. I’ll admit I looked at the man page before typing in the original comment. I know disk space is cheap these days, but losing 8GB of space more than the 5% that you’ve already lost seems really wasteful to me.

                                                                                                                                                                                                                                  3. 7

                                                                                                                                                                                                                                    Wouldn’t you also be just as likely to forget to recreate the file if you were using the strategy proposed by the article?

                                                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                                                      I’d probably have them set up in an ansible config. Don’t need to remember, the computer remembers for you.

                                                                                                                                                                                                                                      1. 4

                                                                                                                                                                                                                                        you can set up tune2fs -m 5 in an ansible config as well.

                                                                                                                                                                                                                                    2. 5

                                                                                                                                                                                                                                      You can tune a file system, but you can’t tune a fish.

                                                                                                                                                                                                                                      1. 2

                                                                                                                                                                                                                                        This is great information, but I can see it not finding its way to everybody who needs to know it, like someone spending their time mainly on building the application they then serve. When / how did you learn this?

                                                                                                                                                                                                                                        1. 7

                                                                                                                                                                                                                                          This is something that’s been in UNIX since at least the ‘80s, so any basic intro to UNIX course ought to cover it. I came across it in an undergrad UNIX course. Per-user filesystem quotas have also been around for a long time, this is just a degenerate special case (it’s traditionally implemented by setting root’s quota to 105% and underreporting the ‘capacity’ of the disk).

                                                                                                                                                                                                                                          Note that this is far more reliable than creating an empty file. Most *NIX filesystems support ‘holes’, so unless you actually write data everywhere, you’re not actually going to consume disk space. Worse, on CoW filesystems, it’s possible that deleting a file can require you to allocate space on the disk, which may not be possible if you let the filesystem get 100% full. I believe this is the case for ZFS if the zpool gets completely full.

                                                                                                                                                                                                                                          1. 2

                                                                                                                                                                                                                                            Thanks! In the early years after university (think mid-2000s), I often wished my school had given some more practical knowledge. They were very much on the theory side, so I learned a lot of OS concepts and was ready when functional programming really landed, but only my internships stooped to discuss pragmatic things like version control. If you didn’t get this knowledge from academia or if you didn’t go through academia in the first place, where would you look for it?

                                                                                                                                                                                                                                            1. 3

                                                                                                                                                                                                                                              It’s been over 20 years since I read a Linux book, but I’m pretty sure that the last one I read covered it. It’s the sort of thing I’d expect to see in anything aimed at sysadmins.

                                                                                                                                                                                                                                            2. 1

                                                                                                                                                                                                                                              the output of df and fsck will tell you about this. I probably learned about it when I realized the filesystem was one size but df had a slightly smaller size.

                                                                                                                                                                                                                                        1. 18

                                                                                                                                                                                                                                          Other posts in this series:

                                                                                                                                                                                                                                          • Why All My Servers Have a Process that Allocates 1 GB of RAM and Then Sleeps Forever
                                                                                                                                                                                                                                          • Why All My Servers Have a Process that Runs an Infinite Loop on One of the Cores
                                                                                                                                                                                                                                          • Why All My Databases has a Table With 1 GB of NUL Strings
                                                                                                                                                                                                                                            1. 11

                                                                                                                                                                                                                                              You can rely on Go picking up stupid ideas and doing them for real ..

                                                                                                                                                                                                                                              1. 3

                                                                                                                                                                                                                                                Thanks for sharing – that was a fun read! “Ballast” is such a perfect name for this.

                                                                                                                                                                                                                                            1. 9

                                                                                                                                                                                                                                              I use a ZSA Moonlander, which I absolutely love, and I doubt I’ll ever want to use another different keyboard again. I just filled out your survey!

                                                                                                                                                                                                                                              1. 4

                                                                                                                                                                                                                                                I also recently got a Moonlander. I’m not back at my full speed yet but I’ve only had it for a full week. So far I really enjoy it.

                                                                                                                                                                                                                                                1. 3

                                                                                                                                                                                                                                                  I got a Moonlander last year just before Christmas. That way I could use the break to relearn how to type. I learned proper touch typing for the first time in my life. Found out that I was crossing over for the ‘y’ and ‘6’ keys all the time. It’s been about two and a half months now and I feel like I’m back up to speed.

                                                                                                                                                                                                                                                  Recovery was partly spending 30 minutes a day on typing sites, and partly a matter of changing the layout to avoid my most common errors. (When trying to use my left index finger to hit the phantom ‘y’ key on the left side, I was hitting the “layer 2” modifier. Remapped those centerline keys to ‘(’, ‘{’, and ‘[’, which helped a lot.)

                                                                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                                                                    I’m having exactly the same issue right now. Thanks for the suggestion.

                                                                                                                                                                                                                                                2. 3

                                                                                                                                                                                                                                                  The Moonlander looks really good to type on! when I’m back in work I think I’ll invest in one!

                                                                                                                                                                                                                                                  Thanks for doing the survey.

                                                                                                                                                                                                                                                  1. 3

                                                                                                                                                                                                                                                    I can’t recommend it enough. You’re clearly experienced with split/ergonomic keyboards, and I can’t speak to others as this is the only one I’ve used, but there isn’t a single thing about this keyboard I wish I could change, and I’ve been using it for a few months now.

                                                                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                                                                      Thanks for the recommend, typing on the ErgoDox that I built has been a pleasure, and the Moonlander looks like a great extension of that.

                                                                                                                                                                                                                                                1. 2

                                                                                                                                                                                                                                                  This would certainly be interesting to me if I didn’t love my Moonlander so much. The thing I really want to see, and I don’t know if anyone is doing, is something like this but for mice.

                                                                                                                                                                                                                                                  1. 4

                                                                                                                                                                                                                                                    For mouse, Ploopy is pushing with qmk to be able to use it with mouse and trackball but it is still the beginnings.

                                                                                                                                                                                                                                                  1. 4

                                                                                                                                                                                                                                                    Forgive my apparent tone-blindness, but what makes this satire?

                                                                                                                                                                                                                                                    1. 11

                                                                                                                                                                                                                                                      This is a parody of this blog post, likely in response to this one.

                                                                                                                                                                                                                                                    1. 14

                                                                                                                                                                                                                                                      Rust seems like a cult at this point. It seems that in every post there is always someone commenting “you know, in Rust we do it like this”, or “how funny, this remind me that one time, at Rust camp, when…”

                                                                                                                                                                                                                                                      I’m glad some many people have found their passion, but it is funny nonetheless to see how “intense” Rust fans can be.

                                                                                                                                                                                                                                                      1. 11

                                                                                                                                                                                                                                                        Rust does an excellent job alienating a decent number of C++ programmers by constantly hijacking their posts.

                                                                                                                                                                                                                                                        I wish people would also stop wrapping C++ up in discussions about C. They’re not the same language and each have their own good and bad points. That table’s wrong: C++ is type safe, has C++ has implicit typing with auto and you can do “dynamic” type checking (either with templates or std::any).

                                                                                                                                                                                                                                                        1. 7

                                                                                                                                                                                                                                                          C++ is type safe

                                                                                                                                                                                                                                                          What meaning of “type safe” do you have in mind here? In C++ the type system is more of a suggestion than a strict enforcer. Let’s see what Wikipedia has to say about it:

                                                                                                                                                                                                                                                          First definition:

                                                                                                                                                                                                                                                          In computer science, type safety is the extent to which a programming language discourages or prevents type errors. A type error is erroneous or undesirable program behaviour caused by a discrepancy between differing data types for the program’s constants, variables, and methods (functions), e.g., treating an integer (int) as a floating-point number (float).

                                                                                                                                                                                                                                                          Second definition:

                                                                                                                                                                                                                                                          Vijay Saraswat provides the following definition: “A language is type-safe if the only operations that can be performed on data in the language are those sanctioned by the type of the data.”

                                                                                                                                                                                                                                                          Both are demonstrably not true for C++ with its const_cast, reinterpret_cast, normal casts between different pointer types, no array bounds checking and lack of memory safety which results in values being overwritten by other data and basically any violation of type system you can think of.

                                                                                                                                                                                                                                                          Now, Rust also isn’t type-safe. Safe Rust is type-safe. Unsafe Rust isn’t, but even unsafe Rust is more type-safe than C++.

                                                                                                                                                                                                                                                          1. 4

                                                                                                                                                                                                                                                            In C++ the type system is more of a suggestion than a strict enforcer

                                                                                                                                                                                                                                                            I can’t comprehend how that could be true, other than that it allows explicit casting, which many languages (that are generally considered type-safe) do. One typical difference is that C++ is not memory safe, and such a cast may have or result in undefined behaviour rather than a run-time error as a result. But memory safe and type safe are not the same thing.

                                                                                                                                                                                                                                                            Let’s see what Wikipedia has to say about it:

                                                                                                                                                                                                                                                            The first definition is bogus, and the second is met by C++, excluding casts; it won’t let you call a member function that doesn’t exist, it won’t let you add two things that have no suitable operator overload defined, etc. That’s what’s usually meant by type-safety: if the code compiles and contains no type casts, you can’t get a runtime type error. Casts do break this, of course, but if you use a cast you’re explicitly overriding the type system.

                                                                                                                                                                                                                                                            It may do a few implicit conversions if necessary, which is an example of weak typing, but not of lack of type safety.

                                                                                                                                                                                                                                                            (One problem, admittedly, is that there is no very good agreement on what “type safety” really means, as can be seen in the wikipedia article you refer to. But it irks me that people point at C++ and say it lacks type safety because of XYZ, and they are really talking about memory safety or implicit conversion).

                                                                                                                                                                                                                                                            no array bounds checking and lack of memory safety

                                                                                                                                                                                                                                                            That’s nothing to do with type safety.

                                                                                                                                                                                                                                                            1. 4

                                                                                                                                                                                                                                                              Without memory-safety there is no type-safety, as you can modify any object representation to anything you want. You don’t need casts in C++ to violate type-safety in this way, just use-after free, out-of-bounds array access, use-after-referenced-object-wend-out-of-scope.

                                                                                                                                                                                                                                                              I can’t comprehend how that could be true, other than that it allows explicit casting, which many languages (that are generally considered type-safe) do.

                                                                                                                                                                                                                                                              Which languages are you talking about and in what way does casting in them violate type-safety? Note that type-casting alone isn’t a problem in C++, only casting of pointers.

                                                                                                                                                                                                                                                              1. 2

                                                                                                                                                                                                                                                                in what way does casting in them violate type-safety

                                                                                                                                                                                                                                                                It doesn’t, that was the point I was making.

                                                                                                                                                                                                                                                                You have certain types of cast available in C++ for which using them breaks universal type safety (as you define it at least). But, they’re clear markers in the code, and they indicate a choice of the programmer to override the type system. Saying “the type system is more of a suggestion than a strict enforcer” is true for C++ only in the same way as it is for Rust, which has an “unsafe” keyword and allows casts; that is, it’s not really true at all. Type-checking in C++ is generally quite stringent.

                                                                                                                                                                                                                                                                even unsafe Rust is more type-safe than C++

                                                                                                                                                                                                                                                                How would you even measure it? If “without memory-safety there is no type-safety” – your own words – then both unsafe Rust and C++ have no type-safety, and unsafe Rust can’t be “more” type-safe than C++.

                                                                                                                                                                                                                                                                I think Rust is pushing language development in a good direction, but this kind of “Rust good, C++ bad!” clamour is not constructive.

                                                                                                                                                                                                                                                                1. 2

                                                                                                                                                                                                                                                                  You have certain types of cast available in C++ for which using them breaks universal type safety (as you define it at least). But, they’re clear markers in the code, and they indicate a choice of the programmer to override the type system.

                                                                                                                                                                                                                                                                  That’s only true for casts though. I’ve already pointed out many other aspects of the language which don’t require any casts, and yet violate type-safety. You can’t grep for out-of-bounds array access, use-after-free,use-after-referenced-variable-went-out-of-scope the way you can for unsafe.

                                                                                                                                                                                                                                                                  How would you even measure it? If “without memory-safety there is no type-safety” – your own words – then both unsafe Rust and C++ have no type-safety, and unsafe Rust can’t be “more” type-safe than C++.

                                                                                                                                                                                                                                                                  I need to do more in unsafe Rust to e.g. go against the borrow-checker. It’s not enough to just write unsafe, I also need to convert some references into pointers. In C++ there is no equivalent thing that would stop me from violating the ownership model.

                                                                                                                                                                                                                                                                  I think Rust is pushing language development in a good direction, but this kind of “Rust good, C++ bad!” clamour is not constructive.

                                                                                                                                                                                                                                                                  There are good and bad language design decisions. C++ had plenty of the latter. Is pointing out the bad decisions inconstructive? Maybe in the sense that it doesn’t advance the state of C++. But I think it’s constructive in the sense that people should be aware that it’s not the only way in the niche that C++ fills and there are options you can switch to. C++ continually disappoints me both in ergonomics and safety, and its committee never disappoints on the front of making it even worse that it already is. So yes, it’s not constructive for C++. I don’t have a problem with that. Pointing out those flaws also serves another constructive purpose: a warning not to repeat C++‘s faults in other languages. Let’s learn from the past.

                                                                                                                                                                                                                                                                  1. 1

                                                                                                                                                                                                                                                                    C++ had plenty of the latter. Is pointing out the bad decisions inconstructive?

                                                                                                                                                                                                                                                                    No. But bold assertions like “In C++ the type system is more of a suggestion than a strict enforcer” are unconstructive. Assertions like “unsafe Rust is more type-safe than C++” are unconstructive if you don’t clarify what you mean by “more type-safe”.

                                                                                                                                                                                                                                                                    How would you even measure it?

                                                                                                                                                                                                                                                                    I need to do more in unsafe Rust to e.g. go against the borrow-checker

                                                                                                                                                                                                                                                                    You’re missing my point. You vacillate between treating type-safety as a binary quantity (“C++ is not type-safe”) and as a spectrum (“unsafe Rust is more type-safe than C++”). Pick one!

                                                                                                                                                                                                                                                                    1. 1

                                                                                                                                                                                                                                                                      Agreed. I was being ridiculous. Too much time spent on the internet.

                                                                                                                                                                                                                                                              2. 1

                                                                                                                                                                                                                                                                it allows explicit casting, which many languages (that are generally considered type-safe) do.

                                                                                                                                                                                                                                                                Please name one language that allows unsafe typecasts but is considered type-safe.

                                                                                                                                                                                                                                                                That’s what’s usually meant by type-safety: if the code compiles and contains no type casts, you can’t get a runtime type error.

                                                                                                                                                                                                                                                                Most people’s definition of type safety is not the same as yours; runtime type errors are an example of type safety as the language doesn’t allow values of a type to be used incorrectly. Compile-time vs runtime type-checking has nothing to do with type safety. You seem to be confusing static typing with type safety.

                                                                                                                                                                                                                                                                1. 1

                                                                                                                                                                                                                                                                  Please name one language that allows unsafe typecasts but is considered type-safe.

                                                                                                                                                                                                                                                                  I didn’t say “unsafe typecasts”.

                                                                                                                                                                                                                                                                  If you want to make the argument that it’s the unsafe casts that make C++ not typesafe, I’m somewhat ok with that. But do casts in general make it not typesafe? No. Implicit conversions? No.

                                                                                                                                                                                                                                                                  Most people’s definition of type safety is not the same as yours; runtime type errors are an example of type safety as the language doesn’t allow values of a type to be used incorrectly

                                                                                                                                                                                                                                                                  Definitions are problematic here, as I already noted. By your definition, I don’t think you can have a memory-unsafe language which is type-safe at all (depending on what exactly you mean by “used incorrectly”, I suppose). The wikipedia article also essentially defines “type safe” and “memory safe” in a way that you can’t have one without also having the other. That seems pointless to me, but ok, maybe it’s the more accepted usage.

                                                                                                                                                                                                                                                              3. 1

                                                                                                                                                                                                                                                                C++ does implicit conversions of primitives, that doesn’t mean that it’s not type safe. You can see this with restrictions on narrowing casts on things like std::vector<int> v = {{ 1, 2, 3.0 }}; giving an error, and also with how function overrides with various primitives work. This is also visible at the function level because C doesn’t allow function overloading, whereas C++ does, because the types (integer, float, etc.) are part of the symbol put in the binary.

                                                                                                                                                                                                                                                                Rust even allows normal casts between pointer types using as. This is actually a difference between C and C++ in that C++ requires the cast.

                                                                                                                                                                                                                                                                reinterpret_cast in C++ is used for the same purposes as std::mem::transmute in Rust, for most of the same reasons, like reinterpreting binary data from a file or network as a struct.

                                                                                                                                                                                                                                                                I think I’ve only ever seen one actual use of const_cast in 5 years and about 20 million lines of code.

                                                                                                                                                                                                                                                                1. 4

                                                                                                                                                                                                                                                                  C++ does implicit conversions of primitives, that doesn’t mean that it’s not type safe.

                                                                                                                                                                                                                                                                  It doesn’t matter whether they are implicit.

                                                                                                                                                                                                                                                                  Here is a perfectly valid C++14 program demonstrating problems with casts:

                                                                                                                                                                                                                                                                  #include <iostream>
                                                                                                                                                                                                                                                                  #include <string>
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  int main() {
                                                                                                                                                                                                                                                                      const std::string hello = "hello";
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      float* fello = (float*)(void*)const_cast<std::string*>(&hello);
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      *fello /= 0.0;
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      std::cout << hello;
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      int x = 5;
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      double* y = (double*)&x;
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      std::cout << *y;
                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                  Another one, no casts, no bounds-checking:

                                                                                                                                                                                                                                                                  #include <iostream>
                                                                                                                                                                                                                                                                  #include <string>
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                  int main() {
                                                                                                                                                                                                                                                                      const std::string hello = "hello";
                                                                                                                                                                                                                                                                      volatile int a[] = {1, 2, 3};
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      for (int i = 0; i <= 3; i++) {
                                                                                                                                                                                                                                                                          a[i] = 0xff;
                                                                                                                                                                                                                                                                      }
                                                                                                                                                                                                                                                                  
                                                                                                                                                                                                                                                                      std::cout << hello;
                                                                                                                                                                                                                                                                  }
                                                                                                                                                                                                                                                                  

                                                                                                                                                                                                                                                                  What do they have in common? They demonstrate that the language is not type-safe (they violate the semantics of the std::string type). Similar effects can be achieved with use-after-free, referring to variables whose references were captured in e.g. a lambda, but whose scope already ended.

                                                                                                                                                                                                                                                                  Rust even allows normal casts between pointer types using as.

                                                                                                                                                                                                                                                                  reinterpret_cast in C++ is used for the same purposes as std::mem::transmute in Rust, for most of the same reasons, like reinterpreting binary data from a file or network as a struct.

                                                                                                                                                                                                                                                                  You can do neither in safe Rust. All C++‘s footguns on the other hand are at your disposal at all times. And you can’t just grep for them in an inherited codebase.

                                                                                                                                                                                                                                                                  Wikipedia page provides a clear objective definition of a type-safe language. It isn’t a language that merely allows you to write programs that don’t violate type safety. It’s a language that prevents you and your collaborators from violating type safety, so you may sleep well, without the paranoia that maybe a string is not a string.

                                                                                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                                                                                    Type-casts are explicitly there to subvert type-safety. Rust has equivalent constructs, and I can write equivalent programs in Rust, if you allow me the “unsafe” keyword.

                                                                                                                                                                                                                                                                    Native arrays in C++ are of course flagrantly unsafe. So is pointer arithmetic. Both are heavily discouraged in modern C++

                                                                                                                                                                                                                                                                    So I will disagree with you that Rust is type-safe; only the subset without “unsafe” is. I agree C++ is unsafe, but the unsafety can be avoided by avoiding certain language features, which can be enforced as part of a style guide. (Unlike C, where no style guide can save you.)

                                                                                                                                                                                                                                                                    (I do think “unsafe” is a brilliant feature, and I wish other languages had it; I’m looking at you, Nim.)

                                                                                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                                                                                      Native arrays in C++ are of course flagrantly unsafe. So is pointer arithmetic. Both are heavily discouraged in modern C++

                                                                                                                                                                                                                                                                      They are discouraged in favour of std::vector with operator[] which has the same problem.

                                                                                                                                                                                                                                                                      So I will disagree with you that Rust is type-safe; only the subset without “unsafe” is.

                                                                                                                                                                                                                                                                      If you check my comment again, you will see that I explicitly said that Rust isn’t type-safe, only safe Rust (as in without unsafe code) is.

                                                                                                                                                                                                                                                                      1. 1

                                                                                                                                                                                                                                                                        Hm, I’d forgotten that vector isn’t range-checked by default. I use the libc++ feature that turns on range checking, plus the Clang address and UB sanitizers in test builds.

                                                                                                                                                                                                                                                                        1. 1

                                                                                                                                                                                                                                                                          At that point you can opt into bounds-checking in the compiler and then classic arrays are just fine. You’ll gain lighter syntax and faster compilation as well. Unless you want growable arrays, but that’s a different scenario.

                                                                                                                                                                                                                                                                          1. 1

                                                                                                                                                                                                                                                                            I’m not aware of a compiler flag for bounds-checking C arrays … ? It seems of limited use because, if you pass an array as a function parameter, it decays into a pointer with no length information.

                                                                                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                                                                                              g++ -fcheck-pointer-bounds -mmpx

                                                                                                                                                                                                                                                                              Appears to work with arrays converted to pointers as well. But maybe there is a case where it will not work. I would have to check more details.

                                                                                                                                                                                                                                                                              UPDATE: Above works only on x86 linux though. But after a bit of searching I found this piece on Wikipedia, which says that you can enable bounds-checking in STL with _GLIBCXX_DEBUG=1 or _LIBCPP_DEBUG=1 preprocessor constants. That will be more portable. I’m glad I found out about it. Less stress in the future debugging C++ memory issues.

                                                                                                                                                                                                                                                                  2. 1

                                                                                                                                                                                                                                                                    Implicit conversions have nothing to do with type safety. JavaScript will implicitly convert a float to a string but is a type-safe language. You can work around C++‘s type system which means it isn’t type-safe. Rust’s std::mem::transmute is also not type-safe and can’t be used in safe Rust code.

                                                                                                                                                                                                                                                              4. 2

                                                                                                                                                                                                                                                                Maybe explore why this is the case?

                                                                                                                                                                                                                                                                1. 6

                                                                                                                                                                                                                                                                  If I had to guess, it’s desperation to validate the time they’ve spent climbing the absurd learning curve. I see so many Rust programmers who only have personal projects to show, and bash away with Python/Go/Whatever at their jobs.

                                                                                                                                                                                                                                                                  I’d never even consider Rust for anything serious. It’s way too difficult to learn, and there’s way too many low-quality user conversations that I’ve read. It’s hard to take it seriously.

                                                                                                                                                                                                                                                                  I think Zig will eventually find a place in low-level systems programming, and thank God for that. It’s by no means perfect, imo, but it’s way easier to learn than Rust.

                                                                                                                                                                                                                                                                  1. 12

                                                                                                                                                                                                                                                                    Your comment reads like your issues with Rust are that (i) it’s not mainstream, and (ii) you’re not familiar with it.

                                                                                                                                                                                                                                                                    I’ll just note that C++ is probably even harder to learn than Rust. Except most don’t even realise it, because on average, they’re much more familiar with C++ already.

                                                                                                                                                                                                                                                                    1. 5

                                                                                                                                                                                                                                                                      I’ll just note that C++ is probably even harder to learn than Rust.

                                                                                                                                                                                                                                                                      I agree. I think there’s a misconception that Rust is harder to learn than it is, and that comes from the strong shift it forces you to make in your mental model when you’re at the early-intermediate stage of your learning. It’s an uncomfortable thing to have to do, because it makes you feel like a beginner for a bit, but ultimately I don’t think it makes Rust that much harder to learn. I think if you were learning Rust and you actually were a beginner to programming, that barrier wouldn’t really exist.

                                                                                                                                                                                                                                                                      C++ teaches you the same lessons that Rust’s borrow checker does, but it teaches you those things over the span of 40 years through hard-won experience. Rust compresses that into a few months.

                                                                                                                                                                                                                                                                      1. 5

                                                                                                                                                                                                                                                                        I’ve always been curious about this. Having written C++ and C in the past (though not a lot), I found Rust’s borrow checker to be, in most cases, fairly easy to learn. I understand the pain if you’re coming from a managed memory language, but if you’re already used to manual memory management, the borrow checker often just enforces best practices. Don’t return dangling pointers unless they have an explicitly tracked lifetime, make sure that any function consuming a struct uses a read-only pointer to the struct, etc, etc. The borrow checker certainly makes some things that a programmer knows is safe much harder to express, but that sounds more like a sharp edge than a learning curve. And if you’re coming from a managed language, manual memory management will always be a learning curve.

                                                                                                                                                                                                                                                                        1. 2

                                                                                                                                                                                                                                                                          Rust compresses that into a few months.

                                                                                                                                                                                                                                                                          That’s exactly what I mean by “hard to learn”; the learning is front-loaded. The payoff is great but the cost is very real.

                                                                                                                                                                                                                                                                        2. 1

                                                                                                                                                                                                                                                                          The low-quality internet chatter certainly doesn’t help, case in point TFA. Most of it just reads like marketing blog posts and exhortations on the glory of the fearless borrow checker.

                                                                                                                                                                                                                                                                        3. 6

                                                                                                                                                                                                                                                                          If I had to guess, it’s desperation to validate the time they’ve spent climbing the absurd learning curve.

                                                                                                                                                                                                                                                                          I can only speak from my own experience, but for me this is the other way around. My outward expression of enthusiasm is a result of already feeling the time I spent learning Rust has been validated by how much I enjoy working with the language.

                                                                                                                                                                                                                                                                          I see so many Rust programmers who only have personal projects to show, and bash away with Python/Go/Whatever at their jobs.

                                                                                                                                                                                                                                                                          I’m not sure if you intended it as such, but I don’t think this really works as a supporting argument that it’s too difficult to learn. Rust jobs are still really scarce, for a variety of debatable reasons - foremost among them, imo, that it’s trying to displace some very well-established/entrenched languages (C and C++). That and the fact that it’s still quite a young language in the grand scheme of things. I think that scarcity is probably the main reason you see this happening.

                                                                                                                                                                                                                                                                          I’d never even consider Rust for anything serious. It’s way too difficult to learn

                                                                                                                                                                                                                                                                          Again, I can only speak anecdotally, but I work full-time in Rust, and it’s in a very serious use-case. And I work with people who didn’t know Rust before they worked here, and they’re getting by more than fine.

                                                                                                                                                                                                                                                                          And yes, I realise the more I type the more I validate this:

                                                                                                                                                                                                                                                                          to see how “intense” Rust fans can be

                                                                                                                                                                                                                                                                    1. 22

                                                                                                                                                                                                                                                                      Largely, I agree with everything in here, but I feel like there’s some logical inconsistency between two of the points the author makes. First, they give this argument for short lines:

                                                                                                                                                                                                                                                                      Easy-to-read code is easier to follow and understand which leads to fewer bugs and faster debugging.

                                                                                                                                                                                                                                                                      But then they argue for 2-space indentation:

                                                                                                                                                                                                                                                                      To make this work, and yet allow a few indent levels, the code basically have to have small indent-levels, so I prefer to have it set to two spaces per level.

                                                                                                                                                                                                                                                                      I think 2-space indentation and long lines have similar effects on readability. In my experience, such a small indentation amount makes it really hard for my eye to follow which level I’m looking at, which is not all that different from the way long lines make me lose track of which line I’m on when I have to jump all the way to the left to find the beginning of the next line.

                                                                                                                                                                                                                                                                      All of this is not to say I think the author is wrong, per se, but more to point out that using 100 columns rather than 80 allows you to use 4-space indentation, for readability reasons, and still keep all the other benefits of hard-wrapping at a relatively short column width. I tend to think it’s more important to have a column limit, and that it’s consistent across a codebase, than exactly what the column width is.

                                                                                                                                                                                                                                                                      1. 3

                                                                                                                                                                                                                                                                        Does this support macOS? cargo install meli fails with errors that look suspiciously like issues with cross-platform compatibility.

                                                                                                                                                                                                                                                                        1. 4

                                                                                                                                                                                                                                                                          Basically OSX doesn’t have POSIX timers, and I don’t have an OSX machine to implement kqueue timers instead; contributions are very welcome. Here’s the issue https://git.meli.delivery/meli/meli/issues/46

                                                                                                                                                                                                                                                                          1. 2

                                                                                                                                                                                                                                                                            Ι pushed a commit to use async timers (timerfd/kqueue) yesterday, I can’t test if master can compile now but the timer problem should be solved now.

                                                                                                                                                                                                                                                                            If you want to test it, git clone and run make

                                                                                                                                                                                                                                                                            1. 1

                                                                                                                                                                                                                                                                              It does! I was able to compile master, although I had to sd '@install' '@ginstall' Makefile before I could make install (filed an issue for this here).

                                                                                                                                                                                                                                                                          1. 2

                                                                                                                                                                                                                                                                            Mine is at https://neros.dev. I’d appreciate any feedback!

                                                                                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                                                                                              I love it! The text is a little low contrast, especially the blue, but otherwise, this is a fantastic site.

                                                                                                                                                                                                                                                                            1. 1

                                                                                                                                                                                                                                                                              Isn’t this basically type erasure? Only you use inner functions instead of something like std::function in C++ or whatever.

                                                                                                                                                                                                                                                                              1. 2

                                                                                                                                                                                                                                                                                Not really, because no type information is being lost. The AsRef<Path> bound in the example represents the ability to do a conversion into a &Path, and even in the version without an inner function, you need to call .as_ref() before being able to use the value. So all that’s happening here is that the conversion is being done ahead of time.

                                                                                                                                                                                                                                                                                1. 1

                                                                                                                                                                                                                                                                                  Forgive me if I’m not understanding this right, but Path here is a trait, no? So the inner function just takes a reference to “something that implements Path”. That sounds like type erasure to me, in that it removes all information related to a type except for the fact that it can do what a Path can do.

                                                                                                                                                                                                                                                                                  In fact, unless rustc optimizes this, wouldn’t this generate a new function per concrete type that calls the outer function?

                                                                                                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                                                                                                    No, Path is a struct, while AsRef<Path> is a trait. So the inner function is taking a reference to a concrete type, while the outer function is the one where the only thing it knows about its parameter is that it’s “something that can be converted to a &Path”.

                                                                                                                                                                                                                                                                                    1. 1

                                                                                                                                                                                                                                                                                      What does “convert” mean in this context? I am not that well-versed in Rust, sorry.

                                                                                                                                                                                                                                                                                      1. 1

                                                                                                                                                                                                                                                                                        No need to apologise! “Convert” here just means that if you have something that implements AsRef<Path>, you can call .as_ref() on it and you’ll get back a &Path.

                                                                                                                                                                                                                                                                                        So the meaning of “convert” depends somewhat on how the trait is implemented by the type you’re calling it on. In the case of PathBuf, which is just a slightly different representation of a path that already can automatically dereference to a Path, it’s a simple as that: it dereferences itself and returns a &Path. But in the case of String, its implementation of AsRef<Path> actually creates a new Path from the string and returns a reference to it.

                                                                                                                                                                                                                                                                                    2. 1

                                                                                                                                                                                                                                                                                      In fact, unless rustc optimizes this, wouldn’t this generate a new function per concrete type that calls the outer function?

                                                                                                                                                                                                                                                                                      This is correct, though. As far as I understand, the point of this optimisation is just to reduce the size of the outer functions that are generated, by moving some of the function body into the inner function.

                                                                                                                                                                                                                                                                                      1. 2

                                                                                                                                                                                                                                                                                        (Blog post author here!) Also good to note that the outer generic function is now extremely small and is likely to be inlined into the caller, leaving only a call to the non-generic inner function.