Using Python 3.11 or higher, I want to create an output file and add a line describing it to a log file as an atomic operation: either the output file is created and the log entry is added, or neither happens. fcntl.flock() is only advisory - will something else give me stronger guarantees, preferably on all three major OSes? #python#file-lock #atomic-operation #question
@glyph@gvwilson If the goal is atomically creating a file in a specific place, writing to a temp file and then atomically moving to the desired location seems like a feasible way. (I am also interested in the use case here though!)
Been trying out NES games from time to time with the 5 year old. Mario has been a bit too frustrating for him. We picked up Excitebike yesterday, which has been almost perfect. I was surprised to learn you can even make your own tracks!
Are there are other vintage games that are fairly forgiving and good for young kids?
"yeah, he was a really great guy, really gave back to the people who worked for him." CBC about a guy who fought to keep minimum wage down so he didn't have to pay people a living wage while raking in billions in oil and gas profits.
Whenever Americans talk about "fighting for freedoms" I remember that one time some dude who got thwarted by his own flopsweat tried to blow up his shoes and twenty years later anyone who goes through an American airport has to shuffle around in their socks hoping their pants don't fall down while they get millimeter-radared for a security pageant and the whole country just rolled over and decided that's totally reasonable.
@asbestos@zzzeek@mhoye@sidereal I'm not saying it's foolproof or anything, but cannot accurately measure the amount of bombs or whatever have been stopped due to the fact that these endanced security measures, an silly as many of them are, have likely stopped peopl from even attempting certain things.
@coderigger@sarah bingo. This is what makes it such a systematic problem...the incentives are not aligned in a lot of places for folks to choose boring tech.
My wife is looking for a new job. If you're looking for a mid/senior backend engineer (Remote Canada) I'd appreciate any links. She's got loads of PHP experience, and willing to learn other languages. Thanks!
I really do like Linux, and have been using it as a desktop OS for 20 years, but my god, Ubuntu just flipped its lid because I added a hard drive, which caused the old /dev/sda to become /dev/sdb and I am so annoyed.
Not only did it hang for 2 minutes on boot, it went into emergency mode, which somehow made the GUI non responsive, and had me thinking I fucked something up.
Why it didn't just...not mount the drive, and tell me (or not, whatever), I have no idea.
I still don't understand why my system needs to barf because of this though. It wasn't a system mount...just an extra ext4 partition with a bunch of media on it.
(If it were / or /var or whatever, all bets would be off.)
I'm really, really not a kitchen gadget sort of person, but after having been gifted an air fryer for Christmas it's difficult to deny that they're very useful, and much better than, eg: trying to use a full on convection oven as one.
My only complaint is that ours seems to be too good at removing moisture, and it's very easy to dry things out.
Curious to hear how peopledeal with stage & dev environments for many separately deployed services that need to talk to each other. Eg: A <-> B <-> C <-> D <-> E
In my experience, stage for one usually talks to prod for the others (to keep failures isolated). But this gets tricky when one needs to test related/dependent changes at the same time. How do other folks deal with this?
Gotta love it. Watching a whole bunch of GenXers out here quietly doing what we always do: Adapt.
There is a non insignificant number of us building big NAS media storage systems and collecting physical media to store on it for our perpetual and uninterrupted use.
No corporation can unalive your library because it lives where they can't touch it.
Worried about losing everything because it's all digital?
I get #Kagi relying on sources that don't share my values. Nothing in our societal order is uncompromised.
But calling gay rights political is a dog whistle that I hear loud and clear. There's no world in which I directly pay money into that kind of leadership.
Due to a long occupation of the Philippines by Spain that lasted from 1565 to 1821, many Spanish words have made their way into modern Filipino as loan words. However, not all of them.
We had Amazon Prime for years until a few days ago. Now, without it, shipping takes absolutely forever. 1 week for an order that would be delivered next day with Prime. It makes me wonder how much of this is intentional to try to get Prime subscriptions.
On the other hand, it makes non-Amazon options much more attractive, as many smaller retailers can deliver to me within 2-3 days without needing to subscribe to anything.
Over the weekend I attempted to run cat6 between my office (2nd storey) and the room directly beneath it. After 3 hours of drywall sawing, drilling through (non-load bearing) stubs, and attempted cable feeds I managed to confirm that the hole is viable (yay), and that I didn't hit any electrical or HVAC, but the cable isn't making it down for some reason.
Here's hoping some pull chain will resolve that...
@jrconlin Ooooh, I hadn't come across fish tape. I was using coat hangers at first (too short), and nearly bought some copper wire...but this looks much better. Thanks! And I can finally use my fishing line for something too....