Live data from Hacker News

Perl's decline was cultural

beatworm.co.uk

461–470 of 472 posts

Re: Perl's decline was cultural

#461

Earlier quoted context omitted.

I actually think it works when you are in the ecosystem fulltime for a good while. But having to interact with it once in a while is always a hurdle. The same with bash. Do I use [ or [[? Where does the semi-colon go? if then fi, but while do done (and not elihw). -eq or =? Functions have () but no parameters. I'm sure those things make sense when all you write is Bash / Perl, but it's daunting. Now, Python can get p…

You realize you can learn all of this easily online, I hope? Sure it turns out that a scripting language maintaining compatibility with scripts from 40+ years ago has some confusing aspects. That’s the price of such incredible staying power.

You can learn them now, but you will forget them soon. That was the point, I believe.

Re: Perl's decline was cultural

#462

Earlier quoted context omitted.

Do you not think O'Reilly Associates fits some of that role? It seemed like Perl had more commercial backing compared to the other scripting languages if anything at that point. Python and JavaScript were picked up by Google, but later. Amazon was originally built out of Perl. Perl never converted its industry footprint into that kind of advocacy, I think some of that is also culture-driven.

Maybe until the 2001 O'Reilly layoffs. Tim hired Larry for about 5 years, but that was mostly working on the third edition of the Camel. A handful of other Perl luminaries worked there at the same time (Jon Orwant, Nat Torkington). When I joined in 2002, there were only a couple of developers in general, and no one sponsored to work on or evangelize any specific technology full time. Sometimes I wonder if Sun had mor…

Thanks for detailed reply. Yes, the marketing budget for Java was unmatched, but to my eye they were in retreat towards the Enterprise datacentre by 2001. I don't think the Python foundation had launched until 2001. Amazon was migrating off Perl and Oracle. JavaScript only got interesting after Google maps/Wave I think, arguably the second browser wars start when Apple launches Safari, late 2002.

So, I guess the counterfactual line of enquiry ought to be why Perl didn't, or couldn't, or didn't want, to pivot towards stronger commercial backing, sooner.

Re: Perl's decline was cultural

#463

Earlier quoted context omitted.

If you’re in the market for fun hackable tool that sits between “bash script” and “real developer” I highly recommend checking out babashka. It lets you write shell scripts with clojure. Babashka itself is a single executable, so no JVM bulk or startup time. And the built-in libs include all sorts of nifty utilities. Parsers, servers, excellent async stuff (but IMO clojure might have the best async story of any langu…

You might also enjoy Janet https://janet-lang.org/

Wow that IS cool!! Almost sounds too good to be true lol. Green threads? Repl? Event loop? One <1MB binary? What the heck!!

Re: Perl's decline was cultural

#464

For me it wasn't cultural. Perl was my first language because I wanted to make interactive websites and that was the most common way to do it in the late 90s. Shortly after, everyone switched to PHP because mod_php was much faster than Perl CGI scripts.

Surely the people who had purely performance problems with Perl CGI scripts moved to mod_perl? I didn't figure out when mod_php was introduced from casual searching, but given that mod_perl is only a year younger than PHP it must've been available to almost anyone who was considering rewriting their app in PHP. So I have to imagine there were additional reasons. Wikipedia says that this source [1] claims early versio…

mod_perl was a lot more complicated, so in practice "normal people" (such as 14 year old me) didn't use it because it would have required a dedicated server and some sophisticated configuration, rather than a $2/month shared hosting account.

Re: Perl's decline was cultural

#465

Earlier quoted context omitted.

mod_php was distributed w/ Apache httpd, so it was "already installed". mod_perl needed to be installed manually, so it posed immediate friction, if not a complete freeze-out, depending on the situ. I believe that was why PHP became popular.

Systems with mod_perl (or just Perl allowing normal CGI) installed, especially shared hosting was so common as to be the norm in the late 90s and early 00s. I think instead the biggest reason PHP took off was it had far less deployment friction and better aesthetics than Perl did on machines where you didn't have admin access, basically ever shared web hosting ever. Typically CGI scripts on shared hosting were limite…

Perl CGI scripts were ubiquitously supported by shared hosts, but IIRC mod_perl was not unless you had some custom setup on a dedicated server. Also IIRC, mod_perl was just a lot more complicated to set up and use, while mod_php was dead simple.

Re: Perl's decline was cultural

#466
post #8

I always found the Perl "community" to be really off-putting with all the monk and wizard nonsense. Then there was the whole one-liner thing that was all about being clever and obscure. Everything about Python came off as being much more serious and normal for a young nerd who wasn't a theater kid.

I'm having to pick up some perl now, and while I don't interact with the community, it surely _feels_ like it was written by wizards, for wizards. Obscure, non-intuitive oneliners, syntax that feels like it was intentionally written to be complicated, and a few other things that feel impossible to understand without reading the docs. (Before everyone jumps on me - yes, as a developer, I should be able to read documen…

While I'm not a fan of Perl per se, I find it fascinating. One of the reasons for that is that its creator, Larry Wall, is a linguist by trade. This shows in a lot of ways, for example by the fact that, like natural languages, Perl has context: A variable can behave differently whether it is used in a scalar context or an array context. At the same time stuff like this is responsible for Perl's reputation as a write-only language, a cliche which has at least some merit to it.

I can highly recommend reading at least the first chapter of Programming Perl, it's highly insightful even if you don't plan to write or read any Perl.

Re: Perl's decline was cultural

#467
post #209

Earlier quoted context omitted.

That's not super subtle any more than it's super subtle that "*" performs multiplication and "+" performs addition. Sometimes you just need to learn the language. This is not a general defense of Perl, which is many times absolutely unreadable, but this example is perfectly comprehensible if you actually are trying to write Perl and not superimpose some other language on it.*

There's is no fair comparison to be made here with how + and * work is most languages, precisely because + and * work the same in most languages, while whatever perl is doing here is just idiosyncratic. Even C gets it's fair share of flack for how it overloads * to mean three different things! (multiplication, pointer declaration, and dereference)

The original statement wasn't that the sigils are unconventional. They are. It was that they were "subtle". They are not.

Re: Perl's decline was cultural

#468
post #14

I spent year developing CMS in Perl in 1999 (HTA application with ActivePerl. wonder if anybody else did something like this). It traumatized me, and first thing that I did in my next job is to learn python and develop some core systems in it. Few of my friends moved from perl to python as well. I still remember spending time with my coworkers on bench outside of building trying to figure out #@$%$^&$%@something = []…

Perl heads are downvoting you but I agree as a longtime ex Perl user that the sigils were noisy nonsense. The original intent was you could see var types with them - $scalar, @array, %hash. They immediately broke this by deciding the sigil would apply to the value /extracted/ from the data structure. So you declared array @foo but accessed an element as $foo[1]. What? There’s a logic there but already you’re violatin…

Yes (de)referencing can be a PITA sometimes but you've probably forgotten that your example code could have been better written like this:

    $hash1->{key1}{key2}
And if `hash1` was a hash (instead of a hashref) then it's just this:

    $hash1{key1}{key2}
The `%{}` de-reference you mention later is only when you have an operation that requires a hash, for eg:

    keys %{$hash1{key1}}
And for kstrauser example later in Python...

    hash1["hash_name"]["array_name"][3]
the equivalent in Perl would be...

    $hash1{hash_name}{array_name}[3]
I find having {} & [] as lookup keys for their types is not only more explicit but also safer/correct.

Re: Perl's decline was cultural

#470

Perl's decline was cultural in the same way VMS's decline was. A fantastic approach and ecosystem—just one overtaken by a world that was moving on to a different set of desires and values. PHP emerged as a separate language and community and "ate Perl's lunch" when it came to the dominant growing app style of the Aughties... web pages and apps. Had PHP instead been a Rails-like extension of Perl for the web, sigils w…

VMS decline was bound to a failing hardware business and company. That's a very different thing. Unix was around in the 80s and VMS did fine, its when DEC hardware business went down the tubes VMS lost out big time.

VAX hardware did eventually run out of steam by the early 1990s. But VMS had already failed to capture the next generation of growth. Even while DEC was still the number 2 computer company, 5–10x the size of its competitors, and growing $1B/yr in revenues.

Unix (workstations first, then servers), PCs (DOS and NetWare, later Windows), packaged enterprise apps (e.g. IBM AS/400), "data warehousing," fault tolerant apps—a lot of those were not things happening on VAX or VMS or any other DEC product. The fight was already structurally lost and VMS aficionados were already bemoaning DEC's failure to pick up new workloads and user communities even when VAX was still going strong.

VMS declined like almost all proprietary minicomputer environments. AOS, ClearPath, GCOS, MPE, NonStop, PRIMOS, VOS, and VMS...all fine products just ones no longer serving the high-growth opportunities.

Declining investment streams hamstrung proprietary CPU/system development efforts compared to higher-volume alternatives (PC or Unix), so they got successively slower and relatively more expensive each generation. Proprietary environments weren't designed to ever escape their home fields, nor were their companies set up to profit from opening up / spreading out. A few tried, very belatedly, but... by that point, dead man walking.

So from this vantage, same pattern, not a different thing. Perl and VMS were awesome in their original home fields, but were not quick to, or even able to, capitalize on the new directions and workloads customers grew to want.

Post reply on HN