3 ms·
I like perl. Before, I had written a toy web server in perl (it was fun and I learned a lot), then I ported it to cosmopolitan to have it run everywhere! This
by csdvrx 3y ago
I like perl. Before, I had written a toy web server in perl (it was fun and I learned a lot), then I ported it to cosmopolitan to have it run everywhere!
This year I've written a fdisk replacement in perl, to make hybrid MBR+GPT for bootable media.
First, I wanted to check how they were made, but then I decided I wanted to programmatically write hybrid MBR in a way that's easier than gdisk and that offers more control that xorriso.
It's not complete yet, but the partition reading feature was already very helpful to understand the ins and out of the mfg59 layout that's so popular for optical media, and the final gpt tweaks should only take a few more days.
perl allowed me to write it very quickly and to make sure it will work reliably for the years to come.
- kstrauser 3y agoBummer you’d been downvoted for that. It sounds like quite the ambitious project that you’ve nearly got working. Cool! But I’m also saying this while holding a sharp stick and slowly backing away. That is not the sort of thing I’d expect someone to write in Perl, and I’m experiencing an odd mix of “that’s amazing!” and “what on earth were you thinking, my friend?!”
- csdvrx 3y ago> Bummer you’d been downvoted for that. Some people have an instinctual dislike of things they've been told it's fashionable to hate. I resent that, because all programming languages are interesting in their own ways. > It sounds like quite the ambitious project that you’ve nearly got working. Cool! Oh it's already working, it just needs more polish :) Check https://github.com/csdvrx/hdisk https://github.com/csdvrx/hdisk if you're interested Actually, I'll try to submit it! > That is not the sort of thing I’d expect someone to write in Perl, and I’m experiencing an odd mix of “that’s amazing!” and “what on earth were you thinking, my friend?!” I wanted to do it quickly :) For decoding weird formats that mix little and big ending, I think perl unpack/unpack is the fastest way. Also, for computing crc32, I didn't have to bother much :)
- kstrauser 3y agoI dig it, or at least the fact that you stuck it out. Well done. :) Huh, wonder if people who aren’t familiar with the subject saw “GPT” and thought you were going off into AI gibberish land?
- csdvrx 3y ago> Huh, wonder if people who aren’t familiar with the subject saw “GPT” and thought you were going off into AI gibberish land? If they don't know GPT is a type of partition table, I think their stereotypical dislike of perl is the least of their problems!