• 25 Posts
  • 1.08K 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.




  • Yeah, I’ve considered setting up a scrappy rsync solution, because Syncthing felt like overkill for that use-case and like it might stop working one day.

    There’s the Syncopoli app on F-Droid, which hasn’t been updated in three years, but it seems to just be a thin wrapper around rsync, which has been stable for decades, so I still kind of trust it more to continue working. Or at the very least, if I need to fix something or update the app myself, I feel like I’ll be able to do it.





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




  • Ephera@lemmy.mltoich_iel@feddit.orgich🍵✋😮‍💨iel
    link
    fedilink
    Deutsch
    arrow-up
    17
    ·
    3 days ago

    Hmm, die Früchtetees, die ich so kenne, schmecken eigentlich alle nach heißem Wasser, mit Ausnahme von Hagebutte. Apfelstücke im Tee haben bisher auch allerhöchstens geschmeckt, als hätte man getrocknete Äpfel wieder eingeweicht, was vermutlich daran liegt, dass es genau das ist.


  • From like a logical point of view, if you lay down with your feet towards the front, this seems like it would be extremely safe.
    Chances are, you won’t get decelerated too strongly in a bus either way, because of inertia, but if you do, you’ve got the friction of your whole body to hold you in place. And if you do shoot forwards, you can put your feet against the front divider, so worst-case you’re gonna break your legs, which is unlikely to be fatal.






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