1. 3

    I spent 8 hours in Haskell trying to do the equivalent of os.environ[‘FOO’] in python.

    Probably says more about me than Haskell. But if you ever want to kill 8 hours, try googling “get encironment variable Haskell” and then try putting the equivalent of if (variable) { this } else { that } into an existing program.

    Maybe I just got unlucky due to the structure of the program, since it was set up where an IO result was somehow unacceptable. But the ultimate trick was to use something like “unsafeEval” which actually evaluates the expression. No matter how hard I googled, I failed to find this trick out in the wild.

    None of this is to smackttalk Haskell. It’s a different world.

    1. 10

      I think this says more about the stereotypical Haskell tutorial material than about you or Haskell.

      Language X tutorial:

      1. Hello, world!
      2. Slurp something from input, lightly munge it, and then print it right back out
      3. [Usual stuff about standard types and control flow constructs interspersed with fancier examples that often do some useful IO]

      Stereotypical Haskell tutorial:

      1. Factorial (optionally preceded by “Hello, world!”)
      2. Fibonacci numbers (lazy lists) or “sieve of Eratosthenes” (actually trial division) or “quicksort” (actually not in-place)
      3. [Usual stuff about lists and algebraic datatypes and pattern matching interspersed with fancier examples, often including an expression calculator, but nothing about IO apart from getContents and putStrLn. IO would be, like, somewhere in the second half or maybe even near the end.]

      Here’s more of the former and less of the latter:

      At some point you’ll come across the question “what’s a monad?” for the first time, and the correct answer at this point really should be “it doesn’t matter”. You don’t need to know about monads to do IO, you just need to know that IO actions return IO values (IO String or IO Int instead of String or Int), that when you write your own IO actions (like main) you can use a do block, and that using <- inside a do block unwraps the IO value so you can pass a normal (non-IO) String or Int to your normal (non-IO) functions, munge it, and then pass it back to some IO actions to output. At no point do you ever need to use any function with “unsafe” in its name. It might seem like doing extra work for no reason, but that’s how you have slightly increased confidence that you’re not launching missiles while calculating your factorials because the types say so.

      1. 3

        Haskell By Example is amazing and its creator is my hero.

      2. 8

        Does this help any? https://gist.github.com/shapr/7c0fe351f78da33505f640b1b3e12ffe

        I usually structure my code by doing all side effects at the top level and passing the values to the pure code for processing. checkEnvVars is pure code, and the side effects are executed in main.

        1. 2

          Kind of! How would you do the equivalent of turning the PORT environment variable into an integer, falling back to 8080 if it’s unset? It’s honestly eluding me…

          1. 7

            The function you want is readMaybe. Usually there’s enough information from the context that the typechecker can infer which type you are trying to read into. To then go from your Maybe Int to an Int (by providing a default), you can either use a case-expression and pattern match, or the fromMaybe function:

            import Data.Maybe (fromMaybe)
            import Text.Read (readMaybe)
            import System.Environment (lookupEnv)
            
            main :: IO ()
            -- Explicitly:
            main = do
              portVar <- lookupEnv "PORT"
              let port = case readMaybe portVar of
                     Nothing -> 8080
                     Just p -> p
              someFunc port
            
            -- With fromMaybe:
            main = do
              portVar <- lookupEnv "PORT"
              someFunc (fromMaybe 8080 (readMaybe portVar))
            
            someFunc :: Int -> IO ()
            someFunc = undefined
            
            1. 3

              Thank you (and everyone else) for the helpful replies!

            2. 4

              I’d go with something like this:

              import Control.Monad ((=<<))
              import System.Environment (lookupEnv)
              import Text.Read (readMaybe)
              import Data.Maybe (fromMaybe)
              
              main :: IO ()
              main = do
                host <- fromMaybe "::"   <$> lookupEnv "HOST"
                port <- readDefault 8080 <$> lookupEnv "PORT"
                putStrLn (host ++ " " ++ show port)
              
              readDefault :: (Read a) => a -> Maybe String -> a
              readDefault dfl = fromMaybe dfl <$> (readMaybe =<<)
              

              There are three things to grok.

              1. <$> is an fmap alias. It is part of the Functor type class.

                • In the context of Maybe it means “apply function on the left to the thing inside of Just; skip when Nothing”.

                • In the context of IO it means “apply function on the left to whatever value the I/O operation on the right eventually produces”.

              2. =<< means (in the context of Maybe) “do nothing if the thing on right side is Nothing, otherwise pass whatever is inside the Just to the function on the left and use it’s result”. This is part of the Monad type class.

              3. lookupEnv returns IO (Maybe String). The monads are nested here.

              1. 1

                Unfortunately I was in a situation where I was using a third party library (hakyll, a common blog platform) and was not able to pass an IO String into the setExtension function. I didn’t have control over their function and therefore no opportunity to restructure it to use IO. It was expecting a plain String.

                I guess unsafePerformIO might be the right answer there, but someone else here says it’s a disaster waiting to happen.

                Here’s the line of code: https://github.com/shawwn/wiki/blob/7dfe54f4ed6b5f6ec021915fdeed057be71187ea/Main.hs#L69

                1. 2

                  setExtension accepts a String because it doesn’t want to trigger arbitrary side-effects while trying to work out what extension to set, which is what it would do if it accepted an IO String and bound the result via either do-notation or (>>=) (which is what do-notation desugars into).

          2. 7

            the ultimate trick was to use something like “unsafeEval” which actually evaluates the expression. No matter how hard I googled, I failed to find this trick out in the wild

            Unless you’re a very advanced user doing some very low-level and unsafe things that might depend on compiler version, unsafePerformIO and related functions are less an “ultimate trick” and more a disaster waiting to happen.

            As other commenters are noting, the thing to do is to restructure your code to do the IO somewhere else and pass in the value you need.

            1. 1

              It was a third party library hakyll that required a String rather than an IO String. I wonder if there’s any other solution in that case… https://github.com/shawwn/wiki/blob/7dfe54f4ed6b5f6ec021915fdeed057be71187ea/Main.hs#L69

              1. 6

                There are at least two other options, depending on your needs and haskell fluency:

                1. Read the envvar before you call hakyll, while you’re in IO instead of Rules. You can then either:
                • Pass the value into the functions that need it directly, or
                • Use a ReaderT String Rules monad to make the envvar available (if you’re comfortable with transformers, and/or have a lot of places where it’s needed).
                1. Use preprocess :: IO a -> Rules a to lift the envvar lookup into Rules, and then run it just before it’s needed.

                EDIT: I would probably lean towards #2 in this instance, unless I had multiple places where the envvar was needed. Then I’d refactor towards argument passing or transformers.

                1. 5

                  Yes, that’s what you want: https://github.com/shawwn/wiki/pull/1

                  I did this with no knowledge of Hakyll. Only knowledge of Haskell. Took 2 minutes. Types and purity are awesome.

            2. 5

              Others have given concrete advice, here’s the conceptual advice:

              Gathering data from the ENV is a side-effect. From within your program, you cannot be sure when these values change or how they are controlled. We often treat them as though they’re fixed, unchanging global data, but good Haskell practice has us minimize assumptions of this form.

              So, the standard trick for Haskell application development is to have a “startup” phase where resources are acquired and configurations are read all into static, internalized locations which are then fed (purely) to the remainder of the app.

              Concretely, my advise is to make a “Configuration” type and store in it all of the values which you require from the environment. Then, build values of this in IO during “startup” and pass instantiated values of this to the rest of your program during operation.

              This feels bad at first because it smears the linkage between behavior of your program and the state of the ENV variables across two locations. It ends up being way better though as you’ve now factored the logic of your application away from the logic of gathering configuration information. This is excellent for testing, fuzzing, or repackaging the app into new environments.

              1. 1

                You’re completely right, but I don’t think it makes a lot of difference for a beginner in which part of the program reading the ENV variable doesn’t work ;) Just saying, it’s not really easy if doing it as you described, it’s just maybe even harder doing it at runtime, deep in another function.

                1. 1

                  I agree that it busts the “I can do whatever I need to, whenever I need to, to solve my problem” mentality, but that, itself, is an assumed thing. Purity changes the rules of the game in a way that’s quite pervasive.

                  The “startup phase” trick leads to better design. That’s one consequence of the reduced effect induced by purity.

                  I don’t want to try to argue whether one is worse or better for beginners. I know that working with purity is harder for programmers coming from other languages though.

              2. 2

                Nope, it’s not you. I had the same experience with Haskell twice and then again with PureScript.. Doing some IO-heavy stuff in a completely new language usually takes me a few hours. In Haskell and PureScript I needed a few days until it worked. See infinitesimal’s comment, with which I fully agree. Most Haskell tutorials seem to be written backwards, also mostly by zealots. I’ve been told I “don’t get” functional programming several times when I criticized stuff.

                1. 2

                  What does this have to do with OP?

                1. 7

                  Another option is “refuse to play”. I don’t like that I paid for an operating system and still get ads and crapware, so I give windows zero thought when I develop.

                  1. 4

                    we keep the VM alive until you log out or until your normal build time limit has elapsed

                    Immediately on logout? There should be like a couple minute window after logout when you can log back in, because connections can drop, accidental Ctrl-D in the wrong window can happen, etc.

                    soon you’ll be just a few keystrokes away from an ARM or PowerPC shell, too

                    Let me guess, EC2 and IntegriCloud? :)

                    1. 16

                      Aye, I’ll improve upon this over time.

                      Regarding EC2 and IntegriCloud, no - sr.ht is run entirely on owned hardware in a private rack in a colocated datacenter. I don’t put your data in the hands of megacorps.

                      1. 2

                        I don’t put your data in the hands of megacorps.

                        I’m impressed.

                      2. 1

                        There should be like a couple minute window after logout when you can log back in, because connections can drop, accidental Ctrl-D in the wrong window can happen, etc.

                        Not just for this exact scenario, but you can use SSH Sockets for this purpose!

                        1. 1

                          I’ve had that enabled for years. Not sure how it would help when the TCP connection gets dropped because of network problems.

                        2. 1

                          accidental Ctrl-D in the wrong window can happen

                          Set IGNOREEOF and you can (mostly) avoid that problem.

                          1. 0

                            You can always rebuild there, yeah?

                          1. 4

                            The opening comments - particularly about print/parse round trips etc. - suggest a link between fuzzing and property-based testing that I’d love to see explored more. I know that a fuzzer based on Haskell QuickCheck exists but haven’t played with it.

                            1. 4

                              Properties are specifications: what your program is supposed to do. Other names include models and contracts. The code itself is how you attempted to do it. Tests generated from them naturally check the how against the what. Finally, you or your tools can convert each property to a runtime check in the code before fuzzing it. Takes you right to point of failure.

                              Design-by-Contract, contract-based test generation, and fuzzing with contracts as runtime checks is a combo that should work across about any language. Add static/dynamic analysis with low false positives if your language has them. Run this stuff overnight to get more CPU time fuzzing without dragging down performance of your system while you use it.

                              1. 2

                                There are a couple papers on Targeted PBT essentially adding argMax semantics to (at least an Erlang) QuickCheck lib. One can say “test this property using this somewhat non trivial generator and also try to maximize code coverage, as this may help the generation of interesting values”. This is exactly what I did in this proof of concept [1]. It indeed finds counter examples faster than the non maximizing code. In this PoC the non maximizing version often doesn’t find anything at all.

                                I have discovered a passion with this technology and (plug!) am building what will essentially be a language agnostic PBT/fuzzing tool and hopefully SaaS at [2]!

                                [1] https://github.com/fenollp/coverage_targeted_property_testing

                                [2] https://github.com/FuzzyMonkeyCo/monkey

                                1. 1

                                  The way I use the terms, the link is quite simple: both are instances of automated tests with generated input data, but with property based testing, there is a relatively strong oracle, whereas with fuzzing, the oracle is limited to “did it crash?”

                                  This might be slightly different to how the author here uses the terms, though.

                                  1. 4

                                    Your point about oracle is the biggest difference; I think I would expand that to; property based testing can give you statistical guarantees, which means that it tries to sample your program input space according to some pre-defined probability distribution. It doesn’t particularly care about things like coverage either (and as far as I understand it, property based testing should not use feedback — but lines are bluring[1]).

                                    Fuzzing, on the other hand does not particularly care about statistical guarantees (not that you cant make it, but typically it is not done). All it cares about is “can I exercise interesting code that is likely to invoke interesting behaviors”. So, while we use coverage for as a feedback for fuzzing, it is OK to leave aside parts of the program that are not interesting enough.

                                    At the end of the day, I would say the similarities are that both are test generation tools (which also include things like Randoop and Evosuite which are neither fuzzers nor property checkers).

                                    [1] ArbitCheck: A Highly Automated Property-Based Testing Tool for Java

                                    1. 3

                                      I used afl fuzzing to find bugs in math libraries, see e.g. [1] (i.e. things like “divide input a through b with two different libraries, see if the result matches, otherwise throw an assert error”). So you can get the “strong oracle” with fuzzing. I guess you can’t really have a strong line between “fuzzing” and “property-based testing”, it’s just different levels of test conditions. I.e. “doesn’t crash” is also a “property” you can test for.

                                      [1] https://www.mozilla.org/en-US/security/advisories/mfsa2016-07/

                                      1. 2

                                        The original twitter thread where he solicited ideas about how to write fuzzable code had a conversation about how PBT and fuzzing relate: https://twitter.com/mgambogi/status/1154913054389178369.

                                        1. 1

                                          Fuzzing does not limit the oracle to “did it crash?” Other oracles (address sanitizers, for example) are quite common.

                                          There’s obviously some overlap between fuzzing and property based testing, but:

                                          Fuzzing tends to work on the whole application, or a substantial part of it, at once. PBT is typically limited to a single function, although both fuzzing and PBT are useful in different scopes.

                                          Fuzzing tends to run for weeks on multiple CPUs, whereas PBT tends to run alongside unit tests, quickly.

                                          Fuzzing (often!) tends to use profile guidance, whereas PBT does not.

                                      1. 11

                                        I don’t think we should allow these people into open source spaces and I don’t want a company that works with them to profit off of my work.

                                        It doesn’t work that way, for very good reason. See the FSF on censorship envy and licensing.

                                        1. 14

                                          I find that unconvincing. FSF finds it difficult to draw a line, but that doesn’t mean the line shouldn’t exist at all. This problem doesn’t exist for an individual, who can decide exactly for themselves who they’re going to support.

                                          1. 3

                                            I tended to do so too, but Stallman’s argument:

                                            A condition against torture would not work, because enforcement of any free software license is done through the state. A state that wants to carry out torture will ignore the license. When victims of US torture try suing the US government, courts dismiss the cases on the grounds that their treatment is a national security secret.

                                            is pretty convincing to me. If your software doesn’t directly interface with users, or if work has been put into hiding it, it one might often not even realize that one is running enclosed software.

                                            Anyways, since the free software movement when it comes to the fundamental question opposed to copyright and intellectual property, they wouldn’t want to have to extend it further than necesary, as argued here:

                                            It is not clear these [conditions] would be enforcible. Free software licenses are based on copyright law, and trying to impose usage conditions that way is stretching what copyright law permits, stretching it in a dangerous way. Would you like books to carry license conditions about how you can use the information in them?

                                            In the end you can choose to oppose those you don’t want to help in all other ways: don’t help them with issues, ban them from mailing lists, etc. but starting to limit who can and cannot use certain software, can only lead down a rabbit hole of less software for everyone to use, and a even worse/abusable legal situation – it should be obvious that this isn’t the goal of free software, but if this is a higher priority, then nobody is forcing software to be free…

                                          2. 6

                                            Those arguments make sense in the context of a license, but they don’t apply here. The FSF itself is one of the best examples of condemning and refusing to do business with companies like Microsoft, even if the GPL doesn’t prevent Microsoft from using their code.

                                            1. 6

                                              I don’t understand what this article about including politics in software licensing has to do with people boycotting businesses they believe engage in acts of evil.

                                              1. 2

                                                I strongly disagree with the FSF on this issue. We don’t have to, and should not, treat all things the same regardless of ideology. Good things are good and bad things are bad, and we should treat them accordingly. I think that a free software movement that doesn’t take a stance on moral issues outside of software licensing is hollow at best. The first amendment doesn’t apply to open source projects so we’re all perfectly free to not allow Palantir to participate, though I agree that licenses aren’t a good way to enforce this as it’s a social rather than legal problem.

                                                1. 1

                                                  I agree that licenses aren’t a good way to enforce this as it’s a social rather than legal problem.

                                                  Then you don’t disagree with the FSF, as that is their stance.

                                              1. 2

                                                Die, floppy disks. DVDs and audio jacks: you’re next.

                                                Just kidding about the audio jack.

                                                1. 4

                                                  I bought a new phone recently, and I was so mad (at Google, but also at myself for not checking) to find that I had to use USB-C headphones and that I had to install and configure them before they worked. Why is this necessary? (It reminded me of the first USB key I got in ~1999—it was utterly useless because I needed to install drivers for every machine I used.)

                                                  1. 10

                                                    Not only that, I’ve seen people move their USB Type C 3.11 for Workgroups with Power Delivery charger around each port of their computer to try and find the one which will actually accept power. There are tiny dark-grey-on-black hieroglyphs next to each port on my new laptop marking which ones are USB Type C 3.11 for Workgroups with LightningStrike or Thunderbolt OSR2 Enhanced or whatever it’s called, while others are USB Type C 3.11 for Workgroups with DisplayPort alt-mode LTS Edition. Thank god my eyesight is in normal human range; I’d hate to try and work this out with vision difficulties! The laptop will only boot from USB Type C 3.11 for Workgroups Mass Storage Edition on certain ports, and blithely ignore boot media in others. This is unmarked and undocumented, so my passable eyesight is no help here.

                                                    The cable situation is even worse. There are a zillion different types of cables, which are supposed to have markings (i.e., black-on-black embossings that nobody will be able to see). These will allegedly identify which cables are base USB C 3.11 for Workgroups, and which ones support delivering a value meal along with your data, or whatever other hare-brained scheme they cram in there next. Presumably they’re following the logic of whoever makes SD cards: make them look like NASCAR jackets and maybe people will learn what all the weird symbols mean. But of course most of the cables are made in China and are totally unmarked, so the iconography is moot. The only cable you can trust is the one that came with your gizmo.

                                                    We’ve gone from having function-specific ports that were visually distinct, though an all-too-brief golden age of “match the plugs and it’ll probably work”, to a bunch of function-specific ports which all look the same. Anyone involved with USB C 3.11 for Workgroups should be deeply ashamed of themselves, with the exception of that Benson guy who calls people out on their terrible cables.

                                                    1. -1

                                                      Not only that, I’ve seen people move their USB Type C 3.11 for Workgroups with Power Delivery charger around each port of their computer to try and find the one which will actually accept power.

                                                      So rather than acknowledging that when companies do the right thing, and make all USB-C ports accept power, it’s easier for the user, you instead choose to blame the standard which allows said ease of use, on the shitty manufacturer who implemented it in a half-assed way to save a few dollars.

                                                      The laptop will only boot from USB Type C 3.11 for Workgroups Mass Storage Edition on certain ports, and blithely ignore boot media in others

                                                      Yet again, completely unrelated to USB - your laptop is a POS.

                                                      We’ve gone from having function-specific ports that were visually distinct, though an all-too-brief golden age of “match the plugs and it’ll probably work”, to a bunch of function-specific ports which all look the same.

                                                      We’ve gone from dozens of single-use ports that are fucking useless for the user if they don’t happen to have that type of peripheral, and will make the peripheral useless with their next computer because the specific set of single-use ports will have changed and converters are simply not practical or available, to the ability for manufacturers to provide ports that are multi-purpose, and can connect multiple legacy single-use ports with inexpensive, readily available adapters.

                                                      This same argument (single-use ports are better) is made about even expensive laptops, like the MacBook Pro. People whine and whinge about the lack of HDMI and fucking SD card readers - and ignore that they’re completely useless for a whole bunch of people.

                                                      1. 3

                                                        So rather than acknowledging that when companies do the right thing

                                                        I have literally never seen anyone do this completely right.

                                                        You instead choose to blame the standard

                                                        No, I blame everyone. You know this industry: the ideal world specified by a standard and the set of implementations people must interoperate with are often two distinct worlds.

                                                        […] connect multiple legacy single-use ports with inexpensive, readily available adapters.

                                                        The few adapters I have seen have neither of these properties. Sitting a laptop in a plate of dongle-spaghetti is not an improvement. And then you have to break out your magnifying glass to find out whether this particular adapter talks DisplayPort alt-mode or DisplayLink. Reading online, one is painless and the other is impossible.

                                                        Oh, and: this is painful enough for people who work with tech for a living. I feel for all the normal people who have had this shoved onto them; I have no idea how anyone not immersed in this stuff could make head or tail of it.

                                                        1. 1

                                                          I have literally never seen anyone do this completely right.

                                                          Apple’s TB3-supporting computers all do it “right”, and even their now-discontinued Macbook (which had USB-C but not TB3) did it “right”, from what I can see.

                                                          The few adapters I have seen have neither of these properties.

                                                          Few? Have you actually looked for any? USB-C to <Insert combination of USB-A, Ethernet, Some form of video, Some form of card reader> are ridiculously common amongst accessory makers.

                                                          Sitting a laptop in a plate of dongle-spaghetti is not an improvement. So, before USB-C was a thing, the devices somehow didn’t have wires? With adapters you’re doing one of two things:

                                                          • you’re connecting one or more devices via single-port adapters - in which case you just have a slightly longer cable(s); or
                                                          • you’re connecting multiple devices to a single multi-port adapter - in which case you’ve moved the ‘spaghetti’ of multiple cables away from your computer..

                                                          And then you have to break out your magnifying glass to find out whether this particular adapter talks DisplayPort alt-mode or DisplayLink.

                                                          I don’t even understand this complaint, unless you just searched for “weird proprietary confusing display tech” and got a result for DisplayLink. The manufacturers who support it in hardware seem to be limited to those who also make the same shitty decisions like “hey we’ll put 8 USB-A ports, but only 2 of them are high speed, guess which”.

                                                    2. 1

                                                      Annoying, isn’t it? And they can’t undo the decision.

                                                      The flipside is that I just carry around wired earpods in my pocket wherever I go. It’s okayish.

                                                      I keep telling myself “They need that room on the hardware for other things, like AR.” But I’m unfamiliar with hardware engineering, so that’s just a bedtime story.

                                                      The worst is that all the adapters for car <-> phone are useless now. And bluetooth cars aren’t really prolific, at least among my family members.

                                                      1. 1

                                                        I think the reality is that they save a little bit of money on the BOM by leaving out the jack and associated components, and when they sell thousands/millions of units they earn a bit extra.

                                                        1. 5

                                                          Adding to your BOM idea, it’s also more expensive to waterproof an audio jack, from what I have heard.

                                                          1. 2

                                                            I’m not the expert, but I don’t why waterproof headphone jacks would be more expensive than waterproof USB ports.

                                                            1. 4

                                                              You already need to have a USB port, so a headphone jack is one more thing to waterproof/IP certify.

                                                              1. 1

                                                                But is the cost of that anywhere near significant on the total cost of developing a new phone that will sell millions of units?

                                                                1. 3

                                                                  Bean counters are that way… There was a managed switch by Ubiquiti where the OS had serial console support, the board had the controller, and even had the RS232 header in place, but the port was not soldered. Some people ended up cutting a hole in the enclosure and soldering the port to it.

                                                                  That would be a very cheap addition with a lot of value for the customer. But someone probably got a bonus for saving $0.01 per unit.

                                                                  1. 1

                                                                    That’s kind of my whole point above.. saving a few dollars on a unit when you expect to sell millions of them adds up.

                                                                    1. 1

                                                                      That only considers the cost side. There’s also a benefit side: more people interested / not turned off, so you sell more units. If cost is low enough, adding a feature is a no-brainer. I wonder about the math here.

                                                                      1. 1

                                                                        That’s not what is happening though. It would seem that consumers are ‘too invested’ in the Apple brand, for example, to move away entirely from the product line when Apple decides to remove features.

                                                              2. 2

                                                                Yes, I think it was so claimed by Apple when they got rid of the headphone jack and added IP67 dust and water resistance — both in the same iteration with iPhone 7.

                                                                TBH, it doesn’t necessarily make much sense — what’s the big deal with simply designing a proper IP67-rated headphone jack component like they already do with all the other parts?

                                                        2. 3

                                                          I’d be fine using Bluetooth everywhere if it actually heckin’ worked. I tried to pair my phone with my car once to play music without an aux cable. Never again.

                                                          1. 2

                                                            What’s wrong with DVDs? They’re now so wide open pretty much anything will play them.

                                                            1. 4

                                                              DVD-ROMs are okay, but video DVD format builds on top of PAL/SECAM/NTSC analog television with interlacing, which is too harsh legacy. It’s basically a crudely digitized VHS. It have to go just like Kodak Photo CD, despite jpeg, maybe, is even more ancient tech.

                                                              1. 3

                                                                Image quality is what’s wrong with DVDs IMO.

                                                                1. 3

                                                                  I literally don’t have a device in my house that will play DVDs. I have two 2018 computers (one mini desktop, one laptop), a 2011 laptop, and a 2018 (purchased, probably 2017 model) receiver.

                                                                  The weird thing is my car will (apparently, I’ve never actually tried it) play a DVD.

                                                                  1. 1

                                                                    They lose data very quickly. Even allegedly archival quality DVDs

                                                                1. 3

                                                                  I am having a fantastic time using nix shells for my development environments. What is asdf offering that I can’t get from nix?

                                                                  1. 3

                                                                    ASDF is much simpler and offer simpler CLI by sacrificing power and configurability. Nix is more like “system configuration manager” while ASDF is just version manager. I have recently completely moved from the ASDF to Nix in all my development projects.

                                                                  1. 4

                                                                    This looks interesting. The slides are pretty information dense. Is there a talk/video to go along with them ?

                                                                    1. 6

                                                                      Not for that talk, but I think this Ken Scambler talk from LambdaJam 2015 is much better, and I think this slide deck is the one Ken uses, or is very close to it.

                                                                      Whipping out the “monoid in the category of endofunctors” line doesn’t help unless you have explained what those words actually mean - I programmed using monads for a number of years without understanding that catchphrase. I’d also say that OP’s slides probably need at least a lot of talking around to be useful. The slides talk about monad flattening List(Maybe(T)) to List(T), but monadic join is M x M -> M, so that seems off?

                                                                      1. 2

                                                                        Thanks for the links! What I liked about the “Category Theory in 10 minutes” is that it helped me get an idea of what category theory is about and introduce some of the lingo that otherwise takes a long time to acquire (it’s only 22 pages long). As a point of comparison, The Category Theory For Programmers book is 515 pages long, the Seven Sketches in Compositionality book is 243 and the slide deck you shared is 209 – I’d like to see more short or medium-form introductions to category theory, so that it’s easier to dive into it.

                                                                        1. 1

                                                                          I caution you against taking the page count of any slide deck too seriously: often it’s because of little highlights and not-quite-animations. Ken’s talk is only 25 minutes long.

                                                                    1. 1

                                                                      Interesting, especially since many of the points and ways to phrase concepts aren’t just the same thing one keeps reading about all the time. But this confused me even more when it came to Endofunctors. How is “Int -> Int” and “Int -> String” an Endofunctor. Aren’t “String” and “Int” two categories?

                                                                      1. 3

                                                                        Well, you can choose to define a category with the elements of Int as the objects, but I don’t think that’s what’s meant here. I agree that the slides are very confusing. I think the strange notation Int => String here denotes an example mapping from the object Int to the object String (supposedly in some category with types as the objects…). I think that slide doesn’t contain any useful information.

                                                                        1. 2

                                                                          Functors in most programming languages are all endofunctors because most programming languages are in the category of Types

                                                                          (slide 17)

                                                                          For example, in Haskell all types and functions are in the category “Hask”, where the objects are Haskell types and the morphisms are functions, identity is the id function and composition is function composition using the . operator. (see here)

                                                                          Hope that makes sense :)

                                                                          1. 4

                                                                            And Hask is only a category if you wave your hands a bit and ignore seq and bottom. But it’s good enough as an intuition pump.

                                                                        1. 11

                                                                          Pretty standard “why Haskell?” post.

                                                                          That opening sentence is dense enough that you could spend many hours researching the history and merits of things like “purely functional”, “non-strict semantics”, and “strong static typing”.

                                                                          We get it, Haskell programmers are smarter than everyone else.

                                                                          Reading between the lines, it sounds like the team actually has more experience on infrastructure projects than PL projects. They hand wave away writing infrastructure glue as trivial, but foresee themselves drowning in tech debt implementing the language interpretation in C++, Java, Swift, etc. That tells me they’re confident in writing infrastructure glue, but less confident writing PL code.

                                                                          I may be totally off base, but that’s the vibe I got from reading the post.

                                                                          1. 17

                                                                            We get it, Haskell programmers are smarter than everyone else.

                                                                            The odd thing is, I’ve quite often heard people say they use Haskell because they’re not smart enough to ship things reliably in most other languages. I empathise.

                                                                            1. 19

                                                                              I, for one, consider myself too stupid to not use Haskell.

                                                                              1. 5

                                                                                I, for one, consider myself too stupid to use Haskell.

                                                                                An abstraction too hard to understand is just magic.

                                                                                1. 8

                                                                                  You aren’t forced to use abstractions that are too hard to understand. You can go a very long way — all the way, in fact — just using simple things in Haskell.

                                                                              2. 11

                                                                                I prefer OCaml rather than Haskell but the point is the same. I feel much more relaxed when I write OCaml code compared to C (or C++) code. I don’t have the same anxiety of crashes and corruption issues.

                                                                                In the same vein, I’m currently on a mixed codebase and I’m not able to test the code in actual setups and I’m not at work all 5 days of the week currently. I have to do some bugfixes currently and therefore I code, push on branch and hope for the best. I’m much more confident with my fixes for the OCaml code and they usually just work indeed. The fixes to the C and C++ codebases however will likely be partial or trigger issues elsewhere instead.

                                                                                1. 5

                                                                                  I have similar experience with a mixed C#/F# codebase. It is not that the F# code does not have bugs – I create plenty bugs – but in F# there’s a greater proportion of interesting bugs.

                                                                                2. 9

                                                                                  I thought the same of myself, but (to add another perspective) it turns out I’m also not smart enough to use many of the libraries on Hackage, or to reliably manage memory usage, so I moved away. I still appreciate and emulate the discipline of its type system when I have to use a less strictly-typed language, though.

                                                                                  1. 5

                                                                                    I think that’s a pithy (and therefore somewhat imprecise) way of saying that Haskell’s type system lets them encode more correctness guarantees than mainstream languages with less sophisticated type systems, so they feel they can offload more correctness-checking work to the compiler, and therefore don’t have to be as “smart” about reasoning about edge cases to write equally-reliable code. I think that more complicated statement is true enough, but I wouldn’t say that people who are smarter than those Haskell programmers are deliberately choosing to write code in languages with less-strict type systems because they can get away with it.

                                                                                    1. 3

                                                                                      I agree with you. Full disclosure: writing Haskell is 100% of my income and I say the same pithy line above. I just didn’t want to seem like I’m saying “look at me, I write Haskell, I M smrt.”

                                                                                      1. 2

                                                                                        I wouldn’t say that people who are smarter than those Haskell programmers are deliberately choosing to write code in languages with less-strict type systems because they can get away with it.

                                                                                        I think what you are saying is completely true, the asprin must follow the headache. They don’t desire an escape because they either aren’t pushing themselves to actually build at their ability level or they are naturally gifted and don’t feel any need to offload cognitive weight. It’s not that they are flexing, it’s that they don’t feel the weight. Perhaps some of them don’t really know that things would be easier if they didn’t bear it. I notice people with good working memory don’t write notes and then I’ll go to my notes and be able to “recall” something that they couldn’t. Sometimes a lack of ability leads us to use tools that expand our performance far beyond what any natural ability could accomplish. The palest ink is better than the most powerful memory. Or as I often say “Paper don’t forget”.

                                                                                      2. 4

                                                                                        I have trouble articulating why, but I find this cliche really condescending.

                                                                                        1. 4

                                                                                          It might be because the subtle implication is that other programmers are too stupid to realise they aren’t smart enough to have come to the same conclusion.

                                                                                          I’ve said essentially the same, but that’s the tone of general discourse. It isn’t reasonable to hold Haskell developers to a different social standard than any other kind of programmer.

                                                                                          1. 3

                                                                                            I think it’s because you can easily read it as saying “not only am I smart, I am also exceedingly humble.”

                                                                                            An attempt at a better formulation:

                                                                                            It’s not that I use Haskell because I’m abnormally smart—I’m not—but I was able to take the time to learn it and I love it because although of course there is some complexity and novelty to the language it is also very helpful and nice to have such a strong and expressive type system, so I find myself being able to code with more ease and confidence. Other languages may be easier to learn but there’s a big difference between how fast you can learn a language and how much that language actually helps you in the work of coding especially over time, and there I think the effort of learning Haskell is well worth it, and I feel this clearly almost every time I do some bigger refactoring and the compiler helps me step by step until it’s done.

                                                                                            1. 2

                                                                                              Would you also feel this way if someone said “I use JavaScript because I’m not smart enough to use other languages?”

                                                                                              I think within this feeling that the cliche is condescending is an implicit assumption that Haskell is a language for smart people and not the rest of us. The same statement about JavaScript doesn’t feel condescending because few feel like JavaScript is reserved for exceptionally smart people. So when a Haskell programmer (who must be smart because they’re a Haskell programmer) says they do something seen as reserved for exceptionally smart people (Haskell programming) because they aren’t that smart, where does that leave the rest of us chumps? That’s the condescension, as I understand it.

                                                                                              I think what Haskell programmers are trying to say is that they’re not exceptionally smart and Haskell isn’t Mensa for programmers. I saw a tweet recently to the effect of “I am a plumber and when I work with Haskell, I have less leaky pipes”. That’s the sentiment I find in the cliche.

                                                                                              1. 3

                                                                                                Would you also feel this way if someone said “I use JavaScript because I’m not smart enough to use other languages?”

                                                                                                I know you didn’t ask me, but to be fair, JavaScript doesn’t have the same elitist/academic reputation that Haskell does. People who don’t know any better think that Haskellers are all geniuses, so when a Haskeller says “I’m not very smart”, it’s interpreted as insincere. If a JavaScript user says “I’m not smart enough to use anything else”, you’d probably not try to call their bluff.

                                                                                                1. 4

                                                                                                  That’s exactly my point. That assumption should be addressed explicitly, not emotions downstream from that assumption.

                                                                                                  1. 2

                                                                                                    The common perception is more or less completely backwards. The person who can write good software in a language that is essentially out to murder them is likely more naturally gifted than the one who needs the language to assist them. Sure some people use languages with a lot of compile time checks because they are hoping to eek out every last bit of effectiveness, but most of us are trying to make the thing work when it runs. In javascript running gives absolutely no guarantees of workingness, that makes things harder, and you have to be better to compensate. A person from my meet up group said it best “F# feels like bowling with bumpers”, and Haskell is no different. If anything Haskell has more bumpers than F#.

                                                                                                    1. 2

                                                                                                      To clarify: I already totally agree with you.

                                                                                                      I’m just also trying to empathise with the people who have this weird negative and emotional reaction to Haskell.

                                                                                                      1. 2

                                                                                                        oh yeah I wasn’t particularly fighting what you were saying, just saying there’s real javascript wizards out there.

                                                                                              2. 3

                                                                                                Yes this is part of why I champion F# so much in the .net space. I don’t have to consider so many things at once and it makes managing my ADHD wrt programming much easier. Less burden on my working memory, and much easier to focus.

                                                                                                1. 2

                                                                                                  Yes! When I write Haskell I only have to consider function parameters. I have been diagnosed with ADHD, and I really do have less temporary storage compared to most of my coworkers. That reduction in state space means I can write code with less effort.

                                                                                                2. 3

                                                                                                  Yes, that’s the main take-away I got from the post, though I don’t think I fully articulated that.

                                                                                                  In my experience, using Haskell forces you to think about your design a lot more, and the language gives you tools to express and validate your design. If you’re not that confident in your design, like if you’re writing something outside of your area or expertise, that would be quite valuable. Especially if you’re going to tweak core elements of your design frequently.

                                                                                                  Writing infrastructure glue code is harder than it sounds. It’s difficult to handle all the edge cases, both for correctness and performance. Yet the team seems to have done that with little effort. This further leads me to believe they’re mostly infrastructure people, using Haskell because it’s well suited to the problem they personally find most difficult.

                                                                                                  But I stand by my sarcastic comment about the post’s opening paragraph. Common discourse about Haskell is full of humble brags like that. The “not smart enough for other languages” thing feels similarly smug to me.

                                                                                                  1. 9

                                                                                                    But I stand by my sarcastic comment about the post’s opening paragraph. Common discourse about Haskell is full of humble brags like that. The “not smart enough for other languages” thing feels similarly smug to me.

                                                                                                    Damned if we do, damned if we don’t.

                                                                                                    I feel there’s not really any approach Haskellers can take when describing the language that won’t be met with the kind of ridicule you find on r/programmingcirclejerk.

                                                                                                    We could lie and say it’s just another language, and the differences are no big deal. In that case, there’s no point learning it because we already know JS/Ruby/whatever.

                                                                                                    We can say there are truly great ideas in there, and that this makes a significant reduction to the cost of software development over time, to which we are called academics, elitists, and liars.

                                                                                                    We can say “yeah, whatever. I like it, and it’s easier for me to do this than most other languages”, and then we get called “smug”.

                                                                                                    1. 1

                                                                                                      They could have left out the opening paragraph, which added nothing to the post at all.

                                                                                                      We can say “yeah, whatever. I like it, and it’s easier for me to do this than most other languages”,

                                                                                                      That phrasing is fine with me, I don’t find it smug at all. Is the difference between that and “I’m not smart enough for other programming languages” not clear?

                                                                                                      1. 4

                                                                                                        That phrasing is fine with me, I don’t find it smug at all.

                                                                                                        Do you not hear how arrogant you sound? Like other programmers should care about what phrasing is fine with you?

                                                                                                        Is the difference between that and “I’m not smart enough for other programming languages” not clear?

                                                                                                        Not really, no. Haskellers constantly receive pithy dismissals, so you should expect to receive pithy responses in return.

                                                                                                        1. -1

                                                                                                          Like other programmers should care about what phrasing is fine with you?

                                                                                                          Sorry, when you replied to my comment I assumed you were talking to me. My mistake, I will let you soliloquize about how you’re so tragically misunderstood on your own.

                                                                                                          I hope we’re in agreement on this. After all, if you provide me nothing but pithy dismissals, you should expect to receive pithy responses in return, correct?

                                                                                                          1. 3

                                                                                                            I want to break the cycle! Less pith more content!

                                                                                                            Haskell is really cool and worth learning.

                                                                                                  2. 1

                                                                                                    Would you think that Scala is in the same space as Haskell, reliability-wise? I’m seeing rather poor performance & reliability (on many levels) when looking at existing Scala projects, whereas comparable python projects are doing fine.

                                                                                                    1. 2

                                                                                                      I worked on a Scala project at my last job and it was hot garbage, mostly due to bad tooling. I feel at least 30% of my development was wasted untangling dependency hell and swearing at sbt.

                                                                                                      1. 1

                                                                                                        I haven’t even looked at Scala in the last four years, so I honestly couldn’t tell you.

                                                                                                    2. 16

                                                                                                      Pretty standard “why Haskell?” post.

                                                                                                      I didn’t think so. The section on control flow, especially in the context of an interpreter, is one of the things I like most about writing Haskell. I don’t see it mentioned so much in “why Haskell?” posts. In fact, they explicitly avoid a discussion about the usual suspects: purely functional, non-strict semantics, and strong static typing.

                                                                                                      We get it, Haskell programmers are smarter than everyone else.

                                                                                                      I interpreted the sentence you are referring to differently. In my experience, Haskell programmers tend to avoid the larger community of programmers because talking about things they care about elicits angry and dismissive reactions like yours. The reference to the density of the opening sentence is just, in my interpretation, an admission that the sentence doesn’t mean much to someone who isn’t already familiar with those terms. I have found Haskell programmers to be, in general, humble and curious people who are quick to admit what they don’t know and eager to help others understand.

                                                                                                      They hand wave away writing infrastructure glue as trivial, but foresee themselves drowning in tech debt implementing the language interpretation in C++, Java, Swift, etc. That tells me they’re confident in writing infrastructure glue, but less confident writing PL code.

                                                                                                      This sounds like the No True Scotsman fallacy. The real PL hacker doesn’t need the power of Haskell? So if you’re using Haskell, you’re not a real PL hacker? What I read was a list of trade-offs they made. Part of that trade-off was writing more code you might find in a library in other languages. We don’t even know their level of confidence for writing that code, as you suggest. We just know what they valued most.

                                                                                                      These reactions to Haskell always make me sad. There seems to be such a disconnect between the perception of Haskell programmers and the reality of Haskell programmers. As @jgt said, Haskell programmers tend to be people who choose Haskell because they doubt they are sufficiently intelligent to program well in a less powerful language. It seems more about humility than ego.

                                                                                                      1. 14

                                                                                                        We get it, Haskell programmers are smarter than everyone else.

                                                                                                        While this line is particularly shitty, your entire comment is dripping with condescension and dismissiveness. It’s not up to the standards of the lobste.rs community as far as I’m concerned. I’ve marked your comment as a troll but I also want to be explicit:

                                                                                                        If anyone does actually start learning Haskell exclusively to feel smarter than other people, unless they are already geniuses they’ll probably come to appreciate how humbling an experience it is. And I can tell you from experience there are plenty of people who act as though they are smarter than everyone else outside of the Haskell community (generally a higher percentage in most other language communities I’ve participated in, actually). In contrast, the feeling I’ve gotten most often from experienced Haskell programmers is one of thoughtfulness, enthusiasm for learning, and a desire to share their knowledge and help others learn as well.

                                                                                                        But the reality is, if you’re misreading this piece so egregiously that your takeaway is that anyone using Haskell is a selfish egoist only intent on making other people feel small or satisfying their own desires at the expense of all else, then I’m going to say that yes, most Haskell programmers are probably smarter than you at least, just not for the reasons you are imagining.

                                                                                                        I may be totally off base, but that’s the vibe I got from reading your comment.

                                                                                                        1. 2

                                                                                                          your takeaway is that anyone using Haskell is a selfish egoist only intent on making other people feel small or satisfying their own desires at the expense of all else

                                                                                                          The opening paragraph of the post is fluff, it serves no purpose towards the topic of the article. But it does name drop a bunch of concepts, and then note that the reader may not have heard of them.

                                                                                                          Just because I commented on the self-congratulating opening of this post, you’ve extrapolated that I’m kind of crazed anti-Haskell fanatic. I’m not, I just rolled my eyes at that opening. If you’re looking for crazed fanatics, you should probably reread your own comment.

                                                                                                          So yeah, you’re so far off base it’s absurd.

                                                                                                          1. 4

                                                                                                            I’d just like to note that I got the same impression as @ddellacosta, maybe to a somewhat milder degree. That quoted line in particular is hard to not read as coming from a scratched ego.

                                                                                                            That said, as most things it’s not going to be one-sided, and the whole “no actually we’re too dumb to use other programming languages” does not come across as particularly sincere or convincing either.

                                                                                                            1. 1

                                                                                                              If you’re used to a statically typed language like C# and then you try to use javascript one day after years of C# you will definitely feel dumb. Maybe it’s just different and I’m not used to it, but it’s entirely reasonable to think that it is indeed actually harder. If you add more compiler checks on you can see how other languages might start also appearing similarly difficult.

                                                                                                            2. 1

                                                                                                              The opening paragraph of the post is fluff, it serves no purpose towards the topic of the article. But it does name drop a bunch of concepts, and then note that the reader may not have heard of them.

                                                                                                              The quote you chose was from the section “Why Haskell?” not the opening paragraph. Regardless, it is entirely reasonable of the authors to mention major features of Haskell that helped influence their decision, and it’s also entirely reasonable to suggest that interested readers unfamiliar with the language look elsewhere for topics already covered extensively by others. Along these lines, I also suggest taking a moment to consider the title of the piece, as well as the very first line of your original comment.

                                                                                                              Just because I commented on the self-congratulating opening of this post, you’ve extrapolated that I’m kind of crazed anti-Haskell fanatic.

                                                                                                              I was explicit in that I was talking about your entire comment, the line I singled out was just particularly shitty. More to the point, while I never stated that you are an anti-Haskell fanatic, it’s clear to me that you are not approaching the piece with an open mind, and it’s also clear you have a chip on your shoulder. I can’t speak to what or why that is.

                                                                                                              I’m not, I just rolled my eyes at that opening. If you’re looking for crazed fanatics, you should probably reread your own comment.

                                                                                                              I have. Since when does harshly criticizing a biased, poorly thought-out, and poorly written comment make me a fanatic?

                                                                                                              So yeah, you’re so far off base it’s absurd.

                                                                                                              I’m really not, but I am done discussing this with you.

                                                                                                              1. -4

                                                                                                                I’m really not [off base], but I am done discussing this with you.

                                                                                                                If you believe you know my own thoughts and feelings better than I do myself, you were done before you started.

                                                                                                                1. 5

                                                                                                                  I mean you did come to a post about haskell to give a broad condemnation of haskell programmers. If you aren’t a crazed anti-haskell fanatic then you sure are rude.

                                                                                                                  1. 1

                                                                                                                    I wouldn’t call criticizing a comment I thought was annoyingly self-congratulating a “broad condemnation of Haskell programmers.”

                                                                                                                    1. 6

                                                                                                                      Whether or not you intended it “We get it, Haskell programmers are smarter than everyone else.” is going to be interpreted as “I think Haskell programmers are very conceited and snobby.”. I think it’s an entirely fair and reasonable interpretation of your statement, and while you’ve stated that it was in response to their article you haven’t clarified that you don’t view haskell programmers as conceited and snobby. A clear statement that you didn’t intend to condemn all haskell programmers probably would have went a long way. Next time when critiquing on a particular person in really any demographic it’s probably a good idea to not refer to the whole demographic unless of course you intend to condemn the whole demographic. That’s kinda what that does.

                                                                                                        1. 1

                                                                                                          We use Confluence on the job which is better than it has been or could be.

                                                                                                          I personally have been learning roff/troff, and then converting everything into whatever.

                                                                                                          Confluence likes HTML (sometimes)? roff/troff to HTML

                                                                                                          Business likes PDF? roff/troff > ps > PDF

                                                                                                          Confluence sometimes hates HTML? roff/troff > ASCII/any format text > text

                                                                                                          GitHub likes a smattering of formats? roff/troff > smattering of formats

                                                                                                          1. 1

                                                                                                            Are you enjoying learning roff, and would you recommend it to others? Also, what inspired you to learn it?

                                                                                                            (I have a casual interest in old software.)

                                                                                                            1. 2

                                                                                                              I am enjoying learning roff. Yes I would recommend it to others.

                                                                                                              I was inspired by reading man pages and wondering how the heck something so pervasive, yet so standardized (ish… but I won’t spoil it for you) comes to be.

                                                                                                          1. 51

                                                                                                            We use Confluence, like we did at my last job.

                                                                                                            I fucking hate Confluence.

                                                                                                            1. 7

                                                                                                              Same. It’s awful. Search is a train wreck, and it doesn’t even use wiki-markup.

                                                                                                              We also use something like Doxygen, except it errs out instead of generating the docs.

                                                                                                              1. 6

                                                                                                                I’ll be the counterpoint here… Confluence sucks, but I think it sucks less than the other solutions I’ve seen. At least for certain problems, and especially when you need a resource for non-developers.

                                                                                                                A sibling comment says “Search is a train wreck”. To which I say: try searching google docs. Confluence search will at least show you matches within a doc when you search, so you have a better chance of figuring out which doc is actually the one you want.

                                                                                                                Confluence has the ability to embed various kinds of content in the page, which is quite nice. Google Drawings seems uniquely designed to make ugly drawings. In Confluence, I can use PlantUML or Draw.io.

                                                                                                                Their new editor supports typing markdown keystrokes to do formatting. The rollout has been kind of bad, but I think the direction of the new editor is good.

                                                                                                                “Spaces” can be confusing at first, but I think it will help us scale up to the organization sanely.

                                                                                                                So if the problem you’re solving is “I want to document the API of this project”, Confluence is a terrible choice. If your problem is “I want a place in which all kinds of people in the organization can find docs, discussions, and decisions around various things we’re doing”, Confluence works better than the other choices I’ve seen so far.

                                                                                                                1. 2

                                                                                                                  The sad thing with Confluence is they used to (about 5 years ago) have a method of inserting wiki markup so that wiki pages could be generated and pasted in, or if you just didn’t want to use the (frankly awful) WYSIWYG editor you didn’t have to. But they ripped that out.

                                                                                                                  Atlassian actually paid us a site visit to gauge opinions from everyone in the company. Pretty much everyone in the company asked for wiki markup to come back, to which they responded “huh”.

                                                                                                                  The API for Confluence is also pretty bad. We have some tools for generating document trees, e.g. when creating documentation for a new service we run a script which creates a tree of pages from templates, but little things like not being able to turn off “notify watchers” on an edit via the API means you can hammer people’s inboxes (which in turn makes Gmail mad).

                                                                                                                  I agree that it sucks, but sucks less than other solutions. Which in itself is pretty sad.

                                                                                                                2. 5

                                                                                                                  We used to use confluence a bit, but we sort of stopped using it because, well, we also don’t love confluence.

                                                                                                                  1. 8

                                                                                                                    Confluence is awful, but having a constellation of markdown files and Google docs is even worse. One source of truth.

                                                                                                                    The value we got from Confluence is that it gave a place where we could keep dev stuff next to business stuff, so it was easy for people to reference things more easily and have less silo-ing.

                                                                                                                    My only real complaint is that integrating with Confluence via a bot is a pain in the neck–we did this to have a wiki automatically updated with product information from deploys and builds, and that was Not Fun.

                                                                                                                    1. 3

                                                                                                                      The value we got from Confluence is that it gave a place where we could keep dev stuff next to business stuff, so it was easy for people to reference things more easily and have less silo-ing.

                                                                                                                      Something key here is that business folks generally have little interest in editing Markdown files and using Git. Confluence and other such systems may be monstrously annoying (and they are), but they’re better than alternatives.

                                                                                                                      Also, it works in the other direction. Devs want constellations of Markdown, but biz likes constellations of Word documents with comments and tracking. Trust me, Confluence is a better choice.

                                                                                                                      1. 1

                                                                                                                        We dragged them halfway with Confluence, then? We just need to Zeno them to git and markdown (eventually) ;-).

                                                                                                                        1. 1

                                                                                                                          Of course, that goes both ways—I find Con(ef)fluence’s UI so utterly intolerable that I will interact with it the absolute minimum required to not get fired, which in practice means literally never. So now it’s a wiki just for the business side, which is probably better than the “NAS full of outdated Word documents” approach it probably replaced, but it still not very useful.

                                                                                                                          Literally any other wiki software I’ve ever seen would be preferable.

                                                                                                                          But I’m not sure I agree with you that having business and tech share a wiki is a good plan. Business folks love putting paperwork (e.g. “this deployment of this service was signed off on by these people”) into the wiki, which you must never ever ever ever allow, or it will immediately dilute the useful content to homeopathic proportions and make the whole thing useless. So now you either need to be draconian about allowing business folks to put stuff in, in which case they won’t use it, or it turns into a paperwork repository, in which case nobody will use it.

                                                                                                                        2. 1

                                                                                                                          Confluence is awful, but having a constellation of markdown files…

                                                                                                                          That’s a bit of a false dichotomy. Most wikis can provide search, history, notifications…

                                                                                                                        3. 4

                                                                                                                          We use confluence too. I really wish they never made the change to the “smart” editor that prevents users from editing plain markdown (or similar).

                                                                                                                          Read some of the historical tickets around that change if you’re in the mood to shed a tear.

                                                                                                                          In the end though, the key thing is to have one central jumping off place to get to your documentation and confluence works ok for that.

                                                                                                                          1. 3

                                                                                                                            Hear, hear. It’s a nightmare.

                                                                                                                            1. 1

                                                                                                                              I like Confluence. It has a WYSIWYG editor that actually works. Plenty of plugins for lots of features and integrations. Recently it even gained real time collaboration.

                                                                                                                              1. 1

                                                                                                                                I can’t add anything new here - we too use Confluence and almost everyone hates it, but as I and dangoor have mentioned in other comments, there might not be anything better.

                                                                                                                                One thing we did a while ago was move alert references out of Confluence to a git repo which uses mkdocs. This way if Confluence is down or there’s some network issue meaning we can’t get to it, on-call engineers can still have a local copy of all the alert references.

                                                                                                                              1. 4
                                                                                                                                1. 8

                                                                                                                                  It is worth noting that functions whose return values are in IO are also pure. If I call putStrLn "hello", it always returns the same result: an IO action that will print “hello” on stdout, when executed by the runtime system.

                                                                                                                                  It is useful to have this thought, because when you start composing IO actions (e.g., with functions that take an action as input, or through the bind operator (>>=)), you don’t then have as much of a mental shift.

                                                                                                                                  1. 2

                                                                                                                                    Yeah, the wording in the article is a bit misleading. IO doesn’t ‘mark a function as impure’. These are simply values just like any other: you can bind them to a variable, compose them into new IOs, map over and sort them, all without ever ‘executing’ them. Only main : IO () gets executed (and, consequently, the values it’s composed of).

                                                                                                                                    Also, I get what they’re saying with “Impure code is harder to reason about”, but I would still somewhat invert that. I would say “it’s easier to reason about interactive programs with pure code”, and by that I mean it’s possible to reason about them, unlike in languages where you arguably can’t really know because of combinatorial explosion. The fact that >>= is an explicit operation with a precise type is testament to this.

                                                                                                                                    But I understand that this is pushing it, it’s still harder to actually write code, especially if you’re used to being able to just plug in all sorts of effectful computations wherever you want without a second thought.

                                                                                                                                    1. 1

                                                                                                                                      sort them

                                                                                                                                      Well that one is impossible, IO a is completely opaque.

                                                                                                                                      1. 3

                                                                                                                                        Yeah you’re right. You could however sort pairs of Ord a => (a, IO b), which also captures my essential point about IO still being pure.

                                                                                                                                  1. 8

                                                                                                                                    Also note that guy develops SumatraPDF too, which is probablyy most safe (I mean, as safe as it can gets) and lightweight PDF reader for Windows, greatly overperforming hogs like Acrobat or Foxit.

                                                                                                                                    1. 1

                                                                                                                                      God, I remember when foxit was the “lean alternative” to acrobat. The bloatware ratchet turns again.

                                                                                                                                    1. 18

                                                                                                                                      What kind of comments/remarks have you seen with an “abrasive tone” that you would flag (wouldn’t link to them, just copy/paste the relevant parts).

                                                                                                                                      In general, I find that Lobsters is doing pretty well – better than the vast majority of communities I’ve seen – but there are many discussions I don’t read.


                                                                                                                                      A personal note on “abrasive” communicating: as a non-native speaker from a country where the culture is very direct (Netherlands), it took me quite a long time to communicate well in English in the absence of body language (i.e. over text, like here).

                                                                                                                                      It’s one thing to know a language’s vocabulary, grammar, and idioms. It’s another thing to use them as a native speaker expects. I worked remote for an Irish company for three years, and I learned a lot about communicating in English during that time. There have been quite a few cases where I unintentionally was more abrasive than I wanted to be. The feedback from coworkers about this was an invaluable learning experience, and if I re-read some stuff I wrote four years ago I often spot things I phrased far more abrasive than I intended.

                                                                                                                                      The sample size here is just one (i.e. just me), perhaps other people are just better at language/English than me. I suspect part of the problem was that my English was in an “uncanny valley” of being very literate/fluent, but also not quite good enough to fully grok the effect of everything I typed (sometimes this was just a matter of punctuation!) This is different from some of my other non-native coworkers, who were clearly non-native speakers. If they say something awkward/abrasive, then it’s clearly just because they’re not good at English. I was usually not given the benefit of the doubt here.

                                                                                                                                      At any rare, my point here is, “abrasive tone” doesn’t mean “the author intended it like that”, or “the author it is a jerk”. Sometimes it clearly is (e.g. if you call someone an asshole there is little doubt), but often times it’s more nuanced.

                                                                                                                                      Hence my request for some examples.

                                                                                                                                      1. 8

                                                                                                                                        I’m probably guilty of knowingly making abrasive comments that motivate this proposal:


                                                                                                                                        The thing about alcohol and money kind of makes sense, but if you actually think the human dependency on food and water is analogous to meth addiction, then you are a moron.


                                                                                                                                        You completely and utterly missed the point.

                                                                                                                                        Mastodon, Synapse, and GNU Social all implement a mixture of blacklists, CAPTCHAs, and heuristics to lock out spambots and shitposters. The more popular they get, the more complex their anti-spam measures will have to get. Even though they’re not identical to internet mail (obviously), they still have the same problem with spambots.


                                                                                                                                        Uh, what?

                                                                                                                                        […]

                                                                                                                                        I have no idea what the OP is doing, but it’s weird.


                                                                                                                                        Most of them are returning like for like (I’m pretty sure the one comparing meth to food, in particular, was not made in good faith) but I probably should have just not responded at all. The last one, I probably should’ve left out the first paragraph, since it seems unnecessary.

                                                                                                                                        1. 5

                                                                                                                                          Most of them are returning like for like (I’m pretty sure the one comparing meth to food, in particular, was not made in good faith) but I probably should have just not responded at all.

                                                                                                                                          Rudeness is a systemic factor like anything else. If people are being rude because one person is constantly trolling them, then sure, we should call out the rude people… but we should also do something about the troll.

                                                                                                                                          1. 2

                                                                                                                                            How would you feel about:

                                                                                                                                            1. People downvoting the comment(s) with “Unkind”?
                                                                                                                                            2. People replying with comments like “Please change your tone, no need for that language”?

                                                                                                                                            Would you be annoyed/offended by one or the other (or neither/both)? And what would, if anything, help you change your tone. This is assuming your comment is either in reply to a “nice” comment or that the parent comment got the same treatment (downvote or replies to change their tone).

                                                                                                                                            Ultimately, I think everyone here wishes to change the community for the better, and silencing or kicking members that contribute with insightful, if aggressive, comments should not be a goal.

                                                                                                                                            1. 2

                                                                                                                                              I would prefer a PM to either of them, since it allows me to edit the comment without cluttering up the main thread.

                                                                                                                                            2. 2

                                                                                                                                              If you’re interested in some feedback (I’m letting myself risk a guess that this might be your motivation behind posting this comment?): personally, I would agree — to me at least the first two do sound abrasive. The last one actually not so much; I mean, the “Uh, what?” seems to express surprise and lack of understanding, which I believe is more than OK (problems with understanding happen often in discussions, as it’s sometimes genuinely hard to convey thoughts precisely in any language). Although, an “I think I may not understand something” might be an even “gentler” variant. As to the very last sentence, I’d add “to me”, i.e.: “it’s weird to me”. This could make it less of an attempt at absolute, authoritative judgement, and more of a subjective opinion, which tends to be easier to receive. As to the 2nd comment, again, changing the “You completely and utterly…” prefix to a softer one, say, “I believe you may have…” could give the interlocutor some generous benefit of doubt. In the first one, I’d say not responding may be not that bad of an idea; especially per the Internet’s very own “Do not feed the troll” adage from the older days — or, at least, calmly explaining that you feel the interlocutor may have not spoken in good faith, gives them some chance to rethink their statement, and maybe take it back or rephrase. On the other hand, as far as my experience goes, namecalling (moron etc.) seems rather to purely aggravate people; I don’t think I ever seen anybody react in any good way to namecalling…..

                                                                                                                                              Hope this helps! And… really sorry if I misunderstood your motivation!…

                                                                                                                                              1. -1

                                                                                                                                                I’m pretty sure the one comparing meth to food, in particular, was not made in good faith

                                                                                                                                                I was though. You made an inherent assumption that survival is worth stealing for but pleasure is not. Your belief that is particular valuation is so True that it is inviolable and anybody who tries must be trolling.

                                                                                                                                              2. 2

                                                                                                                                                I work with someone who writes like you said you used to. I remind myself that the problem is with me, not him, and besides, his communications are very clear and valuable.

                                                                                                                                                1. 7

                                                                                                                                                  Tell him!

                                                                                                                                                  I had no idea until people told me, and the only reason people told me was because I asked, and the only reason I asked is because some people told me some people found it hard to get along with me (I had no idea!) Turns out the adjustment in phrasing was small, but it made all the difference in my relationship with some coworkers.

                                                                                                                                                  I was more than happy to make these adjustments, but … I can’t make them if I don’t know that I need to.

                                                                                                                                                  It’s kind of like complaining about someone’s music being too loud. I’ve complained maybe 5 or 6 times over the last ten years, and most of the time the response was “I’m so sorry, I had no idea!” Some people are assholes who just don’t care (happened twice), but most just don’t realize how their behaviour is affecting others, and they have no way of knowing unless you tell them.

                                                                                                                                                  1. 1

                                                                                                                                                    No, because he shouldn’t change. He communicates clearly and accurately, not aggressively, and there should be more people like him.

                                                                                                                                                    1. 4

                                                                                                                                                      English is a tool. If I were swinging an axe incorrectly, I’d want to be told, so I could be safer and more efficient with my efforts.

                                                                                                                                                      1. 2

                                                                                                                                                        Is that to help you or him? You might want a cultural change, more people “like him”. But do you think that is the best thing for him as an individual and his career?

                                                                                                                                                        Here is someone who was literally in the position that person is – and they are screaming “Tell him!”.

                                                                                                                                                1. 34

                                                                                                                                                  I’m very strongly in favour of objective, civil, polite discourse. I don’t think anything is gained by penalising people if their tone is a little abrasive.

                                                                                                                                                  To be blunt (in full acceptance of the irony here) I would much rather that people post abrasive content than risk them self-censoring for fear of appearing “unkind”. I’m afraid that lobste.rs would cease being a haven for constructive discussion, and become some sort of Stepford-esque echo chamber instead.

                                                                                                                                                  1. 46

                                                                                                                                                    You can disagree with something without being a jerk about it. I think that’s something we should all aspire to.

                                                                                                                                                    1. 11

                                                                                                                                                      I agree (and think that “being a jerk” is quite a different thing to “being abrasive”, but maybe that’s just my reading of the terms).

                                                                                                                                                      However, I’ll take “abrasive and correct” over “nice but wrong” any day of the week, and I fear that encouraging downvotes over tone will result in the loss of some of the former.

                                                                                                                                                      1. 7

                                                                                                                                                        I’ll take “abrasive and correct” over “nice but wrong” any day of the week, and I fear that encouraging downvotes over tone will result in the loss of some of the former.

                                                                                                                                                        Fortunately, these are not the only two options. An ideal solution would discourage the “abrasive and correct” in favor of the “non-abrasive and correct.” In such an environment, “nice and wrong” comments are welcome because they spark informative discussions.

                                                                                                                                                        1. 2

                                                                                                                                                          Which is why a downvote, as they’re currently implemented, isn’t a good solution. Some sort of separate flag might be, though. Provide an easy way for readers to nudge posters to edit their posts for tone.

                                                                                                                                                          1. 1

                                                                                                                                                            “Nice and wrong” comments that require other people to expend effort to correct them are not kind.

                                                                                                                                                            1. 6

                                                                                                                                                              The “incorrect” flag covers those, however.

                                                                                                                                                          2. 4

                                                                                                                                                            Perhaps the “unkind” vote should have zero affect on karma, but still deprioritize the comment? That way it’s less likely to generate feelings of defensive?

                                                                                                                                                            1. 4

                                                                                                                                                              Being unkind seems very karma-related to me

                                                                                                                                                              1. 4

                                                                                                                                                                It could just be some CSS that provides visual feedback from the downvote action to the voter. Like a big red mechanical button that isn’t wired up to anything, but feels satisfying to press.

                                                                                                                                                            2. 6

                                                                                                                                                              You certainly can. But anger and frustration, like other human emotions, have circumstances where they are objectively justified and reasonable. One would say that in software development, for example, we aren’t really facing the questions of life and death, and getting worked up about something like that is silly. I agree that a lot of anger in comment sections is, indeed, silly – but not all of it.

                                                                                                                                                              Let me bring an example. Recently I found out that one company, which is developing a technology which have been my main “specialisation” since 2012, have decided to move around different modules and in the process deleted documentation for one of it - so from new version on, instead of automatically generated API specification, with all classes and methods, I would have to refer to guides, organised by topic. This change is completely unnecessary, and will make my day-to-day work much harder. I spend 8 hours a day, 5 days a week, at my job, and something that they have done will make me a little bit more miserable, every day. And they don’t even have any reason for it. And a forum post that I’ve written, with detailed explanation of the issue, and then tweeted at them, have gone without a single reply.

                                                                                                                                                              Now, if I would encounter the person who was responsible for this decision here in the comments in a relevant thread, I think that venting my frustration, while staying civilised, would be an appropriate response. Don’t you?

                                                                                                                                                              1. 6

                                                                                                                                                                And yet, being direct is often seen as being unkind. I’m strongly against ranking people on kindness – in addition to being very vague, the norms are highly cultural.

                                                                                                                                                                I sometimes wonder if we’d be better of getting rid of votes entirely, and rely on people using their words.

                                                                                                                                                                1. 6

                                                                                                                                                                  highly cultural

                                                                                                                                                                  But surely we’re seeking to build a lobste.rs culture?

                                                                                                                                                                2. 2

                                                                                                                                                                  100% agreed. In my experience you’re also more likely to effectively get your argument across. However, it is a skill that requires effort to learn and apply – at least in my case.

                                                                                                                                                                  1. 1

                                                                                                                                                                    but you can’t guarantee that people will interpret your politeness as such

                                                                                                                                                                  2. 38

                                                                                                                                                                    I would much rather that people post abrasive content than risk them self-censoring for fear of appearing “unkind”. I’m afraid that lobste.rs would cease being a haven for constructive discussion

                                                                                                                                                                    The opposite is also true: some people stop posting after too many negative interactions, which also reduces participation.

                                                                                                                                                                    You call it “censorship”. Frankly, I’m starting to strongly dislike this term. It’s carelessly thrown around far too often. Every community has social norms, and online communities are no exception. If I’m an asshole to my friends then at some point they’ll start shunning me. If I join a football club (or scout group, or choir, or whatever) and act like an asshole then sooner or later I’ll be asked not to come next week. Would you call this “censorship”? I wouldn’t.

                                                                                                                                                                    I stopped posting on /r/programming at reddit after being called a “moron”, “idiot”, “retard”, accused of having an IQ lower than 65, was told that I “fucking suck at making software (and I guess generally anything)”, was told that my opinion was “hates speech” in two separate recent incidents (both over a technical disagreement, wtf?!), and just general unconstructive/aggressive/belittling/etc. word choice.

                                                                                                                                                                    It’s not that I’m that sensitive, but if you spend a lot of time writing a weblog post, or make some software, and you get told any of the above (which are all real quotes) then that’s … not great. It’s not that I get angry or “offended”, but it’s also not fun and if it happens a few times I’ll stop coming back (as happened on /r/programming). I think most people participate in these communities just for the fun of it. Sure, you also learn new stuff, but I think fun is an important – if not the most important – part for many.

                                                                                                                                                                    Constructive discussion can only happen if everyone feels like they can participate without the fear of being mistreated (belittling, aggressive replies, insults, etc.) If there is such a fear, then I will guarantee you that some people simply won’t post at all.

                                                                                                                                                                    I’m not sure (yet) if a flag is a good idea here for other reasons (I’ll make another top-level comment about that), but I do (strongly) disagree with your sentiment.

                                                                                                                                                                    1. 18

                                                                                                                                                                      I definitely use this site less over time because of the loud frequent posters who often carelessly put down people with insensitive wording. When I was junior I was able to justify spending the emotional energy listening to technically correct jerks, but nowadays it’s pretty rare that I get anything other than anger out of their childish communication. I only come on lobste.rs now when I’ve got pretty high emotional buffers, because otherwise it’s likely to just make me feel worse.

                                                                                                                                                                      1. 7

                                                                                                                                                                        I’ve only been here for a few months, so I can’t comment on Lobste.rs specifically, but I can comment on two general observations:

                                                                                                                                                                        • Often >90% of the problems come from ~1% of the people.
                                                                                                                                                                        • As a community becomes larger, it becomes harder to manage because mods don’t see most of what’s going on (making it harder to identify patterns).

                                                                                                                                                                        In many ways it’s the same as traffic; if you drive or cycle home you may encounter 100 drivers, so if just 1% is reckless driver then you’ll meet one most days. Also, like traffic, it’s hard to completely remove these people unless they commit gross offences. You can break traffic laws and be reckless for pretty much your entire life, and suffer very few consequences.

                                                                                                                                                                        Most of us act like an asshole sometimes; I know I do; I have pretty strong feelings about certain political topics, and sometimes I just have a bad day. But I’m not consistently an asshole. I think they key here is not to look at individual comments too much, but rather at long-standing patterns. There are just a few mods here, and they probably don’t see most of what’s going on. So the ability to see things like “hey, this user is responsible for 28% of all unkind flags” is the critical bit.

                                                                                                                                                                        I don’t know if this needs to be tied to downvoting. Could just be a separate flag. I don’t think it matters too much, as long as there’s an admin panel to see an overview.

                                                                                                                                                                      2. 6

                                                                                                                                                                        This is exactly what happened to Slashdot too. The loudest, most aggressive users gradually took over the comment section, and the more rational voices left. That site is now a quagmire of hate speech. I think it is a good idea to get ahead of it on this site, because it could happen here too. I like the discussion environment of this site, and I don’t want to lose yet another community.

                                                                                                                                                                        I think that the idea of shadowbanning from reddit could be combined with the stack overflow style of flagging bad behavior. If nobody can see abusive or trollish comments, then they don’t accumulate comments and effectively don’t exist (i.e., not rewarding bad behavior). Those users will either correct their behavior or stop posting altogether.

                                                                                                                                                                        1. 3

                                                                                                                                                                          I’m sorry you experienced that behaviour. I have myself, largely for holding unpopular political opinions[1] . It’s even more fun when people attack those positions in a social situation, before realising that someone in the group actually holds them :)

                                                                                                                                                                          The behaviour you describe crosses way beyond “abrasive” to downright abusive. I’d be okay with a flat out ban in the case of someone who called another poster a retard, for example.

                                                                                                                                                                          By “abrasive” I mean posts that might be terse, strongly critical, or dismissive. That is, posts that have issues with tone. Things that could be charitably interpreted as well intentioned.

                                                                                                                                                                          [1] I guess you’d call them Objectivist, for want of a better term. Strongly socially and economically liberal. The former is common in Australian tech circles, the latter rare. People here usually assume party-political alignment, so if you’re say in favour of open immigration, they assume you’re also in favour of progressive taxation.

                                                                                                                                                                          1. 1

                                                                                                                                                                            The reddit example is of course much more extreme than anything I’ve seen here; but it does clearly illustrate the point that people can stop posting (“self-censor”) due to lack of moderation, too.

                                                                                                                                                                            By “abrasive” I mean posts that might be terse, strongly critical, or dismissive. That is, posts that have issues with tone. Things that could be charitably interpreted as well intentioned.

                                                                                                                                                                            A good rule-of-thumb is whether a comment makes you go sigh, “eh”, “pff”, or something similar, either by actually saying it or saying it “in your head”. You can be critical of what someone said and not evoke such a response. My previous comment was critical of your post, but I don’t think if evoked a “pff” response (or at least, I hope it didn’t!) but it’s not hard to imagine that it could with some stuff rephrased.

                                                                                                                                                                            I know this is murky and unclear, but that’s the way language works, especially in a global community with different cultures, etc.

                                                                                                                                                                            I think the key thing here is that “abrasiveness” accumulates. If you encounter an abrasive comment on occasion then that’s okay. Most people are abrasive some of the time (I know I am); that’s just the way things work. The problem is when people are abrasive most of the time, and you encounter abrasive everywhere you look.

                                                                                                                                                                            I don’t think singular abrasive comments are a problem, or that people should be punished for it. But if they’re constantly making them then there is a problem that should be addressed. Also see my other reply in this thread: https://lobste.rs/s/xnjo8g/add_downvote_reason_unkind#c_kqtuqr

                                                                                                                                                                            Analogy: Lobste.rs keeps track of “self promoters”; people who frequently post links to their own websites. Is this preventing people from submitting links to their own site? Not really; but it does help keep track of people who spam links too frequently. I think a potential “unkind flag” should work the same way.

                                                                                                                                                                          2. 2

                                                                                                                                                                            “Censorship” is certainly an overused weasel-word nowadays. Moderation is (generally) not censorship.

                                                                                                                                                                          3. 9

                                                                                                                                                                            Just to clarify, this kind of “bluntness” is of course perfectly acceptable. If you’d labeled my suggestion a “crap idea” on the other hand…

                                                                                                                                                                            1. 4

                                                                                                                                                                              And that’s the rub, isn’t it? I have no problem with having my ideas called crap, but don’t like calling people “crap”. Others might be more sensitive than you, and then you have a ratchet that moves in only one direction, as people say less, challenge each other less, and so on.

                                                                                                                                                                            2. 4

                                                                                                                                                                              Just to piggy-back on this a bit. I wholeheartedly applaud the heart behind this suggestion, I prefer that the tone be kept civil and polite here. However, kind/unkind might be a bit too subjective and might unwittingly stifle conversation. My concern is that for one person, a simple disagreement with an idea could be deemed “unkind” regardless of tone. My skin might be a little thinner, so my unkind trigger finger might be more prone to fire. I think troll covers abrasive behavior and perhaps some kind of flag could be used to alert moderators when issues arise and tone sinks too low in a conversation.

                                                                                                                                                                            1. 5

                                                                                                                                                                              I’ve been thinking about these issues in depth too. Like the problem you mention of passing a float between programs, what if we could pass more than text - but arbitrary structured, typed data. This is not science-fiction, it’s really simple to implement. We know things about programming that weren’t really known or understood back in the early UNIX times. The difficulty is that we can’t just implement it in the shell, it also needs to be common to the userspace binaries we work with all the time (like all the GNU coreutils). At the very least, why couldn’t we at least experiment with a UNIX shells and applications that interchange using tab separated values?

                                                                                                                                                                              On hypertext, there’s been so much excellent theory worked out - but other than the WWW - very little of it rolled out it’s worth mentioning purplenumbers on the topic of being able to link to specific parts of a document https://communitywiki.org/wiki/PurpleNumbers - we can also ask about annotations and snapshotting segments of documents to be included in others.

                                                                                                                                                                              1. 10

                                                                                                                                                                                Had me at “arbitrary structured, typed data.” - immediately thought of PowerShell, which - while just one tool of many - meets your requirement of “be(ing) common to the user space binaries we work with…”

                                                                                                                                                                                1. 6

                                                                                                                                                                                  The structured-ness of PowerShell is nice in theory, but, like every other Microsoft product, the rest of PS is totally botched in implementation. Between long, awkward-to-type command names, lack of laziness for piped data, generally poor COM support in software, and pervasive slowness, it’s easier and faster to write a shell script with grep, awk, and sed.

                                                                                                                                                                                  The unix shell is arcane, but I’ve yet to find anything that’s as good for quickly getting to the information I need. SQL is probably the closest, but requires data to be structured from the start.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    PowerShell Core is even available for Linux, complete with installation instructions. I haven’t yet taken time to get my head around PowerShell, even on Windows, but maybe I should.

                                                                                                                                                                                    1. 4

                                                                                                                                                                                      It’s not obvious to me how to do this completely properly. OO is the wrong approach IMHO, as you don’t want to be passing behaviour downstream. Something like algebraic data types might be promising, but then you have to send a description of the data down the pipe before any data itself?

                                                                                                                                                                                      Erlang’s a bit on my mind today (RIP Joe), but maybe something like its pattern-matching system would work well here?

                                                                                                                                                                                      1. 3

                                                                                                                                                                                        As a paradigm, object-oriented may not be the best approach, especially when attempting to solve the problem mentioned in the link.

                                                                                                                                                                                        PowerShell and ‘OO’ also don’t have to go hand-in-hand.

                                                                                                                                                                                      2. 2

                                                                                                                                                                                        PowerShell is an interesting approach. Unfortunately it has one giant mistake that makes me hate using it — the choice of Verb-Noun naming rather than Noun-Verb means I have to use Google to figure out the command I need rather than just hitting tab. (Because I nearly always know the noun already — what I need is the verb.) Unless I’m missing something, which would be great…

                                                                                                                                                                                      3. 8

                                                                                                                                                                                        what if we could pass more than text - but arbitrary structured, typed data. This is not science-fiction, it’s really simple to implement. We know things about programming that weren’t really known or understood back in the early UNIX times.

                                                                                                                                                                                        Wasn’t that done back in UNIX times on Lisp machines? And then, given it’s dynamic, maybe a bit later on Smalltalk systems?

                                                                                                                                                                                        If not arbitrary, Flex Machine seems like it fit. That was late 1970’s to 1980’s. Fewer people knew about it, though. There was also people like Hansen doing OS’s in Pascal. A brief skim of Solo paper led me to this statement: “Pascal programs can call one another recursively and pass arbitrary parameters among themselves… Solo is the first major example of a hierarchical concurrent program implemented in terms of abstract data types (classes, monitors and processes) with compile-time control of most access rights.”

                                                                                                                                                                                        Clearly, there were already ideas there for people to build on for doing something other than text. They just couldn’t be or weren’t applied. Then, the UNIX authors and others continued building on their ideas with minimal adoption of alternatives. Eventually, Linux ecosystem started adopting pieces of many ideas kind of bolted into and on top of it the existing system. Although it’s a legacy system, a clean-slate project could certainly do things differently. We’re seeing that start to happen with virtual machines and unikernels that reuse hosts’ drivers.

                                                                                                                                                                                        1. 3

                                                                                                                                                                                          Shells using some kind of messagepack-style interface could be interesting

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            what if we could pass more than text - but arbitrary structured, typed data. This is not science-fiction, it’s really simple to implement

                                                                                                                                                                                            So, a BMessage then? :)

                                                                                                                                                                                          1. 2

                                                                                                                                                                                            Looking forward to upgrading this weekend. The previous release broke multi-display for me. Whenever I thunk my laptop down into its dock, the second display is recognized and configured but no video gets sent to it. I have to check and un-check “mirror display” in the display preferences in order to get it to work.

                                                                                                                                                                                            My other issue is that the system always forgets the keyboard repeat rate whenever I connect a USB keyboard.

                                                                                                                                                                                            1. 2

                                                                                                                                                                                              Display has been a total mess on the current version for me too. If I AFK long enough for the screen blanking to kick in, sometimes it won’t wake up unless I do a round of Ctrl+Alt+F1, Ctrl+Alt+F7, and similarly when waking from suspend.

                                                                                                                                                                                              The Desktop itself seems to crash intermittently too. I really hope the new version does better. These days I prefer NixOS but even on other Linuxen I’m more likely to keep a small system managed by the host OS and get most of my packages through Nix.

                                                                                                                                                                                            1. 8

                                                                                                                                                                                              Excellent points, all of them. I do not understand why anyone prefers infinite scroll over pagination or any other mechanism. It’s impossible for many disabled users to use at all, and for users without disabilities it still falls over in common use cases (like the back button).

                                                                                                                                                                                              1. 5

                                                                                                                                                                                                People do not consciously prefer it, but it probably rated higher in time-on-page metrics.