I should have guessed.
Thank you 🤣
I should have guessed.
Thank you 🤣
Bash scripts are rarely the best choice for large, complicated, programs or for software that requires complex data structures. (Git is very much in both categories)
In bash there are so many ways to accidentally shoot yourself in the foot that it’s absurd. That can lead to bizarre seeming behavior, which may break your script, or even lead to a security vulnerability.
There are things that make it a bit more manageable, like “[[]]” instead of “[]”, but a frustrating number of such things are bash specific and this is written for the subset that is POSIX shell, meaning you don’t even get those token niceties.
Where you generally “want” to use POSIX sh is for relatively simple scripts where the same file needs to run on Linux with bash, Linux with only BusyBox sh, OSX with zfs (and an outdated version of bash which will never be updated because Apple refuses to ship any GPLv3 software in MacOS).
This is not that, and so one would expect that:
The developer of this git implementation has poor / foolish judgement.
Shit will be buggy
Shit will be insecure
Shit will be a PITA to try to troubleshoot or fix
And shit will be slow, because bash is slow and this isn’t a job that you can just hand off all of the heavy lifting to grep / sed / awk*, because the data structures don’t lend themselves to that.
* You could write the entire program in awk, and maybe even end up with something almost as fast as a python implementation done in ⅒ the time, but that would be terrible in other ways.
A concrete example of this is doctors and hospitals creating guidelines about how to triage care when ICUs were/are full because of unmitigated spread of COVID.
It is definitely an “interesting” phylisophical question to ask:
“If a long term ventilator user comes into the ICU, with the ventilator they own and brought from home, and they are less likely to survive than an otherwise healthy young man who needs a respirator due to COVID infection, is the morally best choice to steal the disabled person’s ventilator (killing them) and use it to save the young man’s life?”
The policy question that should be asked instead, and never really ways, is “How do we make sure that we never get to the point where we have so many people in the ICU from a preventable disease that we run out of respirators and need to start choosing who to let die?”
This is not just a hypothetical question:
Disabled people continue to plead with us for the bare minimum, like requiring doctors who work with immunocompromised patients to wear N95 respirators while treating those patients.
We continue to chose to stack more people on both sets of tracks instead.
Please be sure to check that the smart switches you have space heaters plugged into are rated for that many amps.
It has already been translated into rust. Python wasn’t ever intended to be used in the “real” driver, but I thought it was a fun anecdote none the less.
USB block devices containing mountable filesystems (on Desktop systems) can generally have those filesystems mounted and files written to them by regular users; But the block device itself stays only root writeable.
So, you need root privileges either way.
(Going from memory, but also decently confident)
Leaks aren’t usually security critical though, and I’ve never heard of sudo triggering the OOM killer.
Also, no general purpose language that I’m aware of can guarantee a lack of memory leaks.
Fun fact!
The Asahi Linux drivers for the Apple M1 GPU were originally written in Python: https://asahilinux.org/2022/11/tales-of-the-m1-gpu/
GPU drivers in Python?!
Since getting all these structures right is critical for the GPU to work and the firmware to not crash, I needed a way of quickly experimenting with them while I reverse engineered things. Thankfully, the Asahi Linux project already has a tool for this: The m1n1 Python framework! Since I was already writing a GPU tracer for the m1n1 hypervisor and filling out structure definitions in Python, I decided to just flip it on its head and start writing a Python GPU kernel driver, using the same structure definitions. Python is great for this, since it is very easy to iterate with! Even better, it can already talk the basic RTKit protocols and parse crash logs, and I improved the tools for that so I could see exactly what the firmware was doing when it crashes. This is all done by running scripts on a development machine which connects to the M1 machine via USB, so you can easily reboot it every time you want to test something and the test cycle is very fast!
This talk introduces sleepgraph, a tool that might help you debug your s2ram issues.
The talk may also convince you that, for your specific hardware, s2idle might be better than s2ram:
Considering some humans to be “not humans” is a primary tool of fascism.
Probably best to avoid de-humanizing anyone if you truly want to end fascism rather than re-create it under a different name.
Humans can do terrible, abhorrent things. It’s good for us to remember that, as we are also human; And capable of the same atrocities if we aren’t careful and vigilant.
10 year old bug?
What are they talking about, that bug report is from 2014‽
… Fuck