• 1 Post
  • 119 Comments
Joined 2 years ago
cake
Cake day: June 14th, 2023

help-circle

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




  • addie@feddit.uktoRetroGaming@lemmy.worldThe deed is done.
    link
    fedilink
    English
    arrow-up
    6
    ·
    12 days ago

    Well, there’s your problem. You’ve plugged a Romantic Robot into the place where your Kempston joystick should be. Never going to win at Daley Thompson’s without perfecting your waggle. Also, the Speccy will probably crash from hammering the keyboard if you try.

    Midnight Resistance is one of those weird games where the first level is the hardest; it’s not too bad to finish it if you do the first bit. Fair play on Robocop, though - that’s a hard game.


  • AI does give itself away over “longer” posts, and if the tool makes about an equal number of false positives to false negatives then it should even itself out in the long run. (I’d have liked more than 9K “tests” for it to average out, but even so.) If they had the edit history for the post, which they didn’t, then it’s more obvious. AI will either copy-paste the whole thing in in one go, or will generate a word at a time at a fairly constant rate. Humans will stop and think, go back and edit things, all of that.

    I was asked to do some job interviews recently; the tech test had such an “animated playback”, and the difference between a human doing it legitimately and someone using AI to copy-paste the answer was surprisingly obvious. The tech test questions were nothing to do with the job role at hand and were causing us to select for the wrong candidates completely, but that’s more a problem with our HR being blindly in love with AI and “technical solutions to human problems”.

    “Absolute certainty” is impossible, but balance of probabilities will do if you’re just wanting an estimate like they have here.


  • Kind of. It’s the Linux kernel that manages all of the controller drivers and makes them available to userspace, mostly via the evdev interface. SDL is a library for managing graphics, sounds and events in a generic way on multiple platforms and devices. It’s overwhelmingly the most common library used for Linux games - Steam used it for all of their Linux-native ports of Source engine games, for instance. But it also presents all gamepad events in a consistent way regardless of their “true source”, so generic devices tend to work with every game.

    SDL3 mostly clears out all the clutter from the previous versions of SDL. It’s a mature library and gamedev has come a long way in that time. Getting rid of all the weird stuff that the API accumulated makes it easier to use and maintain. Plus there were things like managing audio generally, and pen-and-touch gestures mobile phones and tablets, that were quite the head-scratchers before. That’s all a bit easier now.





  • Programming a robust global date-time system and having a transparent conversation between metric and *imperial/traditional" units is just a warm-up to show that you can work with the truly demented currency system. Make sure everything is rounded off to the nearest whole ha’penny.




  • That’s absurdly high resolution for 1994 - it should be at 320×200, although with the “slightly rectangular” pixels that you get in DOS.

    I think some of the magic of Doom gets lost in higher resolutions. The odd badly-aliased pixel gives the impression of glinting light, which it obviously does not have, and some of the mysteries of the enemies is lost, since normally they’d just be a few pixels unless you’re dangerously close to them. Gives the impression that it’s more animated than it is, since it would always be shifting. Modern ports will let you mouselook and things as well, which makes it crazy fast; not that you were exactly slow at turning around, back in the day, but you did need to play it in a more considered way.



  • addie@feddit.uktoProgrammer Humor@lemmy.mlIEEE 754
    link
    fedilink
    arrow-up
    18
    ·
    1 month ago

    You can only store rational numbers as a ratio of two numbers, and there’s infinitely times more irrational numbers than rational ones - as soon as you took (almost any) root or did (most) trigonometry, then your accurate ratio would count for nothing. Hardcore maths libraries get around this by keeping the “value in progress” as an expression for as long as possible, but working with expressions is exceptionally slow by computer standards - takes quite a long time to keep them in their simplest form whenever you manipulate them.


  • Yeah, I was pondering this earlier. In exchange for giving up quite a lot of the CPU die, you can have some NPU functionality instead; rather than having to offload everything to the cloud, you can preprocess some of it first, and then offload it.

    Speech-to-text and text-to-speech plus general battery efficiency are reasonable use cases for a phone, certainly more so than a laptop and much more so than a desktop. But as you note, those models are going to be small, and RAM and backing storage on phones tends to be slow and limited.

    Was also considering that an NPU gives no benefit at all unless code has been written for it; it’s a bastard to write code for something so concurrent, and giving up CPU die for an NPU instead of more cores and cache means that your phone will generally be slower unless it’s largely used for NPU tasks. Plus if you need to offload to the cloud for most useful tasks anyway, it’s just a marketing gimmick that makes your phone less good for most uses.


  • Assuming you had a pretty decent monitor and graphics output in the 90s, it may have been 800x600, but more likely 640x480, and you’d have been using the standard issue bitmap font with no anti-aliasing, blitted to screen using software rendering. Probably in a single colour, too.

    Alas, the problem with that is that it doesn’t scale. On xterm a 4K monitor, I can watch Vim redrawing the screen, paging through logs is painful. Use Kitty for the same, it’s instant, I can flip through tabs and split screens too, and have niceties like anti-aliased fonts and transparency if I want them.

    Some people spend a lot of time in the terminal, so I can’t fault them for taking the time to make a nice working environment and sharing that work with others.


  • Bear in mind as well that the Scottish government rejected a lot of the privatisation that the remainder of the UK went through, so ‘government’ doesn’t just mean civil servants in offices, it means things like Scottish Forestry and Scottish Water as well. Need to manage small teams of people over very large areas who are frequently out of mobile phone contact, as well as sharing information with subcontractors who will frequently be one-man-band operators who may just have a van and a mobile phone; no laptop, no IT team.

    So ‘convenient’, but also ‘almost nothing else would be practicable’.


  • I’d probably go with a “kitchen” metaphor here.

    The executable for a program is a list of instructions for the CPU to execute. Windows and Linux gaming machines will usually use x64. Most of the instructions are logic eg. how to add numbers together, what comparisons to make, what to copy from one place to another; and they’re exactly the same on both Windows and Linux, you can run them as-is.

    Some instructions ask the operating system to do things, like open a file to read. Windows and Linux do these quite differently, but you know how one works then you can change it to the equivalent ask for the other machine. Making the translation takes a moment, but some things are faster on Linux than Windows, so it’s not very easy to generalise as to whether it’ll be faster overall to do certain things. The really important operating system calls for games tend to be messages to pass to the GPU, and the Proton team have put a lot of work into making these as fast as possible.

    If you think of it like following a food recipe, then given the ingredients you’d expect that most people would produce exactly the same meal by following it. Most of the steps will be exactly the same for everyone. However, if a step requires a piece of equipment that you don’t have, then it might take longer to follow the recipe if you’ve got to make do with different stuff. Similarly, you might be able to prepare things quicker if you’ve got a whole pile of restaurant-level gear and can do some of the steps differently.