[TUHS] Book Recommendation [ reallly inscrutable languages ]

Rich Morin rdm at cfcl.com
Fri Nov 19 07:42:36 AEST 2021


Not that anyone asked, but...

My introduction to Perl was motivated by a performance issue.  I had been using a set of sh/awk/... scripts to generate the source files (troff and file trees) for my Prime Time Freeware book/CD-ROM collections.  One of the cooler aspects of this approach was that I could use sh as a macro processor, substituting assorted values into the awk (etc) code.

However, running the scripts was taking about three hours (!), so I tended to start them up just before going to bed.  This worked, for some value of "work", but it was kind of a nuisance...

So, upon the recommendation of Erik Fair, I transliterated my scripts into Perl.  The similarity of Perl syntax to my previous combination of languages was so strong that the effort was almost mindless.  And, even though I made no attempt to use any Perlish features, the new scripts ran about five (!) times faster.  My assumption is that this was mostly due to getting rid of the process startup times.

My move to Ruby was motivated by the Perl 6 clusterfudge.  After watching Perl 5 sit at a siding for a few years, with no relief in sight, I took another friend's advice and tried out Ruby.  Aside from a few odd differences, it was quite familiar and a very easy transition.  However, the syntax seemed much "cleaner" than Perl's (Matz has very good taste, IMHO).  So, it's still my choice for small, single-threaded scripts.

That said, if I want to write larger and/or concurrent apps, I turn to Elixir.  It gives me Ruby-like syntax (with nifty extensions such as pipes), strong support for concurrency and distribution, macros, etc.

-r



More information about the TUHS mailing list