• 8 Posts
  • 447 Comments
Joined 4 years ago
cake
Cake day: May 31st, 2020

help-circle
  • It does have that, the ecosystem is just really fractured and also not good.

    Sort of the ‘standard’ way of managing dependencies is with Pip and a requirements.txt. By itself, that installs dependencies on your host system.
    So, there’s a second tool, venv, to install them per-project, but because it’s a separate tool, it has to do some wacky things, namely it uses separate pip and python executables, which you have to specify in your IDE.
    But then Pip also can’t build distributions, there’s a separate tool for that, setup.py, and it doesn’t support things like .lock-files for reproducible builds, and if I remember correctly, it doesn’t deal well with conflicting version requirements and probably various other things.

    Either way, people started building a grand unified package manager to cover all these use-cases. Well, multiple people did so, separately. So, now you’ve got, among others:

    • Pipenv
    • Pip-tools
    • Conda
    • PDM
    • Poetry
    • Rye

    Well, and these started creating their own methods of specifying dependencies and I believe, some of them still need to be called like a venv, but others not, so that means IDEs struggle to support all these.

    Amazingly, apart from Rye, which didn’t exist back when we started that project, none of these package managers support directly depending on libraries within the same repo. You always have to tag a new version, publish it, and then you can fix your dependent code.

    And yeah, that was then the other reason why this stuff didn’t work for us. We spent a considerable amount of time with symlinks and custom scripts to try to make that work.
    I’m willing to believe that we fucked things up when doing that, but what makes still no sense is that everything worked when running tests from the CLI, but the IDE showed nothing but red text.



  • Big difference to the Wikimedia Foundation is how much money they need. The Mozilla Corporation (which develops Firefox) has around 750 employees.

    Optimistically, only 500 of those are devs and work on Firefox. If you pay those a wage of 100,000 USD, that makes 50 million USD of costs just for wages.

    Firefox has less than 200 million monthly active users, so everyone using it would need to donate $0.25, or alternatively 1% of users would need to donate $25, yearly.

    That’s a lot of money to hope people donate, and this is a very optimistic ballpark estimate.


  • Yeah, the amount of money they get from donations is so tiny compared to what they need for developing Firefox, that they don’t even divert it for Firefox.
    They use it for activism, community work and in the past, they’ve also passed it on to other open-source projects, which are also important for the web but don’t have the infrastructure or public awareness to get donations directly.


  • I mean, if we’re talking about all those problems, the no-type-annotations issue is rather specific for Python, JS/TS and Ruby.

    But in general, I feel like there’s somewhat of an old world vs. new world divide, which happened when package registries started accepting libraries from everyone and their cat.

    In C, for example, most libraries you’ll use will be quite well-documented, but you’ll also never hear of the library that Greg’s cat started writing for the niche thing that you’re trying to do.

    Unfortunately, Greg’s cat got distracted by a ball of yarn rolling by and then that was more fun than writing documentation.
    That’s the tradeoff, you get access to more libraries, but you just can’t expect all of them to be extremely high-quality…


  • Honestly also annoying as a not-so-new folk. I just thought about this yesterday, I reasonably expect to clone a random project from the internet written Java, Rust et al, and to be able to open it in my IDE and look at it.

    Meanwhile, a Python project from two years ago that I helped to build, I do not expect to be able to reasonably view in an IDE at all. I remember, we gave up trying to fix all the supposedly missing dependencies at some point…



  • I don’t know, man, far too many people seem to think that “easy to learn” means they’ll know all they need to know in relatively short time.

    Like, you talk to our data scientists and they’ll tell you doing anything in Python, no problem. But you talk to our seasoned software engineers and you see the war flashbacks in their eyes, because it racks up in complexity so fucking quickly, it’s insane.





  • The guy keeps on picking on Go, which is infamous for having terrible error handling, and then he has the nerve to even pick on the UNIX process return convention, which was designed in the 70s.
    The few times he mentions Rust, for whatever reason he keeps on assuming that .unwrap() is the only choice, which’s use is decidedly discouraged in production code.

    I do think there is room for debate here. But error handling is a hellishly complex topic, with different needs between among others:

    • short- vs. long-running processes
    • API vs. user-facing
    • small vs. big codebase
    • library vs. application code
    • prototyping vs. production phase

    And even if you pick out a specific field, the two concepts are not clearly separated.
    Error values in Rust usually have backtraces these days, for example (unless you’re doing embedded where this isn’t possible).
    Or Java makes you list exceptions in your function signature (except for unchecked exceptions), so you actually can’t just start throwing new exceptions in your little corner without the rest of the codebase knowing.
    I find it quite difficult to properly define the differences between the two.





  • I have actually seen it in an XML file in the wild. Never quite understood why they did it. Anything they encoded into there, they could have just added a node for.
    But it was an XML format that was widely used in a big company, so presumably somewhere someone wrote a shitty XML parser that can’t deal with additional nodes. Or they were just scared of touching the existing structure, I don’t know.


  • The thing is, it was never really intended as a storage format for plain data. It’s a markup language, so you’re supposed to use it for describing complex documents, like it’s used in HTML for example. It was just readily available as a library in many programming languages when not much else was, so it got abused for data storage a lot.


  • If you’ve so far been able to do this stuff in Java, then presumably all your hardware has an OS and such and you don’t need this, but a colleague has been having a lot of fun with Rust and proper embedded development.

    It’s very different from regular development, as you’ve got no OS, no filesystem, no memory allocations, no logging. It can most definitely be a pain.
    But the guy always has the biggest grin on his face when he tells that he made a custom implementation of the CAN protocol (TCP is too complex for embedded 🙃) and that he had to integrate an LED to output error information and stuff like that. At the very least, it seems to be a lot less abstract, as you’re working directly with the hardware.