Live data from Hacker News

Perl, the first postmodern computer language (1999)

wall.org

71–80 of 225 posts

Re: Perl, the first postmodern computer language (1999)

#71

Earlier quoted context omitted.

> Readability of code is paramount. For almost all languages, Perl included, this onus is mainly on the programmer. You can churn out gritty spaghetti in almost any language. Perl code doesn't have to look like what Perl programmers put out in the 90s. It's an old misconception that people refuse to let go of.

> You can churn out gritty spaghetti in almost any language. I hate this argument because it doesn't allow for any variation in the intrinsic readability of languages, or the style those languages encourage. Yes, you can write shitty code in any languages, but some languages encourage it, while other languages discourage it. I would say that Perl encourages unreadableness more than any of its peer languages, and the…

> "I hate this argument because it doesn't allow for any variation in the intrinsic readability of languages, or the style those languages encourage"

I don't understand what you mean by this. How ever does that argument mute Perl's dynamic expressiveness - which lends equally to unreadable syntax as much as clean syntax - or the commonly encouraged patterns in Python?

> "and the corpus of actual code out there is much more likely to be terse, unreadable noise than what you're likely to find in most python or ruby projects"

Because Perl saw in its infancy back in the 90s much higher use than Python and Ruby did. It's the same with PHP, which looked like shit in the 90s even if it didn't need to. Incidentally, PHP, too, suffers from stubbornly outdated criticism.

I think you're too hung-up on the languages themselves, and forgetting that programmers, and software development and engineering as a process and as an art, evolved a lot the past 20 years - much has happened also with how people write C today compared to the 80s and 90s.

Re: Perl, the first postmodern computer language (1999)

#72
post #20

Earlier quoted context omitted.

As someone who spent many years loving Perl, I counter that literally every programming language is obtuse and overloaded with meaningless symbols. And I'd also credit Perl's rise to Lincoln Stein who wrote CGI.pm which was at the time the absolute state of the art for managing web applications with Apache and mod_cgi.

yes and, one of Perl's design goals was literally "report generation" .. which it turns out, might be in HTML format

It can't do reports. It's a rubbish lister.

It's also clearly not an anagram of REPL. I wonder if anyone ever figured out how to write REPL with a keyboard. I'd like to learn it some day.

(REPL was written in a crazy character set and relied on custom printed punch cards. I think it was the perl of its day.)

Re: Perl, the first postmodern computer language (1999)

#73
post #41
post #5

Perl rose to popularity because early web development was all about text processing (reading web forms and outputting HTML) and Perl made that easier (regex deluxe) than other choices on unix at the time. It became the lingua franca of web developers. Perl 5 made heavy use of symbols so it was visually noisy, and then Perl 6 came along and added even more magic meanings to other symbols, and that was a tipping point…

If I understand right you are saying that the # of symbols Perl employs makes it hard to understand or read, correct? TL;DR; I would say that you assertion is context sensitive. - For a junior Perl programmer or an outside expert those symbols are stumbling blocks. - For an intermediate Perl programmer and up, those symbols are tools that make the code more readable and expressive. I got two ways of looking at that.…

While ultimately everything is a matter of taste, the kind of people that hate sigils also tend to hate parentheses in Lisp. Both syntax elements are there for a reason.

I believe sigils make string interpolations easy to support in a language. Consider JS that had to introduce an adhoc „${}“ expression to support those eventually.

Re: Perl, the first postmodern computer language (1999)

#74

...to this day, I still can't wrap my head on how PHP even got to exist in a world where Perl was already filling the web niche just fine. Also, if they wouldn't have made it too-weird-for-math-and-physics people, Perl would've probably filled Python's niche too. And with that kind of resources focused on it, Perl 6 could've actually turned up into a clean nice new language that would've unified us all by also suppor…

It's easy; PHP is/was: Whilst the equivalent Perl at the time would be: #!/usr/local/bin/perl print "Content-Type: text/html\r\n\r\n"; print " "; print "Hello world"; print " "; or possibly... #!/usr/local/bin/perl use strict; use warnings; use CGI; my $q = CGI->new; print $q->header('text/html'); print $q->start_html(); print "Hello world"; print $q->end_html(); ...if you were being a bit more more fancy. In other w…

With your first example, there was no easy path to compatibly handling form requests. Web browsers really sucked back then.

As I understand it, PHP became popular before CGI.pm was ready.

Re: Perl, the first postmodern computer language (1999)

#75
post #4

Earlier quoted context omitted.

Saying that to a lingüist it's... interesting. On Perl, CPAN was and it's still amazing, and lots of stuff came from that. For example, Mojolicious for the web, BioPerl for bioinformatics and Rivescript to write silly chatbots, among others. Oh, and pkg_* under OpenBSD. INB4 gen-z's rant on "PeRl It'S UnRead@ble", check the intro from "perldoc perlintro". EDIT: Unless I'm sure the deleted link it's right, I'd avoid p…

I'm more than two decades away from being gen-z, and I still agree with that sentiment. There might be that theoretical wise and disciplined Perl programmer writing well structured and readable code, but wherever I interfaced with people writing/maintaining Perl code, it was the most hastily thrown together crap that once was a small tool that "just worked" and then slowly grew completely out of hands over the years.…

iirc Perl was always described as the "duct tape of the internet" which encompasses the good and bad sides of Perl.

Re: Perl, the first postmodern computer language (1999)

#77
post #9
post #3

Reposting my old comment https://news.ycombinator.com/item?id=10774245 : > People seem to have forgotten that when Perl evolved from being a better AWK to the paradigm example of the modern "scripting language", Larry Wall explicitly described this as a rejection of the Unix small-tools philosophy. http://www.linux-mag.com/id/322/ ("But Perl was actually much more countercultural than you might think. It was intended…

Interesting take, but as someone who still works regularly with the shell, I'd say there is still a place for small core utils connected together with pipes/textual streams. If we're talking parsing and chopping up text files, I can usually whip up something with awk/jq/cut/whatever in far less time than writing an equivalent Python script. There's a threshold where you prefer to switch to the scripting language for…

Most awk/cut/whatever commands can be done with perl -ne in about 2x the keystrokes, but you don't need to learn the other tools.

In Python, the multiplier is much higher, and I could never get the oneliner stuff to work.

Re: Perl, the first postmodern computer language (1999)

#78

...to this day, I still can't wrap my head on how PHP even got to exist in a world where Perl was already filling the web niche just fine. Also, if they wouldn't have made it too-weird-for-math-and-physics people, Perl would've probably filled Python's niche too. And with that kind of resources focused on it, Perl 6 could've actually turned up into a clean nice new language that would've unified us all by also suppor…

I’ll tell you why it appealed to me.

I started programming web systems in ‘96, with Perl because it was on every machine and every web host. Apache mod_perl was a thing, and it was a bad thing, because it had to be restarted all the time because of memory leaks.

On the other hand, mod_php was much more solid, and additionally, at the time, MySQL was the main thing for many websites. The Perl database bindings were wordy and obtuse, but PHP was a breath of fresh air. I was able to start using it in environments in ‘99 and honestly, I’ve never looked back at Perl as a web application language, just a systems one.

That simple difference was enough to make me fully switch over, and it set me on the path of a career programmer, so I look back on that time very fondly.

One other thing: I don’t recall Perl scripts allowing C-style pre-processing inclusion the way PHP did. I worked at Linux.com around then and we used all sorts of templating and other library reuse via this inclusion.

Re: Perl, the first postmodern computer language (1999)

#79
post #21
post #3

Reposting my old comment https://news.ycombinator.com/item?id=10774245 : > People seem to have forgotten that when Perl evolved from being a better AWK to the paradigm example of the modern "scripting language", Larry Wall explicitly described this as a rejection of the Unix small-tools philosophy. http://www.linux-mag.com/id/322/ ("But Perl was actually much more countercultural than you might think. It was intended…

Having dealt with the clunky record structures of 60s operating systems, they did have their advantages, but the spread of cross-platform tools in the 80s and 90s killed them since Unix only knew byte streams. There are, I think some vestiges of it in the distinction between text and binary files on Windows (assuming that this still exists), but otherwise Unix’s everything is a stream of bytes has won. I kind of miss…

The CODASYL vs relational calculus thing certainly had an impact too.

Navigational databases had gotten incredibly complicated, allowing the relational people to lap them.

Re: Perl, the first postmodern computer language (1999)

#80

...to this day, I still can't wrap my head on how PHP even got to exist in a world where Perl was already filling the web niche just fine. Also, if they wouldn't have made it too-weird-for-math-and-physics people, Perl would've probably filled Python's niche too. And with that kind of resources focused on it, Perl 6 could've actually turned up into a clean nice new language that would've unified us all by also suppor…

It's easy; PHP is/was: Whilst the equivalent Perl at the time would be: #!/usr/local/bin/perl print "Content-Type: text/html\r\n\r\n"; print " "; print "Hello world"; print " "; or possibly... #!/usr/local/bin/perl use strict; use warnings; use CGI; my $q = CGI->new; print $q->header('text/html'); print $q->start_html(); print "Hello world"; print $q->end_html(); ...if you were being a bit more more fancy. In other w…

Pretty sure there's a way to load perl as a webserver module like PHP, then you can do that embedded stuff too
Post reply on HN