• 27 Posts
  • 2.03K 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.





  • Ephera@lemmy.mltoComic Strips@lemmy.worldHealthy Snacks
    link
    fedilink
    English
    arrow-up
    20
    ·
    3 days ago

    A few years ago, I learned that the stomach rumble when you’re hungry, is part of a process that’s actually kind of important health-wise: https://en.wikipedia.org/wiki/Migrating_motor_complex

    So, it’s good when your stomach and small intestine empty out on a regular basis. It’s good when you’re hungry on a regular basis.
    Just yet another luxury problem of modern times, that we have food available at all times and need to stop ourselves from snacking.

    Side-note: It’s also good to go hungry, because then when you do eat, the food tastes so much better. This also means you can go for healthier food and still have it hit the spot.


  • Ephera@lemmy.mltolinuxmemes@lemmy.worldArch be Like
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    Hmm, good question. I know of one such implementation, which is Delta RPM, which works the way I described it.
    But I’m not sure, if they just designed it to fit into the current architecture, where all their mirrors and such were set up to deal with package files.

    I could imagine that doing it rsync-style would be really terrible for server load, since you can’t really cache things at that point…



  • Ephera@lemmy.mltolinuxmemes@lemmy.worldArch be Like
    link
    fedilink
    English
    arrow-up
    5
    ·
    4 days ago

    This doesn’t work too well for rolling releases, because users will quickly get several version jumps behind.

    For example, let’s say libbanana is currently at version 1.2.1, but then releases 1.2.2, which you ship as a distro right away, but then a few days later, they’ve already released 1.2.3, which you ship, too.
    Now Agnes comes home at the weekend and runs package updates on her system, which is still on libbanana v1.2.1. At that point, she would need the diffs 1.2.1→1.2.2 and then 1.2.2→1.2.3 separately, which may have overlaps in which files changed.

    In principle, you could additionally provide the diff 1.2.1→1.2.3, but if Greg updates only every other weekend, and libbanana celebrates the 1.3.0 release by then, then you will also need the diffs 1.2.1→1.3.0, 1.2.2→1.3.0 and 1.2.3→1.3.0. So, this strategy quickly explodes with the number of different diffs you might need.

    At that point, just not bothering with diffs and making users always download the new package version in full is generally preferred.



  • Good question. My best guess is that the buttons have become less important, because:

    • they try to auto-detect where a signal comes,
    • they have better defaults, so you don’t really need to change settings, and
    • even monitor brightness can partially be controlled by the OS.

    But yeah, I got a new monitor at work, and instead of buttons, it has a joystick on the backside. Now the monitor’s menu pops up every so often, I’m guessing because something shook the joystick just enough to trigger it.
    When I saw that joystick for the first time, I wondered how long it’ll take before it breaks, but it’s broken on day 1, so that’s great. 🫠


  • Ephera@lemmy.mltoScience Memes@mander.xyzPeas plz
    link
    fedilink
    English
    arrow-up
    7
    ·
    6 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.







  • On KDE, it’s just one of the suggestions, I believe, that you could search this term on the web. If you trigger that suggestion, it then opens the web browser to do the search.

    As such, searching “terminal” wouldn’t yield a suggestion from a web result that matches, but I’m pretty sure applications are prioritized above other results either way.



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