• 0 Posts
  • 4 Comments
Joined 2 years ago
cake
Cake day: June 9th, 2023

help-circle
  • I see this as an accessibility problem, computers have incredible power but taking advantage of it requires a very specific way of thinking and the drive to push through adversity (the computer constantly and correctly telling you “you’re doing it wrong”) that a lot of people can’t or don’t want to do. I don’t think they’re wrong or lazy to feel that way, and it’s a barrier to entry just like a set of stairs is to a wheelchair user.

    The question is what to do about it, and there’s so much we as an industry should be doing before we even start to think about getting “normies” writing code or automating their phones. Using a computer sucks ass in so many ways for regular people, you buy something cheap and it’s slow as hell, it’s crapped up with adware and spyware out of the box, scammers are everywhere ready to cheat you out of your money… anyone here is likely immune to all that or knows how to navigate it but most people are just muddling by.

    If we got past all that, I think it’d be a question of meeting users where they are. I have a car but I couldn’t replace the brakes, nor do I want to learn or try to learn, but that’s okay. My car is as accessible as I want it to be, and the parts that aren’t accessible, I go another route (bring it to a mechanic who can do the things I can’t). We can do this with computers too, make things easy for regular people but don’t try to make them all master programmers or tell them they aren’t “really” using it unless they’re coding. Bring the barrier down as low is it can go but don’t expect everyone to be trying to jump over it all the time, because they likely care about other things more.


  • I’m so confused that the same people can say “why does everyone get their undies in a bunch that we happily accept putting arbitrary data in columns regardless of type, that’s good, it’s flexible, but fine, we’ll put in a ‘strict’ keyword if you really want column types to mean something” and also “every other SQL says 1==‘1’ but this is madness, strings aren’t integers, what is everyone else thinking?!”


  • Back in the olden days, if you wrote a program, you were punching machine codes into a punch card and they were being fed into the computer and sent directly to the CPU. The machine was effectively yours while your program ran, then you (or more likely, someone who worked for your company or university) noted your final results, things would be reset, and the next stack of cards would go in.

    Once computers got fast enough, though, it was possible to have a program replace the computer operator, an “operating system”, and it could even interleave execution of programs to basically run more than one at the same time. However, now the programs had to share resources, they couldn’t just have the whole computer to themselves. The OS helped manage that, a program now had to ask for memory and the OS would track what was free and what was in use, as well as interleaving programs to take turns running on the CPU. But if a program messed up and wrote to memory that didn’t belong to it, it could screw up someone else’s execution and bring the whole thing crashing down. And in some systems, programs were given a turn to run and then were supposed to return control to the OS after a bit, but it was basically an honor system, and the problem with that is likely clear.

    Hardware and OS software added features to enforce more order. OSes got more power, and help from the hardware to wield it. Now instead of asking politely to give back control, the hardware would enforce limits, forcing control back to the OS periodically. And when it came to memory, the OS no longer handed out addresses matching the RAM for the program to use directly, instead it could hand out virtual addresses, with the OS tracking every relationship between the virtual address and the real location of the data, and the hardware providing Memory Management Units that can do things like store tables and do the translation from virtual to physical on its own, and return control to the OS if it doesn’t know.

    This allows things like swapping, where a part of memory that isn’t being used can be taken out of RAM and written to disk instead. If the program tries to read an address that was swapped out, the hardware catches that it’s a virtual address that it doesn’t have a mapping for, wrenches control from the program, and instead runs the code that the OS registered for handling memory. The OS can see that this address has been swapped out, swap it back in to real RAM, tell the hardware where it now is, and then control returns to the program. The program’s none the wiser that its data wasn’t there a moment ago, and it all works. If a program messes up and tries to write to an address it doesn’t have, it doesn’t go through because there’s no mapping to a physical address, and the OS can instead tell the program “you have done very bad and unless you were prepared for this, you should probably end yourself” without any harm to others.

    Memory is handed out to programs in chunks called “pages”, and the hardware has support for certain page size(s). How big they should be is a matter of tradeoffs; since pages are indivisible, pages that are too big will result in a lot of wasted space (if a program needs 1025 bytes on a 1024-byte page size system, it’ll need 2 pages even though that second page is going to be almost entirely empty), but lots of small pages mean the translation tables have to be bigger to track where everything is, resulting in more overhead.

    This is starting to reach the edges of my knowledge, but I believe what this is describing is that RISC-V chips and ARM chips have the ability for the OS to say to the hardware “let’s use bigger pages than normal, up to 64k”, and the Linux kernel is getting enhancements to actually use this functionality, which can come with performance improvements. The MMU can store fewer entries and rely on the OS less, doing more work directly, for example.


  • For a couple seasons, there was a private subreddit where they had extracted the official streams of every NFL game, and you could just open it in a web browser and watch in full quality for free with no ads other than what was in the actual broadcast. And for a while, there was a promotion in a few European countries for free NFL Sunday Ticket access, and if you started the stream over a VPN connection into one of those countries, you could turn the VPN off and it’d continue working. Then some online magazine published the trick and it stopped working the next week.