• 3 Posts
  • 259 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle
  • We used to do that in industrial automation. If you make any changes to the PLC / HMI / SCADA software, burn a DVD with what you changed and leave it next to the rack. No danger of bringing in viruses on a USB stick (the whole system was air-gapped) and you’d still have a backup available.


  • CMake, which is kind of the universal standard build system for C++ now, has “fetch content” since v3.11. Put the URL of a repository (which can be remote, but also local, which is handy) and optionally the branch / commit ID that you’d like, and it will pull it into your build directory automatically. So yeah, you can pull anything nefarious that you’d like. I don’t think most people would question pulling and building a library from Github as part of the build, especially if it had a sensible name for the task at hand.


  • addie@feddit.uktoBuy European@feddit.ukNut nut
    link
    fedilink
    arrow-up
    3
    ·
    2 months ago

    They’re occasionally the crisp of choice in pubs; an excellent accompaniment to an 80/-. Suppose there’s worse criteria for your pub crawls. But aye, a weird omission - you’d be thinking there’s plenty of wagons on the Stranraer ferry that could bring a few palletloads over.


  • A binary tree is one way of preparing data, usually for sorting. Each node can have a left, right, or both, children.

      A
     / \
    B   C
       / \
      D   E
    

    “Inverting the tree” means swapping the children for each node, so that the order that the nodes are visited is reversed. Depending on whether you want to copy the tree or swap it in place then the algorithm is different. C++ provides iterators too, so providing a “order reversed” iterator can be done efficiently as well.

    You’re going to have to visit every node and do at least one swap for every node, and an efficient algorithm won’t do much more than that. Bring unable to do it suggests that the student programmer doesn’t understand stacks or recursion yet, so they’ve more to learn.


  • Lunacid is awesome - old-school dungeon crawling with slick controls. The speed and smoothness makes fighting all the old enemies new again.

    The Kings Field games are… very hard to love. They’re old-school dungeon crawlers with the most awful, clunky controls that you can imagine. They’re all “pre-Miyazaki” FromSoftware games; don’t expect many Souls-like touches. Getting killed by a skeleton because you can’t turn round to face it in time, or falling down a hole because judging how far you’ve walked forward is difficult? Far more likely.

    A Lunacid follow-up with a little more Ultima / Wizardry about it would be amazing. Bit more environmental variety, a few more RPG trappings, and for the love of all that is holy, a minimap. But I can’t see how that would be better done in Sword Of Moonlight rather than just adding them to their existing engine.


  • addie@feddit.uktolinuxmemes@lemmy.worldPanik
    link
    fedilink
    arrow-up
    11
    arrow-down
    2
    ·
    2 months ago

    After having used Grub for about twenty years (eek) I was uncertain about the alternatives, but systemd-boot is absurdly better. Much better configuration, much better documentation, fixes a while pile of bugs that Grub team had as “won’t fix” for years and years. No reason to ever go back.


  • Does make me think about the story of Thales of Miletus; ancient Greek philosopher, got asked what use was philosophy if it doesn’t make you any money. Predicted good weather, and monopolised all the olive presses, made a fortune.

    For a modern example; shares in Rheinmetall (German firm who make, amongst other things, the turrets for tanks) have gone through the roof after the recent US debacle. I could have told you a year ago that Trump getting in would have meant the US abandoning Ukraine; obvious in hindsight that that would mean a boon for European arms manufacturers.

    I don’t think you need to be quick to take advantage. I think you need insight. If there’s a topic that you’re knowledgeable about and you can see which way the wind is blowing, then you can make your own boat.

    https://en.wikipedia.org/wiki/Thales_of_Miletus#Olive_presses










  • Man alive, all that time I wasted learning LaTeX in that case. Supports tables properly, “floats” pictures and figures about without messing up the flow of text, exceptional support for equations, beautiful printed output…

    Suffers from a completely insane macro-writing language, and its markup is more intrusive in the text than markdown’s is. Also, if you have very specific formatting output requirements (for a receiving publication, for instance) then it can be somewhat painful to whip into shape. Plain-text gang forever, though.




  • Memory safety is just a small part of infrastructure resilience. Rust doesn’t protect you from phishing attacks. Rust doesn’t protect you from weak passwords. Rust doesn’t protect you from network misconfiguration. (For that matter, Rust doesn’t protect you from some group of twenty-year old assholes installing their own servers inside your network, like you say.) Protecting your estate is not just about a programming language.

    “Infrastructure”, to me, suggests power, water, oil and food, more than some random website. For US infra, I’m thinking a lot of Allen-Bradley programmable logic controllers, but probably a lot of Siemens and Mitsubishi stuff as well - things like these: https://www.rockwellautomation.com/en-us/products/hardware/allen-bradley/programmable-controllers.html.

    Historically, the controllers for industrial infrastructure (from a single pumping station to critical electrical distribution) have been on their own separate networks, and so things like secure passwords and infrastructure updates haven’t been a priority. Some of these things have been running untouched for decades; thousands of people will have used the (often shared) credentials, which are very rarely updated or changed. The recent change is to demand more visibility and interaction; every SCADA (the main control computer used for interactive plant control) that you bring onto the public internet so that you can see what it’s up to in a central hub, the more opportunity you have to mess up the network security and allow undesirables in.

    PLCs tend to be coded up in “ladder logic” and compiled to device-specific assembly language. It isn’t a programming environment where C has made any inroads over the decades; I very much doubt there’s a Rust compiler for some random microcontroller, and “supported by manufacturer” is critical for these industries.