💾 Archived View for tilde.team › ~catz › blog › ruby.gmi captured on 2023-09-08 at 17:31:34. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
2023-8-13
My latest rabbit hole: what if my "show me when my partitions were last fscked and when the next scheduled check is" script could sort them by date?
Implementing that in the script sounded like it would be quite annoying, an OOP language would probably make it a lot simpler. But doing it in C or Rust (the two languages I sorta kinda know a little bit of) was definitely going to be just as annoying in different ways. This is exactly the sort of task that people usually gush about being able to solve extremely quickly with Python! Maybe this will be the thing that finally makes me commit to learning it/start liking it! (I don't even know what it is, something about that specific language always seems to rub me the wrong way ._. You know how sometimes you just don't like a specific person for no apparent reason? That's been me with Python ever since I first laid eyes on it.)
Spoiler alert: it wasn't.
After a couple hours of researching about how to do it in Python I figured that calling out to tune2fs and parsing the output was going to be a massive pain in the ass. Perhaps something like Perl or Ruby might be better... But I don't know either of them. Eh, I guess I can wing it. I'm way less familiar with Ruby than Perl though, time for a challenge? Let's see what it's like!
...
And that led to a two day crash-course which resulted in me successfully writing my shiny new script that can sort by last checked or upcoming check date (both ascending and descending) :D
I feel quite proud of myself... but now I don't know what to do with my life until I find something else to work towards ahahah.