• 17 Posts
  • 636 Comments
Joined 2 years ago
cake
Cake day: November 24th, 2023

help-circle






  • I am guilty of this but for a different reason: setting up debugging for clis in rust is hard

    I love the debugger. I use it all the time I can. But when debugging cli it’s a pain as you need to go back in the launch.json file, remake the argument list, then come back to run debug, find out why tf it doesn’t find cargo when it’s the PATH… again, then actually debug.


  • I oversimplified it but the actual process was to zip files to send to an FTP server

    The cron zipped the files to send in the same directory as the zipped files, then sent the zip, then deleted the zip

    Looks fine, right? But what if the FTP server is slow and uploading take more time than the hourly cron dispatch? You now have a second script that zip all the folder, with the previous zip file, which will slow down the upload, etc…

    I believe may have been started by an FTP upload erroring out and forcing an early return without having a cleanup, and progressively got worse

    … I suppose this happened. The logs were actually broken and didn’t actually add the message part of the error object, and only logging the memory address to it










  • I kinda hate the push towards passkeys. If you have two factor Auth, going to passkeys makes you go back to 1 factor, aka less secured.

    There’s also more and more 2FA fatigue attacks going on, and they can affect passkeys too, and if you don’t have a 2FA that involves the user writing a code on the 2FA device, passkeys could be quite possibly worse than passwords





  • This is also part of my death, because it’s much easier to not deadlock when you are FIFO.

    Personally I went for the nuclear option, and any transaction is sent as a tokio task to make sure the transaction keeps getting polled despite other futures getting polled. Coupled with a generous busy timeout timer (60secs) and Wal mode, it works pretty well.

    Probably should also put the mutex strategy (perhaps a tokio semaphore instead?) although due to lifetimes it might be hard to make a begin() function on my DB pool wrapper.

    … Congratulations. You nerd snipped me. Time for it to go on the todo stack.

    Hyped for it too, but wouldn’t use until sqlx suport. Compile time checked queries are just so good. I don’t use rustsqlite for that reason alone (you often don’t need async SQLite anyways)