Spakman
Joined 18 years ago
Joined 18 years ago
One of the linked papers[1] in that article is highly recommended.
1. https://www.usenix.org/system/files/conference/osdi14/osdi14...
I agree that reliably writing files is a sneakier problem than it first appears and that the likes of SQLite have already solved it.
Despite that my preference these days is still for a DB, like almost all dependencies, to have to justify its existence in my projects rather than defaulting to it as many seem to favour. It's straightforward to add SQLite but I'd typically rather take a little extra pain around the filesystem upfront to not have to deal with all the extra complexity of an SQL database if I can avoid it.
Naturally, this kind of simplicity is just one factor among many such as the size and shape of the data, expected access patterns and a host of others to weigh up during the trade-off decision.
A related thing I discovered recently is the potential non-atomicity of writes using O_APPEND on Linux[1], although I couldn't get the attached test program to fail on my machine. I would love to find some kind of confirmation that this behaviour has been changed and that appends can be relied upon to be atomic.
In the application I'm working on at the moment I've managed to get add more certainty around this stuff since I'm only ever appending to the file in 4096 byte chunks, so can perform a simple file size check to see if data was written completely or if the file needs to truncated to the nearest multiple of 4096. I'm fortunate that it prevents having to do something like open it read only to verify contents as you mentioned.
I'm running LineageOS without Play Services too and didn't about know this!
Do you have any reference materials (I guess getting busy with Wireshark and the source is my next step)? I found this Reddit thread[1] talking about a connectivity check but am keen to start tracking down any others.
https://www.reddit.com/r/LineageOS/comments/5qnfxf/why_linea...
So take up juggling!
Aside from obvious things like becoming more coordinated and increasing your spatial awareness, it will teach you a lot about learning. It's fascinating when a challenging new pattern moves from deliberate and entirely conscious effort to straddling the conscious/unconscious divide until it gets bedded in to your nervous system and you can do it without thinking.
Juggling is almost entirely non-competitive and jugglers are overwhelmingly supportive and eager to teach and learn new tricks from each other. It doesn't seem to be possible to get into it without also wanting to teach anyone who wants to learn. There aren't many egos getting in the way, which I find rather pure and beautiful.
Contemporary juggling is hugely varied. You can go from technical and accurate numbers jugging (high number of objects) to flowing improvised moves to something that is as much dance as circus stuff.
Also siteswap[1], a notation for juggling patterns, is cool!
In case you aren't aware, your email address isn't visible in your profile either. I've emailed the GMail address that I found on your website :)
I'd have replied to this on lobste.rs but don't have an account. I'm not a heavy poster but I'd love an invite if anyone has one going :)
1 - https://www.kernel.org/doc/Documentation/filesystems/overlay...
https://www.youtube.com/watch?v=Z-9rLlFgcm0
Creating new species without genetic changes seems wild!