1.  

    You can’t write functions with a receiver in a different package, so even though interfaces are ‘duck typed’ they can’t be implemented for upstream types making them much less useful.

    am i mistaken or does embedding the upstream type this, but in reverse? the composition is often overlooked in go, while it is one of the best things. not being allowed to fiddle around in other packages is a good restriction as this is a symptom for other problems.

    1.  

      Yes, embedding types is one way to solve this in Go. Rust and Go are very different in this regard.

      In Rust, it’s common to extend a type with additional functionality using traits so you don’t need to convert between the types. In Go this isn’t possible. See this for an example. The basic AsyncRead provides low level methods and AsyncReadExt provides utility functions. It means that if someone else implements AsyncRead for a type, they can use any of the AsyncReadExt methods on it (provided AsyncReadExt is imported). Something like that just isn’t easily possible in Go to the same level because it’s only possible in Rust due to generics.

      1.  

        if you extend a type, can your extension affect what the original code was doing? Part of the motivation for Go’s typing system is that it’s designed to avoid the fragile base class problem. As someone with little Rust experience, it’s not clear how extending types in Rust avoid a fragile base class scenario.

        1.  

          The original code is unaffected. The alternative implementation is only available to code that uses the implemented trait and Rust doesn’t allow conflicting method names within the same scope, IIRC, even if they’re for two different traits on the same type.

          1.  

            No, because traits are only available to use if they’re imported. So you’re not actually modifying the actual type, but extending it.

          2.  

            I don’t know rust, but isn’t that kind of having io.Reader in go and other types which take io.Reader implementations and implement other functionality on top of that? Like bufio.Reader?

            1.  

              Wrapping a type to implement an interface is somewhat similar. But in Rust, you do not have to write a wrapper to implement traits. E.g. have a method to reverse code points of a String you can just define a trait and implement it directly for String:

              trait ReverseCodepoints {
                fn reverse_codepoints(&mut self);
              }
              
              impl ReverseCodepoints for String {
                fn reverse_codepoints(&mut self) {
                  // Implementation.
                }
              }
              

              After that you could just call somestring.reverse_codepoints() when the trait is in scope. It’s often more convenient than wrapping, because you do not have to wrap/unwrap depending on the methods you need (or write delegation methods).

              That said, there are some limitations in that the orphan rules have to be satisfied. Very roughly, this means that the implementation should be defined in the same crate as the trait or as the type the trait is implemented for. Otherwise, two different implementations could be defined for the same type. If you cannot satisfy the orphan rules (e.g. because the type and trait come from another trait), you do need a wrapper type.

              1.  

                This seems dangerous, since now users of the original type may not realize it has suddenly grown new talents.

                1.  

                  Or, worse yet, that existing talents may have been redefined. (Is that possible?)

                  1.  

                    Nope - and even if you could override an impl, the orphan rule would stop you overriding impls you don’t own.

                    1.  

                      👍 Good to hear.

                  2.  

                    It actually doesn’t, because the function is not associated with the type. It’s associated with the pair of (type, trait).

                    You have to import the trait ReverseCodepoints before you can call it.

                2.  

                  I had forgotten about interfaces somehow. Yes, sort of. But you’re limited to wrapping stuff one level at a time and you have to actually make new wrapper types.

            1. 11

              Error handling also causes repetition. Many functions have more if err != nil { return err } boilerplate than interesting code.

              Whenever I see return err, I see a missed opportunity. Every error return is a chance to add additional context to the error, stringing together the exact sequence of events leading to the error directly into the error message. Done well, you end up with a lovely semantic “stack trace” that completely identifies the situation leading to the error.

              You could have logs full of ERROR: connect timed out, or you could have:

              ERROR: failed to zing the bop "abcd": failed to fetch bibble diddle: failed to initialize HTTPS connection to "https://bleep-bloop.domain": timed out waiting for DNS response

              1.  

                yes, returning an error without wrapping it is, nine times out of ten, Doing It Wrong. At my company we have a package that is similar to this one that contains various tools for manipulating and handling errors: https://github.com/pkg/errors

                also, after 8 years of programming Go, I strongly dislike stack traces now. Stack traces do not tell me a story of how an error happened, they give me homework of how to divine that story by reading the source code and running the program in my head. If you don’t have the source code, or if you’re running many versions of many programs, the utility of the stack trace further decreases. My Go code consistently has the best error-handling semantics of any code that I actually put into production.

                1.  

                  I’m not a go programmer, so a stupid question: How would the error handling code look then? Like this?

                  return err, "timed out waiting for DNS response"
                  

                  Or something more complex? Would this affect the function signature of everything in the call chain?

                  1. 7

                    Go 1.13 added error wrapping, so you can now do this:

                    return fmt.Errorf(“timed out waiting for DNS response: %w”, err)
                    
                    1.  

                      that’s been around since 2010; it didn’t actually take the Go team a decade to come up with that.

                      https://github.com/golang/go/commit/558477eeb16aa81bc8bd7776c819cb98f96fc5c1

                      1.  

                        The %w is what’s new in 1.13, permitting e.g. errors.Is.

                        1.  

                          ah! Nice! Yeah, that’s a useful improvement. Wasn’t clear from the comment before how 1.13 changed it; I thought trousers was saying that 1.13 added fmt.Errorf. Thanks for the clarification :)

                      2.  

                        In addition, depending on the case where this return is located, the “time out” info may already be included in err, so it might even be potentially removed from the error message; personally, I recently start to lean towards, in each function, including what “extra” info this function can add to the error, about context it controls, and the function itself; so, I might for example write instead something like:

                        return fmt.Errorf("waiting for DNS response: %w", err)
                        

                        or maybe even:

                        return fmt.Errorf("retrieving DNS record %q: waiting for server response: %w", recordName, err)
                        

                        This is based on how errors in stdlib are composed, e.g. IIRC an error from os.Open would often look like: "open 'foobar.txt': file not found"

                    2.  

                      I haven’t yet used the “new” errors packages (e.g., github.com/pkg/errors) in anger yet. How do they work with respect to checking if an error in the chain was of a specific type (e.g., os.IsNotExist() or io.EOF or converting to a specific type)?

                    1. 24

                      Disallowing import cycles. This really limits how useful packages are for modularising a project, since it encourages putting lots of files in a package (or having lots of small packages, which can be just as bad if files which should be together are not).

                      Maybe I’m in the minority here but this has forced me to design packages in a better / more modular fashion that really shows up later in a projects lifecycle in spades.

                      1. 25

                        I agree, every import cycle I’ve seen has been a mistake of design.

                        1. 16

                          The same restriction actually applies to Rust. You can’t have import cycles between crates, which are Rust’s compilation units. Rust modules are an extra tool for code organization within a crate that really has no Go equivalent, and recursive imports in this case are occasionally useful.

                          A real comparison here is difficult to make, since in Rust, you might not create as many crates as you would packages in Go. But it’s pretty likely that you’ll create some.

                          It’s also further complicated by the fact that a Go module is analgous to a Rust crate in terms of the unit of distribution, with the crucial distinction that a Rust crate is also a compilation unit. But in Go, a module may of course be built from many compilation units.

                          1.  

                            Technically, I think it’s actually possible to work around this by using the dot alias in the import.

                          1. 9

                            Good, maintained, didactic documentation, and a domain expert on the code base who can field questions. The code itself is almost an afterthought, a liability — the asset is the domain knowledge, and documentation is the way to incept that asset into new people.

                            1. 38

                              I sent the link to this post, via DM only, to three of the admins with a short note. Not 10, not 100, not a random project: three of the admins of a project in which I am already a participant.

                              Within 60 seconds of linking these users to my own webpage, Discord deleted my account.

                              No third-party service should be in a position to be deciding for you what your group membership should be allowed to communicate with each other.

                              According to the message, people flagged your DMs. That’s not really “censorship”, that’s removing a member considered disruptive by the community. Frankly, I’d do the same if random strangers started DMing me with “this service sucks, you should use something else”.

                              Regardless of whatever merit your points against Discord may have, it seems you don’t realize just how disruptive your “advocacy” is perceived by many. Going around telling other people what they “should” do is what people mean with “Open Source entitlement” and quite literally why people get burnt out by being an Open Source maintainer.

                              I strongly urge you to reconsider your approach. It will benefit everyone, including yourself since it will be much more effective. It’s a win-win.

                              free software-adjacent teams and groups, such as hackerspaces, art camps, and other DIY undertakings should always question falling by default onto the “buy” side of “build vs. buy”. DIY or die! Run your own!

                              Are you doing to do the legwork and front the server costs, too? “DIY” isn’t about telling what other people should do, it’s about … doing it yourself.

                              If I was unhappy with the communication platform of a project, I’d compile a list of advantages switching would have and offer to help and/or pay. I don’t want to gatekeep “DIY” here, but in my view that’s the “true” DIY way.

                              1. 12

                                According to the message, people flagged your DMs. That’s not really “censorship”, that’s removing a member considered disruptive by the community. Frankly, I’d do the same if random strangers started DMing me with “this service sucks, you should use something else”.

                                Nothing in that email from Discord says people flagged my DMs. I’m also not a random stranger—I am an active participant in that project. I didn’t disrupt anyone or anything.

                                If you read the suspension message carefully, it claims that my account violated the ToS—it did not. It was not the result of messages being flagged. They are using the term “the Discord community” as a stand in for Discord’s automated spam detection, which no-questions-asked censors young/new Tor-created accounts that send three similar messages containing the same link in a short period of time.

                                Regardless, it’s still censorship when Alice tries to privately message Bob and Mallory decides “Bob isn’t allowed to see this message” and prevents it from reaching its destination, leaving Bob in the dark. That’s pretty much the dictionary definition of censorship. It’s my opinion that Alice and Bob should seriously reconsider their choice of association with Mallory in that instance.

                                Regardless of whatever merit your points against Discord may have, it seems you don’t realize just how disruptive your “advocacy” is perceived by many. Going around telling other people what they “should” do is what people mean with “Open Source entitlement” and quite literally why people get burnt out by being an Open Source maintainer.

                                I think perhaps the first line of my post was garbled in transmission. I’m not telling anyone to do anything.

                                I’m telling people what they should not do: that is, don’t discriminate against people who insist on privacy.

                                Choosing to use Discord does that, so people who don’t want to discriminate should not choose to use Discord.

                                I’m also offering them alternatives that don’t discriminate against those people, so that they can make better choices if they decide that they don’t want to be the kinds of projects that discriminate against segments of their userbase.

                                I feel like it’s a little bit of a stretch to go from “please don’t discriminate against and exclude me and others like me from participating”, which is basically the message in my post, to “open source entitlement”.

                                Are you doing to do the legwork and front the server costs, too?

                                I mention on the page that the server costs for such things are on the order of $5 per month for most teams.

                                I’d compile a list of advantages switching would have and offer to help and/or pay

                                There is an explicit offer of expert help at the bottom of the post, including my direct email address and telephone number, and it has been sitting there on the page since before you left your comment. :)

                                I have also donated approximately 5-6 years worth of server hosting expenses, anonymously and in cash, to a local nonprofit I am attempting to convince to switch away from Discord, and have offered to personally manage and document 100% of their migration for free—time for which I would bill a theoretical customer in the mid to high five figures.

                                1. 36

                                  Although I’ve been working as a programmer now for many, many years, prior to that I studied, and received a degree in, philosophy.

                                  The chair of my department was a Kant scholar, and taught many of the courses in ethics and moral philosophy, and there was a saying he was fond of, to the effect that there are two great traps, or errors, in moral philosophy, which are easy to fall into and difficult to climb back out of. The first trap is concluding that there is no correct moral system. The second trap is concluding that there is, and that you have found it.

                                  You appear to have fallen into the second trap, and this has had a negative impact on your interactions with other people. For example, prior to falling into the trap, you likely would have recognized that sending unsolicited messages to multiple people promoting your blog post is behavior that those people – and probably most neutral observers – would consider spamming. After falling into the trap, you are unable to see this. After all, you are bringing them the truth and the light and the good word! You are like Moses, descending from the mountain bearing the commandments: how could it be incorrect to share such an important message with others? Surely it must be the other people who are at fault if they react negatively.

                                  My suggestion to you would be to spend some time working on trying to see this situation from the perspectives of other people, rather than only from your own perspective. To help with that, perhaps consider Kant’s categorical imperative, and consider what the world would be like if your approach were to be made universal. Would you enjoy living in such a world, constantly being bombarded by others’ unsolicited manifestos, constantly being ordered by others to stop doing things they consider immoral, and, if you objected, being told that you are the one who is acting wrongly? I do not think you would find such a world to be pleasant, nor would you find it moral. Think on the lesson that example offers.

                                  1. 10

                                    I’m reasonably sure that I just did read an unsolicited manifesto on morals, when I read your post. It is all too easy to stand on a soapbox and become morally superior to others. And if Moses did exist, and if he really did receive instructions from Jehovah, then we must keep in mind that immediately upon coming down from the mountain, he had a fight with his brother over morals and ethics. (We must also keep in mind that evidence suggests that Moses is mythical and that the Exodus did not really happen. It is all too easy to draw moral lessons from myths.)

                                    On Freenode, if I attempt to privately message somebody, and they are not interested in receiving private messages from me, then I am not instantly banned upon my attempt, but instead notified that the recipient has caller ID enabled and will not be receiving my message.

                                    In a world where it is universally recognized that Discord is actively interfering with and shaping its user base, perhaps people would not use Discord as often. And that’s all that’s really been asked for.

                                    Finally, on morality, let us not forget Pirsig. Pirsig morality is the fact that atoms obey the laws of chemistry. It is the Kochen-Specker theorem and the Free Will Theorem. Pirsig said that humans are morally free to do what they want/will/desire, but that humans are inherently not as moral as the ideas which they espouse. At the low level, there are few degrees of freedom, but they are clear and easy to see; when we get up to the level of humans and ideas, there are so many degrees of freedom that the possible moral actions of humans become a continuous spectral palette of moral positions. The typical moral action of a human is to think, and in thinking, be acted upon by ideas, in order to create an emotional context for spurring physical actions.

                                    Why do I mention Pirsig? Because of this Pirsig quote (from memory):

                                    It is more moral to kill a man than an idea.

                                    On one hand, Discord is moral in their choice to be heavy-handed on reputation and moderation, and even moral in their choice to deliberately delegate moderation so as to make each Discord “server” a small fiefdom ruled by jealous gamer overlords. On the other hand, the author, myself, and others are moral in our choice to speak out against and criticize Discord’s design and actions. I think that we value the idea of not living in a police state and not having our mail read, and this idea contrasts sharply and precisely with what Discord’s tools and staff appear to be doing here.

                                    1. 16

                                      In a world where it is universally recognized that Discord is actively interfering with and shaping its user base, perhaps people would not use Discord as often. And that’s all that’s really been asked for.

                                      OP has admitted now that what actually happened was connecting via a service designed to hide the origin of traffic, and immediately firing off multiple DMs containing links to different users. I would actively refuse to use any service that didn’t at least treat that as highly suspect – the odds of that behavior indicating a spambot are ludicrously high.

                                      Unless you and OP truly believe that it is deeply and reprehensibly morally evil – so evil that you yourself suggest homicide as a preferable alternative – to have systems in place which automatically detect and act on patterns of behavior that are overwhelmingly like to be spam, I’m not sure there’s even a case left to make here. All that’s really left of OP’s argument is a set of desired stances for Free software projects, which would inevitably exclude certain segments of the population (but, notably, not the segment OP belongs to, which apparently makes it acceptable).

                                      1. 1

                                        desired stances for Free software projects, which would inevitably exclude certain segments of the population

                                        Which segments do those desired stances exclude? Are you saying that the communication systems that adhere to these desired stances are inherently user-hostile compared to proprietary, more restrictive systems like Discord?

                                        1. 1

                                          Some of the proposed alternatives (specifically IRC) are much less user-friendly than Discord.

                                          To get a feature like chat persistance, the user will have to either

                                          • set up a bouncer (usually requires access to a server)
                                          • use WeeChat/Glowing-Bear (ditto)
                                          • pay for IRCCloud
                                      2. 7

                                        I’m reasonably sure that I just did read an unsolicited manifesto on morals, when I read your post.

                                        Maybe I’m picking nits… but I do believe I’d consider clicking through to a discussion thread about whether a tool is acceptable for those who value freedom and privacy tantamount to soliciting a manifesto on morals.

                                        “X is not acceptable for free software” is something that makes me expect that some moralizing and probably at least one manifesto lies on the other side of a link, anyway.

                                      3. 5

                                        For example, prior to falling into the trap, you likely would have recognized that sending unsolicited messages to multiple people promoting your blog post is behavior that those people – and probably most neutral observers – would consider spamming.

                                        Well, it turns out I have an existing relationship with these people. I wasn’t spamming anyone.

                                        The people to whom I sent the messages never had an opportunity to object to them. They didn’t flag them. They didn’t even see them. Discord’s software decided that because I was a new user, and I was connecting via tor, and I sent the same link to three different people within five minutes of signing in, I must be a spammer and be silenced.

                                        That’s called censorship.

                                        Regardless, this is a red herring. The main issue is that choosing to use Discord is exclusionary and discriminatory, regardless of whether they censor messages or not.

                                        1. 33

                                          Discord’s software decided that because I was a new user, and I was connecting via tor, and I sent the same link to three different people within five minutes of signing in, I must be a spammer and be silenced.

                                          That seems like a perfectly reasonable conclusion for their software to draw.

                                          1. 25

                                            That’s called censorship.

                                            It really, really isn’t.

                                            1. 1

                                              It absolutely is. Most censorship is not government censorship. It’s also not universally bad: for example, we self-censor to avoid being unkind to others.

                                              1. 15

                                                If your working definition of censorship is so broad as to encompass anti-spam measures like rate limit violations, then let me suggest that it is not a useful definition in this conversation.

                                                1. 2

                                                  On the contrary, the fact that legitimate anti-spam measures can be used to block the legitimate sending of messages by people seeking to keep their physical and network location private means that the definition of censorship should definitely include anti-spam measures.

                                                  1. 7

                                                    Let me make my point in a different way:

                                                    because I was a new user, and I was connecting via tor, and I sent the same link to three different people within five minutes of signing in, I must be a spammer

                                                    This isn’t “legitimate sending of messages” — it is actually spamming.

                                                    1. 3

                                                      I don’t think these measures “are being used to block legit sending of messages”, rather, these algorithms block you because your behaviour is virtually indistinguishable from someone sending illicit and abusive messages. Lots of legit email is being blocked by spam filters because the sender lacks DKIM and Reverse DNS, but it’s simply because people not having those is a very sure sign that someone is spamming so you block them without wasting additional CPU on it.

                                                      If your behaviour is identical to abusive behaviour then I don’t see why you get a free pass for your behaviour relating to a “righteous cause” like free software.

                                              2. 10

                                                Seems like their spam detection algos are pretty good. Spam detection and prevention (actual spam, not false flags) is one of the shortcomings of IRC and other “anonymous” platforms.

                                                1. 0

                                                  If they were pretty good, they would not get such an obvious false positive.

                                                  The point was that you should use tools that do not give third parties the ability to read your private messages at all.

                                                  1. 7

                                                    So, I don’t like when foss communities use discord (or slack for that matter) either. However, what you’re describing - creating a new account via tor and then immediately sending the same message with a link to three people - sounds like exactly what most spammers I’ve seen will do. What makes you say it’s an obvious false positive (from the perspective of spam detection software)?

                                            2. 13

                                              Are you doing to do the legwork and front the server costs, too?

                                              I mention on the page that the server costs for such things are on the order of $5 per month for most teams.

                                              I help run a hackerspace. It has about 75 members and they are all volunteers. We do not have the money for real employees, we do not have on-call support, and it is not uncommon for people to get busy with Real Life Stuff and just disappear for a month or three at a time. If the floor gets swept, it’s because someone decided to pick up a broom and help out.

                                              At a guess, members are about 30% professional techies of various types (engineers, academics, technicians, mostly in non-computer fields), about 40% interesting but non-tech people (that hippie who makes cool laser cut art, the cosplay guy who builds a full Iron Man suit, etc), and the rest are interested amateurs who just like playing with different stuff. There are a grand total of three people there who I would actually trust to run a server people rely on, I’m one of them, and I go there to get away from that shit. We can and do run several servers, but they’re all things like an internal NAS or shop IoT system that are toys to play around with and not essential services. We have a VPS that runs our website and a couple other mission critical things, but only a few people have access to it and working with it is not much fun so usually we don’t touch it.

                                              Chat is an essential communication medium for this place. There was a fire on our block last year and chat was how we notified people and coordinated stuff. For chat we use Slack. Slack is free, it never breaks, and if it does break we don’t have to fix it. It has an interface a child can set up and use, the client never breaks either, and it takes a new member who isn’t a computer guru about 2 minutes to set up an account.

                                              I would love to be able to point people at a Matrix server instead, but last I checked it can’t do all the things Slack can and all the clients I tried were buggy, slow, incomplete, or otherwise unpleasant to use – though this was a year or two ago now, maybe it’s better now. That was the time at which we looked at various chat services and chose Slack though. If we ran a server ourselves, we would need to have someone responsible for babysitting it. I don’t see any commercial services we can buy Matrix hosting from, and a custom managed services setup would probably run $hundreds/month. And even then, we’d have to redo a dozen channels, a couple bots, Google Calendar integration, and get 75 people to switch chat programs.

                                              Maybe we can do this someday. Maybe even someday soon. But the costs are far greater than the $5/month for hosting.

                                              1. 2

                                                I believe Slack can be used easily via Tor, and does not demand a phone number to join a group, so users who need privacy of their personal data (IP/location) would not be excluded from participating in your group.

                                                The risk of logged DMs remains, but that is a smaller risk. Discord is much more censorship-heavy.

                                                Look into Mattermost and a hidden service.

                                                1. 6

                                                  Slack includes your email address in the profile, forcibly.

                                                  1. 1

                                                    You can generate new emails that are not linked to anybody’s account. The article wasn’t about don’t use slack after all, just how it’s not as preferred.

                                                    1. 2

                                                      And how many users will do that? If privacy preservation is important to you and you want to be a trustable service provider, you can’t have any situation of “the user accidentally omitted that”. Especially as the user must be pre-informed of that behaviour and have the ability to draw this conclusion before using it.

                                                      Also, I’m replying to a comment on Slack, so I don’t know what the point about the article is.

                                              2. 7

                                                I have also donated approximately 5-6 years worth of server hosting expenses, anonymously and in cash, to a local nonprofit I am attempting to convince to switch away from Discord, and have offered to personally manage and document 100% of their migration for free—time for which I would bill a theoretical customer in the mid to high five figures.

                                                From the view of a well-managed nonprofit, this reads as: if that person goes away or changes their view on things, there’s the risk of mid high five figures costs.

                                                1. 3

                                                  Discord is not yet a profitable company with a sustainable revenue model.

                                                  GP has those risks presently, PLUS privacy/discrimination/censorship issues for all of GP’s users.

                                                  GP says it’s a volunteer organization. Then you say that someone volunteering to do the work is a risk.

                                                  Running communications tools is about 20-40 hours per year. Can management not extract redundant commitments from reliable members to serve as someone’s understudy in the case of disaster?

                                                  1. 3

                                                    GP says it’s a volunteer organization. Then you say that someone volunteering to do the work is a risk.

                                                    Is the mission of this organisation running a chat service? If not, even in a volunteer organisation, the prime goal is that volunteers can work on the mission.

                                                    Running communications tools is about 20-40 hours per year. Can management not extract redundant commitments from reliable members to serve as someone’s understudy in the case of disaster?

                                                    20-40 hours for a skilled person, especially if you have security standards. Finding someone to keep this server safe and secure and is on-call if it breaks is hard.

                                                    There’s a reasons why even collectives that focus on making communication their mission, like system.li shut down their service on major demonstrations to inform people that they cannot be trusted to not be compromised on some level.

                                            1. 3

                                              It’s interesting to me how — apart from the usual fanboys — I still haven’t seen any unequivocally positive feedback about Mac OS Catalina.

                                              I have unequivocally positive feedback about Catalina. I have no complaints about anything that’s stopped working, no complaints about anything missing, and I appreciate the minor changes and improvements.

                                              1. 1

                                                You also do a clean install every year, right? Did you do one for Catalina?

                                                1. 1

                                                  I do a wipe/reformat every year but not tied to OS upgrades. Haven’t done one since Catalina, yet, no.

                                              1. 3

                                                Every time you indent you add another precondition to the programmer’s stack consuming one of the 7 ±2 slots in their short term memory. Avoid control flow that requires deep indentation. Rather than nesting deeply, keep the success path to the left using guard clauses.

                                                This doesn’t actually reduce the number of control paths the programmer has to consider, it is just an aesthetic adjustment that makes those control paths not reflected in the indentation of the program.

                                                Personally I’d rather have worse aesthetics, with a completely obvious program branching structure.

                                                1. 5

                                                  To me it actually makes it simpler to read because it’s easier to make out the exit paths and their conditions.

                                                  1. 1

                                                    I’ve noticed that there is sort of a brain-behavior dichotomy where one group of programmers read programs like a story (I suspect that might be you), while other programmers read programs like a map or diagram (I suspect that might be me). I’m not proposing any value judgements here, but it does seem to be a “different strokes for different folks” kind of situation.

                                                  2. 2

                                                    This doesn’t actually reduce the number of control paths the programmer has to consider,

                                                    I think it does. If you’re at indent level 0, your working state is empty. If you’re at indent level 1, your working state necessarily includes the predicate of the indent. That grows linearly.

                                                    expr // I can consider this expr in isolation
                                                    if cond1 {
                                                        expr // This expr's context includes cond1
                                                    } else {
                                                        if cond2 {
                                                            expr // This expr's context includes cond1 and cond2
                                                        }
                                                    }
                                                    
                                                    1. 1

                                                      This is my point:

                                                      if cond1: return err
                                                      if cond2: return <value>
                                                      expr // this expr includes both cond1 and cond2
                                                           // the indentation does not reflect control flow
                                                      
                                                      1. 1

                                                        I don’t agree. Once line 1 has been parsed and passed, I can throw cond1 out of my working context. Technically it is part of expr’s context but effectively it is not.

                                                  1. 4

                                                    Avoid package level state

                                                    I really actually like this way of declaring this goal. I’ve heard “no package level variables” before, but there are instances you might actually want to do this (regexp.MustCompile comes to mind).

                                                    This being said, there are still instances where init/package level state are useful (in particular, systems where you can register drivers or plugins, similar to the database/sql package.

                                                    1. 4

                                                      I might be the odd man out, but I really dislike the database/sql interface. Unless I’m missing some hidden advantage of the init() method, I would think it better to have at least a package-level RegisterDriver() function if not a type DriverSet struct{} and a func (ds *DriverSet) RegisterDriver(). Thoughts?

                                                      1. 3

                                                        With vendoring init() and registering a driver by accident twice is a sign imho that the pattern is fraught, I would also rather have a method I have to call and make it explicit in my main()

                                                      2. 2

                                                        There are still instances where init/package level state are useful (in particular, systems where you can register drivers or plugins, similar to the database/sql package.)

                                                        Like weberc2 I consider this an antipattern. It’s strictly better to have a component that takes a driver as a parameter to construction.

                                                        1. 1

                                                          I understand where you’re coming from. In an ideal world I would agree, but I still think this can be a useful pattern if you need things configurable at runtime.

                                                          One of the examples I have of this is my IRC bot - everything is implemented as a plugin and they’re all registered by name. When a bot is started, it takes the list of all the plugins and initializes them based on that list… this would be a pain to do by hand. Similarly, with databases, if you’re supporting more than one, it’s hard to configure at runtime if there are multiple possibilities without a system like this (though you need to special case a number of things as well because of query incompatibilities).

                                                      1. 1

                                                        Avoid package level state

                                                        Seek to be explicit, reduce coupling, and spooky action at a distance by providing the dependencies a type needs as fields on that type rather than using package variables.

                                                        I’ve actually started doing the opposite of this in a bunch of cases. I discovered that a lot of my classes/modules were basically being used as singletons so instead of binding functionality to types and requiring instantiation of the type I just keep everything as globals internal to the module and then expose a public interface that encapsulates that module-level-state. If something does require multiple instantiations I can always break it out into a struct/class later. A more detailed explanation of this concept is discussed in Brian Will’s Object-Oriented Programming is Good*. This form of module-oriented-programming doesn’t work in every case, but I have personally found it useful.

                                                        1. 4

                                                          Never do this, it is too easy to mis-use, leading to things like deadlocks and spaghetti synchronization. Mutexes should always be unexported fields, accessed only by methods.

                                                          Longer discussion here (warning: also Twitter thread).

                                                          1. 2

                                                            This is a good counter point. In this contrived example I’m only accessing the mutex inside the struct’s one add function, but I hadn’t considered that by embedding the mutex it effectively exports it since Lock and Unlock are available at the same level as add itself. Thanks.

                                                            1. 3

                                                              Updated the thread for others to discover this too.

                                                          1. 13

                                                            In my experience the highest velocity architecture is one monolith per team.

                                                            1. 5

                                                              Microservices should implement bounded contexts, which map to teams, so, yes: one microservice (monolith, service, whatever) per team is exactly right.

                                                              1. 9

                                                                … until that team gets reorged.

                                                                1. 6

                                                                  This is a mood beyond words

                                                                  1. 4

                                                                    A microservice architecture is indeed a poor fit for an organization that’s still figuring out how to hew the borders of its bounded contexts.

                                                                  2. 3

                                                                    Something that seems to have gotten lost is that there was a reason to tack the “micro” onto the long-established term “service oriented”. Micro was supposed to be very different. A lot of talk about microservices nowadays seems to just mean “not-monolith”. I’m not generally very keen on microservices, but a lot of confusion seems to stem from mixing ideas from different approaches without understand their strengths and weaknesses. My current advice is to 1) achieve strong modularization within your monolith (so it becomes which modules could be turned into stand-alone services if need be, 2) extract a few services when there is a clear benefit, 3) forget about microservices until you have no other options.

                                                                  3. 2

                                                                    Not only highest velocity, but also lowest fragility. Since you essentially allocate responsibility onto a team, which is unlikely to quit all at once. It also lowers communication overhead to come extent, since you reliably have team leads + PMs + managers communicating without having to get everyone involved in the communication chain.

                                                                  1. 11

                                                                    This is basically right, but I think misses a bit of the forest for the trees. They are frequently misunderstood and over-applied, but they do have real and massive value in the right setting, and it would be a shame to write them off altogether.

                                                                    Microservices are an architectural design pattern that converts Conway’s Law from a liability to an asset. They solve organizational problems and create technical ones, and so should be few, mapping to autonomous teams in an organization, not functional components in a system.

                                                                    1. 4

                                                                      Conway’s Law

                                                                      organizations which design systems … are constrained to produce designs which are copies of the communication structures of these organizations.

                                                                      https://en.wikipedia.org/wiki/Conway%27s_law

                                                                    1. -10

                                                                      Money quote:

                                                                      Why are you leaving? Little bored. Not learning as much as I used to. I’ve been doing the same thing too long and need a change. […] I want to build something new again. I don’t want to get stuck in a comfortable rut.

                                                                      I hope the author, who has so far worked on Go at Google, reignites his learning through something relatively more sophisticated like Rust or Haskell.

                                                                      1. 61

                                                                        This is an incredibly patronizing thing to say.

                                                                        1. 27

                                                                          Agreed, I usually downvote and ignore such comments, but I can’t help but point this out in light of the recent “Lobsters Is Better than Hacker News thread” [1] (which I also found to be “low effort”)

                                                                          The comments on this same article on HN are significantly more enjoyable and positive to read than this thread:

                                                                          https://news.ycombinator.com/item?id=22161383

                                                                          It reminds me of the “low effort” framing here regarding open source participation.

                                                                          https://lobste.rs/s/8pvhsl/my_foss_story#c_r697kv

                                                                          Leaving aside the fact that the comment is patronizing (and IMO should just be deleted), it just has so little effort behind it that it contributes nothing.

                                                                          I try to ignore the many low effort / tribal comments on lobste.rs, but sometimes the noise overwhelms the signal. I think the relatively aggressive HN moderators have done a good job. I understand why people dislike the site, but that’s because it’s big and the bad stuff jumps out at you.

                                                                          https://www.newyorker.com/news/letter-from-silicon-valley/the-lonely-work-of-moderating-hacker-news

                                                                          Anyway I write this in hopes that people will put some more effort into their comments. I didn’t submit my last 7 blog posts here and it wasn’t a loss. One post was submitted to HN yesterday and that was plenty of feedback – at least 80% of it not “low effort”.


                                                                          [1] https://news.ycombinator.com/item?id=22146746

                                                                          https://lobste.rs/s/bxuqzy/why_lobste_rs_is_better_than_hacker_news

                                                                          1. -1

                                                                            I didn’t submit my last 7 blog posts here

                                                                            With all due respect, personally I havent missed it. I admire what youre trying to do with the Oil project, but its not of personal interest to me and I havent found a way to filter it out. To be candid it feels as if you use Lobster as a advertising platform sometimes. I think it would be better if you posted more non-Oil topics. Looks like 12 of last 15 were Oil Shell:

                                                                            https://lobste.rs/newest/andyc

                                                                            Good luck to you.

                                                                            1. 37

                                                                              I hate advertising as much as the next guy, but this is very unfair to Andy. For one, the pieces aren’t just about Oil shell. Most of them are about topics inspired by Oil shell, things like motivations, facets of the system, different techniques used to implement it. He’s also written tons of comments on other people’s submissions. He’s a good-faith member of the community.

                                                                              1. 13

                                                                                I agree he definitely interacts more than simple link dumping and while Oil isn’t interesting to me, so are a lot of other technologies that I can’t filter out. I think he should be welcome to share his links so long as they contain new information and not a repetition of existing information. For example I probably would be interested in how he stays so productive and how he manages tasks, and how he decides what to work on next. I hate to admit it but I’m probably more likely to click it if a product name isn’t in the title ;).

                                                                              2. 18

                                                                                Disagree strongly. @andyc’s blog posts are exactly the kind of content that should be submitted to lobsters. Please don’t stop Andy!

                                                                                1. 13

                                                                                  Strongly disagree. If @andyc content is not for lobsters, what is? Each of the posts is technically sound, and I learned many things from them, even tho I’m not interested in Oil per se.

                                                                            2. 19

                                                                              Interestingly, a sentence immediately below, which however didn’t make its way into above “money” quote, is:

                                                                              It’d be nice to primarily work in Go rather than work on Go.

                                                                              1. 19

                                                                                How good of a programmer does one have to be before they can reject Haskell or Rust have it reflect something other than their own ignorance?

                                                                                1. 4

                                                                                  Sorry, I don’t understand your question/statement. Could you please rephrase it, English is not my mother tongue. I’m not sure if you ask about the skill level one has to have to be able to reject Haskell or Rust on a non-ignorance base without prejudice of other developers, or something completely different?

                                                                                  1. 5

                                                                                    Some fervent proponents of programming languages will imply that programmers that like or use other languages simply do not understand the unique benefits they convey. Paul Graham wrote a whole article that may be the root of some of this thinking.

                                                                                    Rust and Haskell stereotypically attract these followers more than many languages. But other languages are not immune to this criticism; I’m a Lisp weenie and as we all know, Lisp is still #1 for key algorithmic techniques such as recursion and condescension.

                                                                                    I read cgag’s comment (and upvoted it) as a tongue in cheek joke: a fervent follower of language X will always consider a criticism of X or a desire to not use X as a position rooted in ignorance of X’s capabilities.

                                                                                    1. 3

                                                                                      Some fervent proponents of programming languages will imply that programmers that like or use other languages simply do not understand the unique benefits they convey. Paul Graham wrote a whole article that may be the root of some of this thinking.

                                                                                      This is true a lot of the time. It’s certainly possible for two people who have both used language X to disagree on whether the style of programming that language X facilitates or encourages is good; but a lot of the time a person who likes language X is making the case that language X is good to programmers who haven’t used it and don’t care to (which is fair enough - it takes a decent amount of time and effort to learn a novel programming language well enough to have an informed opinion about it, and it’s reasonable to decide that you don’t care about forming an informed opinion about a language and doing something else with your time instead).

                                                                                      1. 1

                                                                                        Oh, I think you and pg make a good point: sometimes there really are advantages that you can’t see when you look up from blub to language X, and the only real way to get it is to learn X. But I think it’s important to think about looking down the ladder too.

                                                                                        When I’m in X slinging macros to build a DSL that makes my life easier, I’m making a decision that forces the next programmer to look at my code to deeply understand my DSL and all the decisions therein. What multiplies my productivity might quarter theirs.

                                                                                        Sometimes you look down and the forced simplicity of blub looks OK :)

                                                                                2. 8

                                                                                  I spent a little bit of time on both Rust and Go and I learned a lot more with Go. Rust is pretty standard and sane, calling into libc, using LLVM. Go goes wild and does its own thing everywhere, it even does its own linking. It’s a lot of fun.

                                                                                  1. 4

                                                                                    I believe I understand what you meant, Go has a goal of simplicity, Rust and Haskell are more feature rich. Working on the Go compiler as a result can feel like polishing the same thing over and over, spending tremendous effort to make small improvements. The way you phrased it though appears as though you think Rust and Haskell are “smarter” or “superior” in some way. Implying some language is “smarter” or “more sophisticated” is a good way to make everyone hate that language.

                                                                                    1. 6

                                                                                      Implying some language is “smarter” or “more sophisticated” is a good way to make everyone hate that language.

                                                                                      I would only ask that while some fans of other languages can become overly zealous that we try to not anthropomorphize the language itself by applying a label of hate to it. I think we can all agree that the GP comment is of poor quality.

                                                                                      1. 3

                                                                                        I can see that. I doubt anyone truly “hates” a language any more than they hate broccoli or brie. I love broccoli and I love brie, but I have heard some people hold strong negative opinions before.

                                                                                      2. 1

                                                                                        I think he just means Go isn’t that great of a language. I don’t really blame him for having that opinion. Go reminds me a lot of Java, it got adopted because a giant tech company “sponsored” it

                                                                                        I mean just replace “Go isn’t that good” with “C++ isn’t that good” or “Java isn’t that good” and it suddenly becomes way less controversial.

                                                                                        1. 4

                                                                                          i first played with go before it was 1.0, and immediately liked it because it got so many things right, even back then. easy compilation, easy definition of packages without additional magic files, binaries that can just be copied. it’s just optimized for sanity if you want.

                                                                                          so, imho: it got adopted because smart, experienced people got as much time as they wanted to carefully build something.

                                                                                          1. 2

                                                                                            Yea from what I’ve heard/experienced, the Go tooling is incredible (just like the Java tooling was incredible). I think what people have a problem with is Go the language.

                                                                                            Full disclosure though, I’ve never used the language in any serious capacity (other than adding a 5-line patch to the backend code at work here and there) so I don’t have much to say. I have an irrational distaste for the language that I can’t put my finger on. I’m not sure if it’s the weird syntax or what. Tooling seems great though. I’ve been meaning to install 9front on one of my computers.

                                                                                            1. 1

                                                                                              most, if not all of the weird choices were made deliberately, the faq explains some of them. imho these things make the language great. for example, the “backward” declarations really feel natural for me, compared to c style declarations.

                                                                                              the rest of the language is really boring, but the single features really work well together. that’s what makes it great. maybe it’s like watching a anthony bourdain episode where someone cooks a great meal in a single wok over a wood fire outside. it’s about how the tools are used, not how complicated the tools are :)

                                                                                              1. 1

                                                                                                Hm maybe I should check it out then. I really like Lua and C for the same reasons you like Go

                                                                                        2. -10

                                                                                          It’s better to be hated than to be incorrect.

                                                                                          1. 16

                                                                                            That’s a ludicrous false dichotomy. Being incorrect isn’t good, sure, but being hated is also bad. But good news, you can be correct and not hated! The secret is to communicate humanely and not conflate abrasiveness with intelligence.

                                                                                            1. 3

                                                                                              You can’t always avoid being both correct and unhated. If enough people sacralize or tie their identities to a particular falsehood, someone who says things that are consistent with the truth will be hated.

                                                                                              1. 8

                                                                                                Sure you can. You do it by being quiet.

                                                                                                Of course, that’s often undesirable for other reasons.

                                                                                                In the case of the comment that sparked this chain, it was more-or-less the optimal choice, since Brad does not (to my knowledge) read the comments here.

                                                                                            2. 8

                                                                                              Hmm sometimes yes, sometimes no.

                                                                                              If you are hated over an inconsequential disagreement where you were correct then you probably didn’t take the right dialogue tree. There are many ways you can share ideas without being hated and correct.It’s also important to note that most people in this kind of situation merely think they are correct, are incorrect and are hated. For example someone with hostile communication strategies would say “No if you are correct you will be hated” , fight tooth and nail, and be nonetheless incorrect and hated. They will think they are more correct because they are hated, but they are probably wrong.

                                                                                              1. -1

                                                                                                I think people here are quick to jump to giving an uncharitable reading of my comment. Rust and Haskell are unquestionably sophisticated (and arguably technically superior) in regards to the type system when compared to Go. My goal was to get people curious, and not harbor hatred.

                                                                                                Where I may have erred is in suggesting that author take that route. I just think there is not much you can learn, from a PL standpoint, by staying in Go and similar languages. But then, for all we know, the author may care about other things than PL.

                                                                                                Speaking personally, I have passionately used Go (among other languages) in the past. Curiosity and need naturally lead me to discover other languages and, today, I’m extremely delighted to use Haskell for real world software.

                                                                                                I also recommend reading http://www.paulgraham.com/disagree.html (especially when emotions run high).

                                                                                                1. 4

                                                                                                  I’m a functional programmer so you’re preaching to the choir and I think it is valuable when interfacing with others to be particularly careful when saying that you have a better approach. Even if you are right, people often hold the idea that they are what they do. If you appear to be saying what you do is better than what they do, then they are likely to read it as “I think I am better than you”. Now you probably don’t think you’re better or smarter than they are, after all its just a different tool. Nevertheless this can be how it is received if you are not careful. Since when we write we are often writing to an audience, how the audience receives our message can really matter in advocacy and outreach. I think your original post was unfortunately ambiguous about what you thought of others. So even though that might not have been what you felt or thought, it still is how it will be received, even to a generous listener. The second post is much clearer that you don’t look down on others. You probably didn’t think to explicitly spell that out because well it’s probably not how you felt. However many readers really benefit from clarifying that point because for many writers that IS what they intend. They are trying to make someone perceive themselves to be inferior, small, or useless. For the record I don’t use go, and I don’t particularly enjoy writing it, I was merely laying out ground rules for interaction because I would not appreciate it if someone talked to me in that way.

                                                                                                  1. 2

                                                                                                    I see what you are saying. The solution that you propose to be “particularly careful” when communicating is accepted as general wisdom, yet it does not consistently work, as people will find ways to get offended regardless.

                                                                                                    First, taking offense is often a subjective response. What’s offensive to one may be neutral or naive to another. Emotions are influenced by one’s cultural upbringing.

                                                                                                    Second, intention matters more. Both parties should strive to understand the context and intention of another. And aim to take words at face value, rather than second-guessing meaning.

                                                                                                    A better course of action for people here really is to be inquisitive. And assume good faith, as Wikipedians say. So, person B is feeling offended. Instead of reacting to the emotion, why not find out the facts of the matter? Personal B could respond saying “I felt X upon reading your comment. Did you really intend Y? If not, could you clarify what you mean by it if not Y?”.

                                                                                                    To me, personally, what matters first-most is my own affective state: was I feeling malice (however subtle) or not? I’ve written a whole article on this topic.

                                                                                                    1. 2

                                                                                                      To put that in practice

                                                                                                      Person A: I hope the author, who has so far worked on Go at Google, reignites his learning through something relatively more sophisticated like Rust or Haskell.

                                                                                                      Person B: Your post appears as if you are suggesting that the project he spent ~10 years as a core developer on is unsophisticated (basic, primitive, etc). This seems inconsiderate and rude. A farewell post is not the place to bring up other languages you prefer to Go. If not, could you clarify what you meant?

                                                                                                      Person A: (What is the correct response here?)

                                                                                                      1. -1

                                                                                                        This would be my response:

                                                                                                        Your post appears as if you are suggesting that the project he spent ~10 years as a core developer on is unsophisticated (basic, primitive, etc).

                                                                                                        Nope; my post was referring to Go the programming language, which is indeed unsophisticated – in the context of type system – when compared to languages like Rust or Haskell.

                                                                                                        Perhaps ‘advanced’, instead of ‘sophisticated’, would have been a more agreeable adjective?

                                                                                                        This seems inconsiderate and rude.

                                                                                                        No inconsiderateness or rudeness was intended. And making a factual observation about a set of technologies does not mean malice is intended on humans.

                                                                                                        A farewell post is not the place to bring up other languages you prefer to Go.

                                                                                                        I have never seen anyone suggest observing a social protocol of not bringing up other programming languages on a blog post with farewell theme. It seems like such an arbitrary restriction. I’m curious where you gleaned this norm from.

                                                                                                        1. 4

                                                                                                          Even you do not act maliciously and are not affected by a conflict does not mean the other party feels the same way. Like your article states “once enough people are piling on to complain or tell you what’s wrong with what you did, you’re going to feel attacked “. Sure you can’t control how other people feel but I think we should try to minimize this if it’s unnecessary. Acknowledging and understanding their emotions go a long way towards this.

                                                                                                          When coworkers leave for another job, I congratulate them and thank them for their contribution. If I didn’t like the work they did, I say nothing.

                                                                                                          [I too was becoming defensive, edited for politeness :D]

                                                                                                          1. -2

                                                                                                            Even you do not act maliciously and are not affected by a conflict does not mean the other party feels the same way. […] Sure you can’t control how other people feel

                                                                                                            Correct.

                                                                                                            but I think we should try to minimize this if it’s unnecessary.

                                                                                                            Humans having been trying this for centuries, and conflicts have not stopped. No thank you, I’ll stick to my current approach of feeling good which has been working so well for me. I’d have to be pretty silly to regress from that because of some random incidents online! (Can you now understand why Twitter can be such a raging place?)

                                                                                                            1. 9

                                                                                                              Not caring about how other people feel or are affected by your actions is the very definition of being inconsiderate. Not being malicious is not the same thing as being kind.

                                                                                                              1. 3

                                                                                                                Thank you, this much more clearly captures my thoughts.

                                                                                                          2. 9

                                                                                                            It might benefit you to take some time away from this thread, cool off, have fun with friends, then reread it and see what you think later. I know if I were in your shoes I would probably be feeling pretty defensive, as it was not your intention to downplay someone’s effort or tooling. However defensiveness here may affect your ability to see the situation clearly which would allow you to be more effective next time at sharing your informed opinions. You may decide afterwards we’re all being too sensitive, and that’s fine. It is after all your call. However I have found some people slide down the “I’m not rude, everyone is just too sensitive” trap. If everyone is too sensitive perhaps it would be more effective catering to it at least some of the time.

                                                                                                            As for your last point, I think it is possible to share new ideas when someone is ending a career path, however I think it would require quite a bit of finesse. You do not want to appear as though you are disregarding their effort and commitment. Often people who have several years into a project can feel very sad when they leave it, even if it was the right thing to do. If you propose a new path too bluntly it can appear that you are pouring salt on the wound. They are already sad about losing their job and community and now you’re telling them they are wrong. Even if what you are telling them is right, it can still hurt. If you are going to advise someone in an emotional space (big life changes, employment, relationships, home), it’s good to give them the possibility that they may be right even though they are not. After all it’s pretty logical to say that in our partial information world that few things are perfectly knowable. Then when their emotions cool off they may realize that maybe you had their best interest in mind all along and might even agree with you.

                                                                                                            1. -1

                                                                                                              You suggest that I wasn’t feeling good, and then go on to say that I “cool off”, and even indicate that I might be feeling “defensive” - but nowhere above did I say that I was feeling anything but good. So I do wonder where you get this information about my mental state from, so as to concoct such an unsolicited advice.

                                                                                                              Can you see how being “particularly careful” is working for you here? Speaking personally, feeling good before reaching for the keyboard, ensures that I never uncharitably interpret other’s words, much less project my feelings onto them.

                                                                                                              If I may suggest, instead of second-guessing other person’s feelings, take their words at face value and directly engage with their points (and I do note that you are yet to address any of my points on this topic). It makes communication so much simpler.

                                                                                                              1. 1

                                                                                                                You’re right, being careful when someone is a troll is a misstep, I’ll make sure to report you to the mods. I’m done here.

                                                                                                                1. 3

                                                                                                                  srid isn’t being a troll. He is disagreeing in good faith with a majority of the thread.

                                                                                                                  1. 2

                                                                                                                    Well that’s what I thought too, until he said “Can you see how being “particularly careful” is working for you here?”, and then I realized he was just being manipulative.

                                                                                                                  2. -2

                                                                                                                    You’re right, being careful when someone is a troll is a misstep,

                                                                                                                    Any intelligent person who is not actively under the affective throes of offense (or whatever) that reads my comments in this thread can easily see how I was being anything but a troll[1]. Be that as it may, when I asked whether you can see how being “particularly careful” is working for you here, what I was referring to was this exchange (emphasis mine):

                                                                                                                    • [voronoipotato]: I think it is valuable when interfacing with others to be particularly careful when saying that you have a better approach.
                                                                                                                    • [srid]: The solution that you propose to be “particularly careful” when communicating is accepted as general wisdom, yet it does not consistently work, as people will find ways to get offended regardless.
                                                                                                                    • [voronoipotato]: It might benefit you to […] cool off […] if I were in your shoes I would probably be feeling pretty defensive
                                                                                                                    • [srid]: Can you see how being “particularly careful” is working for you here?

                                                                                                                    The fact that you went on to project feelings of defensiveness on to me, despite my making it clear I was feeling neither inconsiderate nor rude (much less needing to defend anything) served as a perfect example of just what the effectiveness of your proposed solution of being “perfectly careful” is … to wit: not effective at all.

                                                                                                                    Indeed, I’ve made this exact point under the Where civility falls short section of the aforementioned article.

                                                                                                                    (My delineating the situation in this manner is only done to elucidate the facts of the matter; however I also understand that it might be uncomfortable for you, as it goes against your beliefs regarding civility).

                                                                                                                    [1]: Just so there is no misunderstanding here’s what that refers to:

                                                                                                                    troll: a person who makes a deliberately offensive or provocative online post. (Oxford)

                                                                                                              2. 3

                                                                                                                There’s more to a language than its type system. Go’s runtime isn’t unsophisticated. I think it’s funny that you focus in on the type system as the primary measure of the language’s complexity, it lays bare that you have a narrow perspective on programming languages.

                                                                                                                1. 0

                                                                                                                  Wow you got me!

                                                                                                    2. 2

                                                                                                      Oderint dum computant.

                                                                                                      [1] original here, correction to my Latin gratefully accepted.

                                                                                                1. 36

                                                                                                  Twitter is a terrible platform for (among other things) long hand writing, it’s unreadable. I wish people would stop using it for that.

                                                                                                  1. 25

                                                                                                    Unlike the other folks who are defending Twitter, I think Twitter isn’t a great format for consuming content, but I also think it reduces friction for producing content, which results in a lot of great content that wouldn’t otherwise exist. For example, foone lays out his reasons for posting on Twitter here:

                                                                                                    Not to humblebrag or anything, but my favorite part of getting posted on hackernews or reddit is that EVERY SINGLE TIME there’s one highly-ranked reply that’s “jesus man, this could have been a blog post! why make 20 tweets when you can make one blog post?”

                                                                                                    CAUSE I CAN’T MAKE A BLOG POST, GOD DAMN IT.

                                                                                                    I have ADHD. I have bad ADHD that is being treated, and the treatment is NOT WORKING TERRIBLY WELL. I cannot focus on writing blog posts. it will not happen.

                                                                                                    if I try to make a blog post, it’ll end up being abandoned and unfinished, as I am unable to edit it into something readable and postable. so if I went 100% to blogs:

                                                                                                    You would get: no content

                                                                                                    I would get: lots of unfinished drafts and a feeling of being a useless waste

                                                                                                    but I can do rambly tweet threads. they don’t require a lot of attention for a long time, they don’t have the endless editing I get into with blog posts, I can do them. I do them a bunch! They’re just rambly and twitter, which some people don’t like.

                                                                                                    I’ve tweeted about it before, but I’ve been told this is “unprofessional” and I’m sorry if this surprises you, but I am not a professional writer. of course my hobby writing is going to be unprofessional. Cause it turns out there’s good reasons I’m not a professional writer, and the main one is that I can’t do it.

                                                                                                    Note that this also address the one direct criticism in the other sub-thread, broken sentences.

                                                                                                    Personally, if my options are “read foone’s writing on Twitter (or via something that re-writes his Twitter threads)” or “not be able to read foone’s writing”, I’ll choose the former.

                                                                                                    For some authors, like @jxxf, this is less extreme. He has a blog that he writes on, but the tradeoff is still the same at the margin: because he has a low friction platform available to him, he writes a lot more than he otherwise would and I’m glad he does.

                                                                                                    I view this the same way I view complaints that making programming easier has dumbed down programming because (for example) people no longer have to understand pointers to produce useful software. I think that’s great, on balance, even if there are some downsides.

                                                                                                    For people who dislike Twitter so much that they would rather have no content than content on Twitter, they can make that choice for themselves: when they see a twitter.com link, they can not click on it. Some people would prefer to make that choice for other people (as of the time of this writing, this post has downvotes for “spam”, “off topic”, and “broken link”, which are all incorrect IMO) and I don’t agree with that. From looking at lobsters content from twitter, it seems like maybe 2-4 twitter posts get traction each month? IMO, it’s preferable that people who don’t want to read content on Twitter click “hide” 2-4 times a month than to not have this content exist at all or get flagged off of lobsters.

                                                                                                    1. 7

                                                                                                      I’ve read this guy’s reasoning before and I just don’t believe it. The guy may have adhd, I have no reason to doubt him, but I think anyone capable of writing super long tweet messages and doing in-depth device break downs can be taught to write blog posts one paragraph at a time.

                                                                                                      Of course, the dude should write however he likes, I’m not his boss. He may believe what he says, but I think his reason is not real.

                                                                                                      I agree with your “don’t click on it.” approach as what I love about the internet is our ability to choose and filter.

                                                                                                      I don’t comment out of a wish to squash this guys stuff and I certainly don’t have to read it. But I comment because I want to understand why people write this way, and want to discourage others from writing this way, as overall it reduces the amount of content people can read, I think. Since this way takes longer to read, is hard to share and respond to thoughtfully.

                                                                                                      1. 2

                                                                                                        I have ADHD and I can relate really strongly to the sentiment. My thoughts don’t flow in a natural stream, it’s more spurts and fits. I can sit down and write a blog post, sure, but I’ll be sitting around writing it for 30+ minutes (an eon!) before I either a) get bored, and decide the point I’m trying to make isn’t worth making anyway, or b) realize my thoughts really don’t sound as good as I thought they did, even if they may have some merit. In the end, the blog post ends up getting deleted either way.

                                                                                                        I’d say using Twitter over a blogpost is more writer-centric than reader-centric, which obviously hinders the audience, but the way foone puts in the previous post really resonates with me:

                                                                                                        if I try to make a blog post, it’ll end up being abandoned and unfinished, as I am unable to edit it into something readable and postable. so if I went 100% to blogs:

                                                                                                        You would get: no content

                                                                                                        I would get: lots of unfinished drafts and a feeling of being a useless waste

                                                                                                        It’s all about focus, collecting thoughts, and forming them into a singular, discrete narrative - which just does not jive with ADHD behavior.

                                                                                                        1. 2

                                                                                                          Agreed as a fellow. My draft folder is a nightmare, my writing is comment sections and tweets.

                                                                                                          Even if I write a blog post it becomes painful, as I usually hyperfocus on it, will spend multiple days on it and end up rereading it too often out of fear for small errors. Tweet chains are much more permissive and raw.

                                                                                                          The guy may have adhd, I have no reason to doubt him, but I think anyone capable of writing super long tweet messages and doing in-depth device break downs can be taught to write blog posts one paragraph at a time.

                                                                                                          I hate to say it, but if I had a dime for every time a neurotypical person just utters disbelief about how my brain works, I’d have a ton of money on the side.

                                                                                                          These effects are very real.

                                                                                                          1. 1

                                                                                                            I called out the ability to train. I understand ADHD really well. What I meant is that it’s quite possible to train on a writing technique where I write only one sentence or paragraph at a time.

                                                                                                            That’s not unique to twitter. I can do the same thing in WordPress or google docs or many other tools that I can adapt to use.

                                                                                                            Maybe this author can’t do it, but they can learn to produce content in a way that is still possible given their medical condition.

                                                                                                            I was disputing the statement that the author can’t or that it’s impossible given ADHD. I don’t think that’s accurate. Maybe The author doesn’t want to train or learn. That’s cool, that is their prerogative. But the reason they aren’t doing it isn’t ADHD, it’s that the author likes it that way and is unwilling to change.

                                                                                                          2. 2

                                                                                                            Eh I can believe it. I have ADHD. Sometimes the things you can do, and the things you can’t do, don’t make any goddamn sense. ADHD is an executive dysfunction disorder. Shorter tasks do help…

                                                                                                          3. 1

                                                                                                            Not an unreasonable insight, but on the other hand if you can write 20 tweets, you can also write the same 20 tweets in a .html page?

                                                                                                            By biggest gripe with Twitter is that it doesn’t work in Firefox for whatever reason. Clicking “Show this thread” just doesn’t seem to do anything. Probably due to some Firefox setting I changed or whatnot, but it’s really hard to figure out what (I discovered that copy/paste was broken in Twitter because I disabled the clipboard API, took me a long time to figure out). It can also takes ages to load (although not ridiculously slow, my connection in Indonesia is somewhat low bandwidth/high latency).

                                                                                                            It’s all about what your goal is, if you want to just “tweet out in the universe” then by all means, go ahead. But if you want to reach people, then a blog post is probably more effective.

                                                                                                            Perhaps this is an opportunity for creating better blogging software that combines the best of both 🤔

                                                                                                          4. 9

                                                                                                            I like it as a format because it forces you to be concise and make every 280 characters a self-contained point. It’s a fun writing constraint.

                                                                                                            1. 13

                                                                                                              The endless scrolling, broken sentences (that most attempts have) and crappy twitter experience when JS is disabled doesn’t make it fun to read.

                                                                                                              1. 15

                                                                                                                I’d suggest maybe turning JS on to make your UX better, but I feel like you’re not going to be receptive to that idea.

                                                                                                                1. 4

                                                                                                                  I suggest nitter, for a far more usable and less hostile experience, without requiring JS:

                                                                                                                  https://nitter.net/jxxf/status/1219009308438024200

                                                                                                                  1. 1

                                                                                                                    Wow - JS or not, that’s a really nice UI.

                                                                                                                  2. 4

                                                                                                                    Ok, even with JS on, it’s still a bunch of poorly separated blocks of sentences and sentence fragments.

                                                                                                                    The comment above mentions a ‘fun writing constraint’.

                                                                                                                    Writers, find a different way to punish yourselves without punishing your readers. The number of hours a writer spends on a piece is almost certainly less (much, much less) than the number of combined hours that readers spend reading it. Don’t drag your readers through shit for “fun.”

                                                                                                                    1. 2

                                                                                                                      Why not? Nobody is forcing you to read it.

                                                                                                                      If someone wants to have fun writing in a weird format, that’s their prerogative. They don’t have to be maximising your utility.

                                                                                                                      That said, consider just using something like this: https://nitter.net/jxxf/status/1219009308438024200

                                                                                                                    2. 1

                                                                                                                      I disagree that JS should be required to be treated decently on a website.

                                                                                                                  3. 6

                                                                                                                    This isn’t a constraint if it’s split over 50 tweets.

                                                                                                                    This tweet stream is an example of how things aren’t self-obtained points. Almost all of these tweets are meaningless without context before and after.

                                                                                                                    This story seems made up, like a business fable and even more so because it’s tweeted out in small amounts.

                                                                                                                    This was interesting the first few times I saw it 13 years ago. But now it’s weird and confusing and shows how valuable friends and editors are to the writing process.

                                                                                                                    I read a novel in 1999 where the entire story took place in emails. It was an interesting constraint. But the same book today would not be original enough to outweigh the awkwardness of such a constraint.

                                                                                                                    I am not sure what’s up with these “tweet storms.” I guess they are best for online brands or something since people can like and tweet each item. This author seems quite successful with hundreds of interactions per message. So maybe it makes more money, or sells more ads, or just shows which paragraphs are best liked.

                                                                                                                    But I just wonder if the author is capable of setting up a blog.

                                                                                                                    I liked the story, but it took much longer to try to read because of all the scrolling. It’s also harder to read because the lack of paragraphs and grammar and links.

                                                                                                                    1. 1

                                                                                                                      Is Exegesis by Astro Teller the book you are thinking of?

                                                                                                                      1. 1

                                                                                                                        That looks pretty cool, but not it. I’ve added it to my to read pile.

                                                                                                                        I was referring to E: a Novel by Matt Beaumont. It was set in present day (2000) office place and was just a simple, relatively ok office drama.

                                                                                                                    2. 0

                                                                                                                      I am with you. There is something engaging about the dramatic separation of paragraphs that each read like headlines. Not great for details, but for short stories I find it fun.

                                                                                                                    3. 2

                                                                                                                      I think there should be automation for mirroring twitter threads in an accessible format.

                                                                                                                      I don’t click Twitter links anymore, because my Twitter experience typically goes as follows.

                                                                                                                      1. Click the twitter.com link on lobsters
                                                                                                                      2. “If you’re not redirected, click this link”
                                                                                                                      3. “It looks like you’re browsing without JS. Do you want to continue to basic site? [Yes]” (Yes is the only option provided here.)
                                                                                                                      4. Get redirected either to the twitter home page or a thread I clicked on 3 days ago on reddit, which was stored in a cookie and did not update correctly.
                                                                                                                      5. Repeat steps 0-2.
                                                                                                                      6. Arrive at the page, start reading the content in between the repeating author name, user name, and irrelevant timestamps.
                                                                                                                      7. Any other Twitter links on that page, go back to step 0.
                                                                                                                      8. Trying to open any images takes me back to either the author’s page, the twitter home page, or some other thread I clicked on recently.

                                                                                                                      I think browsing without JS is valid, and no-JS users deserve to be first-class visitors.

                                                                                                                      1. 1

                                                                                                                        @bandali says:

                                                                                                                        I suggest nitter, for a far more usable and less hostile experience, without requiring JS:

                                                                                                                        https://nitter.net/jxxf/status/1219009308438024200

                                                                                                                      2. -1

                                                                                                                        Twitter threads are a de facto standard for publishing and consuming content like this on the internet, the ship has sailed, and it’s just mind-numbingly uninteresting to have to endure replies like this every time one is shared to a content aggregation platform. Get with the times, old man 👴🏻 ✊🏻 ⛅️

                                                                                                                        1. 3

                                                                                                                          De facto standard lol? Since when? Blogging is still alive and well and blog posts outnumber twitter threads 100:1 on lobsters alone.

                                                                                                                      1. 29

                                                                                                                        I worked at large companies with user-facing products similar to what the author referenced - not Apple, but Skype, Microsoft and Uber. I worked or observed the team closely on OSes like XBox One and Windows 8, similar to the MacOs example. I think the example is overly dramatic.

                                                                                                                        In software - especially with BigTechCo - the goal is not to ship bug-free software. It’s to ship software that supports the business goal. Typically this means gaining new customers and reducing user churn. Ultimately, the end goal of publicly traded companies is to provide shareholders value. And Apple is dam good at this, generating $50B in profit on $240B in revenues per year.

                                                                                                                        All the examples in this blog post are ones that won’t result in user churn. The Catalina music app having a buggy section? Big deal, it will be fixed in the next update. The Amazon checkbox issue? Same thing: it will be prioritised and fixed sometime. They are all side-features with low impact. The team might have known about it already. Or - more likely - this team did not spend budget on thorough testing, as what they were building isn’t as critical as some other features.

                                                                                                                        The Skype app was full of smaller bugs like this: yet it dominated the market for a long time. When it failed, it was not for this. Catalina likely spent resources on making sure booting was under a given treshold and updates worked flawless. Things that - if they go wrong - could lead to loss of customers, gaining fewer new ones. So things that would directly impact revenue.

                                                                                                                        Finally, a (very incorrect) fact:

                                                                                                                        Lack of resources? This is Apple, a company that could’ve hired anyone in the world. There are probably more people working on Music player than on the entire Spotify business. Didn’t help.

                                                                                                                        This is plain false and very naive thinking. Teams are small at Apple and the music player team for Catalina is likely 10-15 people or less, based on my experience. While Apple could hire an army for an app like this, then they would not be the $1T company they are today. They have that valuation because they are very good at consistently generating high profits: for every $10 of revenue, they generate $2 of profit. They hire the number of people needed to make a good enough product and don’t spend money just because they have it.

                                                                                                                        What did change is Apple used to have a huge budget for manual testers: it was insane, compared to other companies. Due to rationalising - publicly traded company et al - the testing department is likely smaller for non-critical apps. Which puts them in-line or slightly above with the rest of their competitors.

                                                                                                                        I am not saying that bugs in software are great. But consumer-facing software development is more about iteration, speed and launching something good enough, than it is about perfection. It’s what makes economic sense. For other industries, like air travel or space, correctness is far more important, and it comes at the expense of speed and iteration.

                                                                                                                        It’s all trade-offs.

                                                                                                                        1. 12

                                                                                                                          It’s to ship software that supports the business goal.

                                                                                                                          This is really the fundamental miss of the author. Author doesn’t understand that (1) crap happens and (2) the level of quality required for a satisficed user is lower than he thinks.

                                                                                                                          Teams are small at Apple and the music player team for Catalina is likely 10-15 people or less, based on my experience.

                                                                                                                          Also, I can’t lay my head on a citation, but I think that it’s been studied that smaller teams produce better quality software (up to a point, ofc).

                                                                                                                          1. 3

                                                                                                                            All the examples in this blog post are ones that won’t result in user churn. The Catalina music app having a buggy section? Big deal, it will be fixed in the next update. The Amazon checkbox issue? Same thing: it will be prioritised and fixed sometime. They are all side-features with low impact. The team might have known about it already. Or - more likely - this team did not spend budget on thorough testing, as what they were building isn’t as critical as some other features.

                                                                                                                            The inability to open the iTunes Store might be bad for sales, so they’ll probably want to fix that one. But yes, as long as the basic features are working, these bugs are fine, on some level. This is how it is.

                                                                                                                            I think he is trying to highlight something on a more fundamental level: it should not be so easy to write these kinds of bugs. The developers should have to go out of their way to write them. But with the tools they have been given, it seems they have to work very hard to avoid writing bugs. It is like they have been given hammers that by their nature have a tendency towards hitting thumbs and sometimes manage to hit both your thumbs at the same time.

                                                                                                                            Let’s turn it around. Suppose software had a fundamentally good and auspicious nature. Suppose also that your product owner was a tricky fellow who wanted to add some bugs in your program. He comes up with a user story: as a user, sometimes I want to have an item be selected, but not highlighted, so as to further my confusion. I think the result of this would be a commit with some kind of conditional statement, table-driven code or perhaps an extra attribute on the list items that activates the bug path. The point being that you would need to add something to make it buggy. With the tools the Catalina music app team had, they very likely did not have to add anything at all to get those bugs.

                                                                                                                            The instances of bugs he brings up suggests to me that the tools involved were not used for their intended purpose. They were used to create simulacrum software. The Amazon checkboxes probably get their state from a distributed system where they “forgot” to handle multiple pending state changes. They could instead have used a design where this would never be an issue at all. If it had been designed properly, they would indeed have needed to add code to get it that buggy. And the buggy list items are probably not even in lists, but merely happen to sometimes visually resemble lists. And so on.

                                                                                                                            It is not good that this sort of thing happens regularly. One example from my own experience: the Swedish Civil Contingencies Agency (MSB) has an app that alerts you to important events. I cannot count how many times it has lost its settings and has defaulted to alerting about everything that happens everywhere. I have uninstalled that app. When the war arrives, I’ll be the last one to know.

                                                                                                                            1. 4

                                                                                                                              Teams are small at Apple and the music player team for Catalina is likely 10-15 people or less, based on my experience.

                                                                                                                              Yes, this accords with my experience. I would be surprised if it were that many people; the number of people who were working on the iTunes client was shockingly small, and they’d never grow the team just for Music.

                                                                                                                              1. 3

                                                                                                                                Based on my experience at Apple, I’d be surprised if the Music app was an actual team. Much more likely it was a few folks from another team that was tasked with creating it as a part-time project and wasn’t their primary project. Or, it could’ve been 2 folks who were fairly junior and tasked with writing it with occasional assistance.

                                                                                                                                In my experience teams and projects were sorely understaffed and underfunded (unless it was wasteful projects like the doomed self-driving car, in which case they were showered with far too much money and people). It was just shocking to work at a company that had so much excess cash and couldn’t “afford” to add people to projects that could really use them.

                                                                                                                              2. 2

                                                                                                                                All the examples in this blog post are ones that won’t result in user churn. The Catalina music app having a buggy section? Big deal, it will be fixed in the next update. The Amazon checkbox issue? Same thing: it will be prioritised and fixed sometime. They are all side-features with low impact. The team might have known about it already. Or - more likely - this team did not spend budget on thorough testing, as what they were building isn’t as critical as some other features.

                                                                                                                                One bug like this would not make me “churn”, but two or three would. I no longer use Chrome, nor iTunes, nor iOS, because of exactly this type of drop in quality. I no longer even bother with new Google products, because I know that they’re more likely than not to be discontinued and dropped without support. I no longer consider Windows because of all the dark patterns.

                                                                                                                                I am on the bleeding edge relative to less techical users, but I am also a lazy software dev, meaning I hate tinkering just to make something work. I’ll probably go with GNU for my next computer. And a year or two later, I bet so will my neighbor who just uses email and my friend who just needs to edit photos and my other friend who just writes papers.

                                                                                                                                1. 7

                                                                                                                                  I no longer use Chrome, nor iTunes, nor iOS, because of exactly this type of drop in quality . . . I hate tinkering just to make something work.

                                                                                                                                  I’ll probably go with GNU for my next computer.

                                                                                                                                  🤨

                                                                                                                                  1. 1

                                                                                                                                    Not sure if you intended for that to show up as “missing Unicode glyph”, but it works.

                                                                                                                                    You’ve got a point there.

                                                                                                                                    Until now, I have been using macOS for the hardware support, a few niche apps for stuff like playing music, and a GNU VM (Fedora LXDE) for dev which has proven to be a low-maintenance setup all around.

                                                                                                                                    1. 2

                                                                                                                                      The “missing Unicode glyph” is the Face with one eyebrow raised emoji and shows up for me using Chrome on iOS and Windows.

                                                                                                                                      1. 2

                                                                                                                                        And FF on Android

                                                                                                                              1. 4

                                                                                                                                In go channel communication is synchronous by default. If a send operation can’t proceed because the receive side is busy, the goroutine will go to sleep.

                                                                                                                                This will give you backpressure when working with Kafka or similar systems. I believe you can model a similar idea in Python, though I’ve only done it with the threads and the Queue class.

                                                                                                                                I think for other use cases one of the first things to do is to always accept a timeout for requests. Things may get overloaded but at least you won’t end up with tons of zombie requests.

                                                                                                                                Also all the rage right now are service meshes like envoy which can actually implement some of this at the network layer: https://www.envoyproxy.io/docs/envoy/latest/intro/arch_overview/upstream/circuit_breaking#arch-overview-circuit-break

                                                                                                                                1. 1

                                                                                                                                  synchronous/blocking communication is a poor model. Good backpressure requires a queue with a maximum fixed size.

                                                                                                                                  Even better if the queue allows more complex, pluggable scheduling methods.

                                                                                                                                  1. 7

                                                                                                                                    Good backpressure requires a queue with a maximum fixed size.

                                                                                                                                    Most often, that maximum fixed size should be 1.

                                                                                                                                    Queues exist only to handle burstiness. If your system doesn’t need to handle burstiness, communication should be synchronous.

                                                                                                                                    Even if you do need to handle burstiness, generally, queues should be provided at the edges of the system, not within it.

                                                                                                                                    1. 2

                                                                                                                                      Even if you do need to handle burstiness, generally, queues should be provided at the edges of the system, not within it.

                                                                                                                                      That’s the purpose of backpressure: to push the queuing to the right location.

                                                                                                                                      Often the edge is in a different place depending on where the caller is. The same component could be the edge and not at the edge depending on the caller or network conditions. The same queue could be filled when needed and shrunk down .

                                                                                                                                      Especially during failovers and in very dynamic networks.

                                                                                                                                      1. 3

                                                                                                                                        Valuing highly my own ability to model and predict system behavior, I would not want to be in charge of a system that contained dynamic queues. But I suspect we work in different domains.

                                                                                                                                    2. 4

                                                                                                                                      Go also has buffered channels.

                                                                                                                                  1. 25

                                                                                                                                    Queue theory is so nice for understanding almost everything in our machines. Most of my advice in conversations with async library authors boils down to “use unbuffered channels and enforce a global maximum number of requests that your tcp acceptor pauses for when the number is reached, so that your tcp backlog fills up and your load balancer can do its job and send traffic elsewhere or provide feedback to a scaling system”.

                                                                                                                                    One reason I’m very much in-favor of just using fixed size threadpools for rust services instead of any use of async is that it makes that max number of requests just the number of threads you picked, with no need for complex backpressure mechanisms. I feel like async is really only appropriate for load balancers, as far as its use in rust goes. When you’re running real workloads that do stuff on the CPU, context switching costs disappear into the noise, even post meltdown/spectre mitigations that exacerbate their costs (but we’re still better off than in the c10k days).

                                                                                                                                    1. 13

                                                                                                                                      This is great general advice, not only in Rust. Async should be understood as a niche solution to specific problems, not a default, general-purpose approach.

                                                                                                                                      More fundamental truths about queueing, which I find myself returning to over and over: https://apenwarr.ca/log/20170814.

                                                                                                                                      1. 1

                                                                                                                                        Thank you for the link, the article is quite dense but the guidelines given there are very helpful!

                                                                                                                                      2. 1

                                                                                                                                        Thank you for this explanation. I started working on a tcp client and I couldn’t figure out why/if I should use async. I felt like I should cause I have experience mostly in node.js but it wasn’t making sense (at least right now) with rust.

                                                                                                                                      1. 6

                                                                                                                                        This looks great, let’s please replace PGP with it everywhere. :D

                                                                                                                                        1. 9

                                                                                                                                          Yes, let’s replace a system which has been tested and proven and worked on since the 1990s with a random 47-commit project someone just tossed up on GitHub. Because good encryption is easy.

                                                                                                                                          /s

                                                                                                                                          1. 9

                                                                                                                                            File encryption is in fact kind of easy, thanks to everything we learned in the last 30 years.

                                                                                                                                            1. 9

                                                                                                                                              Yes, actually.

                                                                                                                                              1. 3

                                                                                                                                                I guess even the author of PGP would be up for that: https://www.vice.com/en_us/article/vvbw9a/even-the-inventor-of-pgp-doesnt-use-pgp

                                                                                                                                                1. 3

                                                                                                                                                  In a cryptography context, “since the 1990s” is basically derogatory. Old crypto projects are infamous for keeping awful insecure garbage around for compatibility, and this has been abused many many times (downgrading TLS to “export grade” primitives anyone?)

                                                                                                                                                  1. 3

                                                                                                                                                    I don’t see the point in sarcasm. PGP does many things and most of them are handled poorly be default. This is not a PGP replacement, it’s a tools with single purpose: file encryption. It’s not for safe transfers, it’s not for mail. It’s got a mature spec and it’s designed and developed by folks who are in the crypto community and there are two ref implementations. It does one thing and does it well which is everything PGP isn’t.

                                                                                                                                                    1. 1

                                                                                                                                                      I think icefox’s comment was already being sarcastic

                                                                                                                                                      1. 5

                                                                                                                                                        Not necessarily, PGP is a trashfire

                                                                                                                                                        1. 2

                                                                                                                                                          Why do you say that?

                                                                                                                                                          1. 6

                                                                                                                                                            This should answer your question better than I ever will.

                                                                                                                                                            https://latacora.micro.blog/2019/07/16/the-pgp-problem.html

                                                                                                                                                            1. 1

                                                                                                                                                              Thanks

                                                                                                                                                    1. 2

                                                                                                                                                      I’ve read the code and mostly read the paper, but I’m still missing the… utility? It looks like an abstract protocol for key/value operations, mappings to various languages or paradigms, and examples of implementations that serve different use cases. But this reads simply as a formalization of a design pattern, to me — software authors who need these sorts of behaviors already have all the tools they need to get them. Go, for example, has a rich ecosystem of different concrete types that implement the same interface with different behaviors that can be combined in artful ways, and which avoid the code smell of the empty interface. Probably the most widely used examples are the io.{Reader, Writer} interfaces, and types like io.TeeReader or io.MultiWriter, which I expect are more performant and more generally applicable than what’s being described here. What am I overlooking?

                                                                                                                                                      1. 1

                                                                                                                                                        abstract protocol for key/value operations

                                                                                                                                                        URI/Path → value operations. Small but important difference.

                                                                                                                                                        But this reads simply as a formalization of a design pattern

                                                                                                                                                        That description would fit pretty much every language feature ever. Why do you consider it a problem?

                                                                                                                                                        avoid the code smell of the empty interface

                                                                                                                                                        What empty interface? As described in the paper, there is a rich set of combinators (+ non-combinator stores reference but not described in the paper) that can be combined in simple and sometimes artful ways to create complex and highly useful behaviours.

                                                                                                                                                        This composability has extremely high utility, as does abstracting from specific stores.

                                                                                                                                                        What am I overlooking?

                                                                                                                                                        Not exactly sure, but what you describe (for example the io.{Reader, Writer} interfaces) seems almost entirely unrelated to what’s described in the paper.

                                                                                                                                                        1. 1

                                                                                                                                                          But this reads simply as a formalization of a design pattern That description would fit pretty much every language feature ever.

                                                                                                                                                          Sorry, I’m even more confused :) If you agree that storage combinators are a formalized design pattern, what is being proposed, exactly? I see (incomplete) mappings to HTTP/REST and a few languages… what else?

                                                                                                                                                          What empty interface?

                                                                                                                                                          The linked Go library returns values as interface{}, which is generally a code smell. It’s because of Go’s weak type system, absolutely, but generally there are smarter ways around it, such as…

                                                                                                                                                          what you describe (for example the io.{Reader, Writer} interfaces) seems almost entirely unrelated to what’s described in the paper.

                                                                                                                                                          The io.Writer interface and its various implementations appears to me to be exactly the same thing as the StorageCombinator interface and its various implementations. It’s one method instead of four, and it deals in byte slices instead of references and objects, but the concept is the same: different concrete types with different behaviors that can be combined in simple and artful ways to do novel things.

                                                                                                                                                          For example, you can io.Copy from os.Stdin (file descriptor implementing io.Reader) to an io.MultiWriter (concrete type implementing io.Writer) that pipes the output to a bytes.Buffer (concrete type implementing io.Writer) and a net.Conn (intermediary interface implementing io.Writer). Or implement your own e.g. CountingWriter that tracks the number of bytes written. Or whatever.

                                                                                                                                                          1. 1

                                                                                                                                                            Yes, I think the interface{} is my biggest issue with this. If it’s for storage, an io.Reader and io.Writer are far more appropriate for get/set operations.

                                                                                                                                                            1. 1

                                                                                                                                                              If you agree that storage combinators are a formalized design pattern

                                                                                                                                                              A reductio ad absurdum generally does not signal agreement ;-)

                                                                                                                                                              The empty interface in the Go implementation (which is not mine) probably reflects the use of “id” in the reference implementation, which in turn reflects the fact that many storage combinators do not care what the data actually is. In a language with generics, this would frequently be indicated by a generic parameter, in Objective-C it’s more common to use id, in this case also because a single instance can easily have more than one type here (so sum type, maybe?)

                                                                                                                                                              io.Writer .. exactly the same thing as the StorageCombinator interface

                                                                                                                                                              I actually have seen this misunderstanding before: because SCs are so composable and have features such as filters, some people appear to match this up with one of the few other areas which has this type of composability: I/O processing in the Unix pipes/filters fashion.

                                                                                                                                                              However, they still are nothing alike, as you wrote earlier the SC interface is more akin to a generalised key/value interface (dictionaries, filesystems, REST, variable access, …), whereas io.Writer is more streaming. For that sort of thing, see my other SPLASH ’19 paper: Standard Object Out: Streaming Objects with Polymorphic Write Streams

                                                                                                                                                              Yes, I am very much into composable abstractions, but not all composable abstractions are the same. :)

                                                                                                                                                              1. 1

                                                                                                                                                                A reductio ad absurdum generally does not signal agreement ;-)

                                                                                                                                                                I’m sorry, I thought I was summarizing, not mischaracterizing.

                                                                                                                                                                However, they still are nothing alike, as you wrote earlier the SC interface is more akin to a generalised key/value interface (dictionaries, filesystems, REST, variable access, …), whereas io.Writer is more streaming.

                                                                                                                                                                Well, they are both abstract interfaces whose implementations can have different behaviors, and can be combined in different ways to solve lots of different use cases. I understand that the method sets are different, but I (still) don’t understand why the specific definition of the StorageCombinator interface is important, nor why this definition, combined with mappings to language constructs and transport semantics, is so interesting. Or would you consider every such combination of interface + abstract implementations + mappings to language constructs + mapping to transport semantics interesting enough to motivate a paper?

                                                                                                                                                                1. 0

                                                                                                                                                                  I (still) don’t understand why the specific definition of the StorageCombinator interface is important

                                                                                                                                                                  Hmm…that is explained in exhaustive and exhausting detail in the paper, in terms of motivation, relevance, results, related work (novelty) etc.

                                                                                                                                                                  I could copy-paste the paper here, but that would be somewhat pointless. (A paper that went through fairly tough peer review and was accepted at a prestigious conference, that’s been downloaded almost 300 times from the ACM DL in a few weeks, whose results have been enthusiastically received and that’s been implemented a good number of times in a fairly brief timespan)

                                                                                                                                                                  I am not sure what more information I can give you except to read the paper and come back with more specific questions.

                                                                                                                                                                  Or would you consider every such combination of …

                                                                                                                                                                  I can only answer with another Reductio ad Absurdum:

                                                                                                                                                                  E=mc^2. is a combination of letters, numbers and mathematical symbols. Would you consider every combination of letters, numbers and mathematical symbols worthy of a paper?

                                                                                                                                                                  So of course, not every combination. This combination. And no, not every paper (and certainly not this one) is as groundbreaking as E=mc^2, and not every paper has to be.