Threads for cgag

  1. 19

    If that same 2 hour task crops up twice, I have broken even, and if it comes up three times, I’ve come out ahead.

    I’ve always liked to look at the case where you come out behind as just discount practice. If you spent 4 hours automating, and only gained 3 hours back from the resulting code, you got 4 hours of practice for the cost of 1.

    1. 2

      Even faster: fmt.Print(1)

      1. 3

        in nearly 30 years I have never had a bug introduced into my code because a local function variable was mutable when I didn’t expect it. It does nothing for me to aid in code analysis or tracking. It has at most a tiny impact on performance.

        This is a huge annoyance of mine in JavaScript. JavaScript const only prevents reassignment, so using it with function local objects is a waste of time (and a source of bugs where junior devs might naively believe that the object is immutable), but it’s very popular for some reason. Yet I have essentially never seen a bug caused by function local reassignment. The closest thing to it is that in Vue 3, you should do x.value = thing instead of x = thing, so declaring x as const does help prevent bugs. But it’s really just a weird quirk of Vue 3’s reactivity system that makes it valuable.

        1. 5

          I have no idea why JavaScript has const for local variables but IME it is very useful in Typescript because TS uses constness of variables to make type guards more useful. Especially in async code.

          e.g. if I have const x: string | null = ... and I write if (typeof x === "string") { ... } then inside the body of that if statement Typescript continues to believe that x is a string. Whereas if I write let there then the information that Typescript inferred from control flow gets invalidated quite quickly (offhand I think at any function call and after any await in an async function).

          1. 4

            On the other hand, since const and let were standardized I’ve never needed to use let (reassignement) outside of a rare for (let i = start; i < n; i += step). I always use const on the basis that while I don’t need reassignement I shouldn’t enable it.

            1. 2

              I always use let on the basis that it’s shorter and looks better to me.

              1. 1

                while I don’t need reassignement I shouldn’t enable

                Why? Reassigning locals doesn’t cause bugs. Why spend even a second thinking about it?

                1. 6

                  That’s a nice zugzwang, he can’t respond with the obvious retort “I didn’t spend a second thinking about it; I just used const” because then he’ll have spent more energy on the argument and lost by the metatheory that you put in place.

                  1. 2

                    A functional programming mentality encourages immutability by default.

                    1. 1

                      But const is mutable. That’s literally the whole complaint I have about it. That’s why I don’t think you should use it in most cases.

                    2. 1

                      Because let semantically means “I’m going to reassign to this binding later on” while const means “this binding is assigned to only once here”. Like yourself I didn’t really think about it. That just makes sense to me.

                      Both convey some intention to me.

                      1. 1

                        You could have blorf mean you’re going to access a variable an odd number of times and splork mean you’re going to access it an even number of times. You could probably even get very quick at knowing in advance whether a variable if a blorf or a splork. It’s still a waste of time because odd versus even access doesn’t cause bugs and so there’s no reason to keep track of it whatsoever.

                        Mutation causes bugs. Reassigning a local looks similar to mutation, but unlike mutation it is not a source of bugs. People want const to do something about mutation because that’s the source of bugs, but it just doesn’t. It instead prevents reassignment, which is a waste of time. Use const for exported values and primitives (which has the side effect of making them immutable, which is what you want). Don’t use const for local objects because you’re not preventing any bugs.

                1. 5

                  What’s the reason for avoiding Yoda conditions? I see that there’s a way to get errors on assignments when a condition was intended, but I’m still going to be cold dead hands about them without knowing why.

                  1. 8

                    Why write in an awkward, contorted style to prevent a class of errors that the compiler/interpreter is perfectly capable of preventing? In Perl you just need to enable warnings, and in clang/gcc you can use -Wparentheses.

                    1. 3

                      Because the technique is applicable in a huge range of programming languages and environments, many of which don’t have tooling support to catch the error another way. That, and it’s only awkward and contorted the first time you do it.

                      1. 4

                        Even if you personally get used to it, it is contorted for anyone trying to read your code and slows the process down. And most other languages also warn or prevent it. In modern C, you need to put assignments in extra parentheses to avoid warnings.

                        It’s a pity the Pascal approach of := for assignments and = isn’t more pervasive.

                        1. 1

                          I don’t think the contortion issue is that big a deal. I got used to it fast and I can’t see why anyone else couldn’t too. It’s not a new idea and it’s out there in loads of code bases already. There’s nothing inherently correct about putting the variable on the LHS, it just seems more common. This technique costs basically nothing and can prevent bugs. If someone reading code does a double-take when they spot a construction like that, good! It means they’re paying attention.

                    2. 4

                      This isn’t just a piece of Perl advice; anything that allows an assignment to occur in a conditional can potentially have the problem mentioned in the article, which is that you accidentally type an assignment operator in the conditional expression instead of an equality operator, and get a conditional that doesn’t actually implement the logic you wanted to implement.

                      I’ve seen the same advice for working in C and other languages which allow conditional expressions on assignment. Having the left-hand side of the expression be something you can’t legally assign to (as the article recommends) is often the preferred style in such languages, in order to avoid the possibility of accidental assignment due to typo.

                      1. 6

                        It is silly though. People go out of their way and write funny looking code to defend against a class of errors that they are fully aware of. If you are aware enough to write conditions with Yoda style, you are aware enough too look there whe debugging.

                        It also silly to combat a class of errors by reminding yourself about it every single time. How is that better than checking them all before compiling? At the point you think “I write this condition with this style because…”, Why don’t you just make that same thought exercise but put two double signs instead of one?

                        Quite frankly, I suspect people do such sily things because it gives them a feeling of being “advanced” programmers. It’s an exercise of display of experience. I personally never felt any gain in such silly technique nor have I found anyone that came up with that themselves for their own interest, rather than having learned it from someone else.

                        1. 4

                          languages which allow conditional expressions on assignment

                          … and which make the assignment operator a prefix of the comparison operator.

                          1. 2

                            Yes, I know why to use a Yoda condition, I’m curious why “avoid Yoda conditions […] you should.”

                            1. 4

                              As far as I can tell, the reasoning in full totality is “they look weird”.

                              1. 3

                                The unstated assumption (which I think is uncontroversial) is that the common, standard way to write conditionals in most every language is if $var == val, so by using the yoda style you are just going against the grain for no good reason, making your code idiosyncratic. It’s not “bad” in any absolute sense…. it would just be like making weird but legal formatting choices, or using camelCase in a language whose standard style was snake_case, etc…

                                An invalid (imo) answer to your question is that the non-yoda style is more “natural” in some absolute sense…. which is like saying SVO or more natural than SOV word ordering.

                                1. 4

                                  I don’t believe there are any absolutes at play here, like you mention, but it’s funny you bring up word order, because I think it’s precisely due to the predominance of subject-first languages that the variable-first order in conditionals is more intuitive, because I would guess that most people, in referencing a variable that way, model it as the subject of the conditional expression at hand in their heads.

                                  Anyway, if it’s not something you already do intuitively, I don’t know why you’d adopt the practice when static analysis can easily guard against this case and others besides.

                                  1. 2

                                    I think it’s precisely due to the predominance of subject-first languages that the variable-first order in conditionals is more intuitive

                                    Absolutely. Which implies that “more intuitive” here means “what you’re used to”. Which is also the reason to follow community standards, when they exist, which was essentially my answer to the question. It just makes it easier for everyone, on average. You can say, “But the accepted way is not more intuitive to me,” and choose to die on that hill, but as a general policy when working with shared code I think it’s wiser to give in, and in a few weeks the accepted way will probably start to look natural. The point is, all these things are arbitrary and habit-driven.

                                    1. 2

                                      In most natural languages (all?) The subject comes first when stating a comparison verbally. The subject is the fixed mental reference that is to be tested against a value and therefore we start by that. We start by what’s known. The value on the other hand is naturally put by the question signal (a question mark or descending melody) because is the part of the language that is subject to that doubt.

                                      Note that, unlike latin languages, Germanic languages such as English often have qualifiers (adjectives) in front of subjects. However, not when asking a question. In that case the subject comes first and the “value” comes next by the question marker.

                                      Yoda conditionals look weird because they are objectively conter intuitive. Sure, one can get used to it as with anything else.

                                      1. 1

                                        This got me curious. According to Wikipedia 87% are SOV (45) or SVO (42). 9% are VSO. Was surprised to find svo wasn’t the most common.

                            1. 2

                              I have a layer with thr f keys and ctrl Alt and delete on them and I don’t use it often.

                              1. 3

                                Every command is broken into a Block

                                Seems like a custom shell prompt is still visible in these screenshots. Is it using Semantic Prompts within a regular shell session?

                                Also curiously absent is any mention of how well full screen apps like text editors work in there.

                                I think the primary sales point of Warp is the Sharing functionality

                                That… that’s just a pastebin?


                                Plug: Wezterm is the real deal! I don’t know why I’ve stuck with Alacritty for so long. Wezterm is focused on features and usability rather than some abstract “simplicity”. It’s really good.

                                1. 1

                                  The prompt is fully controlled by Warp currently (we render it with information that we wire from the shell, more information here: https://blog.warp.dev/how-warp-works/).

                                  Full screen apps like Vim work like they do in any other terminal emulator. There’s a screenshot of Emacs and Nano in Warp in one of our blog posts if you’re interested in seeing an example! https://blog.warp.dev/fantastic-terminal-programs-and-how-to-quit-them-2/

                                  1. 1

                                    Just checked out wezterm and I’m definitely going to try it out for a bit. Thanks. Feels nicer than the windows terminal, I think maybe the latency on windows terminal is more noticeable than I realized.

                                  1. 14

                                    This really nails everything about how much I regret being a language enthusiast.

                                    1. 2

                                      I have a few queries that it has some trouble with, that I’ve left as strings. A few where I had to add some column aliases to make it happy, but it understands the vast majority of my crazy queries with CTEs and unions and subselects that I was worried about before I tried it. I’m very happy with it.

                                      I think a lot of what I like about it is naming all my parameters and it generating struct arguments. I was using sqlx and the NamedGet/etc functions and passing a maps of string to interface, but it’s not type safe, and sqlx doesn’t have Named varieties for all the query functions, which really annoyed me.

                                      1. 22

                                        As much as I love lisps, ‘totalitarian’ and ‘policing’ is a bit of an odd spin to put on languages with a more constrained operational model. You know what’s a really totalitarian move? Your program crashing. The CPU, that dictator, doing exactly what you told it and shitting the bed as a result.

                                        When a language enforces strong, static typing, memory safety, or immutability, it doesn’t feel like I’m being policed; it feels like I’m using the computing resources in front of me to improve my chances that my program will work once it’s running.

                                        1. 44

                                          You know what’s a really totalitarian move? Your program crashing. The CPU, that dictator, doing exactly what you told it and shitting the bed as a result.

                                          You know what’s really totalitarian? Killing political dissenters. “Totalitarian” is a silly word to apply to programming languages.

                                          1. 7

                                            In line with the author’s distinction between Common Lisp’s, erm, adaptability, I suppose? and the “grand ideas” languages, I’d suggest replacing the obviously out-of-place “totalitarian” with the much nicer “hedgehogs-like”.

                                            I’m nodding at Isiah Berlin’s The Hedgehog and The Fox (itself an allusion to a much older line) here, although nowadays Philip Tetlock’s study about political experts and forecasters may be more widely known nowadays. I’m specifically mentioning Berlin’s essay, though, because Tetlock sort of makes a value judgement in his study, whereas Berlin is far less categorical in this regard, and it’s sort of what I’m trying to do here, too.

                                            By analogy with Berlin’s classification, “hedgehog” languages, like Haskell or Rust, or more generally, hedgehog systems, like Unix (“everything is a file”) have this single, elegant, unifying philosophy, a sort of lens through which they view everything, whereas “fox-like” languages like Perl, Python, Common Lisp or C# have no single grand idea that permeates their entire design. (One could argue that C#‘s grand idea is OOP but there are plenty of functional idioms in it, for example; I guess C++ would’ve been an even better example?)

                                            Both have good and bad sides – this is why I specifically cautioned against following Tetlock’s analogy too much (in his study, foxes are better at forecasting than hedgehogs, but this is really not about forecasting).

                                            Lots of “hedgehog” languages have a well-earned reputation for elegance and solid design, and they push all sorts of things forward. But grand unifying theories fare no better in computer science than they do in physics: oftentimes, reality just won’t bloody fit their elegant design, and elegant designs often get a bloody nose when they run into the real world. This is further complicated by the human factor, as people tend to get attached to their tools more than it’s healthy, and the results are often baffling.

                                            “Fox” languages may feel more pragmatic, and the fact that they’re not attached to a particular world model means that sometimes they really are substantially better at handling things that just don’t fit the damn model. But lack of a “higher” unifying idea in a language often descends upon the programs written in that language, too, and they can end up messy. This, too, is further complicated by the human factor: just because they have multiple tools at their disposal doesn’t mean people will end up using the right one, and all this flexibility sometimes encourages them to do things just because they can, without wondering if they should, too.

                                            Also, hedgehogs and foxes are really cute and that alone would suffice, just sayin’ :-D.

                                            (Edit: obviously, this is an informal classification :P. One could argue, for example, that Common Lisp belongs in the “hedgehog” category because homoiconicity is the grand idea around which the entire language is built. Like any classification that isn’t based on numbers, it’s hard to say exactly where the border is, but that doesn’t make it any less useful, because most of the time, it’s pretty easy to figure out when two languages (say, Rust and C++, or Haskell and Common Lisp) are on different sides of the border.

                                            1. 6

                                              I reject the fox/hedgehog classification. Haskell and Rust are every bit as general purpose as Common Lisp. They can be used for all of the same problems.

                                              In addition to the syntax, Lisp’s grand unifying idea is that everything can be represented by (mostly) mutable, garbage collected objects, with a notion of object identity that you can test using ‘eq’. No other language worked this way when Lisp was introduced.

                                              The fact that this idea has become mainstream does not change the fact that Lisp’s “everything is a garbage collected mutable object” is not a good fit for every problem. Haskell and Rust stand out by the fact that they don’t use this model. Haskell is based on pure functions and immutable values. Rust also has elevated support for immutability, and is not garbage collected.

                                              Lisp’s grand idea works great for single-core CPU programming. It’s terrible and unusable for GPU programming. Shared mutable objects are not great for concurrent programming in general. That’s where programming with immutable values instead of mutable objects has clear benefits. There are also lots of contexts where garbage collection is a liability, and where Rust is moving in.

                                              1. 1

                                                The point of the classification is not general purpose vs. special purpose, just how many different, sometimes conflicting ideas a language accommodates. For example, Haskell is obviously just as general-purpose as Common Lisp, but while Common Lisp happily includes both imperative and functional idioms, Haskell is far less willing to accommodate the former. Similarly, C++‘s memory model, far less constrained that Rust’s, will accommodate plenty of things that Rust won’t. Not that it’s a good thing.

                                            2. 5

                                              I suppose a CS forum would be among the tougher crowds for metaphor.

                                              1. 12

                                                Calling a language “totalitarian” is like me calling you a Qanon supporter: while there might be some technical denotative merit to the analogy, it’s so hyperbolic to completely ruin the point you’re trying to make. There’s a difference between a metaphor and a good metaphor.

                                                (You’re just like a Qaon supporter in that I disagree with you.)

                                                1. 2

                                                  I can’t get behind this totalitarian language policing, even if it weren’t a good metaphor, which I think it is.

                                                  1. 7

                                                    Calling a metaphor bad isn’t totalitarian language policing, it’s criticizing the quality of the article. Which is a totally normal and reasonable thing for writers to do. Anyway, this is now pretty off-topic for the OP, feel free to DM if you want to continue chatting aesthetics.

                                            3. 4

                                              also both of these languages do allow you to do whatever nonsense you would like, with unsafePerformIO in haskell and unsafe blocks in Rust.

                                              1. 2

                                                Yeah this seems like the same bad argument against static typing - you can just use Object/Any types and voila you have dynamic typing. As you say, these constructs are a superset of what was possible before and arguing that they limit you is silly

                                                1. 4

                                                  I don’t think this is a great response. Sure, you can emulate some features of dynamic types with Any everywhere, but the language isn’t holistically designed around dynamic types, so you’re swimming upstream when you want to do anything. Kinda like how you can emulate HOFs with the strategy pattern, but it’s not the same as having HOFs as a primitive.

                                                  1. 2

                                                    You say emulate some features - are there any features of dynamically typed languages that you can’t emulate in a statically typed language? Sure, additional boilerplate of Any is annoying. But the article talks about certain things being impossible to do in languages, not just annoying.

                                                    1. 2

                                                      Sure, some dynamically typed scripting languages can have programs rewrite their own code as strings and immediately interpret it without losing state. You can technically do that in Haskell by writing a dynamic Haskell interpreter and running that, but I’d call that a whole new language.

                                                      Side note, I think Haskell has some dynamic typing features that I haven’t seen in actual dynamic languages, like witness types. You can have a value become untyped and later cast it (or a computation result) back to the right type because it was witnessed.

                                                  2. 2

                                                    Technologies have affordances, because technologies are opinionated. So, yes, you can reproduce certain alien patterns in various languages, but you’re going to be fighting uphill the whole time.

                                                    1. 2

                                                      Sure, but the article frames them as being impossible to do “Encouraging you to avoid something, however, is quite different from banning it outright.”

                                                2. 3

                                                  The CPU, that dictator, doing exactly what you told it and shitting the bed as a result.

                                                  Dictator being defined as something that does exactly what I tell it sounds a bit odd.

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

                                                                          I actually feel that we should compare Zig to Go, because it is closer in concept to what I think Go wanted to be

                                                                          Eh.. kinda, yes, as in Go “wanted to be a modern C”, but it seems like fully automatic memory management was a really big part of their vision of “modern”.

                                                                          1. 11

                                                                            Yeah, I never understand comparing Go to C, Go competes more with Java at the “mid level garbage collection care about performance a bit” tier

                                                                            1. 5

                                                                              I think it’s because it’s small and imperative, and also doesn’t hide pointers from you.

                                                                              1. 8

                                                                                Go compiles to native code. Besides the performance benefit, it also means that, like C/++, it produces a regular binary file anyone can simply run without having to install anything. This also makes binding to C APIs a lot easier.

                                                                                At the language level, Go and Java disagree violently about inheritance and error handling.

                                                                                1. 2

                                                                                  Yes

                                                                                  1. 3

                                                                                    There is no reason Java can’t compile to native as well. And with GraalVM it is becoming more and more prevalent.

                                                                                2. 4

                                                                                  I assume the connection to C is primarily because of Ken Thompson’s involvement.

                                                                                  1. 2

                                                                                    i always feel like Go is a lovechild of C and Scheme : compiles to native, compiler can detect stack allocatable activation records as in C, with a huge standard library, but the compiler can also generate functions whose activation records are heap allocated for situations needing a construction of a closure for runtime realization of lexical scoping like Scheme (and , unlike Java’s half-hearted version).

                                                                                  2. 6

                                                                                    There’s also a “X for me but not for thee” division between how go’s stdlib is implemented under the hood versus user code. That philosophy is non-existent in zig, and often I find myself cribbing code snippets or concepts from stdlib in zig.

                                                                                  1. 5

                                                                                    It’s good for programmers who too smart for their own good.

                                                                                    Yes, it’s easy to use and easy to read. It’s possible these things are more important than concision, even to some smart people.

                                                                                    1. 1

                                                                                      The feeling I have is that AI may do for art and music what it has done for playing Chess and Go.

                                                                                      Indeed, ruin them.

                                                                                      1. 5

                                                                                        I don’t think that’s fair. AIs are better than humans in chess, but it’s widely accepted that they’ve made human-level play much better, by making chess training and board analysis widely available even to people who can’t afford coaches.

                                                                                      1. 11

                                                                                        The meat of this article is pretty good, unfortunately it is halfway down after reading through what anyone outside the movement could only see at an anti-government borderline-covid-denying rant. I honestly feel that, your personal feelings on how the pandemic should be handled notwithstanding, the point would be clearer and more forceful if given the main spotlight of the article.

                                                                                        1. 11

                                                                                          The meat of this article is pretty good, unfortunately it is halfway down after reading through what anyone outside the movement could only see at an anti-government borderline-covid-denying rant.

                                                                                          That “Unfortunately” represents an extremely politicized opinion. There are lots of good reasons to be opposed to (your particular) government, including actions that (your particular) government has undertaken in the name of managing the coronavirus pandemic. Similarly it is reasonable to be suspicious of people using “borderline-covid-denying” as a way of dismissing an argument - “borderline covid-denying” implies that the OP did not in fact deny the existence of the covid pandemic, and there are lots of statements that are semantically close to denying the existence of the covid pandemic - like “it’s bad if the government forces people to install closed-source software on their cell phones in the name of fighting pandemics” that constitute extremely reasonable political arguments.

                                                                                          1. 4

                                                                                            Again, I did not dismiss the argument or (necessarily) even disagree with the rant. This was meant as constructive criticism of the article to say that focussing on the point/meat would make the point punch harder with all audiences.

                                                                                          2. 8

                                                                                            The opening section is a bit of a waffle; I have trimmed it down. The “papers, please” section in particular was true but off-topic. The techno-authoritarianism remark remains true, but is hard to elaborate in an on-topic way, so it’s been removed too. (Aside: Population-level vaccine targets provide aligned incentives without compromising people’s medical privacy or bodily autonomy.)

                                                                                            It is possible to build privacy-preserving check-in, and to legislate protections for the data; it is a travesty that Australia has pretty much done neither. (Small exceptions: Western Australia legislated protections after it was revealed that the police accessed contact tracing and border pass data, and the federal government’s failed COVIDSafe app has strong legal protections also.)

                                                                                            I think you are being extremely rude and uncharitable to lump me in with some “movement” of nutters, and I’d like you to apologise. Like most Australians, I am waiting patiently for our vaccine rollout to crawl down the age brackets, increasingly frustrated that additional restrictions and surveillance are imposed on citizens because of the government’s failures.

                                                                                            (Quote of the removed original text below, for reference):

                                                                                            Over the past year, there have been incredible restrictions on people’s freedoms of movement, speech, and association, in the name of protecting public health. On a recent trip, I was required to carry travel papers for 14 days, and to show them on request to certain classes of authorised officers — something I never thought I’d be required to do in a first-world liberal democracy.

                                                                                            In Australia, we are now required by law to pump our personal information into one or more “contact-tracing” platforms in order to visit the supermarket or have something like a normal social life. This all-but-forces people to own a smartphone, and to interact with an enormous pile of proprietary software just to participate in society. Despite earlier promises to only be used for contact tracing, these databases have been used by police. Because of course they have.

                                                                                            Elsewhere, there are talks of “vaccine passports” on smartphones, which accelerates techno-authoritarianism and should therefore be resisted. (Search for “raise the more generalized version of this objection”.)

                                                                                            1. 9

                                                                                              I think you are being extremely rude and uncharitable to lump me in with some “movement” of nutters, and I’d like you to apologise. Like most Australians, I am waiting patiently for our vaccine rollout to crawl down the age brackets, increasingly frustrated that additional restrictions and surveillance are imposed on citizens because of the government’s failures.

                                                                                              1. He meant the Free Software Movement, the one you’re advocating in the piece.
                                                                                              2. That removed original text is pretty easily construed as an anti-government borderline-covid-denying rant.
                                                                                              1. 5

                                                                                                I disagree with your claim #1: as it’s embedded in the sentence “anyone outside the movement could only see at an anti-government borderline-covid-denying rant”, it reads pretty clearly to me like it applies to the various covid-is-a-conspiracy “movements”.

                                                                                                I can back everything in #2 with links to mainstream (i.e. not Murdoch/fringe/conspiracy-tier) news articles or to the relevant health orders, but to do so would take us further off-topic. I still do not understand this reading that you and singpolyma seem to see in the original text. (The “borderline-covid-denying” part, in particular. Whatever; it’s off-topic and removed from the main post, anyway.)

                                                                                                1. 5

                                                                                                  If you have been paying even a modicum of attention to news, you know that there are and for a long time have been people who, no matter what crisis or emergency occurs, immediately denounce it as either a complete fiction or at best having been blown out of proportion as a cover story for the “truth”, which always is that the (insert preferred evil conspiratorial one-world-government entity here) wants an excuse to finally confiscate all our guns, terminate our freedoms, and institute worldwide dictatorship, all of which is only held at bay by badly-formatted postings from lone heroes on the internet.

                                                                                                  What people are telling you is that the quoted section of your post sounds like one of those paranoid rants, in that it can be read to imply that contract tracing and vaccination status are sham reasons being used to impose the real agenda of “techno-authoritarianism”.

                                                                                                  1. 2

                                                                                                    What people are telling you is that the quoted section of your post sounds like one of those paranoid rants, in that it can be read to imply that contract tracing and vaccination status are sham reasons being used to impose the real agenda of “techno-authoritarianism”.

                                                                                                    They’re worse than sham reasons to impose the real agenda of techno-authoritarianism - they’re superficially good reasons to impose the real agenda of techno-authoritarianism. Techno-authoritarianism is advanced more by a broad social atmosphere where opposition to software authoritarianism is widely thought of as low-status and uncomfortably adjacent to people with heretical politics, than it is by genuine conspiracies.

                                                                                                    1. 3

                                                                                                      Your formulation appears to be a literally irrefutable claim, in that anything and everything could be described, via argumentative gymnastics, as advancing or supporting “techno-authoritarianism”.

                                                                                                  2. -2

                                                                                                    Ignore them, they’re robots.

                                                                                                  3. 2

                                                                                                    Thank you for reading me correctly and providing this good summary of my comment

                                                                                                    I would like to further clarify that I in no way meant to assume the rant was in bad faith (as someone in the Free Software movement, I could see the intent) but only that it would be easy to read it that way and thus distract from the meat of the article.

                                                                                                  4. 3

                                                                                                    I don’t think those three paragraphs make you out as a crank. I think it is fine and good to ask for serious privacy protections in contact-tracing, vaccine passport, and identity systems.

                                                                                                    I would like to point out that many liberal democracies require their citizens to carry ID with them at all times. I believe this is the law in Germany and France, where I understand it is mostly used for harassing ethnic minorities.

                                                                                                    FWIW, I think this history could be used to strengthen your argument: “liberal” democracies are very comfortable with authoritarianism for some of the population and these illiberal mechanisms are rarely dismantled, so they will accumulate if not resisted.

                                                                                                    1. -2

                                                                                                      a first-world liberal democracy.

                                                                                                      In Australia

                                                                                                      I think king Murdoch would disagree.

                                                                                                    2. 5

                                                                                                      Being anti-government is not immoral per se. It depends on the government. For example, you would probably agree that it’s moral to be anti-government in North Korea. You don’t have to deny Covid, the respiratory disease, to see that some governments have massively overstepped their boundaries. For example, there is mounting evidence that dusk-to-dawn curfews have no impact on the pandemic situation whatsoever, yet they were broadly imposed, often violating the constitution of the respective country. I would appreciate if people like you would stop with the moralistic shaming and inspect the subject matter with more care and thought. Not everyone who criticises the measures or aspects thereof is a science-denying anarcho-terrorist.

                                                                                                    1. -8

                                                                                                      Good, this place doesn’t deserve him.

                                                                                                        1. 29

                                                                                                          Weird, I definitely disagree on expanding this. It just wastes horizontal space and keystrokes for no benefit.

                                                                                                          Maybe I32 and Str instead of i32 and str, but abbreviations for commonly used things are good. You’re not even getting rid of the abbreviation, Int is after all short for Integer.

                                                                                                          1. 9

                                                                                                            I agree with this (I think lowercase would be fine, too, though).

                                                                                                            I think that Rust overdoes it a little bit on the terseness.

                                                                                                            I understand that Rust is a systems language and that Unix greybeards love only typing two or three characters per thing, but there’s something to be said for being descriptive.

                                                                                                            Examples of very terse things that might be confusing to a non-expert programmer:

                                                                                                            • Vec
                                                                                                            • fn
                                                                                                            • i32, u32, etc
                                                                                                            • str
                                                                                                            • foo.len() for length/size
                                                                                                            • mod for module
                                                                                                            • mut - this keyword is wrong anyway
                                                                                                            • impl

                                                                                                            None of the above bothered me when I learned Rust, but I already had lots of experience with C++ and other languages, so I knew that Vec was short for “vector” immediately. But what if I had come from a language with “lists” rather than “vectors”? It might be a bit confusing.

                                                                                                            And I’m not saying I would change all/most of the above, either. But maybe we could tolerate a few of them being a little more descriptive. I’d say i32 -> int32, Vec -> Vector, len() -> count() or length() or size(), and mut -> uniq or something.

                                                                                                            1. 11

                                                                                                              mut -> uniq

                                                                                                              Definitely this!

                                                                                                              For the context of those who aren’t familiar, &mut pointers are really more about guaranteeing uniqueness than mutability. The property &mut pointers guarantee is that there is only one pointing at a given object at a time, and that nothing access that object except through them while they exist.

                                                                                                              Mut isn’t really correct because you can have mutability through a & pointer using Cell types. You can have nearly no mutability through a &mut pointer by just not implementing any mutable methods on the type (though you can’t stop people from doing *mut_ptr = new_value()).

                                                                                                              The decision to call this mut was to be similar to let mut x = 3… I’m still unconvinced by that argument.

                                                                                                              1. 4

                                                                                                                Not to mention the holy war over whether let mut x = 3 should even exist, or if every binding is inherently a mutable binding since you aren’t actually prevented from turning a non-mutable binding into a mutable one:

                                                                                                                let x = 3;
                                                                                                                let mut x = x;
                                                                                                                // mutate the ever living crap out of x
                                                                                                                
                                                                                                                1. 4

                                                                                                                  My favorite is {x} allowing mutability, because now you’re not accessing x, but a temporary value returned by {}.

                                                                                                                  1. 2

                                                                                                                    I never knew about that one! Cute.

                                                                                                              2. 11

                                                                                                                For an example, check out some Swift code. Swift more or less took Rust’s syntax and made it a little more verbose. fn became func, the main integer type is Int, sequence length is .count, function arguments idiomatically have labels most of the time, and so on. The emphasis is on clarity, particularly clarity at the point of use of a symbol — a function should make sense where you find a call to it, not just at its own declaration. Conciseness is desirable, but after clarity.

                                                                                                                1. 2

                                                                                                                  Yep. I also work with Swift and I do like some of those choices. I still think the function param labels are weird, though. But that’s another topic. :)

                                                                                                                2. 4

                                                                                                                  I think this mostly doesn’t matter - I doubt anyone would first-try Rust, given its complexity, so it’s not really that much of an issue. Keywords are all sort of arbitrary anyway, and you’re just gonna have to learn them. Who’d think go would spawn a thread?

                                                                                                                  I, for one, think these are pretty nice - many people will learn Python so they expect len and str, and fn and mod are OK abbreviations. I think the terseness makes Rust code look nice (I sorta like looking at Rust code).

                                                                                                                  Though I’d agree on mut (quite misleading) and impl(implement what?).

                                                                                                                3. 2

                                                                                                                  Oh, true.

                                                                                                                  I don’t care about the exact naming conventions, as long as it is consistent. (This is in fact exactly how I named types in my project though, what a coincidence. :-D)

                                                                                                                  In general the random abbreviations of everything, everywhere are pretty annoying.

                                                                                                                  1. 3

                                                                                                                    It’s the consistency, yes. Why should some types be written with minuscles?

                                                                                                                    1. 4

                                                                                                                      Lowercase types are primitive types while camelcase are library types. One has special support from the compiler and usually map to the machine instructions set while the other could be implemented as a 3rd party library.

                                                                                                                      1. 4

                                                                                                                        Because they are stack-allocated primitive types that implement Copy, unlike the other types which are not guaranteed to be stack-allocated and are definitely not primitive types.

                                                                                                                        1. 1

                                                                                                                          And how does the lower-case letter convey this fact?

                                                                                                                          1. 4

                                                                                                                            How does anything convey anything? It’s a visual signal that the type is a primitive, stack-allocated type with copy semantics. As much as I hate to defend Java, it’s similar to the int/Integer dichotomy. If they were Int and Integer, it wouldn’t be quite so clear that one is a primitive type and the other is a class.

                                                                                                                            1. 3

                                                                                                                              I just searched for “Rust stack allocation lower-case” but couldn’t find anything. Do you have a link that explains the connection?

                                                                                                                        2. 2

                                                                                                                          Because they are used more than anything else :)

                                                                                                                          (and really it should be s32 to match u32)

                                                                                                                          1. 1

                                                                                                                            Not a good reason. Code is read way more often than it is written.

                                                                                                                            1. 4

                                                                                                                              I don’t see how i32 is less readable. It makes the code overall more readable by making lines shorter and looks better.

                                                                                                                    1. 15

                                                                                                                      I think I agree with the first person who wrote him a letter. There is a difference between finding more novel and varied examples and picking examples designed to goad your readers.

                                                                                                                      Please in the future, remember that we, the book buyers, are looking for information about using PL/SQL. I am as tired of the emp and dept tables as you are, but less distracting examples would have been more appropriate.

                                                                                                                      Everyone has a political view and sometimes that arises legitimately in technology but I think it’s just basic self-control to express your political view only where it really might help something.

                                                                                                                      1. 21

                                                                                                                        The dude’s point is that we all have a political perspective, and we’re expressing it, either explicitly or implicitly. He chose to express his explicitly through the examples in his textbook.

                                                                                                                        If you write a database text and fill it with department / employee type examples, shopping examples, and so forth, then you are implicitly promoting a capitalist world view, the same world view that does not bat an eye when using degrading terms like “human resources”. At least here in the US, this sort of thing goes unquestioned, because of the dominant ideology.

                                                                                                                        1. 5

                                                                                                                          Yes, it’s implicit, it’s unquestioned and nobody bats an eye - and that’s why it makes for better examples.

                                                                                                                          Examples require the use of social territory. That territory can be either unquestioned good or questioned territory. When choosing examples in questioned territory, you engage in active cultural participation; when choosing examples in unquestioned territory, you engage in passive cultural participation. Examples should engage in passive participation, because that way they are relatable to the greatest number of readers.

                                                                                                                          (You can also use unquestioned bad territory, such as defining a database schema to count Jews in the Holocaust for the Nazis, but then nobody will buy your book.)

                                                                                                                          1. 9

                                                                                                                            I don’t see why “nobody bats an eye” is a desirable quality for examples or why “active cultural participation” is a bad thing.

                                                                                                                            It’s not at all clear to me that the examples given are not relatable or that “relatable to the greatest number of readers” should even be a core value. Perhaps provocative examples engage readers more and cause them to think about the examples more.

                                                                                                                            1. 5

                                                                                                                              Would be curious how you’d feel if it were something sorting countries by iq or something.

                                                                                                                              Would you be happy to be engaged, or be distracted by a thinking about testing methodology and things like that?

                                                                                                                              1. 3

                                                                                                                                I’d have to see it in context to find out how I’d react. IQ is strongly related to class and similarity to the people who devised the test, and such a table might be part of a demonstration of that.

                                                                                                                                Certainly if an example just seemed pointlessly offensive I would think less of the author and maybe choose a different textbook.

                                                                                                                                But I think equating a hypothetical very racist example with some examples that are a bit left of centre in the USA is unfair.

                                                                                                                                1. 3

                                                                                                                                  A substantial amount of political dispute in the English speaking world is precisely about what speech counts as racist and therefore legitimately stigmatizable. Using data that implies that cognitive capacity is meaningfully different between different countries of the world in a programming example constitutes a political assertion that this idea is not stigmatizable; in the same way that the article’s example about a war criminal database constitutes a political assertion about how people should see Henry Kissinger.

                                                                                                                            2. 6

                                                                                                                              But now you’ve thought about it, so it has become active participation. From now on you are obliged to make sure your examples completely apolitical.

                                                                                                                              Consider engineers have a code of ethics, https://en.wikipedia.org/wiki/Order_of_the_Engineer

                                                                                                                              If your work includes producing examples they should “serve humanity”. I cannot conscientiously make examples that promote capitalism, but giving examples that might make people think about world affairs would be okay.

                                                                                                                              1. 4

                                                                                                                                Yes, it’s implicit, it’s unquestioned and nobody bats an eye - and that’s why it makes for better examples.

                                                                                                                                That assumes a lot from the readership. For a mundane, apolitical example, I submit children to this discussion. For most my childhood due to various reasons, I only had access to a Pentium. It didn’t have a network connection, and I eventually installed Linux on it. Because Linux made it so easy to code, I would try to check out books from the library and learn how to write code, but all the examples were completely unrelatable to me as a pre-teen. Employee this, business that, I realized even at the time that the examples were meant to be highly relatable to practitioners, but I honestly found math much more interesting than these soulless books because I was unable to relate to them in any way. That was one of the big reasons I started out coding by trying to write games; game programming books felt much more relatable to me as a kid who read a lot of books and played video games than these soulless books about employee hierarchies and recipes.

                                                                                                                                Also, it’s important to keep in mind that the conditions that make something unpolitical are pretty restricted in context. Someone growing up in a developing country or a country with a very different economic ideology will probably find these staid business examples just as unrelatable as children. International editions of textbooks frequently do change examples for exactly this reason.

                                                                                                                                1. 1

                                                                                                                                  I would try to check out books from the library and learn how to write code, but all the examples were completely unrelatable to me as a pre-teen. Employee this, business that, I realized even at the time that the examples were meant to be highly relatable to practitioners, but I honestly found math much more interesting than these soulless books because I was unable to relate to them in any way.

                                                                                                                                  I also started learning at a young age, and I find this attitude so alien.

                                                                                                                            3. 5

                                                                                                                              Everyone has a political view and sometimes that arises legitimately in technology but I think it’s just basic self-control to express your political view only where it really might help something.

                                                                                                                              I am totally with you on this, and do my best to keep my political perspectives away from the technology work I do as much as I can. I have worked on projects with ethical/political considerations (whether someone might consider a few of these projects ethical depends on their personal political leanings.) Definitely a touchy subject.

                                                                                                                              That being said, I have a really hard time empathizing with the readers who wrote in to complain that the examples are too distracting. I believe a database book aught to have concrete examples while teaching the abstract concepts (e.g. it’s a book about writing databases in general, not “how to keep track of war criminals”). My own personal reaction to the examples talked about are “ok, whether I agree with the premise or not, these examples have interesting abstract concepts that they’re illustrating.” There are lots of systems that exist in this world whose existence I fundamentally disagree with, but where I’d also love to pop the hood and figure out how they work!

                                                                                                                              In fact, as I sat here thinking about this, I started wondering if, for me, this style of examples might actually help cement specific concepts with easy mental look-up keys; I can imagine coming to a database design problem and thinking “oh, this is like the Kissinger problem.”

                                                                                                                            1. 36

                                                                                                                              Honest question: why should I care it’s written in Rust? I keep seeing these posts of new software and the authors highlight its “written in Rust.” I’ve never before seen such an emphasis on the language rather than the features it offers.

                                                                                                                              1. 34

                                                                                                                                I care that it isn’t written in C/C++. Memory safety catches a lot of security bugs. And language communities have different cultures, so knowing the actual language can be a signal as well.

                                                                                                                                1. 17

                                                                                                                                  Okay, but in that case, it would be cool if the submission at least highlighted some of the neat use cases for which the language is relevant. E.g. if the description would at least mention an example – a particular module that’s very easy to get wrong in C, but Rust is particularly suited to, the way e.g. Julia is so well-suited for writing a FEM program. Or a “this module would’ve been 600 lines of inscrutable C but look how neat it is when you have explicit lifetime management features baked in the language”.

                                                                                                                                  If there’s none of that, but it’s just a very good program, that’s great (even better, in fact) – but at least let’s talk about that. Is it remarkably fast, in which case can we have some benchmarks? Is it super secure, as in, has anyone tried to do even an informal review, it’s cool that it’s written in Rust but what I’d really like to know is if someone checked it to make sure that attempting to view an attachment called /dev/null; rm -rf ~ won’t nuke my home folder, which is a far more straightforward exploit than anything involving memory safety.

                                                                                                                                  Better – hell, best yet – if it’s none of that, and the author just wrote a cool program and wants to share it with everyone else and wants some feedback. Great, but can we at least get that? Hey, fellow lobsters, here’s a thing I made, it’s super early, it won’t be big and professional like Outlook, do you like it? Would you like to send in a patch? What do you think about X?

                                                                                                                                  Otherwise it’s just another program written in Rust. I get it’s cool but hundreds of programs get written in Rust every day.

                                                                                                                                  As far as security bugs are concerned, if being written is C would be a red flag, what colour would you say is best ascribed to the flag raised by a tool whose installation script – which you’re supposed to curl straight into bash, of course – downloads an unsigned archive and `sudo mv’s the stuff in it into $PATH ;-)?

                                                                                                                                  1. 8

                                                                                                                                    I believe 4 out of these 5 would’ve been unlikely if mutt and libraries were written in rust, for example:

                                                                                                                                    https://www.cvedetails.com/vulnerability-list/vendor_id-158/product_id-274/year-2018/opov-1/Mutt-Mutt.html

                                                                                                                                  2. 10

                                                                                                                                    Any GC language is memory-safe.

                                                                                                                                    1. 4

                                                                                                                                      Which is why written in Go is also a popular thing, and deserves to be. People want single binaries and fast, safe programs but for whatever reason they also want to pretend there’s no reason to care what language something is written in.

                                                                                                                                      1. 3

                                                                                                                                        Apart from the fact that garbage collection brings its own issues (although probably none that would affect a mail client), Rust offers much more than just memory safety.

                                                                                                                                      2. 2

                                                                                                                                        What is the most likely security attack surface for a email client?

                                                                                                                                        1. 10

                                                                                                                                          Untrusted input: message body, attachments, headers; protocol implementation (tls negotiation, authentication)? [ed: and in particular string handling and path handling]

                                                                                                                                          1. 2

                                                                                                                                            This is a great argument for making MUAs just deal with MH/Maildirs and leaving the server interface to existing programs (mbsync, msmtp).

                                                                                                                                            Not only do you sidestep a good chunk of problems you mentioned - no worries about protocols, network, etc - you also are likely to fit into existing workflows. And it engenders trust: honestly, I’m unwilling to try software that speaks to my mail server. I risk anything from a bug inconveniencing me to something more malicious. Keep it local and I’m not as worried.

                                                                                                                                          2. 2

                                                                                                                                            HTML & images mostly

                                                                                                                                            1. 1

                                                                                                                                              If you want to support it, html display.

                                                                                                                                          3. 29

                                                                                                                                            I really have trouble understanding why people ask this. What’s so hard to understand about folks caring about which language a program is written in? There are literally oodles of reasons why it might be relevant. For example, if the title of the post were, “email client written in Zig,” it would actually attract my interest more than the current title. I would probably wind up spending some time reviewing the source code too. But if the title left that out, I probably would have skipped right by it.

                                                                                                                                            1. 2

                                                                                                                                              Yeah, I agree that the underlying tech can be interesting and makes sense in some cases to be in the title. We’re all hackers lobsters here, right?

                                                                                                                                              I’m a little surprised you’d show so much interest in Zig. I think of you as one of the “gods of rust”. Are you interested in a “keeping tabs on the competition” sort of way? Or is there some use case that you think Zig might shine more than rust for? In other words: are you interested in ideas you can bring to rust, or because you’re evaluating or interested in using Zig in its own right?

                                                                                                                                              1. 5

                                                                                                                                                No, I’m legitimately interested in Zig. I’ve always loved the “simplicity” of C, for example, for some definition of simplicity. (That one can cut a lot of different ways.) It’s also why I really like Go. And I think Zig is taking an interesting approach to memory safety and I’m very interested to see how well it work in practice. I’m also quite interested to see how well comptime does and how it balances against readability and documentation in particular.

                                                                                                                                                But I haven’t written a single line of Zig yet. I’m just following it with interest. I’m also a Zig sponsor if only for the amazing work that Andrew is doing with C tooling.

                                                                                                                                              2. 2

                                                                                                                                                I think “written in [L]” makes sense, if the fact that it was written in a language is interesting. If a more complex program is written in APL, it is interesting because APL is know to be diffucult. If something is written in C89 is is interesting because that will probably make it very portable. If something is written in Zig, it might be interesting because a lot of people are not familiar with it’s strengths and weaknesses in real world systems. If something is written in Go, it might be interesting because it provides a easy static binary that can be installed without a big fuss.

                                                                                                                                                Most of the time, I’m not surprised about Rust because why shouldn’t you be able to write a CLI tool in Rust? It has been done over and over again. If writing something in Rust has practical advantanges (”… written in Rust making it 4x faster”, “… written in Rust avoiding 90% of all security issues”, …) then it might be interesting.

                                                                                                                                                1. 14

                                                                                                                                                  One aspect of that is that what is “interesting” varies from person to person and from time to time. Just as an example, I know I would be more interested if the title were “written in Zig,” but I’m sure there are plenty of others that would be less interested because of it. And that actually makes the “written in Zig” part of the title useful. Because it lets people filter a bit more, even if it means it’s less interesting.

                                                                                                                                                  More to the point, “interest” is just one reason why “written in [L]” makes sense. It’s not the only reason. As others have mentioned, some programming languages tend to be associated with certain properties of programs. Whether that’s culture, barriers to contribution (for some definition of “barrier”), performance, UX and so on. Everyone here knows that “email client written in C” and “email client written in Rust” likely has some signal and would mean different things to different people.

                                                                                                                                                  I truly don’t understand why people are continually mystified by this. It’s like the most mundane thing in the world to me. Programmers are interested in programming languages and how tools are built. Who woulda thunk it.

                                                                                                                                                  To be clear, this doesn’t mean everyone has to be interested in the underlying technology 100% of the time either. So I’m under no illusions about that. Most of the users of my software, for example, not only don’t care what language it was written in, but probably don’t even know. I’d even bet that most of my users (via VS Code) not only don’t know what language their “find in files” is written in, but probably haven’t even heard of Rust.

                                                                                                                                                  But we’re on a tech forum. It self selects for nerds like us that like to talk shop. What a surprise that we would be interested in the tools used to build shit.

                                                                                                                                                  Apologies for the minor rant. This is just one of those things that pops up over and over on these forums. People are continually surprised that “written in [L]” matters to some people, and I guess I’m just continually surprised that they’re continually surprised. ¯\_(ツ)_/¯

                                                                                                                                              3. 11

                                                                                                                                                Personally I care because I am trying to learn Rust and projects like this are nice to explore and figure out stuff.

                                                                                                                                                1. 6

                                                                                                                                                  I’m not sure either. I do occasionally see the “written in Go” or “written in Crystal” or “written in pure C99”, however.

                                                                                                                                                  1. 4

                                                                                                                                                    This was a trend 5 years ago with Python I feel, now it’s a trend with Rust. In case of Python, in my experience, it boiled down to “we improved the UI massively (compared to existing alternatives) and our error handling is nonexistent”, while with Rust it’s more likely to be “we’re obsessed about efficiency and everything else is secondary” ;)

                                                                                                                                                    In practice, the “in X” is likely a call for contributors, not the users – as a user, when I see “it’s written in X” I assume that it’s probably got no real upsides aside of that, as if writing it in X was the whole point.

                                                                                                                                                    1. 3

                                                                                                                                                      It makes it interesting to me because I’m interested in Rust, so I’d like to check out the source and learn something!

                                                                                                                                                      1. 3

                                                                                                                                                        As an email client for users, it isn’t interesting at all (no disrespect to the creator). But, as an expression for the possibilities of an up-and-coming language, it is useful. This post has the same similar feel to a “hello world” for a new language.

                                                                                                                                                        1. 2

                                                                                                                                                          People still writing new software in C in TYOOL 2021 also like to brag online about their choice of language. I don’t get it.

                                                                                                                                                          1. 2

                                                                                                                                                            I first thought “written in Rust” seems boisterous, then rethought and realized it’s beneficial specifying such, not just in boistering, but as an example for folks wanting to learn.

                                                                                                                                                            1. 2

                                                                                                                                                              Well,one reason to care is to make sure they don’t fall victim to the RIIR question from the Rust Evangelism Strike Force. (Have you considered rewriting it in rust?) (https://transitiontech.ca/random/RIIR).

                                                                                                                                                              (Note: this is a joke. You probably don’t care about rust and nor should you, but the author does.)

                                                                                                                                                            1. 25

                                                                                                                                                              Back in the old 2d days we used to cheat by automating clicking on the minimap to get around. They fought that one by just subtly randomly rotating the minimap a couple degrees off from reality so you’d wake up and you’d just be standing in a corner on the other edge of the world. I always found that technique pretty hilarious.

                                                                                                                                                              1. 11

                                                                                                                                                                The class names are long because they do a lot of things.

                                                                                                                                                                “With Tailwind, you’re forced to interpret semantics on the fly”

                                                                                                                                                                With css, you’re forced to flip to through some other file to get it. If you don’t see the tailwind code as obviously better, I would still say try it, and if you’re not convinced, don’t use it I guess, but nothing written there at all convinces me otherwise.

                                                                                                                                                                Point 3 is absurd, the docs immediately explain how to set up purging so that unused class names. My purged css is like 4.5kb and my unpurged css is like 8MB.

                                                                                                                                                                1. 4

                                                                                                                                                                  Yep, I thought that was a pretty disingenuous point. Purging excess CSS is talked about so much, even on the homepage:

                                                                                                                                                                  It’s tiny in production.

                                                                                                                                                                  Tailwind automatically removes all unused CSS when building for production, which means your final CSS bundle is the smallest it could possibly be. In fact, most Tailwind projects ship less than 10KB of CSS to the client.

                                                                                                                                                                  1. 8

                                                                                                                                                                    One problem with the “we don’t care about the size because our custom minifier will make it small” is that it adds yet another part to the ridiculously fragile rube-goldberg machine that is npm.

                                                                                                                                                                    1. 3

                                                                                                                                                                      Also, may I introduce you to Windi CSS, that doesn’t even generate unused tailwind classes in the first place :) ! https://github.com/windicss/windicss

                                                                                                                                                                      1. 1

                                                                                                                                                                        Or twind, which doesn’t even require you to generate a CSS file in the first place. :-)

                                                                                                                                                                        If you use the shim that is: https://twind.dev/docs/modules/twind_shim.html