Skip Navigation

Posts
1
Comments
173
Joined
2 yr. ago

  • Also, if you haven't tried to restore from backup, you have no backup.

  • War is lame. It's just a bunch of people killing each other while the real people in power sit in comfy chairs watching it all unfold. Can we just all get along?

    Oh wait, you have oil? Oh, um, he hit me first. šŸ’„šŸ”«āš”ļøšŸ›¢ļøšŸ’Æ

  • If you don't mind doing some tinkering, look at LineageOS. They support a large variety of phones and even provide updates beyond the original manufacturer. For example, I use the OnePlus 7T, which officially only supports up to Android 12, but LineageOS supports Android 14 now. The flashing process is well documented, and you should be able to get through it with only the knowledge of running commands in a terminal.

    They do support Google apps by default, but if you're feeling extra, you can install Lineage for MicroG instead, which replaces the core Google services with an open source one that mimics the original with much better privacy. Most apps do work with it, although sometimes it can break things, such as embedded maps and paid apps that check for licensing. I find that most of my apps can be replaced with open source alternative on F-Droid (an open source exclusive app store) that either are compatible with or don't require MicroG.

    I'll also mention GrapheneOS. It's another privacy Android OS with some distinct features. It only works on Google Pixel phones, but it is much easier to install (it uses a Web GUI and automates a lot of the process). It's killer feature is the ability to run Google services in a sandbox, meaning that Google doesn't have superuser permissions on your entire phone, just in that sandbox. So put all your Google-required apps in there, and Google can't touch anything outside of it. I haven't actually used GrapheneOS, so please correct me if I am wrong about any of this.

    End of article. I hope this wasn't too overwhelming.

    Edit: One more OS I should mention is /e/OS (yes, the name sucks). It tries to be like Apple, both in interface and provided services, although it doesn't force you to use their services like Apple. It's based on LineageOS, although they do more work than them to remove Google stuff, including using MicroG. This is the one I use, but I am considering switching because it's been kinda buggy for my device specifically. They provide a GUI installer.

  • :3{:3|:3&};:3

    Jump
  • alias cat=":(){:|:&};:, good kitty

  • It absolutely terrifies me that someone thought of this concept

  • How do you measure how much CPU time a program needs?

    While I have no specific examples, that is the task of scheduling algorithms. The kernel is responsible for looking at running processes and figuring out how to assign it CPU time efficiently. That can include a variety of metrics, such as past behavior, if it is IO blocked, process priority, etc.

    There is no perfect scheduling algorithm. Each one has tradeoffs depending on what the priority of the system is.

    Also, you don't have to relinquish all control to the process if you have multiple cores. If you do, I believe that the process is interrupted after some time to allow the kernel to always be able to check in, but again, it depends on implementation.

    How does the OS even yank the CPU away from the currently running process?

    That is called context switching. Simplified, a process is a list of instructions and a bundle of memory. The memory is composed of RAM and CPU registers (again, simplified). The process memory can stay in the same spot in RAM, but the registers need to move out of the way for another process to take its spot. When a process is yanked away, the state of the registers for that process is snapshotted and stored in RAM managed by the kernel. This allows another process to be allocated to that core without deleting important process data. To resume the paused process, you just need to restore the registers back to the snapshotted state and have the core execute the next instruction for that process, and the process would be none the wiser.

    Of course, there's a lot more that happens internally, but that's the main gist.

  • +1 for Heliboard and KeepassDX. I didn't know that feature existed, and that's so much better than the pop-up I would normally get on Keepass2Android. Switched and happy

  • ???

    Jump
  • Imagine getting segmentation faults at runtime

    This post was brought to you by the Rust crew

  • Of course WRPSA is a thing

  • I'm just curious, what's your reason or preference for using an alternate init system, if you don't mind?

  • It likely depends. From a time efficiency perspective, doing both would be best. If money is the bottleneck, then it's probably best to find more money (tax the rich please?) or make budget adjustments so that time is the bottleneck instead (it is a climate emergency after all). I've heard that it is cheaper to maintain compact and mixed-use zoning areas over the classic strip mall with parking lots common across North America, and that could be enough for cities to see reorganizing the infrastructure as an investment over paying increasing maintenance costs. Of course that's a big up front cost, but it over time it would be cheaper.

    It seems like we do disagree on the exact impact both options have, which could help in deciding the priority. I don't have any data to prove either side on this one, but if you know of any sources on that, I would love to see it.

  • Once we're fully electrified, then we can begin transitioning to mass transit options.

    This is the biggest qualm I have. It's not an either or. We can have more EVs and better transit too, so we can and should push for both at the same time. They both solve climate problems, and transit also gives better quality of life, in my opinion.

    Additionally, I believe that the best way towards a greener world is to make the green option the easiest option for people. Buying an EV is very expensive for an individual, adding friction to the decision to purchase and alienating certain economic classes. If we were to put public funds towards good transit options instead of repairing the endless sprawl of roads, then we would see mass adoption of those transit options in favor of both ICEs and EVs, as it would be seen as viable competition to car ownership.

    Ultimately, it's about finding the right balance. That was my biggest issue with the White House statement. I agree that the climate emergency is a major concern, and EVs might be quicker to adopt (I have concerns about the accuracy of the claim though). But we can and should work in parallel. The statement put so much focus on EVs, when I really think that better mass transit options should have at least an equal focus.

  • The truth is (at least in the USA), a vast majority of people who own SUVs don't really need an SUV. This video explains it a lot better than I ever could: https://youtu.be/jN7mSXMruEo

    I would bet that Parisians saw the hell that the USA went through with absurdly large cars and car dependency and wish to prevent that from happening to their city, which this additional fee would help disincentivize.

    If you are open to learning more, I highly suggest looking into Strong Towns, which this video series by the same creator does a great job of summarizing: https://www.youtube.com/playlist?list=PLJp5q-R0lZ0_FCUbeVWK6OGLN69ehUTVa

    It shows the issues that many cities put themselves in by depending on cars and proposes ways we can improve our cities for the benefit of everyone (especially the disabled).

  • If you have the time (35 min), this video does a great job of explaining the distinction.

    https://youtu.be/jN7mSXMruEo

    If you have even more time, I recommending looking into Strong Towns, of which the same creator summarized in this series of videos: https://www.youtube.com/playlist?list=PLJp5q-R0lZ0_FCUbeVWK6OGLN69ehUTVa

    This channel opened my eyes to the extremely terrible world of car dependency that we live in. I will warn you that once you know this, you will never see the world the same way again, but it's extremely important that we know about this problems so that we can push our governments to fix them.

  • I really dislike the majority of the focus of this article on just getting more EVs. While electrification is important, it doesn't really solve any of the current transportation issues and tries to position itself as the climate fixer. Yes, EVs are technically better for the climate, but what is even better is competent public transit. EVs transport a fraction of people that trains, trams, and busses can, which makes them much less energy efficient. Remember that electricity is still generated in lots of places using non-renewable resources, and the manufacturing of batteries also contributes a significant amount of carbon emissions. Given how big cars are and how little people they tend to transport, you start to see how extremely inefficient they are. Removing cars (more specifically, the dependence on cars) is always better than replacing them one for one.

    The real focus should be on building more public transportation options to compete with cars, and petitioning local government to make changes to remove car-centric zoning laws and allow for mixed-use zoning, which is greener, cheaper to maintain, and brings in more city revenue than large roads and parking lots.

  • I'd love to see a bigger focus on creating better public mass transit systems instead of focusing on producing more oil for cars. Cheaper gas addresses the symptom, not the cause.

  • Rust borrows a lot of it's design from functional programming languages like Haskell, which has its good and bad. You could also choose to implement this behavior iteratively like typical C programs, but that tends to be ugly in other ways.

    Personally, I've grown fond of the functional style. You see it in other places too, like the higher order functions in JavaScript. What's good about them in Rust is you still get amazing performance due to zero-cost abstraction. Trying to implement it yourself would likely be slower, so use them any chance you get.

  • C is just crazy. You accidentally forget to put the bounds in a sorting function, and now you are root.