1051
submitted 10 months ago by stsquad@lemmy.ml to c/programmerhumor@lemmy.ml
you are viewing a single comment's thread
view the rest of the comments
[-] MajorHavoc@programming.dev 23 points 10 months ago

These are excellent.

I need to add Perl.

Perl is a honey bee. You are unassuming and pragmatic. You fill every niche. Your buzzing carries meaning, but only to other bees. In theory, your ecosystem niche is filled by many competing solutions that are more fit to purpose. But somehow we all know in our hearts that if you disappear, all life on the planet will probably die soon after.

[-] barsoap@lemm.ee 16 points 10 months ago

May I acquaint you with the Evil Mangler, historically used by GHC to compile Haskell via C. It would go through the assembly gcc generates and rearrange whole blocks and deletes instructions, such as function prologues and epilogues.

[-] sxan@midwest.social 9 points 9 months ago

Holy shit. This thing sounds insanely awesome, but also quintessentially Perl. Like, the perfect holotype for Perl.

And, damn, but I'm impressed. I've seen code that I admired; elegant, inspired, wise code... but the Evil Mangler leaves me in awe.

[-] barsoap@lemm.ee 5 points 9 months ago* (last edited 9 months ago)

There is a very strange, and maybe unexpected, cultural overlap between Perl and Haskell: It's definitely possible to produce write-only Haskell, and once you get good enough writing Haskell it becomes very inviting to do so. It's generally going to be a tiny bit more robust, probably a bit slower, and do dirty things with syb regexen could never dream of. While Perl will rip a DFA through a html file while hoping for the best, Haskell will respect the tree structure and then bend it into eldritch knots, leaving you with a file that's like 50 lines of parser combinators ("it works on my files") and then five lines of completely inscrutable magic doing the actual processing.

this post was submitted on 02 Feb 2024
1051 points (98.3% liked)

Programmer Humor

32581 readers
1136 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS