Live data from Hacker News

We were wizards – a foreword to Learning Perl (1993)

jwgoerlich.com

1–10 of 130 posts

Re: We were wizards – a foreword to Learning Perl (1993)

#2
Bashing Perl is now a meme, but I can never get over what could have been… Python 3000 and Perl 6 had the community all abuzz. CPAN was the amazing Wild West where people were sharing amazing libraries in such a simple way compared to how every other language was still using the likes of Source Forge and possibly even Fresh Meat (GitHub didn’t exist yet).

Don’t fall into the meme trap of hating on Perl. Although it’s only now used in a handful of companies run by OGs and possibly by devops, I urge you to take a look and spend a month using it - really using it. .. because it really is a beautiful language and it really makes Stream-of-Conscious programming the norm

Re: We were wizards – a foreword to Learning Perl (1993)

#3

Bashing Perl is now a meme, but I can never get over what could have been… Python 3000 and Perl 6 had the community all abuzz. CPAN was the amazing Wild West where people were sharing amazing libraries in such a simple way compared to how every other language was still using the likes of Source Forge and possibly even Fresh Meat (GitHub didn’t exist yet). Don’t fall into the meme trap of hating on Perl. Although it’s…

Stream of consciousness programming?

Re: We were wizards – a foreword to Learning Perl (1993)

#4
post #3

Bashing Perl is now a meme, but I can never get over what could have been… Python 3000 and Perl 6 had the community all abuzz. CPAN was the amazing Wild West where people were sharing amazing libraries in such a simple way compared to how every other language was still using the likes of Source Forge and possibly even Fresh Meat (GitHub didn’t exist yet). Don’t fall into the meme trap of hating on Perl. Although it’s…

Stream of consciousness programming?

Perl has a weird way of letting you go from thought to code, and disappearing in between, unlike any other language I've ever used. You really can go from idea to functioning system as fast as you type without a lot of pre-planning. It's hard to describe, and the style has fallen out of fashion for more formal, easier to share between humans languages like Java or python, which feel like they introduce an inherent friction in that transition layer as a tradeoff for scalable teams and readability.

I miss it, but understand why it fell out of favor. It's the closest I've ever gotten to singing whalesong with a machine.

Re: We were wizards – a foreword to Learning Perl (1993)

#5
The worry with any language dying is the loss of knowledge that accompanies its demise. CPAN has a lot of great libraries that once used to power the early internet. Decades ago, it was in a Perl group / forum that I first heard the term "do not re-invent the wheel" when someone enquired about making some kind of their own CGI framework along with a great write-up about all the unique edge cases that the existing library already handled due to the experiential knowledge it had gained during its development. These were also the times when Oracle DBAs used to love Perl.

Re: We were wizards – a foreword to Learning Perl (1993)

#6
post #3

Bashing Perl is now a meme, but I can never get over what could have been… Python 3000 and Perl 6 had the community all abuzz. CPAN was the amazing Wild West where people were sharing amazing libraries in such a simple way compared to how every other language was still using the likes of Source Forge and possibly even Fresh Meat (GitHub didn’t exist yet). Don’t fall into the meme trap of hating on Perl. Although it’s…

Stream of consciousness programming?

As a medium long time perl guy who's been dragged kicking and screaming to do a bit of python recently I'm going to repeat this here:

Python and perl are actually pretty much exactly the same - analogous to the Judean People's Liberation front versus the People's Liberation front of Judea. However the languages are optimised for a slightly different purpose. Python helps you to think more like the computer does, whereas perl helps the computer to think more like you do.

Re: We were wizards – a foreword to Learning Perl (1993)

#7
post #4
post #3

Earlier quoted context omitted.

Stream of consciousness programming?

Perl has a weird way of letting you go from thought to code, and disappearing in between, unlike any other language I've ever used. You really can go from idea to functioning system as fast as you type without a lot of pre-planning. It's hard to describe, and the style has fallen out of fashion for more formal, easier to share between humans languages like Java or python, which feel like they introduce an inherent fr…

Exactly this.

As fast as you type you're coding. Even though I've now spent years in other languages compared to Perl, it's still stop-start in every other language.

I've said it many times, but Perl really moulds to your brain rather than the other way around. You bend Perl how YOU want it.

Re: We were wizards – a foreword to Learning Perl (1993)

#8
About 5-6 years ago I found a new niche for Perl in my day-to-day work. I did a lot of shell scripting at the time and was constantly getting annoyed by subtle differences between macOS and Linux. Sed is especially difficult, because the flags in BSD version and GNU version for in-place search and replace do not match. Plus, sed regexes are more primitive compared to most other languages.

I decided to switch from sed to Perl for all my string replacements and at the time it made my life so much easier! Eventually I started expanding my Perl use to a few lines of code at the time, and now I write a few larger (100+ LOC) scripts in it a year.

Funny how my personal journey matches the story of Perl back in the 80s: it was born to replace more primitive tools.

Re: We were wizards – a foreword to Learning Perl (1993)

#9

Bashing Perl is now a meme, but I can never get over what could have been… Python 3000 and Perl 6 had the community all abuzz. CPAN was the amazing Wild West where people were sharing amazing libraries in such a simple way compared to how every other language was still using the likes of Source Forge and possibly even Fresh Meat (GitHub didn’t exist yet). Don’t fall into the meme trap of hating on Perl. Although it’s…

Bashing Perl is a meme precisely because of the mentality of the creators of Perl (who set the culture). This "Forward to Learning Perl" epitomizes the mentality: Imagery of wizards, alchemy, breaking all the stuffy rules that quashed creative thought, etc. He even says "bowing down at the Temple of Orthogonality" like orthogonality a bad thing!

It hearkens back to the days when motor cars were curiosities that required frequent tinkering and had no safety requirements. The sky was the limit, but your car could blow up.

Perl was rightly bashed because it was the poster child of cowboy coding, which flies in the face of good engineering practices: Understandability, predictability, reproducibility, measurability, safety. This allows you to use a product with confidence. I had the misfortune of inheriting some cowboy code, and to this day I call a pox upon the writer. His lack of discipline caused YEARS of misery and maintenance costs; far outweighing any temporary benefit he provided.

Newer programmers might not have lived during the bad old days of cowboy coding, but I did. Nothing was documented. Nothing really worked because there was no edge case support. The mentality was "If it was hard to write, it should be hard to understand" and "If you're not happy with it, feel free to modify the code" (their impenetrable code). Basically, pass-the-buck for your own lack of discipline, and then blame the user.

Personally, I'm glad we've moved on towards becoming a serious engineering discipline, complete with UX being a thing.

Re: We were wizards – a foreword to Learning Perl (1993)

#10
Like everything else, Perl has its warts - tacked on object orientation, crude way of handling errors, lack of a decent REPL, way too much expressiveness (I have seen what happens to a few hundred thousand lines of Perl code written by developers who, instead of writing in a maintainable consistent style, tried to show their cleverness and the language was a willing ally to that) etc. Many words have been spent on those shortcomings so I want to focus on the other side.

Many eons ago, I remember me (and my team) being so tired of writing bash wrapper scripts - we just didn't know any better. To my surprise/delight, I discovered that the Solaris boxes we were using came with Perl pre-installed (which in hindsight is totally expected). So I decided to learn about it the proper way and the Llama book was exactly what I needed.

People have called Perl code line noise. But when I read the book for the first time, everything make sense to me because my mind likes mnemonics. $ is for ($)calar, @ is @(rray), % has a pair of circles like key/value pair and so on. I didn't find it odd that you'll get the array in list context and count in scalar context - it made complete sense. Till date, Perl is the language which I reach out for short-term tasks which need to be done immediately, because it helps me get the job done at the speed of thought.

I picked up some bash scripts as candidates to be re-written in Perl and I will never forget my mind being blown by the sheer lightening speed of Perl scripts; stuff that took many seconds or even minutes in bash were done in a second or less, even with my unrefined code. It was like a new world opened up and indeed, I felt like a wizard.

Post reply on HN