• 24 Posts
  • 1.09K Comments
Joined 6 years ago
cake
Cake day: May 31st, 2020

help-circle
  • Lots of “modern” languages don’t interop terribly well with other languages, because they need a runtime environment to be executed.
    So, if you want to call a Python function from Java, you need to start a Python runtime and somehow pass the arguments and the result back and forth (e.g. via CLI or network communication).

    C, C++, Rust and a few other languages don’t need a runtime environment, because they get compiled down to machine code directly.
    As such, you can call functions written in them directly, from virtually any programming language. You just need to agree how the data is laid out in memory. Well, and the general agreement for that memory layout is the C ABI. Basically, C has stayed the same for long enough that everyone just uses its native memory layout for interoperability.

    And yeah, the Rust designers weren’t dumb, so they made sure that Rust can also use this C ABI pretty seamlessly. As such, you can call Rust-functions from C and C-functions from Rust, with just a bit of boilerplate in between.
    This has also been battle-tested quite well already, as Mozilla used this to rewrite larger chunks of Firefox, where you have C++ using its C capabilities to talk to Rust and vice versa.



  • I think it was that back when it was relevant (but replace data scientists with web devs)

    Sure, but if programs from that era are still around, chances are the maintainer is quite experienced by now and has fixed all the funky behaviour. 🙃

    I never got interested in the ecosystem myself, but I’ve run into it every now and then. I feel like it’s in the same place as PHP today: still used a lot for legacy reasons, but you’ll get weird looks if you start a new project with it and you’re under the age of 40

    Ten years ago, a university buddy of mine discovered Ruby and you might’ve thought a miracle happened from how excited he was for it. But yeah, that was also the last time I met someone in real life who was excited about Ruby. 😅


  • Man, I haven’t done structural inheritance in years and by now, this reads like the ramblings of a mad person.

    Like, I recently had a use-case, where I actually wanted to define multiple types with the same fields and for various reasons ended up using a macro for that.
    And that still felt simpler than whatever is going on in this article, because there were no cross-relationships between the types at runtime. The macro templated the type definitions as if I had copy-pasted them, except there’s no actual code duplication, which is ultimately all I wanted.



  • The thing to me is always that, yeah, you need a huge commit for a breaking change in an internal library inside a monorepo, but you will still need to do the same work in a polyrepo eventually, too.

    Especially since “eventually” really means “ASAP” here. Without going through the breaking change, you can’t benefit from non-breaking changes either and the complexity of your codebase increases the longer you defer the upgrade, because different parts of your application have different behavior then. So, even in a polyrepo, you ideally upgrade all library consumers right away, like you’re forced to in a monorepo.


  • A few years ago, I set up a home-server with music and some pictures on there, and recently I noticed that my storage disk was getting full. Then I saw that the disk only had 16 GB and wondered, where the hell I got that small of a disk from.

    So, I go to plug in a bigger disk and can’t even find the original disk at first. Turns out my whole storage capacity was one of these bad boys:

    Spoiler

    A tiny USB-A stick, designed for keeping it plugged into a laptop at all times.

    And yeah, I’ve got about 1800 songs, clocking in at 5.8 GB, so even that tiny storage would easily be enough for a much larger collection.
    And I do also have them replicated on my phone, for listening on the go. (Don’t even need an SD card in my case.)



  • I would argue that a substantial reason for their popularity is also just that devs have fun when developing them.

    With most other genres, you’ve seen the story a gazillion times, you’ve done each quest a thousand times etc… It just gets boring to test the game and it becomes really difficult to gauge whether it still is fun to someone who isn’t tired of it.

    Meanwhile with roguelikes, the random generation means that each run is fresh and interesting. And if you’re not having fun on your trillionth run, that’s a real indicator that something needs to be added or improved.



  • Their primary purpose certainly isn’t the same, but with JavaScript being used to implement text editors, it’s in a playing field where many would argue that Rust is better suited.

    Well, and Rust can play in JavaScript’s playing field, too: You can implement webpages in HTML+CSS+Rust by going through WebAssembly.


  • The description in the ticket isn’t too bad:

    allows users to make a window disappear and keep only its title bar visible.

    It really just hides the window contents. In effect, it is similar to minimizing a window, except that it doesn’t spring into your panel and rather stays in place as just the window title bar without the contents.

    It is a niche feature, if you couldn’t tell. But it isn’t some KDE specialty feature; various other desktops and window managers also support it. I think, it was more popular in the early days of graphical user interfaces, when we were still working out, how we want to do panels and such.

    And conversely, I do think it makes more sense as a feature on big screens like you can have today, where your panel might be quite a bit away.
    Don’t think, window shading will make a big comeback just yet, but yeah, probably enough existing users that use it, so that it would be cool to support that workflow.




  • I mean, modern package managers generally now come with lock files, which effectively auto-pin your dependencies, until you trigger a dependency update.

    And while it isn’t bullet-proof, it does result in you effectively having a dependency cooldown most of the time. You’re only vulnerable, if you trigger the dependency update while the compromised dependency release is public.

    Obviously, this can be bad enough, but it does also mean that an ecosystem with lock files is far less attractive to target with a supply-chain attack, since far fewer hosts will get compromised on average.



  • I mean, sure, I do understand what’s happening on a logical level. I’m just so baffled, because this whole internet thingamabob was architected by the military.
    It was intentionally built, so that parts of it could fail without disrupting the rest. When a corporation fucks up, it was supposed to take down the servers of that corporation, not also a good chunk of the rest.

    But unfortunately, this internet thingamabob is merely the closest approximation we have for the “perfect market” that economics theory calls for, so it still doesn’t actually self-regulate like that whole theory would love to believe.
    In fact, it is so much worse, because now monopolization happens across the whole planet. Particularly also because we don’t have a functioning “world government” that could enforce competition at that level via laws.

    So, the network leads to companies monopolizing on top of it and then monopolies necessitate that the respective companies do as poor of a job as possible, because this reduces costs and increases profits. As a result, major parts of this military-grade internet now falter every few weeks.


  • Oh man, these global outages are really getting out of hand. A few days after the recent AWS and Azure outages, I suddenly noticed that I couldn’t reach certain webpages anymore. And I genuinely didn’t even bother trying to debug, because I just assumed that it’s another global outage.

    In the evening, I did look into it and noticed that my router was at fault (presumably DNS got bugged by a recent update). That was just wild to me, that I genuinely deemed it more likely that several major webpages went offline together than that my home setup is fucky.