• 0 Posts
  • 33 Comments
Joined 3 years ago
cake
Cake day: July 1st, 2023

help-circle
  • Once you’ve learned it, Rust is just a very nice compiled language to work with.

    You get higher level constructs than in C++, a language without a billion weird edge cases, a modern package manager, and much more. In my experience, my code written in Rust is more likely to work as intended, both because of the stricter compile-time checks, but also because language features like sum types make it easier to check the core logic at compile time.

    I work in both C++ and Rust, among other languages, but these days I never reach for C++ for a new project



  • That’s definitely a possibility, along with the possibility that countries with worse English language skills might be underrepresented on GitHub, despite having universal healthcare. Conversely, if the US is over-represented on GitHub, then the pool of US developers who are not already active on GitHub may also be depleted compared to other countries. However, that is not something we can read out of the available evidence.

    The most we can conclude is probably that the US getting universal healthcare might result in an increase in available OSS developers, depending on which assumptions turn out to be correct, but suggesting that it would lead to an order of magnitude increase is surely premature



  • Also, having critical software depend on one guy is not safe. We should avoid that. If critical software depends on one guy it should be phased out.

    Here are the percent of commits from the top committer in each repository you mentioned, as well as rsync, over the last 3 months:

    • rsync: 99.0%
    • restic: 93.2%
    • rclone: 87.5%
    • union: 82.9%
    • syncthing: 74.4%

    As you can see, each of this projects depends heavily on a single person, though to a lesser degree than rsync. That’s just the nature of most open-source software.

    Note that I excluded dependabot commits from the calculations and counted Claude commits as the lead developer for rsync


  • Yes, there’s been several regressions that would’ve been caught by the original tests, but missed by the new vibe-coded tests.

    That is directly contradicted by what the developer of rsync wrote in the linked article:

    yes, there were regressions in some use cases of rsync in the 3.4.3 release. … None of those cases were covered by the existing rsync test suite or by all the manual testing I did (yes, I use rsync, I don’t just develop it).

    It’s possible that somebody in the issue you linked to pointed to a test that would have caught one of the regressions, but I was not able to find it in the 327 comment mess. A direct link would be appreciated, if that is the case.

    But I doubt that you will find such a comment. Because I tried running the 3.4.1 test-suite with the 3.4.3 binary, and all tests passed


  • I write python code for a living. There is no way to sugarcoat it, the new unittests are slop. There already exists a good writeup of why, which I’m going to quote here:

    They are not unit tests, they are integration tests. Which in my experience makes unit-testing frameworks like pytest a poor fit. I’ve also had to write my own framework, for that reason, despite preferring pytest for unit-testing.

    The author also greatly exaggerates the amount of code duplication: They claim that “tests are whole python scripts that redefine basic test functions in every script”, but in reality it is less than half of the tests that even define their own functions.

    Most basic functions are imported from a shared module (rsyncfns.py), and when they aren’t it’s mostly because the code needs to do something different. From what I can see, there is some code duplication that could be moved to the shared module, and some code that could be refactored, but it’s a modest amount


  • That is not just a book about how to “cut potatoes”. That is “A Creative Cooking Guide for Exercising Knife Skills”, using potatoes as a medium. Similarly, your Rust book is an book on concurrency using Rust as a medium, as per the title: “Low-Level Concurrency in Practice”. Both are complex topics, and both have picked a medium. Thus, they do not necessarily reflect on the underlying complexity of the medium, though concurrency in Rust is a complex topic due to the fact that the core language itself does a lot of work to make it “safe”. Async would probably be an even better example of that.

    However, in the case of initialization in C++ and in the case of move schematics in C++, these are topics that are complex because the core language has been accumulating complexity for a long time, and because the language designers cannot afford to break backwards compatibility. Which makes implementing and using move-schematics in C++, as an end-user of the language, much, much more complicated than in a language like Rust, that did not have to bolt this behavior on top of an already complicated language. Similarly with initialization, where C++ has accumulated many, syntactically overlapping forms of initialization, for both member and non-member variables variables









  • He has made a large number of questionable comments, including the argument that the solution to human trafficking includes legalizing child prostitution:

    27 April 2015 (Human Trafficking Act)

    The Senate’s Victims of Human Trafficking Act is dangerous in several ways.

    When it talks about having the customs agency do more to enforce “intellectual property”, I am sure that refers to something bad. Whenever that term is used, something nasty is afoot.

    The way to protect children from being forced into prostitution is to legalize prostitution by licensed prostitutes. Customers could be required to check the prostitute’s license. If the customer fails to check, that concrete omission would be legitimate grounds for punishment.

    Minors should not be denied prostitution licenses in a blanket way, but the state should ask them why they want one and probe their situation, then offer help so they can avoid prostitution.

    https://www.stallman.org/archives/2015-mar-jun.html#27_April_2015_(Human_Traffickting_Act)



  • Well, maybe you’d better wait 10min instead of one, to make sure the led lightbulb heats enough, but still…

    I tested this with a 5W IKEA LED light-bulb, since I was just doom scrolling, anyway:

    • After 1 minute of being on, the bulb was still room temperature.
    • After 10 minutes of being on, the bulb was lukewarm.
    • After 10 minutes of being off, the bulb was room temperature, though the fitting maybe felt slightly warmer. That latter will probably depend on your installation, and how well it is able to disperse the heat.

    This means that the solution either breaks down entirely, or is unreliable, since you are not (reliably) able to tell the first two buttons apart


  • Loop labels are rare, but they lead to much simpler/clearer code when you need them. Consider how you would implement this kind of loop in a language without loop variables:

    'outer: while (...) {
        'inner: while (...) {
            if (...) {
                // this breaks out of the outer loop, not just the inner loop
                break 'outer;
            }
        }
    
        // some code here
    }
    

    In C/C++ you’d need to do something like

    bool condition = false;
    while (...) {
        while (...) {
            if (...) {
                condition = true;
                break;
            }
        }
        if (condition) {
            break;
        }
    
        // some code here
    }
    

    Personally, I wouldn’t call it ugly, either, but that’s mostly a matter of taste