1. 2

    Conditional compilation looks super cool. I wonder how messy it gets as the number of supported targets increases. PureScript has had to have had the entire package-sets forked to support Purerl (Erlang). It seems they keep the JS FFI code to mirror its implementation in Erlang, but a lot of libraries might be easier to maintain with these conditionals.

    1. 4

      It’s already a bit messy in the standard library, but I’m hoping that most libraries won’t need to use conditional compilation at all. There’s no plans for other targets and there’s only to be one package repository so that’ll help.

      If it becomes an issue we’ll revisit this before v1.

    1. 17

      Pattern matching has been available in functional programming languages for decades now, it was introduced in the 70s. (Logic programming languages expose even more expressive forms, at higher runtime cost.) It obviously improves readability of code manipulating symbolic expressions/trees, and there is a lot of code like this. I find it surprising that in the 2020s there are still people wondering whether “the feature provides enough value to justify its complexity”.

      (The fact that Python did without for so long was rather a sign of closed-mindedness of its designer subgroup. The same applies, in my opinion, to languages (including Python, Go, etc.) that still don’t have proper support for disjoint union types / variants / sums / sealed case classes.)

      1. 45

        Pretty much every feature that has ever been added to every language ever is useful in some way. You can leave a comment like this on almost any feature that a language may not want to implement for one reason or the other.

        1. 14

          I think it makes more sense in statically typed languages, especially functional ones. That said, languages make different choices. For me, Python has always been about simplicity and readability, and as I’ve tried to show in the article, at least in Python, structural pattern matching is only useful in a relatively few cases. But it’s also a question of taste: I really value the simplicity of the Go language (and C before it), and don’t mind a little bit of verbosity if it makes things clearer and simpler. I did some Scala for a while, and I can see how people like the “power” of it, but the learning curve of its type system was very steep, and there were so many different ways to do things (not to mention the compiler was very slow, partly because of the very complex type system).

          1. 20

            For the record, pattern-matching was developed mostly in dynamically-typed languages before being adopted in statically-typed languages, and it works just as well in a dynamically-typed world. (In the ML-family world, sum types and pattern-matching were introduced by Hope, an experimental dynamically-typed language; in the logic world, they are basic constructs of Prolog, which is also dynamically-typed – although some more-typed dialects exist.)

            as I’ve tried to show in the article, at least in Python, structural pattern matching is only useful in a relatively few cases

            Out of the 4 cases you describe in the tutorial, I believe your description of two of them is overly advantageous to if..elif:

            • In the match event.get() case, the example you show is a variation of the original example (the longer of the three such examples in the tutorial), and the change you made makes it easier to write an equivalent if..elif version, because you integrated a case (from another version) that ignores all other Click() events. Without this case (as in the original tutorial example), rewriting with if..elif is harder, you need to duplicate the failure case.
            • In the eval_expr example, you consider the two versions as readable, but the pattern-version is much easier to maintain. Consider, for example, supporting operations with 4 or 5 parameters, or adding an extra parameter to an existing operator; it’s an easy change with the pattern-matching version, and requires boilerplate-y, non-local transformations with if..elif. These may be uncommon needs for standard mathematical operations, but they are very common when working with other domain-specific languages.
            1. 1

              the change you made makes it easier to write an equivalent if..elif version

              Sorry if it appeared that way – that was certainly not my intention. I’m not quite sure what you mean, though. The first/original event example in the tutorial handles all click events with no filtering using the same code path, so it’s even simpler to convert. I added the Button.LEFT filtering from a subsequent example to give it a bit more interest so it wasn’t quite so simple. I might be missing something, though.

              In the eval_expr example, you consider the two versions as readable, but the pattern-version is much easier to maintain. Consider, for example, supporting operations with 4 or 5 parameters, or adding an extra parameter to an existing operator;

              I think those examples are very hypothetical – as you indicate, binary and unary operators aren’t suddenly going to support 4 or 5 parameters. A new operation might, but that’s okay. The only line that’s slightly repetitive is the “attribute unpacking”: w, x, y, z = expr.w, expr.x, expr.y, expr.z.

              These may be uncommon needs for standard mathematical operations, but they are very common when working with other domain-specific languages.

              You’re right, and that’s part of my point. Python isn’t used for implementing compilers or interpreters all that often. That’s where I’m coming from when I ask, “does the feature provide enough value to justify the complexity?” If 90% of Python developers will only rarely use this complex feature, does it make sense to add it to the language?

              1. 3

                that was certainly not my intention.

                To be clear, I’m not suggesting that the change was intentional or sneaky, I’m just pointing out that the translation would be more subtle.

                The first/original event example does not ignore “all other Click events” (there is no Click() case), and therefore an accurate if..elif translation would have to do things differently if there is no position field or if it’s not a pair, namely it would have to fall back to the ValueError case.

                You’re right, and that’s part of my point. Python isn’t used for implementing compilers or interpreters all that often.

                You don’t need to implement a compiler for C or Java, or anything people recognize as a programming language (or HTML or CSS, etc.), to be dealing with a domain-specific languages. Many problem domains contain pieces of data that are effectively expressions in some DSL, and recognizing this can very helpful to write programs in those domains – if the language supports the right features to make this convenient. For example:

                • to start with the obvious, many programs start by interpreting some configuration file to influence their behavior; many programs have simple needs well-served by linear formats, but many programs (eg. cron jobs, etc.) require more elaborate configurations that are DSL-like. Even if the configuration is written in some standard format (INI, Yaml, etc.) – so parsing can be delegated to a library – the programmer will still write code to interpret or analyze the configuration data.
                • more gnerally, “structured data formats” are often DSL-shaped; ingesting structured data is something we do super-often in programs
                • programs that offer a “query” capability typically provide a small language to express those queries
                • events in an event loop typically form a small language
            2. 13

              I think it makes more sense in statically typed languages, especially functional ones.

              In addition to the earlier ones gasche mentioned (it’s important to remember this history), it’s used to pervasively in Erlang, and later Elixir. Clojure has core.match, Racket has match, as does Guile. It’s now in Ruby as well!

              1. 2

                Thanks! I didn’t know that. I have used pattern matching in statically typed language (mostly Scala), and had seen it in the likes of Haskell and OCaml, so I’d incorrectly assumed it was mainly a statically-typed language thing.

                1. 1

                  It is an important feature of OCaml.

                  1. 3

                    I am aware - was focusing on dynamically typed languages.

                2. 7

                  For me, it is the combination of algebraic data types + pattern matching + compile time exhaustiveness checking that is the real game changer. With just 1 out of 3, pattern matching in Python is much less compelling.

                  1. 1

                    I agree. I wonder if they plan to add exhaustiveness checking to mypy. The way the PEP is so no hold barred makes it seem like the goal was featurefulness and not an attempt to support exhaustiveness checking.

                    1. 1

                      I wonder if they plan to add exhaustiveness checking to mypy.

                      I don’t think that’s possible in the general case. If I understand the PEP correctly, __match_args__ may be a @property getter method, which could read the contents of a file, or perform a network request, etc.

                3. 11

                  I find it surprising that in the 2020s there are still people wondering whether “the feature provides enough value to justify its complexity”.

                  I find it surprising that people find this surprising.

                  Adding features like pattern matching isn’t trivial, and adding it too hastily can backfire in the long term; especially for an established language like Python. As such I would prefer a language take their time, rather than slapping things on because somebody on the internet said it was a good idea.

                  1. 3

                    That’s always been the Scheme philosophy:

                    Programming languages should be designed not by piling feature on top of feature, but by removing the weaknesses and restrictions that make additional features appear necessary.

                    And indeed, this pays off: in the Scheme world, there’s been a match package floating around for a long time, implemented simply as a macro. No changes to the core language needed.

                    1. 4

                      No changes to the core language needed.

                      I’m sure you recognize that this situation does not translate to other languages like in this case Python. Implementing it as a macro is just not feasible. And even in Scheme the usage of match macros is rather low. This can be because it is not that useful, but also might be because of the hurdle of adding dependencies is not worth the payoff. Once a feature is integrated in a language, its usage “costs” nothing, thus the value proposition when writing code can be quite different.

                      1. 5

                        This is rather unrelated to the overall discussion, but as a user of the match macros in Scheme, I must say that I find the lack of integration into the base forms slightly annoying. You cannot pattern-match on a let or lambda, you have to use match-let and match-lambda, define/match (the latter only in Racket I think), etc. This makes reaching for pattern-matching feel heavier, and it may be a partial cause to their comparatively lower usage. ML-family languages generalize all binding positions to accept patterns, which is very nice to decompose records for example (or other single-case data structures). I wish Scheme dialects would embrace this generalization, but they haven’t for now – at least not Racket or Clojure.

                        1.  

                          In the case of Clojure while it doesn’t have pattern matching built-in, it does have quite comprehensive destructuring forms (like nested matching in maps, with rather elaborate mechanisms) that works in all binding positions.

                          1.  

                            Nice! I suppose (from your post above) that pattern-matching is somehow “integrated” in the Clojure implementation, rather than just being part of the base macro layer that all users see.

                            1.  

                              I think the case is that Clojure core special forms support it (I suppose the implementation itself is here and called “binding-forms”, which is then used by let, fn and loop which user defined macros often end up expanding to). Thus it is somewhat under the base layer that people use.

                              But bear in mind this is destructuring, in a more general manner than what Python 2.x already supported, not pattern matching. It also tends to get messy with deep destructuring, but the same can be said of deep pattern matches through multiple layers of constructors.

                  2. 8

                    I agree about pattern matching and Python in general. It’s depressing how many features have died in python-ideas because it takes more than a few seconds for an established programmer to grok them. Function composition comes to mind.

                    But I think Python might be too complicated for pattern matching. The mechanism they’ve settled on is pretty gnarly. I wrote a thing for pattern matching regexps to see how it’d turn out (admittedly against an early version of the PEP; I haven’t checked it against the current state) and I think the results speak for themselves.

                    1. 6

                      But I think Python might be too complicated for pattern matching. The mechanism they’ve settled on is pretty gnarly.

                      I mostly agree. I generally like pattern matching and have been excited about this feature, but am still feeling out exactly when I’ll use it and how it lines up with my intuition.

                      The part that does feel very Pythonic is that destructuring/unpacking is already pretty pervasive in Python. Not only for basic assignments, but also integrated into control flow constructs. For example, it’s idiomatic to do something like:

                      for key, val in some_dictionary.items():
                          # ...
                      

                      Rather than:

                      for item in some_dictionary.items():
                          key, val = item
                          # ...
                      

                      Or something even worse, like explicit item[0] and item[1]. So the lack of a conditional-with-destructuring, the way we already have foreach-with-destructuring, did seem like a real gap to me, making you have to write the moral equivalent of code that looks more like the 2nd case than the 1st. That hole is now filled by pattern matching. But I agree there are pitfalls around how all these features interact.

                    2. 2
                      for i, (k, v) in enumerate(d.items(), 1): pass
                      

                      looks like pattern matching to me

                      1. 2

                        Go aims for simplicity of maintenance and deployment. It doesn’t “still don’t have those features”. The Go authors avoided them on purpose. If you want endless abstractions in Go, embedding Lisp is a possibilty: https://github.com/glycerine/zygomys

                        1. 5

                          Disjoint sums are a basic programming feature (it models data whose shape is “either this or that or that other thing”, which ubiquitous in the wild just like pairs/records/structs). It is not an “endless abstraction”, and it is perfectly compatible with maintenance and deployment. Go is a nice language in some respects, the runtime is excellent, the tooling is impressive, etc etc. But this is no rational excuse for the lack of some basic language features.

                          We are in the 2020s, there is no excuse for lacking support for sum types and/or pattern matching. Those features have been available for 30 years, their implementation is well-understood, they require no specific runtime support, and they are useful in basically all problem domains.

                          I’m not trying to bash a language and attract defensive reactions, but rather to discuss (with concrete examples) the fact that language designer’s mindsets can be influenced by some design cultures more than others, and as a result sometimes the design is held back by a lack of interest for things they are unfamiliar with. Not everyone is fortunate to be working with a deeply knowledgeable and curious language designer, such as Graydon Hoare; we need more such people in our language design teams. The default is for people to keep working on what they know; this sort of closed-ecosystem evolution can lead to beautiful ideas (some bits of Perl 6 for example are very nice!), but it can also hold back.

                          1. 3

                            But this is no rational excuse for the lack of some basic language features.

                            Yes there is. Everyone has a favorite feature, and if all of those are implemented, there would easily be feature bloat, long build times and projects with too many dependencies that depend on too many dependencies, like in C++.

                            In my opinion, the question is not if a language lacks a feature that someone wants or not, but if it’s usable for goals that people wish to achieve, and Go is clearly suitable for many goals.

                        2. 3

                          Ah yes, Python is famously closed-minded and hateful toward useful features. For example, they’d never adopt something like, say, list comprehensions. The language’s leaders are far too closed-minded, and dogmatically unwilling to ever consider superior ideas, to pick up something like that. Same for any sort of ability to work with lazy iterables, or do useful combinatoric work with them. That’s something that definitely will never be adopted into Python due to the closed-mindedness of its leaders. And don’t get me started on basic FP building blocks like map and folds. It’s well known that Guido hates them so much that they’re permanently forbidden from ever being in the language!

                          (the fact that Python is not Lisp was always unforgivable to many people; the fact that it is not Haskell has now apparently overtaken that on the list of irredeemable sins; yet somehow we Python programmers continue to get useful work done and shrug off the sneers and insults of our self-proclaimed betters much as we always have)

                          1. 25

                            It is well-documented that Guido Van Rossum planned to remove lambda from Python 3. (For the record, I agree that map and filter on lists are much less useful in presence of list comprehensions.) It is also well-documented that recursion is severely limited in Python, making many elegant definitions impractical.

                            Sure, Python adopted (in 2000 I believe?) list comprehensions from ABC (due to Guido working with the language in the 1980s), and a couple of library-definable iterators. I don’t think this contradicts my claim. New ideas came to the language since (generators, decorators), but it remains notable that the language seems to have resisted incorporating strong ideas from other languages. (More so than, say, Ruby, C#, Kotlin, etc.)

                            Meta: One aspect of your post that I find unpleasant is the tone. You speak of “sneers and insults”, but it is your post that is highly sarcastic and full of stray exagerations at this or that language community. I’m not interested in escalating in this direction.

                            1. 7

                              less useful in presence of list comprehension

                              I’m certainly biased, but I find Python’s list comprehension an abomination towards readability in comparison to higher-order pipelines or recursion. I’ve not personally coded Python in 8-9 years, but when I see examples, I feel like I need to put my head on upsidedown to understand it.

                              1. 6

                                It is also well-documented that recursion is severely limited in Python, making many elegant definitions impractical.

                                For a subjective definition of “elegant”. But this basically is just “Python is not Lisp” (or more specifically, “Python is not Scheme”). And that’s OK. Not every language has to have Scheme’s approach to programming, and Scheme’s history has shown that maybe it’s a good thing for other languages not to be Scheme, since Scheme has been badly held back by its community’s insistence that tail-recursive implementations of algorithms should be the only implementations of those algorithms.

                                You speak of “sneers and insults”, but it is your post that is highly sarcastic and full of stray exagerations at this or that language community.

                                Your original comment started from a place of assuming – and there really is no other way to read it! – that the programming patterns you care about are objectively superior to other patterns, that languages which do not adopt those patterns are inherently inferior, and that the only reason why a language would not adopt them is due to “closed-mindedness”. Nowhere in your comment is there room for the (ironically) open-minded possibility that someone else might look at patterns you personally subjectively love, evaluate them rationally, and come to a different conclusion than you did – rather, you assume that people who disagree with your stance must be doing so because of personal faults on their part.

                                And, well, like I said we’ve got decades of experience of people looking down their noses at Python and/or its core team + community for not becoming a copy of their preferred languages. Your comment really is just another instance of that.

                                1. 8

                                  I’m not specifically pointing out the lack of tail-call optimization (TCO) in Python (which I think is unfortunate indeed; the main argument is that call stack matters, but it’s technically fully possible to preserve call stacks on the side with TC-optimizing implementations). Ignoring TCO for a minute, the main problem would be the fact that the CPython interpreter severely limits the call space (iirc it’s 1K calls by default; compare that to the 8Mb default on most Unix systems), making recursion mostly unusable in practice, except for logarithmic-space algorithms (balanced trees, etc.).

                                  Scheme has been badly held back by its community’s insistence that tail-recursive implementations of algorithms should be the only implementations of those algorithms.

                                  I’m not sure what you mean – that does not make any sense to me.

                                  [you assume] that the programming patterns you care about are objectively superior to other patterns [..]

                                  Well, I claimed

                                  [pattern matching] obviously improves readability of code manipulating symbolic expressions/trees

                                  and I stand by this rather modest claim, which I believe is an objective statement. In fact it is supported quite well by the blog post that this comment thread is about. (Pattern-matching combines very well with static typing, and it will be interesting to see what Python typers make of it; but its benefits are already evident in a dynamically-typed context.)

                                  1. 4

                                    and I stand by this rather modest claim, which I believe is an objective statement.

                                    Nit: I don’t think you can have an objective statement of value.

                                    1. 4

                                      Again: your original comment admits of no other interpretation than that you do not believe anyone could rationally look at the feature you like and come to a different conclusion about it. Thus you had to resort to trying to find personal fault in anyone who did.

                                      This does not indicate “closed-mindedness” on the part of others. They may prioritize things differently than you do. They may take different views of complexity and tradeoffs (which are the core of any new language-feature proposal) than you do. Or perhaps they simply do not like the feature as much as you do. But you were unwilling to allow for this — if someone didn’t agree with your stance it must be due to personal fault. You allowed for no other explanation.

                                      That is a problem. And from someone who’s used to seeing that sort of attitude it will get you a dismissive “here we go again”. Which is exactly what you got.

                                  2. 4

                                    This is perhaps more of a feeling, but saying that Rust isn’t adopting features as quickly as Ruby seems a bit off. Static type adoption in the Python community has been quicker. async/await has been painful, but is being attempted. Stuff like generalized unpacking (and this!) is also shipping out!

                                    Maybe it can be faster, but honestly Python probably has one of the lowest “funding amount relative to impact” of the modern languages which makes the whole project not be able to just get things done as quickly IMO.

                                    Python is truly in a funny place, where many people loudly complain about it not adopting enough features, and many other loudly complain about it loudly adopting too many! It’s of course “different people have different opinions” but still funny to see all on the same page.

                                    1. 3

                                      It is well-documented that Guido Van Rossum planned to remove lambda from Python 3

                                      Thank you for sharing that document. I think Guido was right: it’s not pythonic to map, nor to use lambdas in most cases.

                                      Every feature is useful, but some ecosystems work better without certain features. I’m not sure where go’s generics fall on this spectrum, but I’m sure most proposed features for python move it away from it’s core competency, rather than augmenting a strong core.

                                      1. 1

                                        We have previously discussed their tone problem. It comes from their political position within the Python ecosystem and they’re relatively blind to it. Just try to stay cool, I suppose?

                                        1. 6

                                          I really do recommend clicking through to that link, and seeing just what an unbelievably awful thing I said that the user above called out as “emblematic” of the “contempt” I display to Python users. Or the horrific ulterior motive I was found to have further down.

                                          Please, though, before clicking through, shield the eyes of children and anyone else who might be affected by seeing such content.

                                      2. 5

                                        To pick one of my favorite examples, I talked to the author of PEP 498 after a presentation that they gave on f-strings, and asked why they did not add destructuring for f-strings, as well as whether they knew about customizeable template literals in ECMAScript, which trace their lineage through quasiliterals in E all the way back to quasiquotation in formal logic. The author knew of all of this history too, but told me that they were unable to convince CPython’s core developers to adopt any of the more advanced language features because they were not seen as useful.

                                        I think that this perspective is the one which might help you understand. Where you see one new feature in PEP 498, I see three missing subfeatures. Where you see itertools as a successful borrowing of many different ideas from many different languages, I see a failure to embrace the arrays and tacit programming of APL and K, and a lack of pattern-matching and custom operators compared to Haskell and SML.

                                      3. 1

                                        I think the issue is more about pattern matching being a late addition to Python, which means there will be lots of code floating around that isn’t using match expressions. Since it’s not realistic to expect this code to be ported, the old style if … elif will continue to live on. All of this adds up to a larger language surface area, which makes tool support, learning and consistency more difficult.

                                        I’m not really a big fan of this “pile of features” style of language design - if you add something I’d prefer if something got taken away as well. Otherwise you’ll end up with something like Perl 5

                                      1. 5
                                        cat file.txt \    
                                          | sort           `# I *can* put a comment here` \
                                          | cut -f 1 \
                                            `# And I can put one here too` \
                                          | grep foo
                                        

                                        :^)

                                        1. 7

                                          I would usually just write:

                                            cat file.txt | # "useless cat" recapitulated
                                            sort         | # I *can* put a comment here
                                            cut -f 1     | # And I can put one here too
                                            grep foo       # and even here
                                          
                                          1. 6

                                            That’s OK for pipelines, but it falls down for the equivalent of

                                            ... find /bin               # traverse this directory
                                                -type f -a -executable  # filter executable files
                                                -a printf '%s %P\n'     # print size and path
                                              | sort -n                 # sort numerically
                                              ;
                                            

                                            The Tour has an example like this, probably should have put it in the blog post too …

                                            1. 2

                                              This screams to me a future accidental bug by not leading with the pipe and needless whitespace ceremony. It looks nice in a small example like this, but say you need to pipe that input into another command: if it’s a longer command, you’ll need to move all of the pipes and then possibly adjust all of the comments to the new whitespace if you’re on a char limit and then you may forget add back the pipe after grep because it’s easy to miss it on scan. And this doesn’t even considering that it’s not indented which is hard to parse visually.

                                              1. 1

                                                how would you do this without the useless cat?

                                                1. 2
                                                  1. You can do: sort < file.txt | # comment ….
                                                  2. UUoC makes sometimes sense and does not deserve so much hate as it gets in internet discussions.
                                                  3. I prefer | + indentation on the beginning of the next line, so this style of comments is not much useful for me (If I have to, I will probably rather use the backtick trick).
                                                  1. 2

                                                    Also, just sort file.txt | ...

                                                    1. 4

                                                      Or if you want to keep the order consistent with the data flow:

                                                      < file.txt \
                                                      sort | \
                                                      ...
                                                      
                                              2. 3

                                                I’ve seen this trick! But I don’t like all the noise with \ and backticks.

                                                I probably should have mentioned it … Right now it actually doesn’t work in OSH because # goes to the end of the line – we don’t look for a backtick. But that is not fundamental and could be changed. I haven’t seen it enough in real code to make it a priority. I think I saw it in some sandstorm shell scripts, and that’s about it.

                                                The 1.2M lines of shell corpus (https://www.oilshell.org/release/0.9.2/test/wild.wwz/) either contains 0 or 1 instances of it, I forget …

                                                1. 4

                                                  But I don’t like all the noise with \ and backticks.

                                                  i agree it’s a total hack. it wasn’t meant as a serious proposal (although i have used it in the past for a lack of alternatives), i was just being a smart-ass.

                                                  oil’s approach looks way better :)

                                                  1. 1

                                                    Oh also another reason not to use that trick is that it actually relies on “empty elision”. Shell omits empty strings from argv, which is related to word splitting. Consider:

                                                    $ argv X $(echo) `echo` Y
                                                    

                                                    This results in an argv of ['X', 'Y'] in shell, but ['X', '', '', 'Y'] in Oil. Compare with:

                                                    $ argv X "$(echo)" "`echo`" Y
                                                    

                                                    I deem this too confusing which is why Oil Doesn’t Require Quoting Everywhere !

                                                1. 4

                                                  That’s a lot of drama. I understand the frustration. I’m happy I moved so much of my DE to TUIs as they run quick and download quick–with the byproduct of getting to avoid some the fragmentation of GUI toolkits. But even outside the GUI, we are lacking color management in Wayland so even deeper the display server situation isn’t good 12 years after its release, and still many communites still on X11 despite it being touted as the future.

                                                  I wonder if Microsoft and Apple would have had similar issues if it were as easy to fork their GUI systems.

                                                  1. 5

                                                    The utter lack of cohesion in GUI systems on Linux is probably one of my least favorite things about using it as a desktop OS.

                                                    1. 5

                                                      I wonder if Microsoft and Apple would have had similar issues if it were as easy to fork their GUI systems.

                                                      Microsoft does. From what I understand (from rumour and old articles, not any personal experience), in the ‘90s there was a lot of tension between the Windows and Office teams, each of which was contributing 40%+ of Microsoft’s total revenue at the time. The Office team didn’t want Windows to add features that made it easy to implement an Office competitor, which limited the built-in GUI features. In addition to this, the developer division regarded Visual Basic / Visual C++ (later Visual Studio) regarded GUI building tools as a differentiating feature.

                                                      This led to a proliferation of third-party toolkits that used Win32 APIs at a similar abstraction layer to X11 and either provided cheaper / easier developer tools than Visual Studio (e.g. Delphi) or provided a richer set of UI components.

                                                      This, in turn, led to a proliferation of different UI appearances and behaviours between different Windows apps.

                                                      In contrast, Apple’s revenue came from hardware sales. The OS existed to sell the hardware and any first-party apps existed to sell the hardware. If another company came along with a better alternative than an Apple app and made a better MacOS version than a Windows version then that was a potential sale for Apple. As a result, they had a strong incentive to make components and services system-wide and reusable between applications. They also had an incentive to write a good set of usability guides and conform to them in all of their first-party software so that things that didn’t conform stood out. This let them sell a consistent experience as a differentiating feature.

                                                      I think one of the biggest problems with open source DEs is that they tend to be written by people who came from Windows.

                                                      1. 1

                                                        Not to mention the constant struggle between DevDiv/Windows teams for their own GUI toolkits and even developer frameworks (if Spolsky is to be believed, IIRC); eternal battle between .NET and COM. (Perhaps they’ve made up, unified on something, and it’s better now. But we still have the fallout of having to choose between rawdog Win32, MFC, ATL, Windows Forms, WPF, and UWP.)

                                                      2. 4

                                                        I’m happy I moved so much of my DE to TUIs

                                                        I think this says a lot about why GUIs on Linux aren’t living up to their potential.

                                                        1. 2

                                                          For Microsoft it depends what you mean by forking GUI. Around w2k/xp it was reasonably simple to make your own desktop environment and there were a few available. They mostly didn’t survive migration to win7, but even now you can find 2 projects that still work. On the GUI as in toolkit side, MS is doing a bit of fragmentation on its own with Win32/WPF/MAUI and there’s a few 3rd party solutions available. And that’s before we even get into “we need to differentiate with this driver settings window so it gets full custom theme”

                                                          While MS avoided some technical issues with its architecture, I find its look and feel fragmentation to be worse than what I get on Linux.

                                                        1. 8

                                                          Does anyone else have the problem that Matrix is incredibly slow? I have a top of the line desktop PC and it takes 20-60 seconds from double clicking the icon until the Element client finishes with all the spinners and freezing and becomes usable. Also, how can I extract conversations in a usable format (e.g. SQLite)? These are my two biggest pain points with Matrix and the reason why I don’t use it.

                                                          1. 9

                                                            You’re describing problems with Element, which is fair. It’s an electron app, and it’s memory hungry. So is Signal.

                                                            The difference is that you can use Matrix without using Element; there are 3rd-party clients out there that work great with much better performance footprints. If you don’t want to use the Signal electron app, or if Signal decides your platform isn’t worth supporting (like arm64) then your only option is to not use Signal.

                                                            1. 8

                                                              If Element is showing spinners for tens of seconds, that’s all time spent waiting for the server to respond.

                                                              Synapse is (at least was) slow. Back when I’ve tried running it, there even was a postgres query you had to run occasionally to clean up things that brought it to a complete halt. Thankfully it seems that Conduit is a server project that will actually be good.

                                                              1. 2

                                                                The server stack isn’t much better performance wise, sadly.

                                                                1. 1

                                                                  It’s an electron app, and it’s memory hungry. So is Signal.

                                                                  Signal Desktop on my laptop has been running for a couple of days. It is using 23.1 MB of RAM (between 3 processes, two using about 1 MB) and is responsive. Restarting it takes a few seconds and it’s usable as soon as it presents the UI.

                                                                  1. 3

                                                                    That experience is completely different from mine, but arguing about it is academic since I don’t even have the option of running it on my machine any more even if I wanted to.

                                                                2. 2

                                                                  It seems fine as a Weechat plugin for me

                                                                  1. 1

                                                                    Which server do you use? I run my own with (usually nearly) the latest versions of Synapse, and I don’t see any such problem. Starting up the client on my iPhone just now took 4 seconds, on my Linux laptop it took 12 seconds (but normally it’s always running and available as a panel icon).

                                                                    1. 3

                                                                      Same here. A friend of mine chats with me over the Matrix “default” home server and I’ve seen his client freeze like that too, while for me it’s always been fast (I’m using a self-hosted home server). I think there need to be more alternative servers and awareness of how to use such alternatives.

                                                                      1. 1

                                                                        Yeah, I think Matrix.org is slow, because they haven’t been able to scale in proportion to their users. Synapse is overly resource-hungry, but it’s not actually slow unless it’s starved of resources. Small homeservers are pretty much always faster than Matrix.org.

                                                                  1. 10

                                                                    Q: Why choose Docker or Podman over Nix or Guix?

                                                                    Edit with some rephrasing: why run containers over a binary cache? They can both do somewhat similar things in creating a reproductible build (so long as you aren’t apt upgradeing in your container’s config file) and laying out how to glue you different services together, but is there a massive advantage with one on the other?

                                                                    1. 28

                                                                      I can’t speak for the OP, but for myself there are three reasons:

                                                                      1. Docker for Mac is just so damn easy. I don’t have to think about a VM or anything else. It Just Works. I know Nix works natively on Mac (I’ve never tried Guix), but while I do development on a Mac, I’m almost always targeting Linux, so that’s the platform that matters.

                                                                      2. The consumers of my images don’t use Nix or Guix, they use Docker. I use Docker for CI (GitHub Actions) and to ship software. In both cases, Docker requires no additional effort on my part or on the part of my users. In some cases I literally can’t use Nix. For example, if I need to run something on a cluster controlled by another organization there is literally no chance they’re going to install Nix for me, but they already have Docker (or Podman) available.

                                                                      3. This is minor, I’m sure I could get over it, but I’ve written a Nix config before and I found the language completely inscrutable. The Dockerfile “language”, while technically inferior, is incredibly simple and leverages shell commands I already know.

                                                                      1. 15

                                                                        I am not a nix fan, quite the opposite, I hate it with a passion, but I will point out that you can generate OCI images (docker/podman) from nix. Basically you can use it as a Dockerfile replacement. So you don’t need nix deployed in production, although you do need it for development.

                                                                        1. 8

                                                                          As someone who is about to jump into nixos, Id love to read more about why you hate nix.

                                                                          1. 19

                                                                            I’m not the previous commenter but I will share my opinion. I’ve given nix two solid tries, but both times walked away. I love declarative configuration and really wanted it to work for me, but it doesn’t.

                                                                            1. the nix language is inscrutable (to use the term from a comment above). I know a half dozen languages pretty well and still found it awkward to use
                                                                            2. in order to make package configs declarative the config options need to be ported to the nix language. This inevitably means they’ll be out of date or maybe missing a config option you want to set.
                                                                            3. the docs could be much better, but this is typical. You generally resort to looking at the package configs in the source repo
                                                                            4. nix packages, because of the design of the system, has no connection to real package versions. This is the killer for me, since the rest of the world works on these version numbers. If I want to upgrade from v1.0 to v1.1 there is no direct correlation in nix except for a SHA. How do you find that out? Look at the source repo again.
                                                                            1. 4

                                                                              This speaks to my experience with Nix too. I want to like it. I get why it’s cool. I also think the language is inscrutable (for Xooglers, the best analogy is borgcfg) and the thing I want most is to define my /etc files in their native tongue under version control and for it all to work out rather than depend on Nix rendering the same files. I could even live with Nix-the-language if that were the case.

                                                                              1. 3

                                                                                I also think the language is inscrutable (for Xooglers, the best analogy is borgcfg)

                                                                                As a former Google SRE, I completely agree—GCL has a lot of quirks. On the other hand, nothing outside Google compares, and I miss it dearly. Abstracting complex configuration outside the Google ecosystem just sucks.

                                                                                Yes, open tools exist that try to solve this problem. But only gcl2db can load a config file into an interactive interface where you can navigate the entire hierarchy of values, with traces describing every file:line that contributed to the value at a given path. When GCL does something weird, gcl2db will tell you exactly what happened.

                                                                              2. 2

                                                                                Thanks for the reply. I’m actually not a huge fan of DSLs so this might be swaying me away from setting up nixos. I have a VM setup with it and tbh the though of me trolling through nix docs to figure out the magical phrase to do what I want does not sound like much fun. I’ll stick with arch for now.

                                                                                1. 6

                                                                                  If you want the nix features but a general purpose language, guix is very similar but uses scheme to configure.

                                                                                  1. 1

                                                                                    I would love to use Guix, but lack of nonfree is killer as getting Steam running is a must. There’s no precedence for it being used in the unjamming communities I participate in, where as Nix is has sizable following.

                                                                                    1. 2

                                                                                      So use Ubuntu as the host OS for Guix if you need Steam to work. Guix runs well on many OS

                                                                              3. 10

                                                                                Sorry for the very late reply. The problem I have with nixos is that it’s anti-abstraction in the sense that I elaborated on here. Instead it’s just the ultimate wrapper.

                                                                                To me, the point of a distribution is to provide an algebra of packages that’s invariant in changes of state. Or to reverse this idea, an instance of a distribution is anything with a morphism to the category of packages.

                                                                                Nix (and nixos) is the ultimate antithesis of this idea. It’s not a morphism, it’s a homomorphism. The structure is algebraic, but it’s concrete, not abstract.

                                                                                People claim that “declarative” configuration is good, and it’s hard to attack such a belief, but people don’t really agree on what really means. In Haskell it means that expressions have referential transparency, which is a good thing, but in other contexts when I hear people talk about declarative stuff I immediately shiver expecting the inevitable pain. You can “declare” anything if you are precise enough, and that’s what nix does, it’s very precise, but what matters is not the declarations, but the interactions and in nix interaction means copying sha256 hashes in an esoteric programming language. This is painful and as far away from abstraction as you can get.

                                                                                Also notice that I said packages. Nix doesn’t have packages at all. It’s a glorified build system wrapper for source code. Binaries only come as a side effect, and there are no first class packages. The separation between pre-build artefacts and post-build artefacts is what can enable the algebraic properties of package managers to exist, and nix renounces this phase distinction with prejudice.

                                                                                To come to another point, I don’t like how Debian (or you other favorite distribution) chooses options and dependencies for building their packages, but the fact that it’s just One Way is far more important to me than a spurious dependency. Nix, on the other hand, encourages pets. Just customize the build options that you want to get what you want! What I want is a standard environment, customizability is a nightmare, an anti-feature.

                                                                                When I buy a book, I want to go to a book store and ask for the book I want. With nix I have to go to a printing press and provide instructions for printing the book I want. This is insanity. This is not progress. People say this is good because I can print my book into virgin red papyrus. I say it is bad exactly for the same reason. Also, I don’t want all my prints to be dated January 1, 1970.

                                                                            2. 8

                                                                              For me personally, I never chose Docker; it was chosen for me by my employer. I could maybe theoretically replace it with podman because it’s compatible with the same image format, which Guix (which is much better designed overall) is not. (But I don’t use the desktop docker stuff at all so I don’t really care that much; mostly I’d like to switch off docker-compose, which I have no idea whether podman can replace.)

                                                                              1. 3

                                                                                FWIW Podman does have a podman-compose functionality but it works differently. It uses k8s under the hood, so in that sense some people prefer it.

                                                                              2. 2

                                                                                This quite nicely sums up for me 😄 and more eloquently than I could put it.

                                                                                1. 2

                                                                                  If you’re targeting Linux why aren’t you using a platform that supports running & building Linux software natively like Windows or even Linux?

                                                                                  1. 12

                                                                                    … to call WSL ‘native’ compared to running containers/etc via VMs on non-linux OS’s is a bit weird.

                                                                                    1. 11

                                                                                      I enjoy using a Mac, and it’s close enough that it’s almost never a problem. I was a Linux user for ~15 years and I just got tired of things only sorta-kinda working. Your experiences certainly might be different, but I find using a Mac to be an almost entirely painless experience. It also plays quite nicely with my iPhone. Windows isn’t a consideration, every time I sit down in front of a Windows machine I end up miserable (again, YMMV, I know lots of people who use Windows productively).

                                                                                      1. 3

                                                                                        Because “targeting Linux” really just means “running on a Linux server, somewhere” for many people and they’re not writing specifically Linux code - I spend all day writing Go on a mac that will eventually be run on a Linux box but there’s absolutely nothing Linux specific about it - why would I need Linux to do that?

                                                                                        1. 2

                                                                                          WSL2-based containers run a lightweight Linux install on top of Hyper-V. Docker for Mac runs a lightweight Linux install on top of xhyve. I guess you could argue that this is different because Hyper-V is a type-1 hypervisor, whereas xhyve is a type-2 hypervisor using the hypervisor framework that macOS provides, but I’m not sure that either really counts as more ‘native’.

                                                                                          If your development is not Linux-specific, then XNU provides a more complete and compliant POSIX system than WSL1, which are the native kernel POSIX interfaces for macOS and Windows, respectively.

                                                                                      2. 9

                                                                                        Prod runs containers, not Nix, and the goal is to run the exact same build artifacts in Dev that will eventually run in Prod.

                                                                                        1. 8

                                                                                          Lots of people distribute dockerfiles and docker-compose configurations. Podman and podman-compose can consume those mostly unchanged. I already understand docker. So I can both use things other people make and roll new things without using my novelty budget for building and running things in a container, which is basically a solved problem from my perspective.

                                                                                          Nix or Guix are new to me and would therefore consume my novelty budget, and no one has ever articulated how using my limited novelty budget that way would improve things for me (at least not in any way that has resonated with me).

                                                                                          Anyone else’s answer is likely to vary, of course. But that’s why I continue to choose dockerfiles and docker-compose files, whether it’s with docker or podman, rather than Nix or Guix.

                                                                                          1. 5

                                                                                            Not mentioned in other comments, but you also get process / resource isolation by default on docker/podman. Sure, you can configure service networking, cgroups, namespaces on nix yourself, just like any other system and setup the relevant network proxying. But getting that prepackaged and on by default is very handy.

                                                                                            1. 2

                                                                                              You can get a good way there without much fuss with using the Declarative NixOS containers feature (which uses systemd-nspawn under the hood).

                                                                                            2. 4

                                                                                              I’m not very familiar with Nix, but I feel like a Nix-based option could do for you what a single container could do, giving you the reproducibility of environment. What I don’t see how to do is something comparable to creating a stack of containers, such as you get from Docker Compose or Docker Swarm. And that’s considerably simpler than the kinds of auto-provisioning and wiring up that systems like Kubernetes give you. Perhaps that’s what Nix Flakes are about?

                                                                                              That said I am definitely feeling like Docker for reproducible developer environments is very heavy, especially on Mac. We spend a significant amount of time rebuilding containers due to code changes. Nix would probably be a better solution for this, since there’s not really an entire virtual machine and assorted filesystem layering technology in between us and the code we’re trying to run.

                                                                                              1. 3

                                                                                                Is Nix a container system…? I though it was a package manager?

                                                                                                1. 3

                                                                                                  It’s not, but I understand the questions as “you can run a well defined nix configuration which includes your app or a container with your app; they’re both reproducible so why choose one of the over the other?”

                                                                                                2. 1

                                                                                                  It’s possible to generate Docker images using Nix, at least, so you could use Nix for that if you wanted (and users won’t know that it’s Nix).

                                                                                                  1. 1

                                                                                                    These aren’t mutually exclusive. I run a few Nix VMs for self-hosting various services, and a number of those services are docker images provided by the upstream project that I use Nix to provision, configure, and run. Configuring Nix to run an image with hash XXXX from Docker registry YYYY and such-and-such environment variables doesn’t look all that different from configuring it to run a non-containerized piece of software.

                                                                                                    1. 3

                                                                                                      The blog post actually mentions this:

                                                                                                      As one of the trailblazers of location-based online dating, Tinder was inevitably also one of the trailblazers of location-based security vulnerabilities. Over the years they’ve accidentally allowed an attacker to find the exact location of their users in several different ways.

                                                                                                    1. 7

                                                                                                      While the content of this article is interesting, it reads like a product placement for the podcast basically produced by Google (or maybe it’s just trying to optimise the pagerank of coywolf.com).

                                                                                                      This is a lot of text to just say “well basically Safari delegates image/videos decoding to the OS, and Mac and iOS don’t support AVIF, while WebKit has been supporting it for a long time now.

                                                                                                      1. 1

                                                                                                        They also have ampproject scripts on the main page here.

                                                                                                        1. 1

                                                                                                          Well, I’m sorry. I don’t have any connection with those companies.

                                                                                                          1. 1

                                                                                                            I never claimed you did. I think the link is interesting, I’m just sad about how it is written.

                                                                                                            1. 2

                                                                                                              I understand. It is indeed sad that most informative articles these days seem to have some commercial background.

                                                                                                        1. 5

                                                                                                          I’ve become a big fan of direnv for this kind of stuff, being able to just write shel scripts that activate smoothly in all tools I use is a godsend

                                                                                                          1. 1

                                                                                                            use flakes is the chef’s kiss

                                                                                                          1. 2

                                                                                                            Being able to program using this much better JavaScript

                                                                                                            Genuine question: did programming in JavaScript really change that much? Is ES6+ really “much better”? If Iook back at ES6 in hindsight, the only thing that really brought an improvement is async/await. Everything else turned out to be just another way of expressing something that’s already there. I’ve got the feeling my entire team finds itself writing a more old school flavor of JS each day, soon we’ll be back in 2012. Plus async.

                                                                                                            N.B.: I do enjoy writing JavaScript, both 10 years ago and today so this is not supposed to be a slur.

                                                                                                            1. 13

                                                                                                              I’m not sure which versions introduced which features, but between the time I left JS and returned to it, they added for…of loops, const and let, arrow functions, and class syntax. Each of these made a big difference to me.

                                                                                                              1. 6

                                                                                                                Also Map, promises and then async…

                                                                                                                1. 3

                                                                                                                  Do you know which ES6 feature got pulled but I wanted? Tail call optimization. Not supporting it because debuggers would be ‘harder’ was pretty weak–which oddly means only WebKit supports it. Entire styles of application building could be unlocked with it.

                                                                                                              2. 3

                                                                                                                Here’s a list of features, you can also check what will be missing without compilation by checking 2016+ tab https://kangax.github.io/compat-table/es6/

                                                                                                              1. 33

                                                                                                                As a software engineer, Unicode puts a lot of complexity on my table and much of that I really wouldn’t need.

                                                                                                                The “I” in that sentence is significant. Seeing Unicode as an unnecessary imposition is basically an admission that you only care about English (or computer languages/syntaxes based on English.) There are a lot of equivalent complaints about e.g. date/time formats, or all the different schemas for people’s names and addresses. And you can go further, by complaining about having to deal with accessibility.

                                                                                                                (There’s a joke that emoji were invented as a way to make American programmers finally have to give a shit about Unicode.)

                                                                                                                1. 17

                                                                                                                  This prompted me to write a post about encoding issues in the pre-unicode Russia.

                                                                                                                  1. 3

                                                                                                                    Thanks for this. I had no idea KOI8-R was in a different order than the actual alphabet.

                                                                                                                    1. 3

                                                                                                                      Great article! I just submitted it.

                                                                                                                    2. 13

                                                                                                                      The “I” in that sentence is significant. Seeing Unicode as an unnecessary imposition is basically an admission that you only care about English (or computer languages/syntaxes based on English.)

                                                                                                                      And not just languages other than English, but also everything that’s not, specifically, of English origin, which is actually a significant hurdle even to native English speakers in English-speaking countries.

                                                                                                                      It’s very easy to underestimate how important this is if you’re only writing (most types of) software, especially if you’re only writing programmer-facing software. Many years ago I also thought ASCII was actually very much sufficient for a long time, even though I’m not a native English speaker and my own name is spelled with a stupid character that isn’t in CP437. I was happy to just write it without the diacritics, it was easy to figure out.

                                                                                                                      Well… it’s not quite like that everywhere. If you’re doing history or any of its myriad of “auxiliary sciences”, from archaeology to numismatics and from genealogy to historiography, if you’re doing philosophy, linguistics (obviously!), geography, philology of any kind, you’re going to hit Unicode pretty quickly. Even if you’re doing it all in English, for an English-speaking audience, and even if you’re not doing it in any “pure” form – there’s lots of software these days that powers museums (from administration/logistics to exhibitions), there’s GIS software of all kind, there’s software for textual analysis and Bible study and so on. That gives you a huge amount of software that needs to be Unicode-aware, from word processors and email clients to web browsers and graphics programs.

                                                                                                                      I remember pre-Unicode software that handled all this. I never seriously used it, it was kind of before my time, but I could tell it was not just extraordinarily awkward to use, it was extremely brittle. You’d save something on one computer, email it give the floppy to a colleague and all the ăs and îs would show up as ⊵s and ☧s.

                                                                                                                      And that’s leaving out “mundane” things like software that handles patient records and which needs to be aware of these things because you never know when it’ll get big and it’ll be really embarrassing when extending into the Chinese market is going to need a massive development and testing budget because you built a unicorn on software that only recognizes like 30 letters or so. It’s a huge, real-life problem, even for software that’s built specifically for native English speakers who live in English-speaking countries.

                                                                                                                      1. 3

                                                                                                                        Because my bank uses TIS encoding on their back-end despite ‘supporting’ English, I can’t send support messages with unsupported characters like commas, or dashes, or colons, etc. Using ASCII is definitely the same issue.

                                                                                                                        1. 2

                                                                                                                          Have you read the addendum at the end of the post?

                                                                                                                          Some people read this as argument against Unicode, which it is not. I don’t want to come back to ISO-8859-1, because that sucks. Also, I’m ready to deal with lot of complexity to allow people write their names properly.

                                                                                                                          etc

                                                                                                                          1. 1

                                                                                                                            Kudos for the author for clarifying their position better. Thanks for bringing this to our attention.

                                                                                                                          2. 1

                                                                                                                            With encodings like ISO-8859-1 you can cover most European languages, which includes most (all?) of the Americas and a chuck of Africa and Asia as well; you don’t need to be stuck with ASCII from 1966, and in practice most software hasn’t been since the 90s and the effort to make things “8bit clean”.

                                                                                                                            For a surprising number of businesses/software, it turns out you don’t really need Unicode to allow people to enter all the reasonable content they need to enter, and since Unicode is somewhat complex it turns out a lot of “Unicode clean” solutions aren’t in a whole list of edge cases.

                                                                                                                            1. 8

                                                                                                                              Immigrants from other countries might disagree; if you’re a Vietnamese-American or Turkish-German, 8859-1 may not allow you to spell your own name correctly.

                                                                                                                              It’s also missing a lot of common typographic niceties like typographer’s (curly) quotes and, IIRC, em-dashes. Which is a deal-breaker in some markets, like publishing. It also messes up text that was written in any word processor (or even Apple’s TextEdit) with smart quotes enabled.

                                                                                                                              Really, UTF-8 is pretty easy to work with, and modern string libraries handle Unicode well, so I don’t see any compelling reason to stick with an older limited encoding.

                                                                                                                              1. 7

                                                                                                                                When you make the decision to do only ISO-8859-1, you are also – whether you explicitly think about it or not – making the decision to exclude from your user/customer base everyone on earth whose preferred language, or even just name, uses script(s) not covered by it. Even in the US or Europe this will exclude significant numbers of people; for example, in the US there are two languages with more than one million resident speakers which do not use any form of Latin script, and a third which requires diacritics not supported by ISO-8859-1.

                                                                                                                                And depending on your field of business, excluding these people, or making it significantly more difficult for them to work, with you, may actually be illegal. There is no excuse, in $CURRENT_YEAR, for not just putting in the work to understand Unicode and handle it properly.

                                                                                                                                1. 6

                                                                                                                                  I was a speaker at an O’Reily conference once, and they had difficulty printing a badge for me, because my last name requires ISO-8859-2.

                                                                                                                                2. 1

                                                                                                                                  Seeing Unicode as an unnecessary imposition is basically an admission that you only care about English

                                                                                                                                  Don’t say that. If people care as they should, the real question is what «supporting unicode» necessitates for what your particular software does. For a lot of software, it suffices to be encoding agnostic.

                                                                                                                                  A good example is filenames on Unix. They are a string of bytes, and it is in fact wrong to assume any encoding for them. As an example, all my files from the pre-unicode era (early 2000s) are of course not valid UTF-8, despite my modern locale being UTF-8.

                                                                                                                                  1. 3

                                                                                                                                    A filename is not an unencoded blob, even if filesystem implementors might want it to be for simplicity. Filenames are displayed to, and typed in by, users. That requires an encoding. If the filesystem doesn’t specify one, it’s just passing the buck to higher level software, which then has to deal with inconsistencies or undisplayable names. I’m sure this is great “fun” when it goes wrong.

                                                                                                                                    For comparison, macOS — which is a Unix, albeit one that actually prioritizes UX — requires filenames to be UTF-8 in a specific canonical form (so that accents and ligatures are encoded in a consistent way.)

                                                                                                                                    1. 2

                                                                                                                                      In terms of specs and standards, the only thing all Unix filenames are required to have in common is that they are byte sequences. No Unix-wide standard exists which requires that filesystems use a consistent encoding, nor that requires the system to have or be able to tell you about such an encoding, nor even that there be any encoding at all. It’s true that many modern Unixes do in fact have a consistent encoding and ways to discover what that encoding is (or just default to UTF-8 and allow tooling to do the same), but there is, again, absolutely no requirement that they do so.

                                                                                                                                      This is why, for example, in Rust there’s a completely separate string-ish type for handling file paths, which drops all guarantees of being valid UTF-8 (as all other Rust strings are) or even of being decodable at all. This is why, when Python 3 went to Unicode as its string type, there was a long and difficult process that finally led to the surrogateescape error handler (which allows Python to represent file paths in its string type while losslessly preserving non-decodable bytes and byte sequences). And so on and so forth.

                                                                                                                                      And it’s not really a problem that can be solved by any popular language or tool, because while there are not that many people who actually use non-decodable byte sequences in practice, the people who do tend to be aggressively vocal about “the specs allow me to do it, so you are required to support it forever” and making maintainers’ lives unpleasant until they finally give in.

                                                                                                                                      1. 2

                                                                                                                                        Reading between the lines a bit, it seems you agree with me that this is a really bad situation. Which contradicts @anordal’s assertion that “it suffices to be encoding agnostic”.

                                                                                                                                        1. 1

                                                                                                                                          I’m simply making a factual assertion about Unix filenames, which – if you intend to be portable – indeed must be treated as opaque possibly-undecodable bags of bytes, because that’s the only thing you can rely on without running into someone waving an ancient spec and saying “but technically I’m allowed to do this…”

                                                                                                                                          1. 1

                                                                                                                                            Maybe I should have elaborated with an example, because it depends on the core functionality of the software. For example, if we are implementing the mv command, the core functionality – the definition of “correct” if you will, is that renaming even broken filenames works.

                                                                                                                                            The situation is that people have gigabytes upon gigabytes of files named to the tune of “DJ Ti�sto” and other mojibake, and we have to deal with it.

                                                                                                                                            Okay, even the mv command might want to print a filename if something is wrong, but doing this 100% correctly is an unimportant niche feature – the exit status is the real API, strictly speaking. As any feature, we must prioritize this as time and space permits: For human consumption, it suffices to write those bytes to the terminal or do some lossy conversion to make it valid if that keeps it simple. In another case, the concern might even be difficulty and correctness itself (as in the original post). So yes, even in this example, you have a point! Just saying that if it doesn’t count towards the program’s correctness, other tradeoffs may take precedence.

                                                                                                                                  1. 1

                                                                                                                                    Nudging the laurels in the PureScript community and its new registry to start covering more non-GitHub Git forges. Luckily there isn’t GitHub lock-in to packages and identity like Elm and it was always an eventual goal for the registry, but no one has tried to upstream anything yet. I foresee issues, but one package in a open source, non-megacorp, freedom-supporting forge can help set a precendence for others to break their chains as well.

                                                                                                                                    1. 9

                                                                                                                                      Call be a curmudgeon, but I only stream music long enough to know if I should purchase it for DRM from a site like Bandcamp. Spotify never appealed to me. I don’t like the idea of not having offline access, or paying for subscriptions, or listening to ads, or giving bands peanuts for streams. I’ll stick to mpd.

                                                                                                                                      1. 13

                                                                                                                                        I’m kind of a curmudgeon too, but some of these are incorrect.

                                                                                                                                        or paying for subscriptions

                                                                                                                                        Agree, but $120 a year for virtually unlimited music seems like a reasonable compromise to me.

                                                                                                                                        I don’t like the idea of not having offline access

                                                                                                                                        It has offline access with that subscription.

                                                                                                                                        or listening to ads

                                                                                                                                        There are no ads with that subscription.

                                                                                                                                        or giving bands peanuts for streams.

                                                                                                                                        I can’t comment on this. I don’t know how all that works.

                                                                                                                                        1. 12

                                                                                                                                          off-topic but indeed bands are given peanuts. Spotify’s goal was never the compensation of artists but the stop of piracy : https://www.businessinsider.fr/us/taylor-swift-doesnt-need-streaming-royalties-former-spotify-boss-said-2021-7

                                                                                                                                          1. 1

                                                                                                                                            However, the next stop is obviously subscriptions on individual artists or perhaps groups of artists. Substack for music.

                                                                                                                                            1. 3

                                                                                                                                              Since Bandcamp was already mentioned in this thread, just wanted to point out that they do indeed have this. As far as I’m aware, it functions kinda like Patreon, but built into the core download/streaming service.

                                                                                                                                          2. 4

                                                                                                                                            I know some of these concept conflict when free versus paid subscriber but I don’t see the value personally. That said, what does offline mean here? Is it DRM-free and yours to keep and and share, or is locked behind a single device, account, logevity of you being a subscriber?

                                                                                                                                            1. 6

                                                                                                                                              “Offline” in the sense that you can “cache” selected songs indefinitely for the Spotify client on your device.

                                                                                                                                              I don’t know how it’s actually physically stored on disk, but I imagine it’s just a binary blob that could also have some rudimentary encryption on it. At any rate it’s definitely not designed to make songs available outside Spotify.

                                                                                                                                              However, compared to “offline mode” in other subscription products (e.g. Netflix) I don’t think Spotify enforces any limitations on the duration or size of your offline library. Not sure what happens to your “offline” songs if your subscription expires though.

                                                                                                                                            2. 1

                                                                                                                                              I have Spotify Premium, and I was very annoyed to encounter ads recently on a podcast on Spotify. This may not be Spotify’s fault, but clearly Premium does not pay enough for this podcaster to abandon ads, and it is not accurate to say that there are no ads.

                                                                                                                                              If you say “no ads on music”, then that is accurate AFAIK.

                                                                                                                                            3. 4

                                                                                                                                              But if you buy an album and stream it, you’re giving the artists extra money. I only buy albums that I really love (which hasn’t really changed since pre-streaming/downloading days in high school), so when I stream music it’s either a bonus to a band or a few pennies extra to a band I normally wouldn’t listen to at all (or certainly wouldn’t buy their albums).

                                                                                                                                              Payouts depend on a number of factors, though. Even with my meager numbers, I’ve made about $20 on streams this past year.

                                                                                                                                              1. 2

                                                                                                                                                The client is what I’m paying for.

                                                                                                                                                Doing it all myself for many years was fine, recommendations are easy enough to come by … Cleaning metadata, getting album covers correct, organizing, that started to be a lot of work.

                                                                                                                                                At a certain point, Spotify was cheap enough (for me) that having a client with any music I wanted instant-on for any device (laptop, client, kid’s tablet), and an actual, real-life, working version of what uPNP always promised but never delivered… Worth it.

                                                                                                                                                Compensating artists is and always will be a separate topic (let’s talk about radio play baskets) and the equation still favors publishers pretty heavily (Bandcamp doesn’t get press for donating their profits some of the time because it’s no money.)

                                                                                                                                                1. 4

                                                                                                                                                  And I choose to contribute to MusicBrainz and use Picard because I’d rather help open source

                                                                                                                                              1. 17

                                                                                                                                                I tried this and it actually is pretty darn fast. Coming from completion-nvim, it’s a massive difference in speed. If only the author licensed it properly

                                                                                                                                                1. 19

                                                                                                                                                  Everything about this ‘edgy’, meme marketing reeks of immaturity – down to naming it Coq right after news of Coq realizing it probably needs a new name. While there is room on the scale for more fun/serious (no, putting emoji in the docs or CLI is not ‘fun’), I think this well overshot into gawdy and something I can’t take seriously.

                                                                                                                                                  1. 8

                                                                                                                                                    I’m not a huge fan of the copy, but it is pretty good software so I’ll judge it by that metric.

                                                                                                                                                    1. 5

                                                                                                                                                      I wouldn’t want to raise an issue or collaborate with the project though

                                                                                                                                                    2. 3

                                                                                                                                                      Very edgy. I respect the author’s choice to represent their project however they like, but it all comes across very unprofessional to me. Profanity aside, the commit log alone makes me wonder about the quality of the project.

                                                                                                                                                      1. 6

                                                                                                                                                        I don’t get why professionalism matters here? This is a personal project they made in their spare time and released for other people to use if they want. There’s nothing professional about it.

                                                                                                                                                        1. 6

                                                                                                                                                          Profanity aside, the commit log alone makes me wonder about the quality of the project.

                                                                                                                                                          Ouch… I just took a look at it, and yes, I understand your reluctance… I never look at the commit log of projects to assess their quality, now I’m thinking that I should start doing that.

                                                                                                                                                          Thanks for saying this!

                                                                                                                                                          1. 4

                                                                                                                                                            I think icy’s point is a good one. If its good software, then who cares. The commit log being organized says nothing about the quality of the software. If the author is working on a thing primarily by themselves, then it doesn’t matter too much if the commit log is clean as they are the only ones that are hurt by it.

                                                                                                                                                            If the software solves a problem, then that’s a worthy reason for its existence imho

                                                                                                                                                            1. 2

                                                                                                                                                              You’re welcome! The log certainly isn’t the only indicator of project quality, but when the readme concerns me I like to check the logs.

                                                                                                                                                              1. 1

                                                                                                                                                                The r/vim sub didn’t take kindly either https://redd.it/p5931v considering it’s Neovim only and the react doesn’t inspire confidence

                                                                                                                                                                1. 1

                                                                                                                                                                  If it’s good software, isn’t that evidence you should care less about the commit log?

                                                                                                                                                                  1. 5

                                                                                                                                                                    Reading commit logs is a great first step towards contributing to the project. Whenever I’m learning how a project works, often times I’ll look at the log messages, especially when I want to run git blame or git annotate.

                                                                                                                                                                    Proper log messages not only help others, but yourself, too. I’ve forgotten a lot of the code I’ve written over the period of my hobbyist/career. I’ve needed to go back and make changes to code I’ve written. So that I can provide the best fix possible, it’s helpful to understand the “why” of a commit. The changes a commit produces the “what” and log messages (should) provide the “why”.

                                                                                                                                                                    1. 2

                                                                                                                                                                      None of that is an argument for why a chaotic commit log is evidence that a project is not good or that the software is bad

                                                                                                                                                                      1. 2

                                                                                                                                                                        That’s not the point I was making.

                                                                                                                                                              2. 2

                                                                                                                                                                Moreover… I don’t know if you understand French but “gawdy” is probably a good adjective to describe the linked video at the beginning of the readme.

                                                                                                                                                              3. 8

                                                                                                                                                                I wrote a github comment on that license issue: https://github.com/ms-jpq/coq_nvim/issues/15#issuecomment-900956033

                                                                                                                                                                Usually I don’t care too much, stuff like the WTFPL is a bit stupid but ultimately mostly harmless. But this “license” is really dangerous and could end up getting people hurt, if any part of it turns out to be enforceable.

                                                                                                                                                                1. 4

                                                                                                                                                                  Yeah this neovim completion engine has me shaking in my boots.

                                                                                                                                                                  I find it all refreshing that this guy doesn’t care about using his github as a linkedin or about people who think his license is dangerous.

                                                                                                                                                                  1. 2

                                                                                                                                                                    Are you making fun of the idea that giving up your rights to sue anyone ever can be dangerous? I don’t think I’m understanding you.

                                                                                                                                                                    1. 3

                                                                                                                                                                      Interpreting this as “can’t sue for any reason ever” should definitely and obviously be unenforceable right? If that could ever work, that’s not an issue with the license, rather that’s a huge issue with the legal system in question.

                                                                                                                                                                      1. 3

                                                                                                                                                                        I mean, I agree. It’s probably not enforceable. But I don’t know, I’m not a lawyer and neither is the author - and I’d not be willing to test it.

                                                                                                                                                                        I have a lot of confidence that the “you can’t sue me” part of the license is unenforceable, so users of software under this license are probably safe. I assume. Again, not a lawyer. But the part where the license author promises not to ever sue the licensee? I have no idea how that works in court. Could a lawyer argue that the author of the license didn’t know what they were doing so that the license he wrote doesn’t apply to himself? Are there other protections in place to protect license authors from themselves? I really, really wouldn’t want to find out if I was in his shoes.

                                                                                                                                                                        If there are any lawyers out there who could bring some clarity to this, I’d love to hear it. But the obvious practical solution is to pick a real license.

                                                                                                                                                                      2. 2

                                                                                                                                                                        Yes

                                                                                                                                                                  2. 6

                                                                                                                                                                    It has now been relicensed as GPL v3

                                                                                                                                                                    1. 2
                                                                                                                                                                      1. 1

                                                                                                                                                                        Have you compared it to coc-nvim?

                                                                                                                                                                        1. 2

                                                                                                                                                                          No. I’m using Neovim’s built in LSP.

                                                                                                                                                                      1. 36

                                                                                                                                                                        Pip pip! Time to get rev our coding engines to a high RPM! We’ll be sure to have a lot of snacks (yum!) to keep our spirits up. Of course, we’ll be apt to get some people who nix our great ideas, but I’m sure that’s just because of a desire to avoid cargo-cult programming.

                                                                                                                                                                        1. 24

                                                                                                                                                                          This seems like a tangled ball of yarn from the go get. It’s possible there will be some gems, but that’s assuming that nobody placed a hex on the conference. Regardless, I’m sure there will be a cabal of mavens in attendance ready to talk about their stack.

                                                                                                                                                                          1. 4

                                                                                                                                                                            Take it easy everyone. Go brew some coffee and watch some asdf videos.

                                                                                                                                                                            1. 3

                                                                                                                                                                              Nah, me and the Guix were hungry–and not for drinks or something chocolately–so we rock-paper-scissor’d, but I threw papers in luarocks so this little coding cabal’ll be getting some spago at the place with the foreign name, Leiningen’s.

                                                                                                                                                                          2. 8

                                                                                                                                                                            banned

                                                                                                                                                                            1. 3

                                                                                                                                                                              Or let’s just play some pac-man.

                                                                                                                                                                            1. 5

                                                                                                                                                                              As much as I like less data, sometimes blind optimization is pretty bad. In the case of even the original comparison on my hiDPI laptop and phone go from crisp to unacceptable for photography. I also see a lot of tools strip the color profiles and push it into the limited sRGB spectrum. Along with, removing metadata that is either useful to photonerds or legally suspicious removing licence and attribution info all in the name of saving a few bytes. Sometimes this matters more that other times, but I think web developers can be too quick to remove all of this detail and data just to please the Google Lighthouse tool.

                                                                                                                                                                              1. 2

                                                                                                                                                                                My setup for making this site is 3x 4k monitors, so I definitely understand. However, I think the vast majority of images on the internet serve to break up the text and make site navigation easier, not to actually be dwelled on and appreciated. If my site were about photography, I would still probably convert to .webp or at least optipng my images as hard as I could, but I obviously wouldn’t degrade the quality like I do here.

                                                                                                                                                                                I also super don’t care about Google Lighthose. What I do care about is avoiding elements shifting as things pop in after the initial load, and the easiest way to fix that is to just use lighter weight images where applicable.

                                                                                                                                                                                1. 1

                                                                                                                                                                                  Never disagreed, though I’d pick .avif ha. The one that really springs to mind is Instagram and how everything is stripped, including massive cuts to image quality and converting from DCI-P3 if you aren’t using an Apple product. It’s depressing many photopgraphers feel compelled to upload in order to attract a casual audience.

                                                                                                                                                                                  By proxy this applies to PixelFed as well for copying this.

                                                                                                                                                                              1. 6

                                                                                                                                                                                I realize this piece has a strong whiff of PR to it, but I legitimately am interested in the idea of moving past the “local development environment” as a standard practice. Long ago I got real excited about local vagrant and docker for development, and that hasn’t really panned out for me in practice. I’ve been watching cloud development environments with great interest for a while and haven’t had a chance to invest time into them.

                                                                                                                                                                                Is this the way?

                                                                                                                                                                                1. 27

                                                                                                                                                                                  Is this the way?

                                                                                                                                                                                  Not unless you’d like to see the end of accessible general purpose compute in your lifetime.

                                                                                                                                                                                  1. 5

                                                                                                                                                                                    I’m convinced it will happen regardless. Too few people care about it passionately. General purpose computing will become a hobby and cult like the Amiga is today.

                                                                                                                                                                                    1. 2

                                                                                                                                                                                      Also it’ll probably only be relevant if you’ve got such a big project that it takes you 45 minutes to make a fresh clone-to-dev environment and you’re not working with real hardware but something that’s made with replication in mind like web services. Oh and you don’t want any network problems.

                                                                                                                                                                                    2. 2

                                                                                                                                                                                      This could be so, so powerful if the compilation within those codespaces could also be pushed to distributed cloud-build instances. I’d be dying to use this if it came with a prebuilt ccache of previously compiled object files. I’m on a 28 core machine with 64G of RAM and building Firefox still takes up to ten minutes. I know it can be much less than with a distributed compiler like icecc.

                                                                                                                                                                                      1. 3

                                                                                                                                                                                        I think this will be the next step. The first and easiest development workflow to cover a scenario that is matches the remote environment as closely as possible (e.g. linux, no ui, etc). So codespaces is perfect as is for Web Development on Python, Ruby, PHP, JS. The next step would be service development where you combine Remote Execution (https://docs.bazel.build/versions/main/remote-execution.html) with CodeSpaces. It’s a bit tricky because now you have to deal with either multiple build systems, which is very difficult, or enforce a given supported built system (e.g. bazel). But at this point you will have very fast Rust/C/C++, etc compilation and can nicely develop there as well. The problem with CodeSpaces is when it comes to Mobile or GUI development, or worse case, 3D software (games). I am curious to see how they will solve that.

                                                                                                                                                                                        1. 3

                                                                                                                                                                                          Back when I used to build Chromium all the time, the worst part was linking (because it happened every time, even if I only touched one source file.) And [current] linkers are both not parallelizable, and heavily I/O bound, so a distributed build system doesn’t help The only thing that helped was putting the object files on a RAM disk.

                                                                                                                                                                                          1. 1

                                                                                                                                                                                            I don’t recall what was being used because I was a huge Unix fanboy at the time and wouldn’t touch Windows (tl;dr I was even more of an idiot than I am now) but back like 10+ years ago, I recall some folks at $work had this in Visual Studio. I don’t know if it was some add-in or something built in-house but it was pretty neat. It would normally take a couple of hours to compile their projects on the devs’ machines, but they could get it in 5-20 minutes, depending on how fresh their branch was.

                                                                                                                                                                                            I haven’t seen it because it was way before my time but I had a colleague who described basically this exact mechanism, minus the cloud part, because this was back in 2002 or so. ClearCase was also involved though so I’m not sure it was as neat as he described it :-D.

                                                                                                                                                                                            Cloud-based instances are, I suspect, what would really make this useful. Both of those two things were local, which wasn’t too hard for $megacorps who had their own data centres and stuff, but are completely out of my one man show reach. I don’t have the money or the space to permanently host a 28-core machine with 64G of RAM, but I suspect I could afford spinning some up on demand.

                                                                                                                                                                                            I wish this didn’t involve running an IDE in a damn browser but I guess that ship has sailed long ago…

                                                                                                                                                                                            1. 2

                                                                                                                                                                                              Back when we had all those powerful workstations co-located in an office, we had them running icecc, which is really damn awesome and got us above 100 shared cores. For a while, I even ssh’d into my workstation remotely and it worked quite well. But my machine failed me and getting it home was easier than making sure it’s never going to require maintenance again. Especially given that physical office access is very limited.

                                                                                                                                                                                              (As an aside, I agree running an IDE in a browser feels wrong and weird but vscode is pretty OK in terms of usability, considering it’s running on chromium)

                                                                                                                                                                                          2. 2

                                                                                                                                                                                            Docker and Vagrant can be heavy to run and often don’t make reproducible builds. Something like Nix or Guix can help with this part, and if you throw in a Cachix subscription, you can safely build and push once from a developer’s machine to CI, production, and other developers with less overhead.

                                                                                                                                                                                            1. 1

                                                                                                                                                                                              Usually I find it very frustrating to do any sort of development where there is human noticeable (and variable) latency on responses to keystrokes. (eg. Working From Home via vnc or something).

                                                                                                                                                                                              I suspect I’d find this extremely frustrating.

                                                                                                                                                                                              I have been working with a thin schroot container like thing. (ie. Tools, cross compilers, build system etc in a tar ball that gets unpacked into a schroot, gui tools and editor in the native host)

                                                                                                                                                                                              That has been working just fine for me. Schroot is smart about updating the tools when they change.

                                                                                                                                                                                              1. 1

                                                                                                                                                                                                I’m curious what issues you saw/see with a Vagrant setup, that you think some kind of ‘develop in a browser’ environment would solve?

                                                                                                                                                                                              1. 8

                                                                                                                                                                                                Oh, also: whatever approach you choose, you are going to also need to provide an ergonomic, performant animation API.

                                                                                                                                                                                                This is where I died inside. Just no. Animations are one of the most despicable developments of recent UIs. I don’t want to keep either waiting for the computer to do its trivial jobs, or distract me in general altogether. Want to make your phone faster? Disable animations!

                                                                                                                                                                                                You need to support emoji.

                                                                                                                                                                                                Also no, this is a largely pointless complication.

                                                                                                                                                                                                Async You do have nice ergonomic async support, don’t you?

                                                                                                                                                                                                What does this even mean? Win32/X11/Qt/GTK+ are all async by their sheer nature.

                                                                                                                                                                                                He’s describing an opinionated, everything-but-the-kitchen-sink approach. But a decent overview nonetheless.

                                                                                                                                                                                                1. 33

                                                                                                                                                                                                  Complaints about animations an emoji sound very much like “old man yells at cloud”.

                                                                                                                                                                                                  Emoji (and generally Unicode support for more than BMP) is now an expected feature of modern software.

                                                                                                                                                                                                  UI animations can be done well and be helpful, and hint how UI items relate to each other spatially. It’s really weird that even low-end mobile devices have GPUs that can effortlessly animate millions of 3D triangles, but sliding a menu is considered a big effort.

                                                                                                                                                                                                  1. 7

                                                                                                                                                                                                    I’ve honestly never seen a single helpful UI animation in my life, other than spinning wheels and the likes, indicating that the application/system hasn’t frozen up completely. Instead of “click, click, click, be done”, things tend to shift into “click, have your attention grabbed, click, have your attention grabbed, throw your computer out of the window and go live in the woods”. GNOME Builder and GIMP 3 settings dialogues are spectacular examples of GNOME keeping digging its grave.

                                                                                                                                                                                                    One would expect the computer to be a tool, rather than a work of art.

                                                                                                                                                                                                    1. 19

                                                                                                                                                                                                      Maybe that’s just a failing of GNOME?

                                                                                                                                                                                                      For example, macOS has generally well-done animations that don’t get in the way. It tends to animate after an action, but not before. Animations are very quick, unless they’re used to hide loading time. There are also animations to bring your attention to newly created/focused elements. Reordering of elements (menu icons, tabs) is smooth. IMHO they usually add value.

                                                                                                                                                                                                      Touchscreen OSes also animate majority of elements that can be swiped or dragged. The animation is not on a fixed timer, but “played” by your finger movements, so you may not think about it as an animation, but technically it is animating positions and sizes of UI elements. Users would think UI is broken if it instantly jumped instead of “sticking” under the finger.

                                                                                                                                                                                                      1. 4

                                                                                                                                                                                                        Eh, macOS has sort of jumped the gun on animation, too. I’ve activated the “Reduce motion” for it because, by default, the transition between full-screen apps is done by having windows “slide” in and out of view. It’s not just slow (it takes substantially more time to do the transition that in takes to Cmd-Tab between the applications), it legit makes you dizzy if you keep switching back and forth.

                                                                                                                                                                                                        I imagine it’s taken verbatim from iPad (last macOS version I used before Big Sur was… Tiger, I think? so I’m not sure…) where it makes some sense, but I can’t for the life of me understand what’s the point of it on a thing that has a keyboard and doesn’t have a touch screen.

                                                                                                                                                                                                        1. 3

                                                                                                                                                                                                          I can’t for the life of me understand what’s the point of it on a thing that has a keyboard and doesn’t have a touch screen.

                                                                                                                                                                                                          Probably because most people will use their MacBook trackpad to swipe between full screen apps/desktops. I only rarely use the Ctrl-arrow shortcuts for that. A lot of macOS decisions make more sense when you assume the use of a trackpad rather than a mouse (which is why I’ve always found it weird they don’t ship a trackpad with iMacs by default)

                                                                                                                                                                                                          1. 1

                                                                                                                                                                                                            You can still cmd-tab between full-screen applications, which is what a lot of people actually do – a “modern” workplace easily gets you an email client, several Preview windows, a Finder window, and a spreadsheet. Trackpad swiping works great when you have two apps open, not so much when you got a bunch of them.

                                                                                                                                                                                                            When you’re on the seventh out of the fifteen invoices you got open, you kindda want to get back to the spreadsheet without seeing seven invoices again. That’s actually a bad example because full-screen windows from the same app are handled very poorly but you get the point: lots of apps, you don’t always want to see all of them before you get to the one you need…

                                                                                                                                                                                                          2. 1

                                                                                                                                                                                                            These animations are helpful, and have been shown to be so. It’s not something some asshole down at Cupertino just cooked up because he thought it would look cool. Cues as to the spatial relations of things (as the desktops have an order and you use left/right gestures to navigate them) are very valuable to a lot of people, and they even let you turn them off, I don’t really see anything worth complaining about.

                                                                                                                                                                                                            I mean there’s a lot of questionable things Apple is doing these days, but that’s not one of them.

                                                                                                                                                                                                            1. 2

                                                                                                                                                                                                              I’m not talking about desktops, but “maximized” applications (i.e. the default, full-screen maximisation you get when you press what used to be the green button).

                                                                                                                                                                                                              You get full-screen sliding animations when you Cmd-Tab between apps in this case, even though there’s no spatial relations between them, as the order in which they’re shown in the Cmd-Tab stack has nothing to do with the order in which they’re shown in Mission Control (the former is obviously mutable, since it’s in a stack, the latter is fixed).

                                                                                                                                                                                                              In fact, precisely because one’s a stack and the other one isn’t, the visual cue is wrong half the time: you switch to an application to the right of the stack, but the screen slides out to the left.

                                                                                                                                                                                                              Animation when transitioning between virtual desktops is a whole other story and yes, it makes every bit of sense there.

                                                                                                                                                                                                              and have been shown to be so.

                                                                                                                                                                                                              Do you have a study/some data for that? I know of some (I don’t have the papers at hand but I can look it up if you’re curious), but it explicitly expects only occasional use so it doesn’t even attempt to discuss the “what if you use it too much” case. So it’s not even close to applying to the use case of e.g. switching between a spreadsheet and the email client several times a minute.

                                                                                                                                                                                                              (Edit: just for the fun of it, I tried to count how often I Cmd-Tab between a terminal window and the reference manual after I ended up ticking the reduce animation box in accessibility options. I didn’t automate it so I gave up after about half an hour, at which point I was already well past 100. Even if this did encode any spatial cues, I think spatial cues are not quite as valuable as not throwing up my guts.)

                                                                                                                                                                                                        2. 9

                                                                                                                                                                                                          There are many legitimate uses for animations. Yes loading spinners are one of them, unless you think that every single operation can be performed instantly. Sliding and moving elements around on mobile especially is another one. A short animations to reveal new elements after a user action can also improve the UX.

                                                                                                                                                                                                          Not everything has to be one extreme or another - it’s not pointless animations everywhere, or no animations at all. When used well they can improve usability.

                                                                                                                                                                                                          1. 1

                                                                                                                                                                                                            Loading spinners are far from ideal though. A progress bar would be generally better so you have some idea of if it is actually still working and how far is left to go. Or anything else that provides similar information.

                                                                                                                                                                                                            I’ve seen so many times when a loading spinner sits there spinning forever because, for example, the wifi disconnected. The animation then is misleading, since it will never complete.

                                                                                                                                                                                                            1. 4

                                                                                                                                                                                                              That’s an entirely different loading element. You can have animated progress bar. And when progress is indeterminate a spinner makes the most sense. A spinner not stopping on error is a UI bug, not a problem with the concept. If you want to get mad at bad design, how about programming languages and paradigms that don’t make you explicitly handle errors to get in this state.

                                                                                                                                                                                                            2. 1

                                                                                                                                                                                                              The standard way of indicating length is to say so to the user, and possibly add a progress bar, for when progress can be sensibly measured. Like adding a spinner, it needs to be done explicitly. Revealing new elements can be done responsively by improving the design–the standard way is by turning an arrow.

                                                                                                                                                                                                              The notion of phones invading GUIs, as x64k hinted at, is interesting here (though not new). Transplanting things that do not belong, just because of familiarity.

                                                                                                                                                                                                              Going back to the article, it said I needed to. I don’t. And still, I can make anything I desire with the toolkit, with no real change to the required effort. Except for “modern” IM, when I don’t care to implement pictures as pseudo-characters.

                                                                                                                                                                                                            3. 7

                                                                                                                                                                                                              One would expect the computer to be a tool, rather than a work of art.

                                                                                                                                                                                                              The computers I remember most fondly all had some qualities of art in it. Sometimes in the hardware, others in the software, and the ones I like the most had it in both.

                                                                                                                                                                                                              Animations are important in devices in which there is mostly visual feedback. Most computers don’t have haptics, and we often get annoyed at audio feedback. Visual cues that an action was performed or that something happened are important. There is a difference between UI animation and a firework explosion in the corner of the app.

                                                                                                                                                                                                              1. 5

                                                                                                                                                                                                                One would expect the computer to be a tool, rather than a work of art.

                                                                                                                                                                                                                You, me, and everybody in this thread is in the top 0.001% of computer power users. What’s important to us is totally different than what’s important to the rest of the population. Most normies I talk to value pleasing UIs. If you want to appeal to them, you’re going to need animations.

                                                                                                                                                                                                                1. 6

                                                                                                                                                                                                                  I’d argue even further that the 0.001% of computer power users also need animations. When done well, animations really effectively convey state changes in a way that speaks to our psychology. A great example is that when I scroll a full page in my web browser, the brief scroll animation shows my brain how where I am now relates to where I was a split second ago. Contrast this to TUIs which scroll by a full page in a single frame. It’s easy to consciously believe that we can do without things like animations, but I’m pretty sure that all the little immediate state changes can add up to a subperceptual bit of cognitive load that nevertheless can be fatiguing.

                                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                                    I think good animations are ‘invisible’, but bad ones aren’t. So people remember the bad more than the good.

                                                                                                                                                                                                              2. 3

                                                                                                                                                                                                                UI animations can be done well

                                                                                                                                                                                                                Absolutely. I love the subtle animations in iOS. Like when I long-press on the brightness slider to access more controls like the dark mode toggle. I’m already making an action that takes more time than a simple tap, and the OS responds with a perfectly timed animation to indicate that my action is being processed.

                                                                                                                                                                                                                On the other hand, animations can be very easily abused. Plenty of examples, like today’s Grumpy Website post, show animations that hinder accessibility. I think the cases where animation goes wrong are where it was thrown in only because “it’s modern” rather than primarily as a means to convey information.

                                                                                                                                                                                                              3. 15

                                                                                                                                                                                                                I respectfully disagree with your opinion about animations. There are lots of times when I genuinely feel that the animation is important and actually conveys information. For example, the Exposè-style interface in macOS and GNOME is much better since the windows animate from their “physical” locations to their “overview” locations; the animation provides important context about which windows went where, so your eyes get to track the moving objects. It also helps that those animations track your finger movements on the trackpad perfectly, with one pixel of movement per tiny distance travelled across the trackpad (though the animation also has value when triggered using a hotkey IMO).

                                                                                                                                                                                                                But there’s definitely a lot of software which over-uses animations. The cardinal sin of a lot of GUI animations is to make the user wait for your flashy effects. A lot of Apple’s and GNOME’s animations do fit this description, as well as arguably most animations in general. So I think a GUI framework needs a robust animation system for when it’s appropriate, but application programmers must show much more discretion about when and how they choose to use animations. For example, I’m currently in Safari on macOS, and when I do the pinch gesture to show an overview of all the tabs, I have to wait far too long for the machine to finish its way too flashy zoom animation until I actually get the information I need in order to interact further.

                                                                                                                                                                                                                1. 6

                                                                                                                                                                                                                  Bad news, even smooth scrolling is a kind of animation.

                                                                                                                                                                                                                  1. 2

                                                                                                                                                                                                                    I’ll admit, this is an improvement in the browser. Bumping my counter to one case of a useful animation.

                                                                                                                                                                                                                  2. 3

                                                                                                                                                                                                                    What does this even mean? Win32/X11/Qt/GTK+ are all async by their sheer nature.

                                                                                                                                                                                                                    Not really. It is very easy to block the event loop with various other calls (including things like clipboard which like the thing said is async under the hood on X, but qt and gtk don’t present it that way). The gui thing needs to have some way for other operations to hook into the event loop so you can avoid blocking.

                                                                                                                                                                                                                    Not terribly difficult but still you do need to at least think about it, it isn’t fully automatic. (Even on Windows, where it is heavenly bliss compared to unix, you do still need to call a function in your loop like SleepEx to opt into some additional sync processing.)

                                                                                                                                                                                                                    1. 2

                                                                                                                                                                                                                      GTK+ does present clipboard retrieval asynchronously, see https://docs.gtk.org/gtk3/method.Clipboard.request_contents.html which contains a callback argument–that much I remember. Setting clipboard contents can be done blindly, you can have ownership snatched at any moment.

                                                                                                                                                                                                                      Going the way of recursive event loops requires caution that I would avoid imparting on users as much as possible, in particular because of callbacks vs state hell. Typically, this is reserved for modal dialogues, and the API user knows what they’re dealing with.

                                                                                                                                                                                                                      There’s also the possibility of processing the event pump selectively, though that’s another thing you don’t want to do to yourself.

                                                                                                                                                                                                                    2. 1

                                                                                                                                                                                                                      Want to make your phone faster? Disable animations!

                                                                                                                                                                                                                      This is generally the point of animations as a UX feature - they mask the slow operation of applications with a silly animation to keep you distracted/indicate a process is occurring. Want to notice when your app is using a jpeg to pretend it’s loaded? Disable animations!

                                                                                                                                                                                                                      1. 21

                                                                                                                                                                                                                        It’s not only that. The human visual system is very good at tracking movement, much worse at noting that a thing has disappeared and reappeared. If a thing disappears, you’ll typically notice quickly but not immediately be aware of what has disappeared. If you animate movement then there’s lower cognitive load because a part of your brain that evolved to track prey / predators is used rather than anything related to understanding the context of the application.

                                                                                                                                                                                                                        1. 4

                                                                                                                                                                                                                          This is it exactly. The human visual system evolved in a world where things don’t instantly flicker out of existence or appear out of nothing.

                                                                                                                                                                                                                        2. 2

                                                                                                                                                                                                                          I don’t think OP is talking about things like progress bars and spinning indicators, which are pretty legitimate everywhere, but things like “gliding” page transitions between application screens. If a framework is indeed so slow that you notice it rendering widgets, an animation API will help now and then, but won’t make that big a dent. (Edit: also, unless you’re loading things off a network, loading JPEGs cannot be a problem anymore, it hasn’t been a problem in twenty years!)

                                                                                                                                                                                                                          I do think this piece could’ve been more aptly titled “so you want to write a GUI framework for smartphones”. Animations are important on touch screen driven by gestures (e.g. swiping) – gestures are failure-prone, they need incremental feedback and so on, plus nobody who’s not high on their 2013-era post-PC supply expects efficiency out of phone UIs.

                                                                                                                                                                                                                          But they are pretty cringy on desktop. E.g. KDE’s Control Center (and many Kirigami apps) has an annoying misfeature, where you click “back” and the page moves out of view as if you’d swiped it. But you didn’t swipe. Regardless of what you think about animation, it’s not even the right animation.

                                                                                                                                                                                                                          That’s why so many people see them as useless eye candy. If you go all Borg on it and only think in absolute terms, you get a very Borg user experience.

                                                                                                                                                                                                                          Edit: yes, I know, “a modern GUI toolkit” should have all these things. The point is you can drop a lot of them and still write useful and efficient applications. Just because Google is doing something on Android doesn’t mean everyone has to do it everywhere.

                                                                                                                                                                                                                          1. 3

                                                                                                                                                                                                                            It’s funny you mention page transitions. I have my ebook reader set up to do a 200ms-ish animation when I tap the ‘next page’ button where the current page slides off to the left and the next one slides in from the right. It has an option to disable it, but I actually find that disorienting in this vague way I can’t explain. But on my desktop, it’s fine with no animations.

                                                                                                                                                                                                                          2. 1

                                                                                                                                                                                                                            Empirically, that is not how it’s used. This masking is a minority of use cases, and even then it’s bad. To some people that aren’t me, it might be better described as “eye candy” and “smoothness”.

                                                                                                                                                                                                                            Being able to disable this irritation is being lucky, e.g. it’s CSS-hardcoded in Firefox and GTK+ (/org/gnome/desktop/interface/enable-animations only works partially).

                                                                                                                                                                                                                          3. 1

                                                                                                                                                                                                                            What does this even mean? Win32/X11/Qt/GTK+ are all async by their sheer nature.

                                                                                                                                                                                                                            I think they’re talking about Rust async, since this is all in the context of writing a cross-platform GUI toolkit in Rust. This is more of a problem than it seems because if you’re doing a cross-platform toolkit that uses native widgets, it’s not at all trivial to impedance-match whatever model the native widget toolkit uses behind the scenes with your toolkit, which exposes an async model.

                                                                                                                                                                                                                            (Edit: there are some additional complications here, too. For example there are toolkits that (generally) async, but still do some operations synchronously. The author mentions the copy-paste API as an example.)

                                                                                                                                                                                                                            One might conclude that it’s better to not do any of that and instead expose the platform’s intended programming model, as second-guessing thirty year-old code bases tends to backfire spectacularly, but maybe I’m just being grumpy here…

                                                                                                                                                                                                                          1. 2

                                                                                                                                                                                                                            In a world where GraphQL has been denominating, it’s great to see PostgREST still kicking. I was recently assessing it again for a project, and seeing another update always brings confidence.

                                                                                                                                                                                                                            1. 1

                                                                                                                                                                                                                              I’ve been helping out the PureScript community with tooling around the tooling. There’s editor plugin and Nix to support for the two new formatters: purs-tidy and a prettier plugin, pose. Outside of this, I want to get my blog migrated away from an old Hakyll setup + Netlify to Nix + Soupault + Sourcehut.