• 2 Posts
  • 221 Comments
Joined 2 years ago
cake
Cake day: June 20th, 2023

help-circle



  • Real answer: it depends.

    • Deleting a file in use: no problemo. File is removed from the directory immediately, but exists on disk until last program who had the file open closes. Everyone wins! (Unless you’re trying to free up space by deleting a huge file that’s being held open by a program and not understanding why the filesystem usage didn’t go down)
    • Unmounting a hard drive in use: Will error out similarly to Windows. lsof can tell you which process has which files open. There’s nuance with lazy unmounts and whatnot but that should not be used in most cases.

    Now in practice you should be wary of one very important thing that changes compared to Windows: Writes are asynchronous on Linux. First the kernel writes to RAM, then it flushes to disk at a later time for performance reasons (this is one of the reasons why writing a bunch of small files is many times faster on Linux than Windows). The upshot is that just because your file copy is “done” doesn’t mean you can just yank the USB cable. Always safely unmount before unplugging a storage device on Linux.


  • And Hytale got shitcanned!

    It’s actually amazing that in an industry so hell-bent on copying successful formulas ad-nauseam (e.g. Quake&Doom spawning the whole genre of First Person Shooters), Minecraft has not seen anything reach the status of spiritual successor in over 15 years of charts-topping sales performance. Not from its own studio, not from its former creator, not with the Late Hypixel Studios.

    There are survival games and base-building games and exploration games, but none of them are “Minecraft-likes” in the way that early FPS were “Quake-likes”. CS has Valorant. LoL has Dota. Tekken has Street Fighter. PUBG has Fortnite has Roblox. Minecraft somehow remains truly one-of-a-kind, a gaming UFO that eludes suits looking for a replicable formula. I actually believe Mojang themselves don’t understand why Minecraft works in the first place either, which is why every update seemingly either underwhelms or angers everyone. That game is lightning in a bottle and no-one knows what to do with it.

    If Nadella had a stroke so bad he decided to make Minecraft FOSS, I’d be really interested to see what would happen. If any for-profit company was allowed to make direct Minecraft derivatives, I do think we would see a level of creativity and innovation that would dwarf even the already extremely prolific current modding scene.



  • Technology Connections and Hank Green have been shouting this for a while, but that whole issue is way overblown. Some first gen EVs around 2010 had issues, but every major manufacturer since then has way exceeded expectations on battery lifetime thanks to advanced BMS and thermal controls. Car batteries don’t just rapidly degrade out of the blue, the tech has nothing in common with what’s in your phone. But public sentiment has not caught up because most people think Li-Ion = smartphone = dead after 2-5 years, so second hand EVs are way undervalued. Which is great for buyers.

    It’s not like you can’t easily total a second-hand ICE by mechanical failure. Just ask anyone who own(ed) a puretech engine. If you went by manufacturer recommendations, the fucking thing might just eat your timing belt one day and grenade itself. And there’s no way a full engine swap on a 5-10 year old economy car is economically viable.

    There’s always something that could go wrong when you buy a car. Unless you get comprehensive insurance and warranty, you need to accept the fact that losing the entire car to an accident, catastrophic mechanical failure, or theft is always a risk. If that’s too much anxiety to deal with, get a lease.


  • If only.

    Should America one day go back to something resembling a functioning democracy, his legacy will be “who could have seen it coming” “no-one I know voted for him” “voter fraud” “we were too afraid” “at least the trains ran on time” “it was China/Russia’s fault”. I’ve heard most of those already.

    Variations on all these lies and more were peddled by the Germans after the war and believed by the world. Even by American judges right after WWII who acquitted the overwhelming majority of Nazi War Criminals tried at Nuremberg despite mountains of evidence.

    Anything but a society, culture, and individuals holding themselves accountable for easily predictable and predicted failures to govern.


  • THANK YOU.

    I migrated services from LXC to kubernetes. One of these services has been exhibiting concerning memory footprint issues. Everyone immediately went “REEEEEEEE KUBERNETES BAD EVERYTHING WAS FINE BEFORE WHAT IS ALL THIS ABSTRACTION >:(((((”.

    I just spent three months doing optimization work. For memory/resource leaks in that old C codebase. Kubernetes didn’t have fuck-all to do with any of those (which is obvious to literally anyone who has any clue how containerization works under the hood). The codebase just had very old-fashioned manual memory management leaks as well as a weird interaction between jemalloc and RHEL’s default kernel settings.

    The only reason I spent all that time optimizing and we aren’t just throwing more RAM at the problem? Due to incredible levels of incompetence business-side I’ll spare you the details of, our 30 day growth predictions have error bars so many orders of magnitude wide that we are stuck in a stupid loop of “won’t order hardware we probably won’t need but if we do get a best-case user influx the lead time on new hardware is too long to get you the RAM we need”. Basically the virtual price of RAM is super high because the suits keep pinky-promising that we’ll get a bunch of users soon but are also constantly wrong about that.


  • I can’t be fucked to find the graph but it’s true. The relationship between speed and exhaustion is highly asymmetric, going 20 % slower than your default walk is much more tiring than going 20 % faster.

    It actually makes intuitive sense to anyone who hikes. Walking slow is like hiking downhill. You’re fighting your body’s natural cadence which requires extra energy that doesn’t go anywhere useful. Going faster also uses extra energy but it’s largely “useful” energy that spares steps. The extreme version of that line of thought is that I can run 10 km but not crawl 10 km.

    Also fast walkers tend to… walk a lot, it’s a virtuous circle. It’s fine if grandma does a lap around the mall at 2 km/h, but I’ve been walking all day and I have more places to walk to afterwards and I ain’t doing all that at crawling pace.


  • My dad’s Mercedes indeed beeps incredibly loudly (anyone sleeping immediately wakes up in a panic) if the blind spot sensor goes off… which it does as soon as you put your blinker on.

    Guess what that wonderful bit of tech taught my dad to do? That’s right, don’t use the blinker to change lanes if you don’t want your eardrums blown out.

    The fundamental problem is that car manufacturers aren’t being held liable for the accidents caused directly or indirectly by these “safety” systems. There is zero oversight and no mandate to investigate false positives of these systems, even when they cause an accident. The end result is that for the manufacturers the point is not to improve safety but to do obnoxious safety theater so regulators look away from rising pedestrian deaths. “Sure our cars are one ton heavier, but they have automatic braking soooo we’re good right?”

    Who knows if these gadgets actually do anything or even if they don’t decrease overall safety. The manufacturer gets positive marketing, throws the regulator off their scent, and isn’t held liable for shit when the “safety” system fails or encourages bad habits. Win-win-win. Except the general public loses. But who ever cared about these schmucks?



  • It’s not even about predictions or estimations - everything’s so many years late everyone stopped counting. They just… don’t seem to understand “scoping”? The pitch is “ultra-realistic life-size universe sandbox simulation” and they keep hitting walls because they’re using tech that’s completely inadequate for the task at hand but they won’t let that deter them. They’ve probably reimplemented every subsystem of the Crysis 3 engine a dozen times by now, and it’s still not anywhere near capable of achieving even a tenth of their ambitions. Fuck, they just very recently got their server meshing thing barely working after like a decade of development (at the cost of rewriting everything again of course).

    It’s like watching a team raising billions to build the Burj Khalifa but all they have is a bunch of dry sand and some spoons. Deadlines aren’t really the issue.



  • It’s like every other media industry. The monoculture is dying. Everyone’s who’s “about it” is into niche subcultures and micro-celebrities you’ll probably never hear of.

    There was a weird period of time from the mid-20th through the early 21st century where radio and TV had very strongly concentrated media production which made up most people’s media consumption.
    For the last 15 years or so the tools of professional-looking media production for mass consumption have been available to anyone with a few hundred bucks to spare.

    In some ways it’s a communist utopia. The means of production have been commodified so much virtually anyone can afford them. However capitalists have moved on from owning the means of production to owning the means of distribution (the platforms).



  • Counterpoint: Yes, parse don’t validate, but CLIs should not be dealing with dependency management.

    I love Python’s argparse because:

    • It’s “Parse, don’t validate” (even supports FileType as a target)
    • It enforces or strongly encourages good CLI design
      • Required arguments should in most situations be positional arguments, not flags. It’s curl <URL> not curl --url <URL>.
      • Flags should not depend on each other. That usually indicates spaghetti CLI design. Don’t do server --serve --port 8080 and server --reload with rules for mix-and-matching those, do server serve --port 8080 and server reload with two separate subparsers.
      • Mutually exclusive flags sometimes make sense but usually don’t. Don’t do --xml --json, do -f [xml|json].
      • This or( pattern of yours IMO should always be replaced by a subparser (which can use inheritance!). As a user the options’ data model should be immediately intuitive to me as I look at the --help and having mutually exclusive flags forces the user to do the extra work of dependency management. Don’t do server --env prod --auth abc --ssl, do server serve prod --auth abc --ssl where prod is its own subparser inheriting from AbstractServeParser or whatever.

    Thinking of CLI flags as a direct mapping to runtime variables is the fundamental mistake here I think. A CLI should be a mapping to the set(s) of behavior(s) of your application. A good CLI may have mandatory positional arguments but has 0 mandatory flags, 0 mutually exclusive flags, and if it implements multiple separate behaviors should be a tree of subparsers. Any mandatory or mutually exclusive flags should be an immediate warning that you’re not being very UNIX-y in your CLI design.


  • I’ve been using the AI to help me with some beginner level rust compilation checks recently.

    I never once got an accurate solution, but half the time it gave me a decent enough keyword to google or broken pattern to fix myself. The other half of the time it kept giving me back my own code proudly telling me it fixed it.

    Don’t worry though, AGI is right around the corner. Just one more trillion dollars bro. One trillion and we’ll provide untold value to the shareholders bro. Trust me bro.


  • I don’t trust the US government to do literally anything right with this, and I’m kinda surprised Google didn’t already gift an underage child to Trump so he’d make the problem go away.

    However a perfectly viable option that I’m sure the previous government looked into would be to entrust Chromium (which is Open-Source though not copyleft) to a new, independent nonprofit made of Google’s former chromium team led and paid for by a consortium of the major commercial chromium users (Google, Microsoft, etc.). It would be in everyone’s best interest to share the relatively small financial burden so that Chromium can remain decent and competitive.

    This wouldn’t be anything revolutionary. This approach of financing an independent open-source project as a “common good” is basically how the Linux kernel has been developed for many years now, most Linux code is written by corporate sponsors.


  • music-library $ du -h -d 0 .
    270G	.
    

    I am not looking for a compromise. I listen to my high-quality digital library on shuffle most of the time, and am very well aware that my phone allows me to access orders of magnitude more music than even the most compact CD player.

    When I do listen to my favorite albums as LPs, the clunkiness and the artifacts are part of an Experience. I can listen to exact copies of the digital masters of those songs any time I want to, but sometimes we do things BECAUSE they are not maximally optimal. Sometimes I want to take a walk alongside the river and get my feet a little bit wet even though I could have worn boots. Feel a little something, you know?