VorpalWay
Joined 11 months ago
Joined 11 months ago
But if you are talking TVs specifically, I expect they will get back to that too.
Miniz_oxide is an intentionally simple implementation. It would be more fair to compare it to the newer zlib-rs[1], which even beats zlib-ng (fastest implementation in C)[2].
[1]: https://lib.rs/crates/zlib-rs
[2]: https://trifectatech.org/blog/zlib-rs-is-faster-than-c/
You could argue single point of failure, which is fair, so then set up another LE clone which is run in a similar way in another (reasonable) country.
(And there is of course non TLS certs, such as code signing and S/MIME, if that is still a thing. I'm only arguing about the TLS case here.)
I can see the case on phones: the OS may no longer be supported by the vendor, so browsers shipping their own set makes sense. And on embedded there isn't (and on IOT there might not be) an OS, but then you should probably just ship the the single CA that you use, not all of them.
Sure, but the question is how limited you are in what you can do about it. iDevices are incredibly locked down. On my laptop I would just use the package manager to downgrade a package until it is fixed, or restore a backup. Or you could just fix the code yourself (or ask an AI for help to do so these days).
Even Windows has system restore to roll back to a previous OS version iirc (though it has been many years since I used windows last, going to all Linux has been so good). Not sure if that is possible on an iPad? I know Android doesn't really let you downgrade either the OS or an individual app, I would assume it is similar on iOS.
As soon as you have something larger than the hardware atomic size (or unaligned in memory) you risk torn reads/writes. So a pointer + a size for example on some architectures (some hardware like x86 has a double word atomic support, but on embedded you usually only get up to word size atomics).
All this means that you can't (in a systems level language) feasibly make everything atomic and ensure no UB.
All that said, do I wish Rust did more for other concurrency bugs? Yes, sure. Though there is some hope: I have seen Rust crates to enforce lock ordering at compile time (I think that originally came out of the Fuchsia OS kernel development). There is also scoped threads, rayon, actor frameworks etc. All different approaches to strucured concurrency, with the goal of reducing bugs. Different frameworks seem to suit different problems though. For what I do I rarely need mutexes, instead either rayon or message passing work well.
In practice rust also tries to guide you towards patterns that reduces the risk of other bugs. For example, using Result, Option (and enums in general) reduces the risk that you forget to handle error paths. It is also quite hard to get memory leaks unintentionally in Rust, since by default you work with various smart pointers.
In my experience typical multi-threaded C++ has a lot of threading bugs that tend to cause hard to reproduce bugs (I work in safety critical hard realtime robotics / machine control, where we have a lot of communicating threads). When I code Rust I can trust the language to prevent those classes of bugs, letting me focus on the actual hard domain specific problems, rather than language minutiae. Yes, TSAN helps in C++, but that is dynamic analysis so it has to actually catch the potential problem happening while running.
So I think that the multithreading approach in Rust is really good and what we want, not a hindrance. It is absolutely the right thing to do.
Now, the async story is another matter and I have conflicting opinions on how that is done in rust. I can't think of a significantly better design that would work on microcontrollers / no-std though. I'm not interested in anything that requires allocations or a runtime.
The reason you still need fume extraction when soldering is the flux, those fumes are quite nasty to inhale. (How nasty varies based on the specific formulation, I recommend using proper ventilation for all of it though.)
(For those who don't know, the flux is there to prevent/clean oxidation and make the solder flow onto the metal pads and pins. Most solder wire contain a core of flux and you can also add additional flux if needed, usually liquid or a paste that melts into a liquid.)