Just some Internet guy

He/him/them 🏳️‍🌈

  • 2 Posts
  • 298 Comments
Joined 2 years ago
cake
Cake day: June 25th, 2023

help-circle
  • They’re just examples of things you could pipe curl into, but no not really. If the download fails you end up with an incomplete file in your tmpfs anyway, and have to retry. Another use I have is curl | mysql to restore a database backup.

    If the server supports resuming, I guess that can be better than the pipe, but that still needs temporary disk space, and downloads rarely fail. You can’t corrupt downloads over HTTPS either as the encryption layer would notice it and kill the connection, so it’s safe to assume if it downloaded in full, it’s correct.

    With downloads being IO bound these days, it’s nice to not have to read it all back and write the extracted files to disk afterwards. Only writes the final files once.

    That’s far from the weirdest thing I’ve done with pipes though, I’ve installed Windows 11 on a friend’s PC across the ocean with a curl | zstd | pv | dd, and it worked. We tried like 5 different USBs and different ISOs and I gave up, I just installed it in a VM and shipped the image.


  • I’ve had to use that flag.

    --silent is useful when you don’t want the progress bar or you’re piping curl into something else. I like to do curl | tar -zxv to download and decompress at the same time, I’ve even tar -zc | curl to upload a backup taking no disk space to do so.

    The problem however is it’s really silent: if it fails, it exits with a non-zero code and that’s it. Great when you don’t want debug info to interfere, annoying when you need to debug it.

    So you can opt-in to print some errors when in silent mode, but otherwise be silent.


  • If we deleted everything written by insufficiently pure developers, we wouldn’t have a Linux desktop. Especially if we count the ones that were smart enough to not bring up anything political in public.

    Not a fan of DHH, but then you delete Rails then there’s no GitHub, GitLab, Mastodon, and many many other things given how popular Rails is, and that’s just that one guy.

    If you include all the sketchy stuff that happens in the supply chain mining the minerals, processing, assembly all the way up to the final computer product, you just can’t morally justify supporting any manufacturer either.

    This really doesn’t do anything useful other than feeling good to not support one of those guys. If anything it just adds extra political drama that feeds into a much bigger worldwide division problem.


  • No way. iPhones don’t exactly allow bootloader unlocking to begin with, but even if you could, it would be in no better state than Asahi on the M1 Apple computers. Every driver would have to be written from scratch.

    Pixels are a good platform for custom ROMs because until the recent drama, you could literally just build AOSP as-is and use it. So the GrapheneOS team only really need to focus on their changes to the OS and their apps and none of the drivers and modem interface and all that. That’s also why GrapheneOS runs so well on it: Google provided everything, it just works.

    iPhones would be the absolute worst phone to develop for: zero support from Apple, no drivers no documentation, no nothing. Not even a Linux kernel! At least for Android, the Linux license forces manufacturers to publish the source code, so at minimum you start with something that should boot and contain all the stuff to talk to the hardware already, just need to wire it in with userspace drivers. CPU manufacturers like Qualcomm also provide a fair chunk of the userspace drivers open-source too, so you can just pull that and have audio and video working.

    Not impossible, but definitely really hard and impractical.





  • You can mostly backup everything but it’s impossible to make a perfect backup like the old days anymore because of the TEE. Flashing a new ROM will change the keys and permanently make the old data worthless. Stuff like Google Authenticator for example simply won’t backup even with a perfect bit copy.

    Apps will restore okay but many will be logged out and have lost their permissions and push notification registration with Google.


  • It’ll tolerate a few hours no problem, mine’s been down for a bit over 24h and caught up fine.

    I think it marks instances as down after 2-3 days, but I’m not sure if it’ll resume once it comes back up at this point. I think if your instance reaches out it might start pushing events again but it could also result in dropping the previous days.



  • No, I would simply give them a box of condoms or whatever.

    If they’re gonna do it, they’re gonna do it, and as a parent, you’re way better off with your kids comfortable not hiding it because if there’s complications you can intervene quickly. If the condom broke, you want the kid to come to you so you can get plan B and not have to deal with an abortion a couple weeks or even months later. It’s also way better they get caught doing it at home vs in a car and now be on the sex offender registry.

    What you’re describing is abstinance and is common in religious families, and well know for being ineffective. Plus as you’ve described, it completely falls apart when bisexuality is involved, and it makes even less sense if it’s physically impossible to even get pregnant.

    The same extends to alcohol, drugs, porn, whatever evil vice people are worried. If your kid’s gonna do drugs, you want them to feel comfortable calling you if they have a bad trip, and also feel comfortable giving you the drugs so you can get them to the hospital and they can quickly identify what you’re on and give the necessary medications.

    They’re gonna learn about all that eventually, better they learn it from you. Punishment and “you’ll understand when you’re grown up” doesn’t work. If they’re old enough to ask, they’re old enough for the answers too.


  • Max-P@lemmy.max-p.metoFediverse@lemmy.worldTime for a purge
    link
    fedilink
    English
    arrow-up
    10
    arrow-down
    1
    ·
    4 months ago

    Free speech includes respecting speech you disagree with and speech that makes you uncomfortable.

    If the roles were reversed and you were lined up to be banned because you’re not siding with the “correct” side, you’d be crying abusive censorship.

    That’s what the downvote and block buttons are for.


  • Yes, a lot safer. Even bugs in the renderer or media player would typically be triggered by JavaScript by say, moving elements around really fast or whatever.

    Without JavaScript, the browser renders that page and that’s it, there’s no JS to modify it or open popups, nothing to dynamically load/refresh content. The most you can do without JS is animations and responding to simple events like changing the color of a button when the mouse is over it. So your only shot to attack this is the renderer during initial page load, once.




  • For all its flaws and mess, NFS is still pretty good and used in production.

    I still use NFS to file share to my VMs because it still significantly outperforms virtiofs, and obviously network is a local bridge so latency is non-existent.

    The thing with rsync is that it’s designed to quickly compute the least amount of data transfer to sync over a remote (possibly high latency) link. So when it comes to backups, it’s literally designed to do that easily.

    The only cool new alternative I can think of is, use btrfs or ZFS and btrfs/zfs send | ssh backup btrfs/zfs recv which is the most efficient and reliable way to backup, because the filesystem is aware of exactly what changed and can send exactly that set of changes. And obviously all special attributes are carried over, hardlinks, ACLs, SELinux contexts, etc.

    The problem with backups over any kind of network share is that if you’re gonna use rsync anyway, the latency will be horrible and take forever.

    Of course you can also mix multiple things: rsync laptop to server periodically, then mount the server’s backup directory locally so you can easily browse and access older stuff.


  • Also worth noting that the computations don’t have to be expensive either, it’s only there in cryptocurrencies to artificially limit the number of blocks generated on a public system and tie it into the reward system.

    So for a bank, that could be a plain single iteration of a sha256 hash, and once share everyone agrees those were the transactions and you can’t go back and change one without having to change the whole chain.

    Make it sha1 and you basically have git.

    A blockchain is more or less just an append-only database. Or even an append-only replication log with built-in checksums.




  • At the subatomic scale, things are less particule-like and more wave-like.

    The most famous visualization of this is the double-slit experiment: there’s a source of light, two slits and a wall. There should be two lines right? Nope, you get a wave interference pattern. So which slit did the electron take? Both at the same time, it seems. You can know which path it likely took, but in reality the photon could have taken a detour Taco Bell faster than the speed of light for all we know, as long as the end result doesn’t it’s physically totally fine.

    The crazy part of the experiment is that in order measure which slit the photon actually went through, it would have to interfere with your detector. And because it interacted with your detector, the uncertainty collapses and the whole interference pattern disappears. The measurement causes side effects that affect where it possibly could have gone through. You thus only see paths where it did go through your detector.

    The universe seems to prefer the path of least action. All possible paths are evaluated at the same time, including ones that would violate the speed of light. You won’t catch the universe doing it, but you can observe that photons and electrons make it places they physically shouldn’t be able to, but mathematically, they can and do in the real world. Do they even actually travel any given path? We don’t know, we know it went from A to B with no idea where it was in-between or how fast it went.

    To circle back to your coding example: the particule is a class with getters, but the getters don’t read a property, it makes up the value on the fly. So particule.spin, particule.location and particule.speed would return you the values, but they would be inconsistent. It only materializes on demand when probed, and you can’t get two of them at the same time. When you check you only get one possible value it can have, but you check again and it’s a different value. In C that would be a volatile variable.

    That’s why in atoms you end up with a blurry electron cloud. At this scale, it’s a wave of probable positions, it’s everywhere and nowhere at the same time.

    A quantum state is basically that. It’s not a defined state, it’s an equation of all possible states and how probable it is to be in a given state. The only guarantee you have is that all the state will physically make sense if you measure it, so if you measure the spin of an entangled particule, to stay consistent, the other one will take the opposite state because you can’t catch the universe in a lie. But until you observe that state, it’s both at the same time.

    PBS Space Time is a great channel on YouTube for this.