1. 2

    I don’t recommend using this library, author doesn’t understand asynchronous and synchronous exceptions in GHC. Others tried to intervene to get it fixed and they chose to be difficult.

    I usually use https://hackage.haskell.org/package/safe-exceptions or https://hackage.haskell.org/package/unliftio-0.2.7.0/docs/UnliftIO-Exception.html

    You can check who uses a library by using this website: https://packdeps.haskellers.com/reverse/unexceptionalio

    1. 2

      Did you read the article? I thought I had been clear enough to avoid this misunderstanding by this point. This is not about the difference between synchronous and asynchronous exceptions, that was previously a misunderstanding caused by bad documentation on my part. The article (and the library) now clearly state the intent: I want to model recoverable errors. That is, things that the program can recover from and do something useful about. safe-exceptions is designed for a different purpose and does not provide this functionality.

      Besides the fact that the library is not intended for the use case of sync vs async, additionally it is not possible to have a type that excludes all “synchronous” exceptions anyway, since they can be produced by pure code

      return (1 `div` 0)
      
    1. 4

      Why does your site ask for permission to send me notifications when I visit it?

      1. 1

        There’s a weird JS/chat widget.

        1. 1

          The “chat me” button in the bottom right has the ability to notify. I may look into a way to disable that.

        1. 19

          I’m sad after reading these comments.

          I understand and respect his decision, and these comments themselves are the very evidence why he is right. How about having OpenSource simply about openness and source? Why do politics and ideologies have to always appear?

          Maybe a new manifesto is needed, much like the Agile manifesto:

          • Individuals and interactions over group identities and categories of people
          • Working software over ideologies and codes of conduct
          • Respecting each other regardless anything
          1. 21

            Why do politics and ideologies have to always appear?

            Ideologies are always there. You only notice them when they’re different from your own.

            1. 20

              Perhaps the point is that some people would like a safe space for focusing on technical matters rather than every single open source and free software community getting politically co-opted into a culture war.

              Wanting a community focused on technical work and otherwise treating people equitably isn’t “apolitical”, you’re right, but that doesn’t make it invalid.

              I choose to focus on helping people who came from a similarly disadvantaged background as myself but that’s something I do on my own time and money. I don’t impose it on the software communities I participate in.

              I think we need the diversity of participants in free software represented in the communities and organizations. Were that the case, I think I would see more diversity in organizational structures, conduct standards, explicit goals, etc. What I perceive is a corporate-funded monoculture that is getting a bit creepy in the demands placed on others that don’t want to participate.

              I’m also starting to notice a social intelligence / neurotypical punching-down in these threads where someone who is less adept at adopting the politically convenient argot of the day gets excoriated for trying to express their discomfort in their own words. It makes me deeply uncomfortable how the members of this community conduct themselves in these threads.

              Some of my favorite communities are very engaged with the issues of access in ways that are in keeping with the zeitgeist (e.g. Rust) and do great work in part because of that. Some of my other favorite communities have a different emphasis or approach. I’d like them to co-exist peaceably and for people to do what they are most passionate about, whatever form that takes.

              1. 8

                You may be right. But what I wanted to express is: I have my ideologies, just like anybody else does, but I believe that open source should only have one ideology, which is about software, collaboration, and not people, or other ideologies. For my taste even the GNU project is too political in many aspects, but on the other hand they have some great pieces of software and those are often governed and built in a great atmosphere. (I can recall a single notable “scandal” that reached me, but the community was generally welcoming, as it is for most software projects.)

                Edit: Or to rephrase it even more: ideology is a system of thought covering most aspects of (human) life. I beleive everyone has a personal world view, that is closer to some pre-canned ideology than to others. Yet software projects should have ideologies of software lifecycle, not of human lifecycle, and those can be very well separated, as my personal life and life at my work can also be separated.

                The etiquette of the global human civilization should be enough to cover the human-human interaction part of the collaboration, as it is for professional interaction in my experience with colleagues from all over the world. We share our vision about software, quality, and work together, while we may disagree on plenty of things, which have no place in the discussion about a software project.

                1. 1

                  Ideologies are always there. You only notice them when they’re different from your own.

                  This is a really interesting claim that I’m seeing more and more! I’d love to find some sources that explain the justification for it.

                2. 6

                  I’m genuinely sorry about that. :(

                  Unfortunately, some topics always bring out discussion that highlights the leaky abstraction of other lobsters as purely technical beings.

                  It’s the strongest argument against certain forms of content here.

                  1. 3

                    One of the goals of open source movements is bringing in new people. I don’t think that’s a particularly contentious goal.

                    Outreachy is one organization that embodies particular ideas about how best to do that. It’s true those ideas are politically charged, but they’re in service of a goal that is agreed upon. So you can’t effectively pursue the goal of getting new people into open source without taking some kind of stance on the political questions.

                    Some political questions (what is the optimal US tax policy) are more or less irrelevant to open source. But others are so pervasive that they can’t be ignored, except by creating a tacit consensus. Even the idea that we should respect each other creates conflicts where people have sufficiently different ideas about what respect means.

                    1. 2

                      These goals promote the production of “high quality programs” as well as “working cooperatively with other similarly minded people” to improve open-source technology.

                      source: https://en.wikipedia.org/wiki/Open-source_software_movement

                      Bringing a specific political agenda to an open source project violates the similarly minded people, or can have the effect of pushing away differently minded people. This is not what respect means in my opinion. I have worked a lot wit differently minded people, and we got along, as we were focusing on the goals. The goals were creating software, not changing society or a community. This moving goalposts is what is bad for OpenSource in my opinion.

                      1. 10

                        “Apolitical” open source has turned out to be overwhelmingly white and male - significantly more than even the broader software industry. Reference.

                        I don’t think there’s any evidence that this demographic skew is deliberate. However once a group is dominated by a certain demographic then it’s easy for people to get the message that this is “not for them”, even if noone says this (and especially if some “bad apples” do).

                        I believe that there’s nothing about being white and male that makes the best possible open source software developers, so this demographic skew is a bug not a feature. I believe that the best possible open source community is the one with the biggest group of committed (to creating open source) people involved.

                        With this in mind, what can be done to encourage more diversity and bring more people in? There’s no evidence that the status quo (“focus on tech”, etc) will change by itself.

                        pushing away differently minded people

                        The only people the LLVM CoC will push out is people who repeatedly violate it (and by doing so that person is pushing out other people). Outreachy is bringing people in, it doesn’t push anyone out.

                        Someone decided to leave because aspects of the project no longer meshed with their political world view. You see this as “pushed out”, but I don’t really see who is pushing them here (unless there are some CoC violations we don’t know about or something, but AFAIK there aren’t).

                        1. 1

                          Open source is an explicitly political idea to start.

                    1. 3

                      Hope he gets a job. I’m just puzzled at the meaning of 5.1 kids.

                      1. 10

                        Surround sound kids. Which honestly could just mean one and some sugar.

                        1. 8

                          The .1 is the woofer, likely a rescue or mutt.

                        2. 2

                          Wife just got pregnant, at a guess.

                          1. 1

                            Looks like it. So it’s 10% done…

                        1. 1

                          It’s okay if the answer doesn’t mean a lot to you. It won’t map onto concrete coding intuitions very well. I don’t like this meme at all.

                          1. 4

                            I recently read the chapter on the lambda calculus in Haskell Programming from First Principles, along with the papers suggested for further reading. It was a great surprise to find that a topic I assumed would be hard to access without a math background was plenty accessible when explained well. Thank you for that!

                            What are your thoughts on the most effective way to explain monads? I thought @hwayne’s post https://hillelwayne.com/post/monad-tutorials/ was a good elucidation of the imperfection of all familiar monad explainers. I haven’t read the chapter on monads in your book, which might be the answer to my question.

                            I think explanations like this SO answer are often regarded as unhelpful to beginners. But the most fruitful insights I have come from the learning I do in an attempt to understand statements like “a monad is just a monoid in the category of endofunctors”. The best intuitions I’ve in concrete applications of these topics have come from struggling to understand these concepts abstractly, in terms of algebraic law and not in terms of metaphor or patterns of use.

                            1. 2

                              What are your thoughts on the most effective way to explain monads?

                              You already mentioned how I think people should learn Monad: Haskell Programming from First Principles.

                              But more seriously, there’s no point explaining Monad to someone unless they’ve already learned enough Haskell to learn Monad in Haskell. The word-stuff and thought-stuff that Haskell equips you with gives you an automatically verified, mechanical way to work through exercises that will teach you Monad.

                              1. 3

                                I really have to agree with this. I was just reading “Real World Haskell” today (refreshing my Haskel for programming competitions), and it’s chapter on Monads was very clear, since the book had been building up to it, not by introducing the maths (that was in fact the last part of the chapter) but by showing it’s use, background (idea) and slowly sneaking up to the actual implementation.

                                To do this properly, blog posts will rarely find the right words. It’s a longer processes, where at the end you realize that you’ve already understood it for a while, and all that was missing was the name.

                          1. 6

                            How can I tell I am getting old and out of date?

                            I recognize all the words in the article. But they might as well be randomly ordered.

                            1. 4

                              I think you’d need to know Haskell and the associated idioms for it to be of any use to you.

                              1. 1

                                I guess I just don’t know well enough.

                                1. 1

                                  You have to make a concerted effort to learn the language, it’s evolutionarily quite apart from anything you know.

                            1. 3

                              I don’t understand what this means.

                              Does it mean that bitcoin’s stupid energy consumption can finally go down?

                              1. 5

                                The energy consumption is because of the number of people choosing to compete for mining (which they do because the price makes it worthwhile for them to do so) – the same volume of network could be operated with no code changes on a fraction of the energy budget.

                                As they say: you don’t hate X, you hate capitalism.

                                1. 1

                                  I don’t think this is true. The limited block size and the difficulty of mining a new block are code features that incentivise everyone to compete for computing power so they can auction off new blocks. You want your transaction to get verified on the next block, well, there’s lots of people who will get it in but only if you pay the right price. With a larger block size, it wouldn’t be so valuable to auction off space in each block.

                                  The network, the code creates scarcity. In the block size and difficulty of hashing. I thought LN was supposed to fix that.

                                  1. 4

                                    The hash difficulty automatically changes based on how much CPU power is working on mining. So if half the miners turned their computers off, the network would adjust the difficulty down and everything would keep working the same as it does now.

                                    1. 1

                                      Like JordiGH says, though, it’s not designed to do that. It was intentional on the part of the designer that people would do what they’re doing. There are designs for currency that require hardly any energy to operate. That’s easiest in centralized with distributed checking. People into cryptocurrencies tell me there’s decentralized models that use a lot less energy, too. So, this waste of energy is a result of its design.

                                2. 4

                                  Caveats to what I am about to say:

                                  • I find crypto mostly boring and I find discussing it with people a lot more boring than reading a paper

                                  • I am ambivalent about proof of work vs. stake

                                  • The only public ones I’m really interested in are zcash and cardano, privately there are some neat systems banks are making

                                  • I am so so so so far from an expert

                                  With all that said,

                                  Most transactions will require only a handful of witnesses along a chain rather than requiring network quorum. It probably means more useful work will get done per watt rather than reducing the amount of mining happening unless the drop in transaction fees reduces mining (unlikely? Fixed investment)

                                  1. 2

                                    Lightning was about transaction speed based on prior comments. Here’s a Wikipedia article on it.

                                  1. 3

                                    Hey-o! This is how we do it at my company, a startup with about ten software engineers:

                                    Provision with terraform, deploy with ansible. Ansible would do very little, just pull down our packaged software via apt-get which was python virtualenvs. Since the virtualenv was completely self contained it didn’t need to deal with dependencies at all – the idea of installing application level dependencies via pip or whatever is insane to me.

                                    We supposedly adhered to the “devops” mantra of “devops is a shared responsibility,” but in practice no one wanted to deal with it so it usually fell on one or two people to keep things sane.

                                    1. 1

                                      This is pretty similar to what I’ve done in the past although I’d like to have better answers than Terraform or Ansible. Ansible especially turns into a ball-ache once you’re trying to do more than just rsync a binary.

                                      I’ve been thinking about writing a CLI around https://github.com/frontrowed/stratosphere that uses cloudformation changesets to give me diffs like what Terraform does.

                                      1. 1

                                        Yeah, agreed RE: ansible – as soon as you’re doing something complicated with it, you’re doing it wrong. And it’s very tempting to do so simply because it has so much functionality built-in.

                                        Our infrastructure was designed to be immutable once provisioned, so it really would have made sense to go the kubernetes / ECS route.

                                    1. 5

                                      Use what’s actually boring or gives you the least risk. For me, that’s Haskell. I understand quite well that someone who hasn’t spent the time learning Haskell that I have may not be similarly positioned and should use something else on a commercial project.

                                      I won’t forgo those advantages I worked toward in the projects they make sense for. I’ll still use Python if I just want to sketch/graph/kick around some data. Productionization would look a lot different.

                                      1. 3

                                        In my experience, with anything of any significant complexity, this sort of approach ends up being more work than straight LaTeX. On top of that, the conversion tools change too much inbetween versions to guarantee longevity.

                                        1. 2

                                          Having worked on a 1,200 page book I am going to concur. I started out using markdown+Pandoc and it became a time loss pretty quickly.

                                        1. 30

                                          This is pretty wonderful. I’m happy to help you run stats like these for a quantitative post, but the moral of this story is the importance of human connections, I think you have captured here most of what there is to learn.

                                          I still was routinely downvoted as “troll”.

                                          This surprises me a bit. I hope the incidence was much lower, but perhaps it can be explained as reputation carrying over, people read comments in your old tone. Then perhaps we’d see them on posts a sentiment analyzer judged as ambiguous or intermediate. Hm.

                                          1. 16

                                            but perhaps it can be explained as reputation carrying over, people read comments in your old tone

                                            I’m guilty of doing this. I thought the friendlysock name change was one big troll. It wasn’t until reading this post that I even knew it was an earnest attempt to be nicer. Sorry @friendlysock :-(

                                            1. 9
                                              I still was routinely downvoted as “troll”.
                                              

                                              This surprises me a bit. I hope the incidence was much lower, but perhaps it can be explained as reputation carrying over, people read comments in your old tone. Then perhaps we’d see them on posts a sentiment analyzer judged as ambiguous or intermediate. Hm.

                                              At first blush this surprised me too, but honestly I think there are some people who mis-understand what “troll” is for and are a bit too quick to pull this particular trigger.

                                              1. 12

                                                I get downvoted as troll most often in contexts where I’m replying earnestly and constructively. It doesn’t get used well and the only way to avoid it is not to disagree with anyone and avoid posting in threads where people you disagree with might be reading.

                                                1. 3

                                                  I would love to see downvotes only when commenting (so you can explain downvotes). Sometimes I see totally valid comments (for my point of view) being downvoted, and as a reader I don’t know why… it’s probably frustrating for the commenter and the readers.

                                                  1. 5

                                                    I’m not sure that’s a good idea. If I disagree with someone or maybe I don’t understand their position, I write a comment, and don’t downvote.

                                                    Requiring a comment for a downvote can lead to the following undesirable behaviors:

                                                    • Trolls feed on attention, someone actually sitting down and writing a disagreement will only ensure they have been succesfull.
                                                    • It attaches a username to a disagreement, possibly leading to harassment, retaliatory downvotes, etc.
                                                2. 4

                                                  I still was routinely downvoted as “troll”.

                                                  This surprises me a bit. I hope the incidence was much lower, but perhaps it can be explained as reputation carrying over, people read comments in your old tone.

                                                  Could have been me. I’ve downvoted @friendlysock and other’s posts as troll before when I thought they were politely defending/promoting caustic attitudes, discrimination, or other behavior damaging to a community. I realize there are a lot of folks who prefer a written explanation, but I rarely have the bandwidth to sit down and compose a response.

                                                  That said, I do appreciate @friendlysock’s reflection and change in communication style despite our differences in perspective on other subjects.

                                                1. 2

                                                  I work too much but that’s because of my side projects like the book and OSS stuff. This is nothing my employer asks or expects of me.

                                                  1. 5

                                                    For work: I’m re-implementing some abandoned cart handling in the CMS we’re migrating to.

                                                    For me: I’m continuing work on siftrss, fleshing out my unit test suite to better cover edge cases concerning feeds with off characters, encodings, namespaces, etc. Ahhh, they joys of working with XML for no money. :)

                                                    1. 2

                                                      I used your project as inspo for some Rust code I hacked on while streaming.

                                                      1. 2

                                                        Hey, it’s you! I saw that a while back when I happened to search for mentions of siftrss on Twitter. I’m glad I could lend some inspiration for your project!

                                                        I love how clean your code is. I don’t know much about Rust, but your code makes me want to give it a go. I’ve been meaning to get around to writing a serious project in a functional language.

                                                        1. 3

                                                          Thank you very much!

                                                          My main thing (day job and personal projects) is Haskell, which may have something to do with the style of my Rust code. There’s a lot of idioms I ignore/wrap in Rust.

                                                          Case in point, I got irritated with the useless (IMO) information hiding in the rss crate so I forked and patched it: https://github.com/bitemyapp/shiftrss/blob/master/Cargo.toml#L15

                                                          Didn’t get upstreamed, they special-cased a setter or whatever for the thing I was doing.

                                                          I use Rust because it’s a reasonably type-safe language with sweet-spots (super perf sensitive, no GC) that are complementary to Haskell (everything else)

                                                          1. 1

                                                            Right on! I’ve poked at Haskell a couple times, but never used it to write anything of substance. Of course, my list of languages to try out grows faster than my list of projects… which is often longer than I have time for in the first place, haha. I’ve been meaning to try out Elm, as I wanted something new to play around with on the front end.

                                                            Rust sounds very interesting. Consider my interest piqued!

                                                    1. 3

                                                      Instead of reaching for MSG as a shortcut to Umami Town, consider Worcestershire sauce, light soy sauce (like usukuchi), and/or a dash of fish sauce. Garum has been used for thousands of years to enhance savory dishes; don’t fight it. Just don’t add it too late in the cooking process or you will have a fishy aftertaste instead of the small peptides and free amino acids you’re after.

                                                      1. 2

                                                        It’s very funny that so many people use MSG for stews. I’ve always been cooking them without and never needed it. But you have to use very fat cuts of meat + ones with bones (oxtail, …), which is nice since they’re the cheap parts.

                                                        1. 1

                                                          I used worcestershire-and-butter browned mushrooms in the example recipe I made last week. Scroll down to near the bottom of the post and click the link.

                                                          I just also use MSG because I’m not going to eat less tasty food for the sake of other peoples’ snobbery.

                                                          I’m familiar with the use of soy and fish sauce of various kinds (see my reference to Sichuan cooking), but I don’t feel they’re compatible with the flavor I go for in my stews.

                                                        1. 13

                                                          Except that, even though you knew the type, you still knew nothing about the structure of that JSON

                                                          That’s nonsense, use Generics or TemplateHaskell and make a config that fits the pattern you want and you get automatic JSON parsing from your types in addition to getting to know the structure of the JSON based on the structure of the data type. This isn’t a property some Haskellers actually want, but the option is there if you do.

                                                          What we wound up doing was nesting pattern matching to get at the value we wanted. The deeper the JSON nesting, the deeper our pattern matching. We wrote functions to wrap this up and make it easier. But in general, it was a slog. The tools Haskell gives you are great at some things, but dealing with arbitrarily nested ADTs is not one of them.

                                                          This is utterly unnecessary for both the JSON handling itself: https://github.com/bitemyapp/bloodhound/blob/master/src/Database/V5/Bloodhound/Types.hs#L1951-L1965

                                                          And for working with nested types in general: you can use lenses, but even with a very nested API like Elasticsearch’s just being able to compose accessors is generally enough.

                                                          I’m familiar with this guys’ schtick, he did some Haskell back in like 2010 with a Happstack based application and nothing was particularly nice. If I was stuck with Happstack, I’m not sure I would want to use Haskell either.

                                                          Rich had some good points about positional semantics. When defining an ADT, positional semantics make it hard to read the code. If you’ve got seven arguments to your ADT’s constructor, you’ve probably got them in the wrong order and you’ve forgotten one.

                                                          First, I avoid passing a bunch of the same type in consecutive order to a data constructor.

                                                          I avoid Text -> Text -> Int -> Int -> MyType and replace it with: HostName -> Alias -> PortNumber -> WorkerCount -> MyType or some-such, further, if there’s more a few arguments to a data constructor I’ll use record syntax to construct the value:

                                                          MyType {
                                                               hostname = myHostname
                                                            ,  alias = myAlias
                                                            ,  portnumber = myPortnumber
                                                            ,  workercount = myWorkercount
                                                            }
                                                          

                                                          Then ordering doesn’t matter. I usually set record fields strict, especially if I plan to use the record syntax, so that I can’t forget anything.

                                                          The fact is, in real systems, these ADTs do accrete new arguments.

                                                          I can’t say I recall the last time Value got a new constructor or one of its data constructors got a new argument, but I’d sure be grateful that my type system would be there to tell me everywhere in my project I need to fix the code if it did.

                                                          I don’t have the patience for the rest of this.

                                                          — Went from Clojure -> Haskell

                                                          1. 8

                                                            Don’t waste your breathe dude there is a much simpler rebuttal: static and dynamic types are a false dichotomy so any attempt to discount one in context of the other is an invalid argument

                                                            Instead weight the specific features of the type systems against each other. In the case of Haskell vs Clojure, GHC gives you much more feedback than the entire Clojure ecosystem of spec/schema etc so if the criteria for choosing a language is type safety then Haskell wins.

                                                            1. 12

                                                              static and dynamic types are a false dichotomy

                                                              Absolutely. People have written some useful stuff about this:

                                                              https://existentialtype.wordpress.com/2011/03/19/dynamic-languages-are-static-languages/

                                                              1. 2

                                                                I actually don’t totally agree with that article. I’m channeling Foucault here: our understanding of type systems is dependent on the context of type theory. How do we know our type theory is the most true? Sure it allows us to prove lots of things, but that is a pragmatic measure. If type theory has pragmatic value, then our type systems should be measured pragmatically as well. Clojure actually wins in many respects because you get lots of monadic interfaces (the collection abstraction) that allow for reusuable code without the difficulty of the IO monad etc. This is not true in many other dynamic languages, e.g. Python.

                                                                So the “false dichotomy” is really apparent when you compare the monadic-ness of Python, C, Haskell, and Clojure. Clearly Clojure and Haskell fall into the “monadic” category and Python and C into the “non-monadic”. This “monadic-ness” distinction tells us more about how composable functions and data structures are than the “static” or “dynamic” distinction, which means that “static” and “dynamic” categories aren’t the most useful categories to put languages into.

                                                                1. 3

                                                                  How do we know our type theory is the most true?

                                                                  Is this really the question at stake? If a language tells me a variable is a certain type, I tend to believe it. Truth doesn’t seem to be an appropriate axis for evaluating type systems.

                                                                  There’s definitely lots of variety regarding what a type system can tell you. The static/dynamic distinction is about when you can know the type information. Static languages allow you to know the types at compile time, whereas dynamic languages force you to wait until runtime.

                                                                  1. 1

                                                                    Is this really the question at stake? If a language tells me a variable is a certain type, I tend to believe it. Truth doesn’t seem to be an appropriate axis for evaluating type systems.

                                                                    Within the context of your language, a variable has a type; this is the truthiness of that type. Within the context of type theory, the type system of that language has a certain truthiness to it. Within the context of the real world, type theory has a truthiness to it. The implied question in most static vs dynamic debates is, how true is my type system? Which begs the question, how true is type theory?

                                                                    The answer is that it doesn’t matter. What matters: how useful is type theory generally? How useful is the specific type system I’m using? The static vs dynamic distinction doesn’t do much to help us answer this usefulness question. Understanding when types become relevant in a language definitely does help you, so I agree with you on that, but there are other more interesting aspects of type systems too.

                                                                    1. 3

                                                                      Maybe it’s just me but I really can’t follow.

                                                                      Within the context of your language, a variable has a type;

                                                                      Sure, no qualms yet.

                                                                      this is the truthiness of that type.

                                                                      Completely lost. What is the truthiness? I don’t know what your pronoun “this” is referring to.

                                                                      I think I will continue to be lost until you can explain what it means for a type system to be false. “True” does not signify anything to me here.

                                                                2. 1

                                                                  That is the most absurd thing I’ve read. Static typing is necessarily more restrictive because you have to express yourself in a way that can be verified by the type checker at compile time. Thanks to Godel, we know that the set of provable statements is a subset of all valid statements. Since dynamic languages do not attempt to prove correctness, they allow you to make many interesting statements that are impossible to make in a static language. Here’s a trivial example:

                                                                  (eval ’(defn add-one [x] (inc x)))

                                                                  (add-one 10)

                                                                  You should also read this in depth rebuttal to the link you posted http://tratt.net/laurie/blog/entries/another_non_argument_in_type_systems.html

                                                                  1. 14

                                                                    That whole rebuttal rests on a conflation of dynamic types and static types. This is the standard stance for folks arguing from the dynamic camp (specifically, they’re two of the same sort of thing) and the opposite is so basic to the mental space of the static camp that it almost always goes unspoken.

                                                                    In summary, if Bob’s article had explicitly stated that he was solely considering static expressivity… I would have agreed with it.

                                                                    So, yes, Bob did not state that explicitly but it is taken without need for explicitness within static typing literature.


                                                                    My take is that there are two “kinds of power” any formal language may be judged upon and that they are in tension. They are: the power to create and the power to analyze (deconstruct).

                                                                    The more power to create a formal system affords the greater richness of expression exists and the more complex of “values” (whatever that might mean) can be constructed.

                                                                    The more power to analyze a formal system affords the greater richness of semantics the values of the language have and the greater information can be extracted from each one.

                                                                    Types are an alternative semantics to runtime evaluation. Thus, asking for types is asking for greater power to analyze and comes at a cost of power to construct.

                                                                    From here, an argument must move on to tradeoffs between power to analyze and power to construct. Why wouldn’t you want to just side entirely with power to construct?

                                                                    Most arguments of the static typing apologist end up being arguments for the value of power to analyze. Essentially, having more parallel semantic interpretations makes the system you’re working with more stable (fewer bugs, easier refactoring, partial verified documentation) and also opens up doors for other systems to exploit those other interpretations (typeclass resolution, servant, dependent types at large).

                                                                    So which is better?

                                                                    This is just a value judgement now. Nobody can answer for anyone else.

                                                                    But I think that power to construct/power to analyze tradeoffs happen constantly so it’s a good concept to have an eye on.

                                                                    1. 1

                                                                      I pretty much agree with what you’re saying, and that’s ultimately the tradeoff between static and dynamic typing. Depending on your situation one or the other might be preferable.

                                                                      1. 4

                                                                        I think an extension on this is that the technology already exists to make those tradeoffs locally within a single program. Haskell excels at this

                                                                        • the ability to embed DSLs and effect contexts lets you pick and choose this power tradeoff
                                                                        • the existence of the IO monad (as much as it is sometimes maligned) means that there’s an “escape hatch” to compare all of your more analyzable structures against
                                                                        • the existence of the Dynamic type as well as other “semi-dynamic” types like Json gives you opportunity for greater power at the cost of analyzability

                                                                        I think what’s most interesting is that the third point about is rarely explored. The real place where this exploration seems to happen is in row typing/structural typing a la Purescript or OCaml, but we could be building more and more sophisticated ways of working with the Json type without constraining its type.

                                                                        I think the lack of this development is why Haskell is really bad for exploratory data analysis, but it’s mostly the lack of exploration/development rather than a total failure, I believe.

                                                                        On the other hand, gradual typing systems also are an attack at the middle ground but I’d place a smaller bet on them. Ultimately, I think it’s easier to “forget” analytical power and regain constructive power than it is to go the other way. I’d be willing to put some money on this being a very fundamental logical tradeoff.

                                                                        So: where are the research projects for EDA in Haskell? I’d love to see them.

                                                                        1. 2

                                                                          While this is all true, the actual workflow is quite different than it is in a language like Clojure. A lot of the time I don’t know the solution up front, and I don’t know what the types are going to be in the end. It’s actually valuable to me to be able to work with an incomplete solution. With Clojure, I can use the REPL to explore the shape of the solution. I can also do a workflow that’s very similar to type driven development with Spec as seen here.

                                                                          Personally, I find that I generally want a specification at the API level, as opposed to having to structure all my code around types. For me, Clojure default is simply more ergonomic. Meanwhile, Spec provides me both with a sufficient guarantees regarding what the code is doing, and a meaningful semantic specification.

                                                                    2. 3

                                                                      Any dynamic procedure can be implemented in any turing-complete static language; you just have to express your uncertainty about its runtime behavior in the type system. Even in a total language, you can build your entire program out of partial functions just by modeling that partiality with Maybe return values. Even in a pure language, you can build your entire program out of impure functions just by modeling that impurity with an IO monad or something similar. Even in a language with strong data types, you can write all the dynamically-typed code you want just by creating a large sum type of possible cases and using those overly-broad types everywhere (which will almost certainly require modeling some partiality as well). In general, you can write arbitrarily dynamic code if you’re willing to get very few useful guarantees from your type system. That may sound bad, but it’s no worse than writing in a dynamic language, where you get no static guarantees at all from your language (except maybe some very broad invariants about, for example, memory safety).

                                                                      1. 1

                                                                        And everything you can do in a language like Haskell, can be done using assembly. Yet, I think we’ll agree that ergonomics of writing assembly are not the same. It’s simply not interesting to discuss what’s possible in principle, it’s the actual workflow that the language facilitates that matters. The way you express yourself in a dynamic language is very different from the way you express yourself in a static one.

                                                                3. 7

                                                                  I watched Rich’s talk a couple of times, and I think that positional issues can’t be dismissed. Even if you have record syntax for data, to my knowledge you don’t have this for types. Every time I pull up one of the more complex Haskell libraries, I first have to spend a bunch of time deciphering what I need to put in each position of the types. You end up having to rely on convention and hoping people don’t reorder.

                                                                  named arguments are somewhat self-documenting and help with the debugging scenario as well.

                                                                  I like that ADTs end up breaking all over the place in code when I change things, but I also like how my Python code and things likes dictionaries mean that I can work on objects by concentrating only on the parts that “matter”. It’s a tension, but I don’t think it’s a dicothomy and we can have solutions.

                                                                  ADTs that represent objects (Money or Complex) are definitely of the kind where you want to reconfirm everything, but what about ADTs for configuration objects? Does adding another configuration parameter really require auditing everything? The canonical solution might be to decompose that a bit further to avoid this, then you run into the acretion problem. I’m writing wrappers upon wrappers for things.

                                                                  It’s a shame that Rick decided to be so rant-y, because there were some valid points in there. The common ADT patterns force us down a very specific kind of static verification that end up shoehorning us into verbose patterns. I disagree about overall maintenance, but it does lead us to boilerplate.

                                                                  1. 7

                                                                    The issue with losing positional arguments in types is that it’s desirable to be able to talk about partial application without creating new type names (as equality in types gets more complex you run into hairy, very difficult problems quickly, so: if you solve partial application with aliases, how do aliased types equate?).

                                                                    For instance, Scala has the worst of both worlds: positional types and very, very painful partial application.

                                                                    With respect to your earlier statements though I agree a lot. ADTs are overly strict in that they represent a demand of both existence and completeness. Most Python idioms rely on an informal “structural subtyping” formalism (what people call duck typing sometimes) which is verrrry nice.

                                                                    This works very well in the statically typed world: see OCaml or Purescript’s record types (and open variants).

                                                                    1. 1

                                                                      Most Python idioms rely on an informal “structural subtyping” formalism (what people call duck typing sometimes) which is verrrry nice.

                                                                      I guess you’re referring to stuff like __iter__ and __str__ etc? It’s been a long time since I used Python, but I did like those “duck typed interfaces”.

                                                                      But did you know there’s something similar in Clojure, with “protocols”? :)

                                                                      1. 2

                                                                        I meant to point more at the heavy use of dictionaries in Python, though the more I think about it the less it seems like a clear example.

                                                                        Clojure really is one of the clearest examples. Idiomatic Clojure just involves passing dicts around and assuming you’ve got the right keys, hoping that there’s a solution (is there an intersection between the keys produced and the keys needed across all points in dataflow?). This is quintessentially “duck typing” and I think it’s a practice that’s well explored in the world of row types.

                                                                    2. 2

                                                                      It’s a shame that Rick decided to be so rant-y

                                                                      How exactly was he ranty?

                                                                  1. 27

                                                                    I appreciate the detailed response and very thankful for the code changes regarding how thread deletion works. I do believe that having the ability to remove pin-pointed comments without whole threads is a better mechanism.

                                                                    I am concerned how and where moderation is going. I asked yesterday on IRC:

                                                                    21:16 < mulander> pushcx: is this your site or do we curate content as a community?
                                                                    21:16 < mulander> if it's your site and your content than I have nothing more to say than to step down
                                                                    21:16 < mulander> and just shut up.
                                                                    21:17 < mulander> if we are moderating as a community then sometimes the moderation has to accept that a large portion of the userbase wants some content present
                                                                    

                                                                    to which you replied:

                                                                    21:17 < pushcx> mulander: It's both.
                                                                    

                                                                    I don’t think ‘both’ works. With the last mod action we as a community exercised moderation transparency and I think that worked out fine as it did many times before. I do believe a site needs moderation but it should always be the last resort and I hope this site will not end up with yet another pamphlet that I will have to cross reference before posting an article or a comment.

                                                                    1. 16

                                                                      I do believe a site needs moderation but it should always be the last resort and I hope this site will not end up with yet another pamphlet that I will have to cross reference before posting an article or a comment.

                                                                      “Moderation as a last resort” is - in my opinion - something that comes from a very narrow view of what moderation is. Moderation that only applies at the very last moment is bad moderation. It’s an ongoing process, which only rarely shows in technical moderator action like deleting complete or parts of posts.

                                                                      It can definitely be both. In the end, pushcx is the person willing to keep the lights on and to deal with all ramifications of running this site. I’m fine with that person being the final instance. That can definitely be both - there’s interactions between the person running the site and those willing to support, and in that interaction lies a lot of potential.

                                                                      1. 7

                                                                        “Moderation as a last resort” doesn’t preclude moderator intervention, it’s about having a gradient for how problem behavior is dealt with. I’ve been able to keep the number of people I had to ban in #haskell-beginners on Freenode IRC very low (only a couple occurrences) despite building a constructive, focused, and friendly community because I was present and responded to problems in ways other than banning people. It’s now one of the more peaceful and helpful IRC channels I’ve ever had the pleasure of participating in and it’s not so because I resorted to the banhammer every-time someone said something I felt was out of step with my goals for the community.

                                                                        1. 3

                                                                          Sure. The whole point of my post is that moderation is so much more then wielding the banhammer. “Moderation as a last resort” excludes that viewpoint, though, by focusing on only the technical details.

                                                                      2. 17

                                                                        Thank you sharing your concerns. And for bringing up this conversation, because I think there’s more worth talking about.

                                                                        I said “It’s both” because neither perspective can give a full understanding of Lobsters alone (or of any social site). I especially think it’s not only the first because no one can exercise dictatorial power over a voluntary community, everyone is free to leave at any time. And people have left in Lobsters’ history over the near-absence of moderation, mostly quietly. But there’s some maintenance and moderation that need a single person. I’ve been debugging log rotation and backups for the last week, I can’t post root’s ssh key for the community to take over the task. And less frequently, that means deliberately setting norms and expectations for the community, like that we need to prefer substantive counterpoints to dismissive repartee.

                                                                        I think aside from the confusing moderation log message I wrote, the biggest problem with that action was that it was unpredictable. Predictability is vital for effective moderation, and it’s clear from the reaction that I wasn’t. I’ve been working on updating the about page that has not seen much updating since Lobsters was much, much smaller and being vague was a virtue that led to the community experimenting and defining itself. I haven’t rushed to finish because I’m trying to take my time and think hard about what Lobsters has grown into the last five and a half years, and the challenges it faces as it continues to grow, rather than slap something up. Which… is what I did with a thoughtless moderation log entry.

                                                                        I agree and disagree with the idea that moderation should be a last resort. In a large community the little nudges I wrote about in this post are useful for avoiding Eternal September. But the large actions like banning users absolutely need to be a last resort after every other option has failed.

                                                                        And I share your fear of a site where opinions are so constrained that there might as well be a list of orthodox positions. We’ve had some wonderful conversations where people have disagreed about technical and even political topics, which is rare and valuable on the web. I hope to preserve and expand our ability to have those conversations. A pamphlet of required opinions would be an abject failure.

                                                                        1. 17

                                                                          And less frequently, that means deliberately setting norms and expectations for the community, like that we need to prefer substantive counterpoints to dismissive repartee.

                                                                          With the utmost respect for the work you put in and your contributions to the site, please do not use your moderator powers to try and shape the norms of the community.

                                                                          1. 11

                                                                            Could you point to communities where you think this has worked out particularly well? In the last few weeks I’ve been analyzing all the communities I’ve participated in or read substantially, and they’ve either been so small that everyone knows everyone or have moderators doing exactly this. (And it’s certainly been the case on the ones I’ve moderated.) But this could totally be personal style of what I think is a healthy community causing selection bias, and I’d love to break out of it if that’s the case.

                                                                            1. 12

                                                                              I could, but you might not agree with what I believe to be successful communities. That is why I ask that you don’t use your moderator powers to try and shape the community.

                                                                              You are already very influential within the community, so I feel that a lead-by-example approach is more appropriate and effective than trying to tailor the content of the site to what you feel the community wants.

                                                                              1. 15

                                                                                So, let’s just state an obvious examples of a “successful” community with low moderation: 4chan.

                                                                                A large part of Internet shibboleths come directly from there. A lot of really influential art and music and even code originated there.

                                                                                But, is it really worth it to wade through all of the garbage every day? Is it worth skipping every third post from some /pol/ idiot blathering on about white-supremacy? Do you really want to see yet another low-quality bait post about intel and AMD?

                                                                                Similarly, HN used to be fairly lightly moderated (and the current system has its flaws, Lord knows!). But a lot of just plain spam and garbage became cultural norms there: product posts, trivial tech news, politics, whatever.

                                                                                When reflecting on this problem, my advice would be: don’t only consider what moderation would censor, consider what no moderation would allow.

                                                                              2. 5

                                                                                https://lobste.rs/s/kmpizq/deleting_comments_instead_threads#c_uh4my1

                                                                                I successfully shaped the norms of #haskell-beginners without wielding a banhammer. Only a couple problem people have had to get banned in the channel since it started in May 2014.

                                                                                1. 4

                                                                                  One thing to consider is the different audience sizes between a Haskell beginners IRC channel and a general technology link sharing website. What works for one might very well not work for the other.

                                                                                  We’ve witnessed time and time again how the quality of gathering places went to shit as the audience size increased and TBH, I would love to find a place where this doesn’t eventually happen. If heavy moderation is a way to get there (these various other places always felt like places where only little to no moderation was happening), so be it.

                                                                              3. 1

                                                                                With the utmost respect for the work you put in and your contributions to the site, please do not use your moderator powers to try and shape the norms of the community.

                                                                                I don’t see where that was implied.

                                                                                1. 2

                                                                                  I stated it pretty explicitly:

                                                                                  And less frequently, that means deliberately setting norms and expectations for the community, like that we need to prefer substantive counterpoints to dismissive repartee.

                                                                                  1. 3

                                                                                    I was more at miss with the “using moderator powers” part. There’s so many more ways to shape norms.

                                                                                    1. 4

                                                                                      I could’ve been clearer there. I was specifically referring to shaping the norms of the community by means that are not available to every other user - such as removing content.

                                                                            2. 4

                                                                              I hope this site will not end up with yet another pamphlet that I will have to cross reference before posting an article or a comment.

                                                                              I seriously doubt that will happen, and agree that I don’t want it to happen.

                                                                              And I think ‘both’ does work.

                                                                              1. 25

                                                                                wait, it has 17 upvotes (if one is to believe the archived version) and then got deleted?

                                                                                edit: and the “hate post” self-description was clearly sarcasm. even a non native speaker can see that. can we pretty please just use the voting system for moderation except for extreme cases (like, real hate speech)?

                                                                                1. 34

                                                                                  Yeah, I’m not immediately sure how I feel about this. I agree that the comment was low-value, but I also haven’t traditionally felt that my feeling alone should be sufficient justification to delete, in part because others might disagree. That’s never been how lobste.rs does things.

                                                                                  I do acknowledge that without the accidental recursive deletion, the impact would have been lower, and of course that aspect of it was a one-off.

                                                                                  Now that the technical migration is done, the new leadership team should all talk at some point about moderation philosophy and get on the same page.

                                                                                  1. 13

                                                                                    why was it low-value? just because of the wording? the title said “minimal”, and that is at least a bit hazy in its meaning. so saying that electron isn’t minimal is a valid point in the discussion. even with a grain of sarcasm.

                                                                                    1. 7

                                                                                      To me personally it was low-value because it took me a while to understand (might have been easier if I’d seen it while it was up and therefore the article’s subject matter in mind…), and because I didn’t feel that I got much out of it after putting in that effort. It was a valid and accurate criticism of Electron and of the article, without being a constructive one.

                                                                                      It’s certainly legitimate to express feelings about the article and about Electron, and I appreciate that many people have strong feelings on technical subjects, and I wouldn’t ask anyone to suppress those feelings. I don’t think it’s something that shouldn’t have been said. But if I’d personally said something this short I’d have expected to be downvoted.

                                                                                      My personal approach is that if I don’t have anything to add about how we got to this bad situation, or how we might get out of it, I just don’t say anything. This is out of respect for the time people spend reading this kind of remark, and with awareness that it takes time away from reading other pithy critiques. :) I do not consider it appropriate to enforce that on others though.

                                                                                      1. 1

                                                                                        My personal approach is that if I don’t have anything to add about how we got to this bad situation, or how we might get out of it, I just don’t say anything. This is out of respect for the time people spend reading this kind of remark, and with awareness that it takes time away from reading other pithy critiques.

                                                                                        If it comes in the form a one-line comment less than twenty words long, I think the dear citizens of Lobsters will be able to stomach having your opinion fly across their screen without much hazard, no matter how non-substantive it is.

                                                                                        1. 3

                                                                                          That’s fair. I guess I over-emphasized concern for others’ reactions: Only saying things I consider worth saying is mostly a thing I do for myself.

                                                                                    2. 9

                                                                                      And, hopefully, have that moderation philosophy align with the people using the site!

                                                                                      1. 17

                                                                                        It does to be fair go in both directions to some extent, since moderation philosophies impact who you get on a site and vice versa. But it’s tricky here because it’s a change in moderation team. People signed up basically expecting the jcs+Irene brand of moderation, but it’s not clear the pushcx brand is the same as that one. I personally feel very comfortable with the previous two moderators, and if they wanted to become a bit more hands-on as the community grows, I wouldn’t be too worried, because I trust how they’ve moderated the site so far. But a new moderator becoming significantly more hands-on than the existing moderation team makes me more nervous.

                                                                                        1. 4

                                                                                          I can’t speak for pushcx; I’ve always considered that a constraint. I believe I’m on record with it, although I can’t find the comments right now.

                                                                                        2. 5

                                                                                          FWIW, I think that any shift in moderation philosophy isn’t necessarily bad - I just hope it’s something discussed openly as a meta post, considered thoughtfully, and implemented transparently. That transparency was one of the features that pulled many people here and I’d hate to see it change.

                                                                                          1. 4

                                                                                            It had a lot of value for me, it told me that it uses Electron, which I try to avoid. Just because something has low value for you does not mean it has low value for everybody.

                                                                                            1. 0

                                                                                              Yeah, I’m not immediately sure how I feel about this.

                                                                                              I am: a censor abused his powers. In a just world, he would be forced to step down and suffer with the rest of us mortals. Fortunately for him, this is not a just world.

                                                                                            2. 11

                                                                                              Final count according to the author was 23 and -4

                                                                                              1. 9

                                                                                                Upvotes are not necessarily a good way to judge a comment. People are herd animals, and it’s easy to upvote. There is a type of post that optimizes for “time taken” and “upvotes received:” the “zinger.”

                                                                                                1. 20

                                                                                                  up/down votes are imho a clearly better moderation system than randomly deleting posts out of a mood.

                                                                                                  1. 11

                                                                                                    I don’t agree. Upvotes are very prone to herd movements and rarely express a useful policy in aggregates.

                                                                                                    1. 7

                                                                                                      Since we’re in meta territory here: I’ve found that the score hiding feature at least seems to weed out some of the herd tendencies.

                                                                                                      Maybe we should look at adjusting the score visibility threshold up? Or keep the score hidden for a bit longer?

                                                                                                      1. 8

                                                                                                        maybe just don’t show the score except for the poster so the feedback is still there, but the herd effect doesn’t kick in

                                                                                                      2. 3

                                                                                                        but what’s a better alternative? at least with (down-)votes there is a feedback, maybe to better state a point via an edit. i always had the feeling the votes worked rather good here.

                                                                                                        1. 5

                                                                                                          This still doesn’t make them “clearly a better moderation system”. A mix of both is very usual and proven.

                                                                                                          1. 5

                                                                                                            This still doesn’t make them “clearly a better moderation system”.

                                                                                                            like i’ve said: “imho”, but i have felt as i typed “clearly” that it would be a point of criticism for some.

                                                                                                            A mix of both is very usual and proven.

                                                                                                            to quote myself:

                                                                                                            can we pretty please just use the voting system for moderation except for extreme cases (like, real hate speech)?

                                                                                                  2. 1

                                                                                                    can we pretty please just use the voting system for moderation except for extreme cases (like, real hate speech)?

                                                                                                    And how is “real” “hate speech” defined? In reality, the term is just a catch-all excuse for censorship of various kinds.

                                                                                                  3. 0

                                                                                                    if this causes a “problem” in moderation lobste.rs is pretty much dead to me.

                                                                                                  1. 10

                                                                                                    Anyone interested in total languages might like Idris, Agda, or Coq:

                                                                                                    In particular, some interesting approaches to services with an indefinite lifespan (like a daemon) were explored with codata in Agda:

                                                                                                    1. 1

                                                                                                      Going to “Your Threads” seems slower now, probably database limited but I don’t know.

                                                                                                      1. 2

                                                                                                        It turns out the URL in the description is not for video linked from the heading. I was quite confused for a while there.

                                                                                                        1. 3

                                                                                                          Wondered when somebody would trip over the easter egg, sorry :)

                                                                                                          1. 2

                                                                                                            Once I figured out what had happened, I was amused, so no worries. :)

                                                                                                            1. 1

                                                                                                              I did and came back to the Lobster link thinking that there must be more to listen to. Great one indeed ;)