• 1 Post
  • 88 Comments
Joined 1 year ago
cake
Cake day: June 14th, 2023

help-circle
  • When I was still dual-booting Windows and Linux, I found that “raw disk” mode virtual machines worked wonders. I used VirtualBox, so you’d want a guide somewhat like this: https://superuser.com/questions/495025/use-physical-harddisk-in-virtual-box - other VM solutions are available, which don’t require you to accept an agreement with Oracle.

    Essentially, rather than setting aside a file on disk as your VM’s disk, you can set aside a whole existing disk. That can be a disk that already has Windows installed on it, it doesn’t erase what you have. Then you can start Windows in a VM and let it do its updates - since it can’t see the bootloader from within the VM, it can’t fuck it up. You can run any software that doesn’t have particularly high graphics requirement, too.

    I was also able to just “restart in Windows” if I wanted full performance for a game or something like that, but since Linux has gotten very good indeed at running games, that became less and less necessary until one day I just erased my Windows partition to recover the space.



  • You can write an unmaintainable fucking mess in any language. Rust won’t save you from cryptic variable naming, copy-paste code, a complete absence of design patterns, dreadful algorithms, large classes of security issues, unfathomable UX, or a hundred other things. “Clean code” is (mostly) a separate issue from choice of language.

    Don’t get me wrong - I don’t like this book. It manages to be both long-winded and facile at the same time. A lot of people seem to read it and take the exact wrong lessons about maintainability from it. I think that it would mostly benefit from being written in pseudocode - concentrating on any particular language might distract from the message. But having a few examples of what a shitfest looks like in a few specific languages might help


  • My old job had a lot of embedded programming - hard real-time Z80 programming, for processors like Z800s and eZ80s to control industrial devices. Actually quite pleasant languages to do bit-twiddling in, and it’s great to be able to step through the debugger and see that what the CPU is running is literally your source code, opcode by opcode.

    Back when a computers were very simple things - I’m thinking a ZX Spectrum, where you can read directly from the input ports and write directly into the framebuffer, no OS in your way just code, then assembly made a lot of sense, was even fun. On modem computers, it is not so fun:

    • x64 is just a fucking mess

    • you cannot just read and write what you want, the kernel won’t let you. So you’re going to be spending a lot of your time calling system routines.

    • 99% of your code will just be arranging data to suit the calling convention of your OS, and doing pointless busywork like stack pointer alignment. Writing some macros to do it for you makes your code look like C. Might as well just use C, in that case.

    Writing assembly makes some sense sometimes - required for embedded, you might be writing something very security conscious where timing is essential, or you might be lining up some data for vectorisation where higher-level languages don’t have the constructs to get it right - but these are very small bits of code. You would be mad to consider “making the whole apple pie” in assembly.


  • Genesis is a different style of game tho, isn’t it? Diablo-like rather than third-person hack and slash?

    Love the series. Personally prefer 3 due to its more limited scope; the other two are great, but to on for a very long time, and I really can’t be bothered playing through the Portal-like bits again. Happy if 4 is the same length as 3.


  • That would be the 25mm2 stuff, about 9mm diameter. Pretty standard for electric ovens.

    The joy of producing electricity from renewables at 12Vdc is that you can run it straight into a whole bank of car and truck batteries for storage. Can then either use it directly for powering things - there’s a lot of things like portable tellies for use in a caravan that are 12V for this reason - or feed it to an inverter to get 240Vac for ‘normal’ usage. Again, large outdoor stores will have them, because they’re intended for this usage.


  • PS3 most certainly had a separate GPU - was based on the GeForce 7800GTX. Console GPUs tend to be a little faster than their desktop equivalents, as they share the same memory. Rather than the CPU having to send eg. model updates across a bus to update what the GPU is going to draw in the next frame, it can change the values directly in the GPU memory. And of course, the CPU can read the GPU framebuffer and make tweaks to it - that’s incredibly slow on desktop PCs, but console games can do things like tone mapping whenever they like, and it’s been a big problem for the RPCS3 developers to make that kind of thing run quickly.

    The cell cores are a bit more like the ‘tensor’ cores that you’d get on an AI CPU than a full-blown CPU core. They can’t speak to the RAM directly, just exchange data between themselves - the CPU needs to copy data in and out of them in order to get things in and out, and also to schedule any jobs that must run on them, they can’t do it themselves. They’re also a lot more limited in what they can do than a main CPU core, but they are very very fast at what they can do.

    If you are doing the kind of calculations where you’ve a small amount of data that needs a lot of repetitive maths done on it, they’re ideal. Bitcoin mining or crypto breaking for instance - set them up, let them go, check in on them occasionally. The main CPU acts as an orchestrator, keeping all the cell cores filled up with work to do and processing the end results. But if that’s not what you’re trying to do, then they’re borderline useless, and that’s a problem for the PS3, because most of its processing power is tied up in those cores.

    Some games have a somewhat predictable workload where offloading makes sense. Got some particle effects - some smoke where you need to do some complicated fluid-and-gravity simulations before copying the end result to the GPU? Maybe your main villain has a very dramatic cape that they like to twirl, and you need to run the simulation on that separately from everything else that you’re doing? Problem is, working out what you can and can’t offload is a massive pain in the ass; it requires a lot of developer time to optimise, when really you’d want the design team implementing that kind of thing; and slightly newer GPUs are a lot more programmable and can do the simpler versions of that kind of calculation both faster and much more in parallel.

    The Cell processor turned out to be an evolutionary dead end. The resources needed to work on it (expensive developer time) just didn’t really make sense for a gaming machine. The things that it was better at, are things that it just wasn’t quite good enough at - modern GPUs are Bitcoin monsters, far exceeding what the cell can do, and if you’re really serious about crypto breaking then you probably have your own ASICs. Lots of identical, fast CPU cores are what developers want to work on - it’s much easier to reason about.


  • Yes, because it doesn’t do as much to protect you from data corruption.

    If you have a use case where a barely-measurable increase in speed is essential, but not so essential that you wouldn’t just pay for more RAM to keep it in cache, and also it doesn’t matter if you get the wrong answer because you’ve not noticed the disk is failing, and you can afford to lose everything in the case of a power cut, then sure, use a legacy filesystem. Otherwise, use a modern one.


  • Yeah. Unless they’ve some ulterior motive for porting their RE engine to iOS, then this is insane. That kind of cash will barely fund a senior engineer for a month once you’ve paid out overheads as well.

    If they’re planning to have some kind of phone tie-in to the next Resi game, then maybe it might have made sense to work the compatibility issues out. An app that runs on your phone that makes it “your phone in game”, so you can receive texts from the president’s daughter while shooting some definitely-not-Spaniards on your Playstation, bit of an augmented-reality thing. Could be a laugh to have your phone be in control of a drone so that you can see round corners, while juggling the other things you’re doing? But probably mostly so that you can get dinged for microtransactions.


  • addie@feddit.uktoRPGMemes @ttrpg.networkEarth divided
    link
    fedilink
    arrow-up
    39
    arrow-down
    1
    ·
    2 months ago

    There’s three regions missing here - region 0 is “worldwide”, region 7 is “special purpose”, Oscar screening DVDs and the like, and region 8 is “international waters” for cruise ships and things. You can set several regions on the same disk, to make a 2/4/5 and the like. Set each region as a bit, and you can store that in a single byte - that makes it very easy to flash the firmware on DVD players to decide which disks they can play. Aus/NZ will want content in English and Latin America will want Spanish or Portuguese, so the DVD consortium can still get up to their often-illegal, certainly immoral, price fixing and bullshit.

    Really, fuck DVDs. So much potential in the increased capacity, and then it was mired in crap like this and “disabled user operations” so that you can’t skip trailers. Time to raise the black flag and set sail for prosperous waters, me hearties.


  • emerges from a brand you’ve probably never heard of

    Writing this on a Tuxedo Pulse 14 / gen 3 as we speak. Great little laptop. I’d wanted something with a few more pixels than my previous machine, and there’s a massive jump from bog-standard 1080p to extremely expensive 4K screens. Three megapixel screen at a premium-but-not-insane price, compiles code like a champion, makes an extremely competent job of 3D gaming, came with Linux and runs it all perfectly.

    “Tuxedo Linux”, which is their in-house distro, is Ubuntu + KDE Plasma. Seemed absolutely fine, although I replaced it with Arch btw since that’s more my style. Presumably they’re using Debian for the ARM support on this new one? This one runs pretty cold most of the time, but you definitely know that you’ve got a 54W processor in a very thin mobile device when you try eg. playing simulation games - it gets a bit warm on the knees. “Not x64” would be a deal-breaker for my work, but for most uses the added battery life would be more valuable than the inconvenience.




  • Any decent conductor is going to to vary the beat based on how long it takes for sound to fill the venue in question. Beethoven’s choices for the music halls in Vienna might have made sense then, but not so much today.

    One of the things that’s always annoyed the conductors that I’ve worked with is that we always ignore the dynamics in his music. Beethoven’s markings are expressive, subtle. And we always play his stuff louder than indicated.


  • Agreed. JSON solves:

    • the ‘versioning’ problem, where the data fields change after an update. That’s a nightmare on packed binary; need to write so much code to handle it.
    • makes debugging persistence issues easy for developers
    • very fast libraries exist for reading and writing it
    • actually compresses pretty damn well; you can pass the compress + write to a background thread once you’ve done the fast serialisation, anyway.

    For saving games, JSON+gzip is such a good combination that I’d probably never consider anything else.


  • Stephen King’s books tend to be both very long and contain a lot of internal monologue. That’s very much not film-friendly. “Faithful” adaptions tend to drag and have a lot of tell-don’t-show, which makes for a “terrible” film. Unfaithful ones tend to change and cut a lot, which makes them “terrible” adaptions. For instance, “The Shining” film has very little to do with the book, but is an absolutely phenomenal movie. King hated it.

    “IT” the Tim Curry version has Tim Curry in it, who was absolutely fantastic. A lot of material from the book was cut out - I’m thinking it could be 80% or more. That includes the scene where the children have a gang bang in the sewer. Out of nowhere, with no foreshadowing, and it’s never mentioned again if I remember correctly. That might make it a “terrible” unfaithful adaption, but you know something? I’m alright without seeing that.


  • Yeah.

    There’s a couple of ways of looking at it; general purpose computers generally implement ‘soft’ real time functionality. It’s usually a requirement for music and video production; if you want to keep to a steady 60fps, then you need to update the screen and the audio buffer absolutely every 16 ms. To achieve that, the AV thread runs at a higher priority than any other thread. The real-time scheduler doesn’t let a lower-priority thread run until every higher-priority thread is finished. Normally that means worse performance overall, and in some cases can softlock the system - if the AV thread gets stuck in a loop, your computer won’t even respond to keyboard input.

    Soft real-time is appropriate for when no-one will die if a timeslot is missed. A video stutter won’t kill you. Hard real-time is for things like industrial control. If the anti-lock breaks in your car are meant to evaluate your wheels one hundred times a second, then taking 11 ms to evaluate that is a complete system failure, even if the answer is correct. Note that it doesn’t matter if it gets the right answer in 1 ms or 9 ms, as long as it never ever takes more than 10. Hard real-time performance does not mean good performance, it means predictable performance.

    When we program up PLCs in industrial settings, for our ‘critical sections’, we’ll processor interrupts, so that we know our code will absolutely run in time. We use specialised languages as well - no loops, no recursion - that don’t let you do things that can’t be checked for an upper time bound. Lots of finite state machines! But when we’re done, we know that we’ve got code that won’t miss a time slot in the next twenty years of operation.

    That does mean, ironically, that my old Amiga was a better music computer than my current desktop, despite being millions of times less powerful. OctaMED could take over the whole CPU whenever it liked. Whereas a modern desktop might always have to respond to a USB device or a hard drive, leading to a potential stutter at any time. Tiny probability, but not an acceptable one.


  • addie@feddit.uktolinuxmemes@lemmy.worldbtw
    link
    fedilink
    arrow-up
    6
    ·
    edit-2
    3 months ago

    I don’t think that even 8 years ago, the ‘business’ choices would have been SUSE / Fedora / Debian. If you’re paying for support, then you’d be paying for RHEL, and the second choice would have been Centos, not Fedora. Debian in third place maybe, as it was the normal choice for ‘webserver’ applications, and then maybe SUSE in fourth.