1. 14

    I just discovered that this can be detected with -Wpartial-fields, which is nice, but not part of -Wall.

    Aaaaargh. Why even bother having a -Wall if it doesn’t have all warnings?

    1. 3

      That’s weird in GCC as well; it has -Wall and -Wextra, where the latter enables warnings not enabled by the former.

      1. 4

        IIRC the rationale is that -Wall enables everything uncontroversial, but the maintainers also wanted to include possibly controversial warnings, without making teams fight and in the end turn off -Wall.

        Put differently, if some teams’ sensible code styles says to do x, then -Wall is indended to not warn about x. Or put differently again, if a new diagnostic couldn’t be added to a compiler because it would make -Wall too loud, then that is added but outside -Wall.

        1. 1

          gcc’s -Wall is rarely extended because many projects use -Werror and -Wall. Adding more warnings to -Wall can break their builds and results in angry messages to the GCC mailing list.

        2. 2

          Agreed! I think -Wall should be named -Wrecommended instead.

          Haskell has -Weverything which really does turn on every warning. Amusingly it enables a warning that’s less strict than another warning, so you have to turn that one off. https://gitlab.haskell.org/ghc/ghc/-/issues/14794

        1. 27

          I want to give some feedback on the survey. (background: I did co-design the first and second Rust survey)

          The demographics section feels very odd. I pull out the questions so that people here don’t have to scroll:

          • What is your gender?

            • Male
            • Female
            • Non-binary
          • Do you identify as transgender?

            • Yes
            • No

          There’s a couple of issues with this: if you open up the floor for diverse genders, you should go all in. There’s people that are none of the three, most notably agender, but the list goes on. Everything else is clumsy. Second, the question on “how do you identify as transgender” is contested territory, many trans folk I know refuse that question because they are trans, not identify as.

          Another issue is “Which country do you live in?”, it doesn’t poll for nationality. This might be fine, I’m just not sure what the goal of the question is, then.

          I’d like to challenge them on a different territory though: they are the only identity questions asked beyond the usual (age, highest education, etc). This means that other things (e.g. disability) are ignored and thus (implicitly) communicated as uninteresting. Which begs the question: why is gender and trans so important that it is polled? What actions can be taken based on those numbers? This is a representation issue, for a good overview of the question “should we count or not”, I can highly recommend: https://media.ccc.de/v/camp2015-6876-data_and_discrimination_representing_marginalised_communities_in_data

          For that reason, we have completely bypassed that question from our survey and replaced it by a pair of questions:

          • “Do you consider yourself a member of an underrepresented demographic in technology?”
            • I won’t list them all here, but it lists 14 characteristics that we are aware of, such as gender identity, race, but also language skill + a free form field
          • “Do you feel your situation makes it difficult for you to participate in the Rust community?”
            • Yes
            • No
            • Maybe

          Those questions were reviewed from at least one person from each of the groups we list, if possible more. We’ve still run into issues in the first version, where we asked “Are you member of an underrepresented demographic?”. One of the feedback we got was black people in pre-dominantly countries being confused by the question. For that reason, we moved to the more lax question above. The second question makes the thing actionable: if someone is in a group and feels the Rust community is inaccessible because of that, we have something to follow up.

          This yields a ton of better results (at the cost of some people trolling the question).

          I am happy that more and more communities are doing those surveys. I’d be very interested in an experience exchange, or potentially even some standardisation, allowing us to compare results. There’s almost nothing comparative around.

          I’d be super interested in how anonymization works for you. Because of the number of open question we have in our survey, we generally don’t publish the results. To our reading and research into data anonymization techniques, it’s pretty easy to still identify individuals from the data set, especially from countries that are less well populated. We do instead commit to keeping data private. Given that you do ask for things like transness, this may keep people from answering.

          I also just remembered that feedback on missing demographics was given in 2017 to the first survey: https://lobste.rs/s/f5vsl9/first_annual_haskell_users_survey#c_o9l1zk, even with an offer to talk about how to design those. I wonder what was missing from our side for you to take up that offer. I found the issue for the survey, was there a review step of some sort? https://github.com/haskellweekly/haskellweekly/issues/57

          1. 18

            Thank you for this thoughtful and thorough comment. I was clearly made in good faith and it’s helpful, yet I can’t help but feel demoralized by it. It feels impossible to get this right! There is no “survey team” – it’s just me. I don’t really consume the results of the survey, so I’m trying my best to create a set of questions that I think are broadly useful. It’s very time consuming to write the survey, collect results, react to feedback, and produce an analysis. This is on top of my day job, making the newsletter, recording the podcast, and otherwise trying to live life.

            All that to say: I don’t really have the mental bandwidth to deal with this right now. I’ll reach out to you later about it.

            1. 14

              There is no “survey team” – it’s just me.

              Which, to be clear, is exactly the reason why I reach out and reached out back then: We can give you a lot of acquired knowledge, experience and practice up for grab. You don’t have to do this alone. The overload many feel in those areas is because we’re not reaching out to people that give experience, potentially from other communities - which is the reason I highlighted that I am interested to know what blocked you from reaching out, I want to fix that.

              If you have the feeling that you are left alone in running this survey, I can also give some advice there.

              All that to say: I don’t really have the mental bandwidth to deal with this right now. I’ll reach out to you later about it.

              Fully understood and given that the survey is started, I would also recommend to not fix it this year. I’m available for any help.

              1. 6

                Thanks for doing this!

                1. 6

                  yet I can’t help but feel demoralized by it. It feels impossible to get this right!

                  Don’t let any of this get you down. Step away and don’t sweat it for a while.

                  Real talk, this reads like more is going on right now than this survey. Take some time and take care of yourself. Haskell and lobster.rs will be here when you’re ready.

                2. 8

                  Sincere question: wouldn’t it be better to just leave out identity questions in general (other then age and level of education) and ask whether you “feel welcome” in the community (with add-on why question)?

                  I mean, some people find it interesting to talk about these kind of things (gender identity, socioeconomic status, race), I personally would consider these things irrelevant within the context of Haskell usage/adoption. Don’t get me wrong, they’re interesting on a personal level, imo just not relevant to “this context”

                  1. 11

                    A couple of reasons: These things are super relevant to adoption, because the way we phrase the questions is to find blockers to adoption. People do gravitate towards communities they feel safe and accepted in and are willing to bring new people with them. It’s a natural function of having to fight less fights and having more time for code.

                    Case in point: the JavaScript and Python communities have a very effective outreach program towards all the groups mentioned in our survey, and we know where they stand in the language world.

                    Also, polling for these questions isn’t magic. There’s standard methods and on the level we operate on, any will do and especially a carbon copy from a project with more experience - I would recommend getting in touch though, to ask for the thinking behind the questions. There’s a tendency in the FOSS world to reinvent the wheel though and it’s a growing frustration point for me that while we share code, we don’t share organisational practice and learning. I am not alone in this opinion, for example the recent Roadworks Ahead PDF version study highlights the issue of uniform skill sets and devaluing of skills like surveying, managing and outreach in FOSS projects. The reason why I haven’t posted this study here is by the way: I will immediately get an “off-topic” flag (as on my feedback above).

                    But more to the point: “feeling welcome” is even more of a simple barometer, you can’t get a lot of actionable things out of it. FOSS communities are very uniform (that comes mainly from the fact that the access path is uniform), so it’s not uncommon that a lot of the in-group feels happy. Also, it’s hard to figure out what numbers are good and what are bad. Also, a certain base number of people will always feel not welcome - it’s a statistical process. You get in touch with a community and your first 3 interactions are bad. You check “unwelcome”.

                    The polling methodology above is effective because it’s simple, easily understood by readers (by asking for a feeling) and gives a quick way of feedback. The cross-referencing gives us the ability to find out that “non-English-speaking Rustaceans don’t feel welcome”. This isn’t a randomly picked variable, a common form of exclusion is grading arguments of non-English speakers by the level of people who went to debate club at school. A survey is the prime location to find out issues like this.

                    Also, you don’t want to run this as a separate survey. While structured, targeted polling towards communities can be useful, the general yearly survey is the right moment to answer one or two questions to find things that catch your eye. This is the one everyone answers. Some people might fall in a dimension that they hadn’t considered to every raise. Others never felt empowered to represent themselves. This might go both ways: sometimes, you find groups are unexpectedly high in representation. What are we doing right and shouldn’t break? Or, other way put: if there’s a substantially worse representation of a group in a certain locale, are we looking at a missing stair that we don’t know of?

                    We heavily use our survey to inform future project policy and follow up with trends and information from all of the questions very closely. None are in at random.

                    1. 3

                      (WoW, thanks for your in-depth and insightful comment, pdf is on reading list for tonight)

                      I’ve never run a FOSS community nor do I identify as an active participant (I’ve had my first PR ever merged into IHP this week, and that was docs only), so I’m really blue on these kind of topics. Your comment makes perfect sense and - at least to me - indicate that more nuance is required in these kind of things.

                      While you indicate that this “is not rocket science”, I do think (and agree with OP) that this is really hard to get right. So optimizing for “don’t insult too much of my target audience” SOUNDS like a good strategy.

                      Thanks!

                      1. 4

                        I’ve never run a FOSS community nor do I identify as an active participant (I’ve had my first PR ever merged into IHP this week, and that was docs only), so I’m really blue on these kind of topics. Your comment makes perfect sense and - at least to me - indicate that more nuance is required in these kind of things.

                        Note: Surveys are a effective tool to investigate passive participants. People who never spend more time on you then filling out the survey.

                        While you indicate that this “is not rocket science”, I do think (and agree with OP) that this is really hard to get right. So optimizing for “don’t insult too much of my target audience” SOUNDS like a good strategy.

                        Thanks for highlighting that, that may have come out wrong. What I’m lamenting - and it’s frustrating to me - is two factors at play:

                        • The uphill battle of connecting FOSS communities to organisational practice beyond producing the artifact. I specifically say “organisational”, as FOSS projects are not businesses and need to be managed differently. Still, many tools are the same.
                        • A tendency (and this is where my “rocket science” stab comes from) to work in silos and not ask or copy from other projects. Even if you are not fully happy with a standard, go and take one and then iterate. This is how accessibility documentation spread in conferences in the Ruby space. There’s multiple reasons why I think that this is, but phew, other post.

                        I really don’t want to judge people doing this in their free time, my frustration comes from the amount of pain I think we could save ourselves from. Pro-active feedback for example is always better than retroactive (or missing) feedback. The retroactive may not be fixed in the moment, the missing may just leave things broken forever.

                        The second point can be seen again and again, especially part of those communities that are often considered “secondary skills”. My example here is conference organisation: I have to date budgeted and run 15 community conferences. My first one (eurucamp 2012) famously went bankrupt. This is terrible: you have volunteer people running a conference for 200 international people, and in the end, they are liable. This one worked out by another, older conference letting us tap into their disaster pool, looking at our budget and telling us what was our mistake. It was a classic beginner budgeting mistake. I learned 3 things here: the importance of sound budgeting, that there’s a network of conferences that support each other and that there’s a lot of solidarity going around. Had we talked to them earlier, we would have had a lot less stress.

                        Since then, I’m a heavy budget optimiser, particularly around volunteer budgets (easy to create, easy to come up with, making sure you are not liable yourself) and offer my experience for free to FOSS events. Yet, even in the Rust space, people are timid at asking for that 30 minute call that might save them 4 month of panic over budget. I usually help those events shortly before the event, when they already missed all deadlines for venue cancellation. I’d rather give my experience early.

                        The fact that our movement let people who go into liability over 40k$ and more and they are not aware that there’s an experience - and even cash pool to tap into is mind-boggling to me. There’s a number of really simple programs implemented around that on really small budgets (e.g. the Ruby Central conference grant or the Python and Wordpress Foundations small event support). But it’s not known enough in communities that this is a place people can turn to.

                        1. 1

                          Do you have a blog post about this? I’ve done conference organizing, but never heard of this!

                          1. 2

                            I have a half-written one here on budgeting: https://github.com/rust-community/events-team/blob/budget-guide/guides/CONFERENCE_BUDGETING.md (I need to run another pass through it, there’s glaring typos in there)

                            There’s good general books out there, but the budgeting component is often lacking. I tried to write down a bit of it, but while budgeting techniques are general, but also super local. So I prefer 30 minute coaching sessions with people.

                            https://www.quirksmode.org/coh/ has a conference organisers handbook that is good. It still postulates you can’t run a sizable conference under 200 EUR, had I known that before, eurucamp and RustFest wouldn’t have ended up 3-4 days affairs that cost ~100 and pay their speakers ;). The reason why I don’t write about those stunts is because I need to execute them with a team that knows about the how very well and how to trust your fundraising process.

                            There’s another really good PDF book by the people behind UIConf Berlin, but I can’t find it right now.

                            That eurucamp went bankrupt is not something we ever made very public, but all the ex-organisers speak openly about it.

                    2. 3

                      I partially agree, there are factors that are probably orthogonal or at best indirect to usage (gender, nationality, country or residence), but others are probably more interesting (sex, age, languages, level of education), especially in the context of Haskell, a language with a lot of academic bagage that are intereting when asking questions on how the community is developing.

                      1. 4

                        Especially nationality, country and residence can be super direct: the availability of an active meetup scene, conferences and speaker exchanges can be a huge booster. National scenes may form a (formal or informal) organisation, with organisers knowing each other and providing access to their networks. The other way around, I have also seen national scenes running into problems because of bad blood between some of the members. The latter is super hard to fix, but being aware of it can be interesting. But it isn’t uncommon that once you open a conversation channel, give people mental backing and skills to deal with situations, things improve. A lot of people connect that to “kicking people out”, which it almost always isn’t - but for example making people aware that they are having fights on the backs of others often makes them draw reasonable conclusions.

                        But I agree with you in general: Surveys of global scope give you a global overview. They at best give you pointers, assessment of what’s actually around can be take up to years. But “hey, we’ve seen this odd thing, got an idea?” is a good conversation starter.

                        BTW, I did not pick “disability” at random above, as disability is a frequent exclusion factor in programming communities. Which is odd, given that our tools of trade are rather accessible. Interesting side fact: Online conferences have btw. lead to less accessibility for blind people, as many of the platforms used are not accessible. Side subject, though.

                        1. 2

                          The access to a meetup scene is more related to the region you live in, as do you live in a village in the middle of Siberia or St. Petersburg. Nationality should be irrelevant too, just because someone has a German citizenship, doesn’t have to mean that they live there or even have lived there.

                          1. 2

                            The access to a meetup scene is more related to the region you live in, as do you live in a village in the middle of Siberia or St. Petersburg.

                            But this is very focused on a the datapoint itself.

                            The point I tried to work out is that it is particularly not that, aside from your extreme example. Meetups also grow and may create ways to include more people from futher away (such as running a small hackday, where people would drive to from further away). Again: organisers in a country (or adjecant ones, though it’s notable how visible borders still are!) tend to form a group, leading to a boosting effect and creating their own procedures and dynamics. The German Rust/Ruby/JavaScript organiser scene exists and is a rather mappable thing.

                            Nationality should be irrelevant too, just because someone has a German citizenship, doesn’t have to mean that they live there or even have lived there.

                            This depends heavily on the location you are in. There’s places where foreign nationals culturally have less access or more access.

                            Still, we may follow a red herring here:

                            A direct approach around the question of meetups is to actually ask for the info wanted:

                            • “Do you attend meetups?”
                              • “If no? Why not?” (Distance/Topics/Other)
                            1. 2

                              I agree that the last question would be a better way to solve this specific issue, but I think that demographic questions also serve to better understand issues you didn’t know to explicity state before creating the survey.

                              And just to clarify, my “extreme example” intends to show that proximity to a city or a urban area is a better indicator to whether or not you interact with any community on a face-to-face basis.

                              1. 1

                                The point @zge is making is that driving from Anchorage to Seattle isn’t quite the same thing as driving from Miami to New York. Driving from Tijuana to San Francisco as a Mexican national isn’t quite like either of those trips.

                                This doesn’t invalidate your points. My point is that answers to “If not, why” need to be quite granular to be useful.

                      2. -2

                        There’s people that are none of the three, most notably agender

                        By definition, everything that is not male or female is non-binary.

                        “how do you identify as transgender” is contested territory, many trans folk I know refuse that question because they are trans, not identify as.

                        Interesting that you call these folks trans, only to say that they do not identify as such. Why are you invalidating their identity?

                        1. 3

                          Interesting that you call these folks trans, only to say that they do not identify as such. Why are you invalidating their identity?

                          They are not invalidating. Re-read.

                      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. 37

                            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. 8

                                        Wow, that is a very unusual introduction to Haskell — going straight into imperative programs (everything’s a do!) and concurrency. And then it just…stops!

                                        1. 6

                                          It’s a phrasebook. It gives a way to do something in a language you don’t really know.

                                          It isn’t idiomatic, it’s just getting you to have something to show for it as quickly as possible.

                                          1. 6

                                            It’s a work in progress:

                                            We have launched the Phrasebook with 14 demonstrations of topics ranging from if-then-else expressions to transactional concurrency, and there is a lot more to come.

                                            1. 2

                                              In… a good way? Bad way?

                                              1. 5

                                                I don’t know! Well, it’s not good that it just stops. But I wonder what a Haskell book would be like that started with the imperative and concurrent stuff like “normal” languages have, and ended with the higher-order functions and so on, instead of the other way around, as a Haskell book normally does.

                                                Like, you would start off thinking it was like Go or something, just with weird syntax. You’d get sucked in that way, but then things would start getting more abstract and powerful, and by the end you’d be using pure functions and GADTs and free monads before you knew what hit you.

                                                1. 3

                                                  Like, you would start off thinking it was like Go or something, just with weird syntax. You’d get sucked in that way, but then things would start getting more abstract and powerful, and by the end you’d be using pure functions and GADTs and free monads before you knew what hit you.

                                                  I suspect you might give up, thinking, “what’s the point of this weirdness” before you got to any real motivation or reason to keep learning.

                                                2. 4

                                                  I like it. And I am waiting for it to provide more examples. I went through several books, still reading and still trying to learn. But did already write programs that I am using for my work and that are helpful for me. Still mostly reaching out for shell scripting, because the shell scripts naturally grow by combining commands and I wish I would use some Haskell Shell in which I would do my daily stuff and that would easily allow me at some point to put together the Haskell programs.

                                                  I like how they are showing ghcid early (how long did it take me to find settle on ghcid, how many editor/IDE tools did I try), and I like that ghci is introduced. It’s pragmatic.

                                                  I hope it will go on with many examples.

                                                  1. 0

                                                    In… a good way? Bad way?

                                                    Definitely a bad way.

                                                    All the weirdness and higher order stuff is there to give you all kinds of guarantees which can be extremely useful.

                                                    In fact: If you are not using the higher-order stuff, you might just as well use another language which requires you to jump though less hoops, because you are missing the whole point of what Haskell is about.

                                                    You should start with the higher-order stuff and then bolt this phrasebook on as an afterthought, not the other way around. If you start with this phrasebook, you will essentially be writing a bad code base.

                                                    Please keep in mind that I have actually reviewed assignments from a “Functional Programming” course, which used Haskell as it’s primary subject of study.

                                                    1. 9

                                                      You are gate-keeping, and this behaviour is definitely worse for the community.

                                                      I’m one of those developers who had no computer science education, and started programming essentially by banging rocks together, trying to pay the bills with WordPress and jQuery.

                                                      I learned Haskell the trial-and-error way, and the imperative way. My first foray into Haskell was from the book Seven Languages in Seven Weeks, which necessarily doesn’t go very deep into the languages it exhibits. I got some of the basics there, but otherwise trial-and-error, Google, IRC, etc. My first web apps in Haskell were pretty terrible, but I needed to just get something working for me to be more invested in the technology. Everyone sucks at something before they’re good at it anyway. There’s still an enormous amount of Haskell for me to learn. I see that as compelling, not a hurdle.

                                                      This has not “destroyed my reputation”, as you asserted. If anything it’s only improved it, especially among people who are interested in Haskell but are discouraged by people like you.

                                                      Now I run three businesses on Haskell, and employ other Haskellers who have worked at Haskell companies you have heard of.

                                                      1. 6

                                                        you will essentially be writing a bad code base.

                                                        But you WILL be writing a code base.

                                                        1. 1

                                                          But you WILL be writing a code base.

                                                          You will be writing a codebase that will force the next competent Haskell developer, to throw out all your work and start over. Also: It will destroy your reputation.

                                                          Honestly, it’s better to not write anything at all if this is your starting point. Just use something else like python, C/C++, Java or C#. This is simply not how Haskell should be written and I will probably also perform worse than the alternatives.

                                                          Why? Because if you use Haskell the right way, the compiler can throw in all kinds of optimizations, like lazy evaluation and memoization for free. If you are writing Haskell in the way that is proposed in the Phrasebook, you essentially loose all those perks without gaining anything. In fact your code will be much, much, (about a factor 10 actually) slower than it would be if you’d just started out by using a different language.

                                                          For an elaborate example, you can look at The evolution of a Haskell programmer. Note that the Juniors and the first Senior developer’s solutions are in fact perfectly valid and viable.

                                                          However, the second senior (which uses foldl) makes a critical mistake which costs him the “lazy evaluation perk”, which means that his best-case and worst-case performance are both O(n), whereas the senior that uses foldr will have O(1) as best case and O(n) as worst case performance.

                                                          And it goes downhill from there. However the Haskell code I see in the Phrasebook is similar to what the “Beginning graduate Haskell programmer” would do.

                                                          The “right” way to do it, is the “Tenured professor”-way all at the bottom. It doesn’t matter that product uses foldl’ internally in this case, which also sacrifices lazy evaluation. It’s about a way of doing things and in general, where you rely upon the implementation of libraries getting better. This phrasebook also throws a lot of those perks out by manually taking control over nearly the entire control flow (which is something you should do as little as possible when you are writing Haskell).

                                                          That is the kind of “bad codebase you would be writing” we are talking about here. If you find yourself in the situation where you need this phrasebook to get started, you are simply out of your league. The situation is really not unlike the software engineering team that programmed the flight computers of the 737 MAX 8. You should step away and say: “No, I am not up to this task right now. I need at least 120 hours (but 240 hours is a more reasonable estimate) of study before I can do this”.

                                                          But if you did invest the hours upfront and are using this Phrasebook as an afterthought… sure; Sure! Go ahead! You should now know where the pitfalls in these examples are.

                                                          1. 7

                                                            One of the authors of this Phrasebook is also an author of Haskell Programming from First Principles, which starts from the lambda calculus. I think she’s deliberately exploring as different an approach as possible. There’s isn’t a single Right way to teach, the readers’ varied backgrounds and motivations lead them to really different results.

                                                            1. 1

                                                              One of the authors of this Phrasebook is also an author of Haskell Programming from First Principles, which starts from the lambda calculus. I think she’s deliberately exploring as different an approach as possible. There’s isn’t a single Right way to teach, the readers’ varied backgrounds and motivations lead them to really different results.

                                                              The approach the author is taking now, is an approach which defeats the main purpose of Haskell: It’s type-system and a relatively smart compiler that exploits this through lazy evaluation. Because of this, I simply do not agree with this statement.

                                                              A pilot needs to learn at least some basic meteorology and aerodynamics, the same applies here, because if you don’t take the time to properly understand the type system and lazy evaluation, you are basically an unlicensed pilot that knows how to get an airplane off the ground, keep in in the air and land it again, but without any contact with air traffic control.

                                                              I would not want to fly with such a pilot, neither do I want to use an aircraft he/she has flown in. In reality we have systems in place to stop this from happening and the pilot will be told to stay on the ground and “pilot” something (like a car for example) he/she knows how to pilot. In the software world, we do not have a system, other than our own sound judgement, in place to prevent this from happening.

                                                              So please: Learn Haskell’s fundamentals first and then add this phrasebook to the mix afterwards or choose an entirely different technology. Everyone who is currently next to you or whom comes after you, will thank you for it.

                                                              1. 3

                                                                Hopefully Haskell can be many things to many people. I think it makes for a pretty good imperative language.

                                                            2. 6

                                                              I’m currently training a team of engineers to write Scala. We’re experiencing the “no code” problem right now. I prefer people write bad (but functional) code than no code.

                                                              1. 1

                                                                I’m currently training a team of engineers to write Scala. We’re experiencing the “no code” problem right now. I prefer people write bad (but functional) code than no code.

                                                                I would agree with you if this was about any other programming language, but Haskell really is a different beast in this regard.

                                                                I pose you this question: Would you rather spend some time training your engineers or would you rather have them dive in without them knowing what they are doing?

                                                                Since you are training a team, you’ve probably chosen the first approach, which is exactly what I am proposing you should do with Haskell as well. You do not hand a pilot the keys to an airplane without making sure they’ve had some proper training. The same applies here (see below). Most other programming languages are like cars or trucks, but Haskell really is more of an aircraft.

                                                                1. 8

                                                                  I think this type of elitist gate keeping dissuades people trying to learn Haskell and reflects poorly on the community. Furthermore the creators of the Haskell Phrasebook clearly know a lot about Haskell and have built a business around teaching it to people. Do you think it’s possible for them to have a compelling reason to create a resource like this?

                                                                  @argumatronic: I’ve seen people do similar with Haskell, starting with very imperative-style Haskell, but in the meantime: I can understand you, thank you for making effort to learn a new language, welcome.

                                                                  1. 0

                                                                    I think this type of elitist gate keeping dissuades people trying to learn Haskell and reflects poorly on the community.

                                                                    Actually I digress. There is nothing elitist about it. It’s about using a hammer to turn a screw in.

                                                                    Furthermore the creators of the Haskell Phrasebook clearly know a lot about Haskell and have built a business around teaching it to people.

                                                                    The fact that someone builds a business around something, doesn’t mean they are doing things the right way. Teaching people things the wrong way, has a tendency to stick around. Oh and btw, I also earned money teaching Haskell (and cryptography and security) to people during my studies at an accredited university with the oversight of a professor leading in the development of the language…. So I am no lightweight either…. And what I see here makes me cringe and would have awarded any student a non-passing grade with approval.

                                                                    Do you think it’s possible for them to have a compelling reason to create a resource like this?

                                                                    Yes I do. In fact, they state the same reason as I suspected on the Twitter feed you mention:

                                                                    IME, people start to write more Haskelly Haskell as they get comfortable with it, but we have the tools to write imperative-style Haskell as a bridge, no shame in using them.

                                                                    And:

                                                                    Eventually, by doing that a lot, I became quite fluent in Japanese. And I’ve seen people do similar with Haskell, starting with very imperative-style Haskell, but in the meantime: I can understand you, thank you for making effort to learn a new language, welcome.

                                                                    And like I said, there is nothing wrong with using the phrasebook, but you have to use it after you at least have a firm grasp op the basic concepts. Doing it the other way around will give the community and the language itself a bad name. If nothing else, the Haskell ecosystem will turn into a hack fest similar to python or nodejs with the decrease in quality and performance of everything that comes with it.

                                                                    That’s what I am worried about and it’s also why I disagree: You want people that write Haskell, to write it in a completely different way than you’d write an imperative language.

                                                    1. 1

                                                      This graph is missing one of its bars (“Less than high school diploma”): https://taylor.fausak.me/2018/11/18/2018-state-of-haskell-survey-results/#question-100

                                                      1. 1

                                                        That’s intentional. Many of the graphs only show a subset of the possible answers in order to keep things legible. The full results are always included in the table below the chart. You can see exactly how this was done in this script.

                                                        1. 2

                                                          Seems rather arbitrary, at least for the specific graph I mentioned (It’s close in value to two other categories, both of which are shown). Doesn’t excluding arbitrary values without justification essentially render all these graphs meaningless?

                                                          If I can’t look at a graph and learn something without first checking the graph against the data table to see what’s missing, then the graph is at best useless, at worst misleading.

                                                      1. 4

                                                        I am excited to announce the 2018 State of Haskell Survey! This is the second annual State of Haskell survey. I am happy to say that this year the survey is co-sponsored by Haskell Weekly and Haskell.org.

                                                        The goal of the survey is to better understand what people think of the Haskell programming language, together with its ecosystem and community. Whether you have never used Haskell or you use it every day, we want to hear from you!

                                                        The survey opens today, November 1st, and stays open for two weeks. It closes on November 15th.

                                                        Please take a few minutes to fill out the survey! We want an accurate picture of the Haskell community, so please share this link to help us out: https://bit.ly/haskell2018. Thanks!

                                                        1. 28

                                                          That is a very reductionist view of what people use the web for. And I am saying this as someone who’s personal site pretty much matches everything prescribed except comments (which I still have).

                                                          Btw, Medium, given as a positive example, is not in any way minimal and certainly not by metrics given in this article.

                                                          1. 19

                                                            Btw, Medium, given as a positive example, is not in any way minimal and certainly not by metrics given in this article.

                                                            Chickenshit minimalism: https://medium.com/@mceglowski/chickenshit-minimalism-846fc1412524

                                                            1. 14

                                                              I wouldn’t say medium even gives the illusion of simplicity (For example, on the page you linked, try counting the visual elements that aren’t blog post). Medium seems to take a rather contrary approach to blogs, including all the random cruft you never even imagined existed, while leaving out the simple essentials like RSS feeds. I honestly have no idea how the author of the article came to suggest medium as an example of minimalism.

                                                              1. 8

                                                                Medium started with an illusion of simplicity and gradually got more and more complex.

                                                                1. 3

                                                                  I agree with your overall point, but Medium does provide RSS feeds. They are linked in the <head> and always have the same URL structure. Any medium.com/@user has an RSS feed at medium.com/feed/@user. For Medium blogs hosted at custom URLs, the feed is available at /feed.

                                                                  I’m not affiliated with Medium. I have a lot of experience bugging webmasters of minimal websites to add feeds: https://github.com/issues?q=is:issue+author:tfausak+feed.

                                                              2. 3

                                                                That is a very reductionist view of what people use the web for.

                                                                I wonder what Youtube, Google docs, Slack, and stuff would be in a minimal web.

                                                                1. 19

                                                                  Useful.

                                                                  algernon hides

                                                                  1. 5

                                                                    YouTube, while not as good as it could be, is pretty minimalist if you disable all the advertising.

                                                                    I find google apps to be amazingly minimal, especially compared to Microsoft Office and LibreOffice.

                                                                    Minimalist Slack has been around for decades, it’s called IRC.

                                                                    1. 2

                                                                      It is still super slow then! At some point I was able to disable JS, install the Firefox “html5-video-everywhere” extension and watch videos that way. That was awesome fast and minimal. Tried it again a few days ago, but didn’t seem to work anymore.

                                                                      Edit: now I just “youtube-dl -f43 ” directly without going to YouTube and start watching immediately with VLC.

                                                                      1. 2

                                                                        The youtube interface might look minimalist, but under the hood, it is everything but. Besides, I shouldn’t have to go to great lengths to disable all the useless stuff on it. It shouldn’t be the consumer’s job to strip away all the crap.

                                                                      2. 2

                                                                        That seems to be of extreme bad faith though.

                                                                        1. 11

                                                                          In a minimal web, locally-running applications in browser sandboxes would be locally-running applications in non-browser sandboxes. There’s no particular reason any of these applications is in a browser at all, other than myopia.

                                                                          1. 2

                                                                            Distribution is dead-easy for websites. In theory, you have have non-browser-sandboxed apps with such easy distribution, but then what’s the point.

                                                                            1. 3

                                                                              Non-web-based locally-running client applications are also usually made downloadable via HTTP these days.

                                                                              The point is that when an application is made with the appropriate tools for the job it’s doing, there’s less of a cognitive load on developers and less of a resource load on users. When you use a UI toolkit instead of creating a self-modifying rich text document, you have a lighter-weight, more reliable, more maintainable application.

                                                                              1. 3

                                                                                The power of “here’s a URL, you now have an app running without going through installation or whatnot” cannot be understated. I can give someone a copy of pseudo-Excel to edit a document we’re working together on, all through the magic of Google Sheet’s share links. Instantly

                                                                                Granted, this is less of an advantage if you’re using something all the time, but without the web it would be harder to allow for multiple tools to co-exist in the same space. And am I supposed to have people download the Doodle application just to figure out when our group of 15 can go bowling?

                                                                                1. 4

                                                                                  They are, in fact, downloading an application and running it locally.

                                                                                  That application can still be javascript; I just don’t see the point in making it perform DOM manipulation.

                                                                                  1. 3

                                                                                    As one who knows JavaScript pretty well, I don’t see the point of writing it in JavaScript, however.

                                                                                    1. 1

                                                                                      A lot of newer devs have a (probably unfounded) fear of picking up a new language, and a lot of those devs have only been trained in a handful (including JS). Even if moving away from JS isn’t actually a big deal, JS (as distinct from the browser ecosystem, to which it isn’t really totally tied) is not fundamentally that much worse than any other scripting language – you can do whatever you do in JS in python or lua or perl or ruby and it’ll come out looking almost the same unless you go out of your way to use particular facilities.

                                                                                      The thing that makes JS code look weird is all the markup manipulation, which looks strange in any language.

                                                                                      1. 3

                                                                                        JS (as distinct from the browser ecosystem, to which it isn’t really totally tied) is not fundamentally that much worse than any other scripting language

                                                                                        (a == b) !== (a === b)

                                                                                        but only some times…

                                                                                        1. 3

                                                                                          Javascript has gotchas, just like any other organic scripting languages. It’s less consistent than python and lua but probably has fewer of these than perl or php.

                                                                                          (And, just take a look at c++ if you want a faceful of gotchas & inconsistencies!)

                                                                                          Not to say that, from a language design perspective, we shouldn’t prize consistency. Just to say that javascript is well within the normal range of goofiness for popular languages, and probably above average if you weigh by popularity and include C, C++, FORTRAN, and COBOL (all of which see a lot of underreported development).

                                                                                  2. 1

                                                                                    Web applications are expected to load progressively. And that because they are sandboxed, they are allowed to start instantly without asking you for permissions.

                                                                                    The same could be true of sandboxed desktop applications that you could stream from a website straight into some sort of sandboxed local VM that isn’t the web. Click a link, and the application immediately starts running on your desktop.

                                                                                  3. 1

                                                                                    I can’t argue with using the right tool for the job. People use Electron because there isn’t a flexible, good-looking, easy-to-use cross-platform UI kit. Damn the 500 mb of RAM usage for a chat app.

                                                                                    1. 4

                                                                                      There are several good-looking flexible easy to use cross-platform UI kits. GTK, WX, and QT come to mind.

                                                                                      If you remove the ‘good-looking’ constraint, then you also get TK, which is substantially easier to use for certain problem sets, substantially smaller, and substantially more cross-platform (in that it will run on fringe or legacy platforms that are no longer or were never supported by GTK or QT).

                                                                                      All of these have well-maintained bindings to all popular scripting languages.

                                                                                      1. 1

                                                                                        QT apps can look reasonably good. I think webapps can look better, but I haven’t done extensive QT customization.

                                                                                        The bigger issue is 1) hiring - easier to get JS devs than QT devs 2) there’s little financial incentive to reduce memory usage. Using other people’s RAM is “free” for a company, so they do it. If their customers are in US/EU/Japan, they can expect reasonably new machines so they don’t see it as an issue. They aren’t chasing the market in Nigeria, however large in population.

                                                                                        1. 5

                                                                                          Webapps are sort of the equivalent of doing something in QT but using nothing but the canvas widget (except a little more awkward because you also don’t have pixel positioning). Whatever can be done in a webapp can be done in a UI toolkit, but the most extreme experimental stuff involves not using actual widgets (just like doing it as a webapp would).

                                                                                          Using QT doesn’t prevent you from writing in javascript. Just use NPM QT bindings. It means not using the DOM, but that’s a net win: it is faster to learn how to do something with a UI toolkit than to figure out how to do it through DOM manipulation, unless the thing that you’re doing is (at a fundamental level) literally displaying HTML.

                                                                                          I don’t think memory use is really going to be the main factor in convincing corporations to leave Electron. It’s not something that’s limited to the third world: most people in the first world (even folks who are in the top half of income) don’t have computers that can run Electron apps very well – but for a lot of folks, there’s the sense that computers just run slow & there’s nothing that can be done about it.

                                                                                          Instead, I think the main thing that’ll drive corporations toward more sustainable solutions is maintenance costs. It’s one thing to hire cheap web developers & have them build something, but over time keeping a hairball running is simply more difficult than keeping something that’s more modular running – particularly as the behavior of browsers with respect to the corner cases that web apps depend upon to continue acting like apps is prone to sudden (and difficult to model) change. Building on the back of HTML rendering means a red queen’s race against 3 major browsers, all of whom are changing their behaviors ahead of standards bodies; on the other hand, building on a UI library means you can specify a particular version as a dependency & also expect reasonable backwards-compatibility and gradual deprecation.

                                                                                          (But, I don’t actually have a lot of confidence that corporations will be convinced to do the thing that, in the long run, will save them money. They need to be seen to have saved money in the much shorter term, & saying that you need to rearchitect something so that it costs less in maintenance over the course of the next six years isn’t very convincing to non-technical folks – or to technical folks who haven’t had the experience of trying to change the behavior of a hairball written and designed by somebody who left the company years ago.)

                                                                                        2. 1

                                                                                          I understand that these tools are maintained in a certain sense. But from an outsider’s perspective, they are absolutely not appealing compared to what you see in their competitors.

                                                                                          I want to be extremely nice, because I think that the work done on these teams and projects is very laudable. But compare the wxPython docs with the Bootstrap documentation. I also spent a lot of time trying to figure out how to use Tk, and almost all resources …. felt outdated and incompatible with whatever toolset I had available.

                                                                                          I think Qt is really good at this stuff, though you do have to marry its toolset for a lot of it (perhaps this has gotten better).

                                                                                          The elephant in the room is that no native UI toolset (save maybe Apple’s stack?) is nowhere near as good as the diversity of options and breadth of tooling available in DOM-based solutions. Chrome dev tools is amazing, and even simple stuff like CSS animations gives a lot of options that would be a pain in most UI toolkits. Out of the box it has so much functionality, even if you’re working purely vanilla/“no library”. Though on this points things might have changed, jQuery basically is the optimal low-level UI library and I haven’t encountered native stuff that gives me the same sort of productivity.

                                                                                          1. 3

                                                                                            I dunno. How much of that is just familiarity? I find the bootstrap documentation so incomprehensible that I roll my own DOM manipulations rather than using it.

                                                                                            TK is easy to use, but the documentation is tcl-centric and pretty unclear. QT is a bad example because it’s quite heavy-weight and slow (and you generally have to use QT’s versions of built-in types and do all sorts of similar stuff). I’m not trying to claim that existing cross-platform UI toolkits are great: I actually have a lot of complaints with all of them; it’s just that, in terms of ease of use, peformance, and consistency of behavior, they’re all far ahead of web tech.

                                                                                            When it comes down to it, web tech means simulating a UI toolkit inside a complicated document rendering system inside a UI toolkit, with no pass-throughs, and even web tech toolkits intended for making UIs are really about manipulating markup and not actually oriented around placing widgets or orienting shapes in 2d space. Because determining how a piece of markup will look when rendered is complex and subject to a lot of variables not under the programmer’s control, any markup-manipulation-oriented system will make creating UIs intractably awkward and fragile – and while Google & others have thrown a great deal of code and effort at this problem (by exhaustively checking for corner cases, performing polyfills, and so on) and hidden most of that code from developers (who would have had to do all of that themselves ten years ago), it’s a battle that can’t be won.

                                                                                            1. 5

                                                                                              It annoys me greatly because it feels like nobody really cares about the conceptual damage incurred by simulating a UI toolkit inside a doument renderer inside a UI toolkit, instead preferring to chant “open web!” And then this broken conceptual basis propagates to other mediums (VR) simply because it’s familiar. I’d also argue the web as a medium is primarily intended for commerce and consumption, rather than creation.

                                                                                              It feels like people care less about the intrinsic quality of what they’re doing and more about following whatever fad is around, especially if it involves tools pushed by megacorporations.

                                                                                              1. 2

                                                                                                Everything (down to the transistor level) is layers of crap hiding other layers of different crap, but web tech is up there with autotools in terms of having abstraction layers that are full of important holes that developers must be mindful of – to the point that, in my mind, rolling your own thing is almost always less work than learning and using the ‘correct’ tool.

                                                                                                If consumer-grade CPUs were still doubling their clock speeds and cache sizes every 18 months at a stable price point and these toolkits properly hid the markup then it’d be a matter of whether or not you consider waste to be wrong on principle or if you’re balancing it with other domains, but neither of those things are true & so choosing web tech means you lose across the board in the short term and lose big across the board in the long term.

                                                                            2. 1

                                                                              Youtube would be a website where you click on a video and it plays. But it wouldn’t have ads and comments and thumbs up and share buttons and view counts and subscription buttons and notification buttons and autoplay and add-to-playlist.

                                                                              Google docs would be a desktop program.

                                                                              Slack would be IRC.

                                                                              1. 1

                                                                                What you’re describing is the video HTML5 tag, not a video sharing platform. Minimalism is good, I do agree, but don’t mix it with no features at all.

                                                                                Google docs would be a desktop program.

                                                                                This is another debate around why using the web for these kind of tasks, not the fact that it’s minimalist or not.

                                                                          1. 5

                                                                            I’m not sure why fewer than 200 people said they use Haskell at work in the previous question but more than 600 said they use Haskell at work at least some of the time in this question.

                                                                            Was the question “Where do you use Haskell?” multiple choice, or was the survey using radio buttons? Could be the source of the discrepancy.

                                                                            1. 5

                                                                              The “where do you use Haskell” question was multiple choice (check boxes). The “do you use Haskell at work” question was single choice (radio buttons).

                                                                              1. 3

                                                                                I had this same problem with State of Elm. The first go ‘round people told me that the binary yes-or-no was unclear because they felt they had to be using it in production. But that wasn’t my intent, so this year I tried to fix it by making the “where are you using Elm” question have the following choices:

                                                                                • I’m just tinkering
                                                                                • Don’t feel ready for production
                                                                                • No code in staging or production but feel capable
                                                                                • In development towards production
                                                                                • In production on a side project
                                                                                • In production at work (internal)
                                                                                • In production at work (user-facing)

                                                                                Next year I’m going to break it down even more. It turns out that a lot of things I thought were yes/no initially are actually sliding scales. (Except for “can I have your email” or really really specific and leading questions.)

                                                                                1. 1

                                                                                  That is actually quite interesting, I’ve been tinkering with both Haskell and Elm at work but haven’t used them on any project meant for production.

                                                                                  I usually experiment with a lot of languages for smaller side projects and when architecting a new product and evaluating tech choices, many of these are never put into production usage while some do.

                                                                            1. 15

                                                                              I was disappointed that there were no demographic questions - that’s a vital area which the Rust survey creators put a lot of work into. I expect it was due to the survey creators not seeing it as important enough to justify the effort of doing it right, which I know is considerable. I understand that decision, but it’s frustrating, because it’s very important to some of us.

                                                                              1. 16

                                                                                I agree that demographics are important! I definitely want to include them in next year’s survey. This is the first survey I’ve ever published. I didn’t want to get the demographic questions wrong or otherwise mishandle them. That’s why I decided to focus on the technical questions. The survey was developed in the open (see this issue); next year’s will be too. I would be delighted to have you help out with the demographic questions.

                                                                                1. 14

                                                                                  Just copy ours :).

                                                                                  Jest aside, we’re cool with anyone taking these questions like all our other open source output.

                                                                                  Also, there’s a huge problem currently: most languages don’t run these kinds of surveys and then many don’t share a common core. It’s hard to read a lot from them.

                                                                                  In case of Rust, we’re in the lucky position to actually have run two of them, so we can at least put this year’s number in relationship to last year’s.

                                                                                  But for the rest? Are we doing better then language X? Worse? Only gut feeling.

                                                                                  I don’t see this as a competition, there’s rarely been a structured approach to mapping communities.

                                                                                  In any case, if you’d like to exchange experiences, please feel free to contact community-team@rust-lang.org

                                                                                  1. 8

                                                                                    I’m happy to hear that! And I’m also happy to be contacted to comment on concrete proposals, when next year’s survey is at that stage; I don’t have the bandwidth to be involved more than that.

                                                                                    I suspect the team that did the Rust survey will also be happy to advise about these topics. I know they’ve talked about it a bunch here on lobste.rs, and those old discussions are still in the archives somewhere.

                                                                                  2. -2

                                                                                    You mean the part about “underrepresented groups” or whatever on the Rust survey? Why do you think that is important?

                                                                                    One of my favorite things about the Haskell community is that everyone is too busy doing actual technically impressive stuff to worry about e.g. how many gay people happen to be using it.

                                                                                    To be blunt, I think that sort of thinking (obsessing over whether an organic community follows one’s arbitrarily constructed ideals for what it should look like) is a cancerous mind-suck that detracts from actually productive work.

                                                                                    To be a little more blunt, I think the fact that Haskell has a reputation as being extremely technical has actually helped the community a great deal, at least just by virtue of the fact that it scares away people who are primarily involved in software as a means to push some political agenda.

                                                                                    Late edit: feel free to respond instead of just downvoting, would be happy to be wrong here.

                                                                                    1. 33

                                                                                      This is downvoted already, I’ll bite anyways. First of all, I think your comment shows that you have no idea what we are doing there.

                                                                                      Gathering demographics questions is much more then what you narrow it down to. It’s telling that the only thing you can come up with is “how many gay people happen to be using it”? It’s also: where do people live, would they want to travel to a conference, etc… It cuts out the guesswork. You know what? When you measure, you also sometimes find out that things are just okay. No need to do something. Great! Sometimes, you find something odd. Then you might want to investigate. It’s a community survey. We want to know about people, not about technology. But social groups are also a thing to check.

                                                                                      The Rust community also does production user surveys, which are die-hard technical and very detailed, usually specific in certain areas like embedded and or gaming. We seek out users willing to do that and set up meetings to figure out the issues.

                                                                                      To be blunt, I think that sort of thinking (obsessing over whether an organic community follows one’s arbitrarily constructed ideals for what it should look like) is a cancerous mind-suck that detracts from actually productive work.

                                                                                      To be blunt too: It’s shit that you call my work “not productive”. Here’s a thing: I don’t want to contribute to rustc or Servo. Why? I code all day, I don’t want to code at night. I’m happy that other people want to. I still want to contribute to FOSS. In the last 5 years, I’ve set up 2 foundations, 11 conferences and managed around 250000 Euros to run all these things. I signed leases that could have bankrupted me. I managed to find ways to run 2-days conferences that cost 100EUR and still cover all expenses of speakers, attendees and those that cannot pay 100 Euros. I love that work. People are indeed very fair about this. Those that have more give, those that don’t, don’t. And I want everyone to benefit from that. My whole work revolves around the question “Who’s not here, and why?”. It’s my hack. Nothing of that is fundamentally special, other people could have done it.

                                                                                      And you know what? We measure. We don’t go out “hey, please do X because I think it works”. No, we go “hey, we did X and metric Y improved”.

                                                                                      It’s also amazing how many people just need a “have you considered programming might be something for you?” and then just head of and learn it. But the question needs to be asked a couple of times.

                                                                                      It’s shitty to go on an concern troll around people doing precisely that to better do “productive work”.

                                                                                      There’s no way to get me to work on other things without paying me. And you know what I like about the Rust community? They don’t concern troll me. They go: cool, if that’s what you want to do, please do it for us. It’s not like I bind a lot of resources. Community work works best if you don’t have many cycles. We align on a goal and then we do a lot of footwork.

                                                                                      Sure, there are cases where issues arise and social work becomes focus, but that’s fine. Interestingly, the work of community workers is often to talk about issues before they come a trashfire, go to reddit and subsequently to 4chan.

                                                                                      There’s also the “fixed cake” fallacy at work here: The belief that if we expand our community beyond a certain group, another group has to take the impact. That isn’t the case. The cake is not fixed. The market for programming languages is growing in absolute terms, also our communities are growing in absolute terms. These are effect to be appreciated and taken into consideration.

                                                                                      Different folk need to be addressed in different fashion and thats fine. These surveys give us a bearing in where we want to invest our time or where things just work.

                                                                                      If you absolutely want to talk in programming terms, we’re profiling our work. I find it amazing that there is so much pushback when we actually check on our successes.

                                                                                      It’s shitty of people to devalue that work. A work, which has to be said, is more often done by women and people of color in many communities. Many of which are masters of it.

                                                                                      There’s two options here: I do this work within a community or I don’t. It’s as simple as that. No “more productive” trolling.

                                                                                      I structured work on these issues is still “cancerous mind-suck” for you, then go ahead. But say it to my face when you meet me.

                                                                                      To be a little more blunt, I think the fact that Haskell has a reputation as being extremely technical has actually helped the community a great deal, at least just by virtue of the fact that it scares away people who are primarily involved in software as a means to push some political agenda.

                                                                                      I just leave this here:

                                                                                      So I just met Simon Peyton Jones (creator of Haskell) and chatted with him for a bit. Asked him his thoughts on Rust and he said he thinks it seems exciting and he was jealous of the great community we have. Just thought I would let you guys know :)

                                                                                      (From: https://www.reddit.com/r/rust/comments/5yo24a/meta_rust_jealousy/)

                                                                                      This was, by the way, the best compliment I ever saw, I respect Simon very much.

                                                                                      We have an awesome many people primarily interested in software working in the Rust community. But they don’t throw the community workers under the bus like you do. That’s why I run a 6-monthly Rust conference and not a 6-monthly Haskell conference.

                                                                                      I love Haskell, but there’s reasons I’m not active there. Still, for anyone that wants to learn techniques and procedures, by all means get in touch.

                                                                                      Communities don’t happen at random. They work through network effects and feedback and these can be moderated and improved.

                                                                                      Finally, to be very blunt: you just cost me 45 minutes of community work, which I’d have preferred to fill with something productive.

                                                                                      But I also think it’s worth putting it out for others to read.

                                                                                      EDIT: I’d also like to state that I know quite some people in the Haskell community caring very deeply about this. haskell-cafe is still one of my inspirations for a cool space to make. But that space is intentional, not organic.

                                                                                      1. 10

                                                                                        Thank you very much for writing this. It will serve as a great resource the next time I spot a similar comment in the wild.

                                                                                        1. 4

                                                                                          Found this thread late, but wanted to say thanks @skade for the consistently insightful commentary on community here, and for you work in the Rust community. I don’t work with Rust much, but on the occasions when I’m working on community-building, the Rust community is one of the first places I go to for examples of how to do it well.

                                                                                          1. 1

                                                                                            Thanks for responding.

                                                                                            It’s telling that the only thing you can come up with is “how many gay people happen to be using it”?

                                                                                            That’s the only demo data you put on https://blog.rust-lang.org/2017/09/05/Rust-2017-Survey-Results.html

                                                                                            Please, tell me how you thought that was “telling”.

                                                                                            But social groups are also a thing to check.

                                                                                            Check and… what?

                                                                                            The Rust community also does production user surveys,

                                                                                            Do you see me objecting to those?

                                                                                            To be blunt too: It’s shit that you call my work “not productive”.

                                                                                            Sorry you feel that way. I think a lot of things aren’t productive, including some things I do, so you shouldn’t take it personally.

                                                                                            In the last 5 years, I’ve set up 2 foundations…

                                                                                            Cool, but you don’t need to justify your relevance because I called one of your interests into question.

                                                                                            It’s shitty to go on an concern troll around people doing precisely that to better do “productive work”.

                                                                                            Actually, I wouldn’t say anything if I just thought you were just wasting your own time; further than that, I think obsessing over demos is actively counterproductive. The utility to the community is negative, not zero.

                                                                                            There’s also the “fixed cake” fallacy at work here: The belief that if we expand our community beyond a certain group, another group has to take the impact.

                                                                                            It’s not so much “taking the cake” as “ruining the cake”. If you “expand your community” to include demo-obsessed identity politicians, the community is going to become actively worse.

                                                                                            A work, which has to be said, is more often done by women and people of color in many communities.

                                                                                            Why did you feel this comment was relevant to the conversation? I have several hypotheses, but I’d prefer not to assume your motivations.

                                                                                            I structured work on these issues is still “cancerous mind-suck” for you, then go ahead. But say it to my face when you meet me.

                                                                                            Sure. I don’t have an aversion to arguing about the social costs of different activities in person any more than I do online.

                                                                                            That’s why I run a 6-monthly Rust conference and not a 6-monthly Haskell conference.

                                                                                            Right, that’s what I said earlier; something about Haskell pushes away people with demographic planning aspirations, which I like a lot.

                                                                                            Communities don’t happen at random… these can be moderated and improved.

                                                                                            This is just fundamentally untrue; most of the best communities are more or less spontaneous. Many communities I love (such as lobsters) are good precisely because they’re minimally moderated.

                                                                                            haskell-cafe is still one of my inspirations for a cool space to make. But that space is intentional, not organic.

                                                                                            The list is, afaik, unmoderated, and the Haskell IRC (one of the best chats on freenode) is also totally unmoderated. Your example is evidence against your claims.

                                                                                            1. 6

                                                                                              Communities don’t happen at random. They work through network effects and feedback and these can be moderated and improved.

                                                                                              This is just fundamentally untrue; most of the best communities are more or less spontaneous. Many communities I love (such as lobsters) are good precisely because they’re minimally moderated.

                                                                                              This is false for Lobsters, both historically and currently.

                                                                                              Speaking historically, you cut out the key phrase “network effects” from the quote. The Lobsters of early 2014 was a very different, nearly empty place. The current state of Barnacles is quite similar: low activity by any metric you care to measure (traffic, stories posted, comments, votes, etc.) and a negligible sense of community. Online communities start as failures and have to overcome the chicken-and-egg problem that it’s a waste of an individual’s time to participate until quite a lot of other people are already participating.

                                                                                              And on an ongoing basis, Lobsters requires daily attention to moderation and maintenance. Most of it is design, small edits, comments, and private messages. The rare, exciting things like deleted comments and banned users are the tip of an iceberg. It’s all the small, constant attention that keeps the positive feedback loops working to power a successful community instead of killing it. This is also true of Haskell-cafe.

                                                                                              The theme I take from your comments seems to be that the work you are unaware of doesn’t exist and, if it does, it must be worthless. I don’t understand that dismissive cynicism well enough to respond meaningfully to it, so all I can do is point out these surface-level inaccuracies.

                                                                                              1. 2

                                                                                                Lobsters requires daily attention to moderation and maintenance.

                                                                                                I seem to recall jcs saying that he never deleted anything if he could avoid it, and indeed that seemed to be the case. It seems that you are now taking a somewhat more active stance, but historically lobsters has had very little/none of what I would call active moderation.

                                                                                                Most of it is design, small edits, comments, and private messages… This is also true of Haskell-cafe.

                                                                                                SPJ sending out an email about being nice isn’t community moderation or management. Neither is general site maintenance. I’m not sure how you would conclude that I disagreed with any of these things unless we’re using very different definitions for a number of words.

                                                                                                The theme I take from your comments seems to be that the work you are unaware of doesn’t exist

                                                                                                I’m aware of all the examples you gave; they just aren’t the kind of obsessive, inorganic micromanagement I was objecting to.

                                                                                              2. 4

                                                                                                That’s the only demo data you put on https://blog.rust-lang.org/2017/09/05/Rust-2017-Survey-Results.html

                                                                                                I don’t get it. That page contains a bar chart with all sorts of demographic categories on it, just above “Diversity and inclusiveness continue to be vital goals for the Rust project at all levels.”

                                                                                                1. -2

                                                                                                  Me:

                                                                                                  e.g. how many gay people happen to be using it.

                                                                                                  Guy who responded to me:

                                                                                                  where do people live, would they want to travel to a conference, etc…

                                                                                                  What kind of demo data do you see them sharing on that page? I’m not really sure what you’re confused about; you seem to be agreeing with me.

                                                                                                  1. 7

                                                                                                    The blog post is an editorialised overview, the 2016 one covers that. https://blog.rust-lang.org/2016/06/30/State-of-Rust-Survey-2016.html#survey-demographics

                                                                                                    There have not been notable changes, so it wasn’t mentioned again.

                                                                                                2. 4

                                                                                                  As the person who started the Haskell IRC channel and as an active moderator of said channel, moderation happens often. There’s a team of motivated users on the #haskell-ops IRC channel and we have to step in more than I’d prefer.

                                                                                                  Good communities require much work and regular feedback.

                                                                                          1. 4

                                                                                            So far the comments I’ve shown have been personal attacks

                                                                                            Only 2 of the 6 comments up to the point this comment is made have anything personal in them. They seem to be “attacking” the concepts, not the person.

                                                                                            1. 6

                                                                                              Hi! Author here. Now that I’ve had some time to mellow, I wouldn’t call those “personal attacks”. At the time I was excited about functional pipelines (probably thanks to Elixir). No Haskell libraries provided the (|>) pipeline operator. I created Flow to fill that gap. I shared it on Reddit because I wanted to know why pipelines weren’t popular in the Haskell community. It got over 100 comments, which is huge for r/haskell. In my opinion, most of the comments were negative. They derided the library by calling it “backwards” or a “hurdle” or a “crutch” or “exactly what functional programming is trying to avoid”. I took those comments personally when I shouldn’t have.

                                                                                              These days I just import Data.Function ((&)) and wince a little every time I write (&) instead of (|>). It’s definitely not as popular as ($) and (.), but it’s hard to call it non-standard when it’s in the base package.

                                                                                              1. 2

                                                                                                I’ve always found the “backwards” notation of & a bit odd, but as you say in your post, different notations have different uses or people who prefer them. I know haskellforall has done some stuff with & around the “make Haskell look like OOP” experiments.

                                                                                                I mean, >>= is in this direction as the “default” so that’s not uncommon at all. I wonder if you could do some fun stuff with >>= and Identity

                                                                                                1. 2

                                                                                                  I usually prefer (&) because it encourages iterative development. Start with some value, transform it, and keep doing that until you have the result you want. That’s how I usually work in GHCi. The alternative is to start at the “outside” and keep working in until you’re at the bottom. I find that way of developing to be better when I already have the type signature and I’m filling in typed holes.

                                                                                                  Fun fact: You can use do notation with pure computations in Haskell.

                                                                                                  f :: Int -> Int
                                                                                                  f x = do
                                                                                                    let y = x + 2
                                                                                                    let z = x * 2
                                                                                                    y + z
                                                                                                  
                                                                                                  1. 2

                                                                                                    Yes, you can have non-recursive let!

                                                                                                    test = runIdentity $ do
                                                                                                         (x,s) <- return $ foo 1 []
                                                                                                         (y,s) <- return $ bar x s
                                                                                                         (z,s) <- return $ baz x y s
                                                                                                         return (z,s)
                                                                                                    
                                                                                                    1. 2

                                                                                                      I don’t understand what the big deal is, we read from left to right not right to left. It’s just a notational convenience I really don’t understand how people could get so conservative that they can’t even handle a different direction of function composition. If you wrote right to left, I could see that being a serious inconvenience though.

                                                                                                1. 4

                                                                                                  I’m the author. Thanks for posting this! It’s not super useful right now because there are no GHC release candidates to test. But the general idea should be applicable when the GHC 8.2.2 release candidates roll around.

                                                                                                    1. 4

                                                                                                      While I don’t have a particular problem with these newsletters, I have heard feedback before that it isn’t appropriate to post them on a regular basis.

                                                                                                      1. 7

                                                                                                        I hear you! The last one of these I posted was issue 32, which was 24 weeks ago. I’d hardly call that regular ;)

                                                                                                      1. 5

                                                                                                        For example doing this explicitly in Python is cumbersome:

                                                                                                        data = {"a": 1, "b": 2}
                                                                                                        
                                                                                                        if data["a"] is not None:
                                                                                                            return data["a"]
                                                                                                        else:
                                                                                                            return 0 # default return value    
                                                                                                        

                                                                                                        This is not how we do it in Python. if data["a"] is None is going to break if “a” is not in the dictionary, so instead we do:

                                                                                                        data = {"a": 1, "b": 2}
                                                                                                        return data.get("a", 0)
                                                                                                        

                                                                                                        … which returns the default if the key is absent and only does one look up.

                                                                                                        1. 4

                                                                                                          I was going to point this out as well. Unfortunately even get with a default value can still return None. For example, {'a':None}.get('a',0) is None, not 0.

                                                                                                          1. 2

                                                                                                            Ah thanks, I haven’t done Python in a while. I’ll update the article.

                                                                                                          1. 14

                                                                                                            I write Haskell for a living and prefer to use hspec. Less boilerplate, seems to incorporate different types of tests (unit, property, etc.) with less ceremony and hassle.

                                                                                                            1. 2

                                                                                                              I also prefer Hspec. I tried to use Tasty for a while because conceptually I like it better. Having separate providers (Hspec, QuickCheck, golden, …) and “ingredients” (formatters and runners) feels nice. Ultimately Hspec does everything I want and has better ergonomics.

                                                                                                              1. 1

                                                                                                                hspec is my favorite, too

                                                                                                              1. 5

                                                                                                                Can you guess Haskell’s type with the next shortest name (hint: three letters)?

                                                                                                                Pedant note: actually, there’s another two-character type, which is ->, i.e. a -> b is (->) a b.

                                                                                                                1. 5

                                                                                                                  There’s also ().

                                                                                                                  1. 5

                                                                                                                    Yep. And IO, ST.

                                                                                                                  2. 4

                                                                                                                    Nowadays, you might also consider *.

                                                                                                                  1. 6

                                                                                                                    The very same test, written in Haskell, wouldn’t compile!

                                                                                                                    That’s because the author used shouldBe, which (as they noted) is pure. If they wanted to do the same thing as the Python version, they could have used shouldReturn.