• 34 Posts
  • 1.76K 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.


  • Ephera@lemmy.mltoScience Memes@mander.xyzPeas plz
    link
    fedilink
    English
    arrow-up
    7
    ·
    8 days ago

    I believe, the problem is mainly white bread, which is what people typically have in mind for feeding ducks.

    As opposed to wholegrain, it only retains the endosperm, which is mostly just carbohydrates without many nutrients:

    I think, the lack of fiber is also particularly problematic. At least, I’ve heard that it gives them diarrhea, which probably means their guts don’t have time to extract the few remaining nutrients.


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


  • Man, at $DAYJOB, if we open-source something, they tell us to check for checked-in passwords and whatnot, and force us to throw away the commit history, which always feels stupid when we’ve known upfront that we’re going to open-source it and so kept things clean from the start.

    But then, yeah, you see a post like that and just think that it really wouldn’t have been too difficult to search for swear words before publishing.
    I mean, I also don’t really care, since it’s code rather than an official communication channel, but I can understand why management might care.


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