Live data from Hacker News

Perl, the first postmodern computer language (1999)

wall.org

161–170 of 225 posts

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

#161
post #114
post #95

Earlier quoted context omitted.

p.s. This is fun. So what constitutes a Brutalist programming language? It should be something that: - Exposes the construction materials - Implies mass and permanence - Is usually institutional, e.g. libraries, government buildings, public housing. Only rarely shopping centres or company head offices (which were usually done in the "International" style when Brutalism was a thing). What fits that bill? How about SQL…

MUMPS

Not sure MUMPS 'Exposes the construction materials', considering how deeply buried it is in applications like Epic by now. Perhaps I misunderstood what that part meant.

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

#162
post #74

Earlier quoted context omitted.

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.

Was CGI.pm ever "ready"? Modern Perl releases dropped it because it was such a bad design.

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

#163

Earlier quoted context omitted.

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…

That was certainly part of the convenience out of the box. But you could have done something similar with mod_perl since it had filters that could act on every page. Then embperl started to gain popularity some time in 1996, which was decidedly even more like a templating engine, and after that came Mason. PHP really exploded in popularity when web hosting took off. It had a safe mode that made it possible to for sev…

HAH, yes, "safe mode" which is really set-uid mode, meaning that if an admin restores a .php file from a backup and forgets to set the ownership, they have suddenly granted that user root access to the server. and it's called "safe mode". I hate PHP so much...

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

#164

Earlier quoted context omitted.

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…

>> In other words, there was no standard templating. I am not sure how much of a standard it was, but Perl Mason was a superb web site templating system. Amazon and many other websites used it for years because it was flexible, high performance, and had fewer security problems compared to PHP. http://www.masonhq.com/sites https://masonbook.houseabsolute.com/book/

It was only high performance if used with mod_perl and that was the problem for cheap hosts. HTML::Mason without mod_perl was a dog compared with PHP. Perl generally missed the boat with embedded templating. Catalyst, Mojolicious and Dancer eventually arrived but by then PHP had won. The Perl community also wasted a lot of energy trying to agree on a de facto way of doing OO. You had Damian Conway keeping it simple with blessed hashrefs on one side and kitchen sink OO with Moose on the other. In between were countless Moose riffs - Moo, Mouse, Mo. Not content with that, others opted for a Meta Object Protocol (MOP) for Perl but none of this stuck enough for Perl to compete with Python and Ruby which had OO built-in. These 2 factors are more or less why Perl lost mindshare when it mattered.

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

#165

Earlier quoted context omitted.

>> In other words, there was no standard templating. I am not sure how much of a standard it was, but Perl Mason was a superb web site templating system. Amazon and many other websites used it for years because it was flexible, high performance, and had fewer security problems compared to PHP. http://www.masonhq.com/sites https://masonbook.houseabsolute.com/book/

I was about to mention HTML::Mason, which was superior to many other templating solutions back then. The biggest problem for Perl was that PHP was almost built for the web, while Perl was "just a normal programming language." I wonder where Perl would have been if there had been a packaged and easy to install version of Apache with Perl, mod_perl, HTML::Mason etc. pre-installed in some way in late 90s.

Mod_perl was too much of a hosting liability for that to have been a possibility. You had to really watch your step with mod_perl not to expose shared memory to other processes running on the same server. Mod_perl is also much more complex than PHP or even Perl CGI. It was always considered senior Perl dev territory whereas PHP was aimed at the lower-tech DIY market.

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

#166

Earlier quoted context omitted.

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…

>> In other words, there was no standard templating. I am not sure how much of a standard it was, but Perl Mason was a superb web site templating system. Amazon and many other websites used it for years because it was flexible, high performance, and had fewer security problems compared to PHP. http://www.masonhq.com/sites https://masonbook.houseabsolute.com/book/

Mason was great, but it'd have needed to be accompanied with an easy-as-adding-a-different-document-extension scheme installed by default w/ mod_perl on commodity hosting in order to have saved Perl's popularity vs PHP.

The big thing for PHP was how easy it was to go from "I've got a static HTML document that looks like what I want!" to "I've just added a tiny bit of dynamic content by sprinkling in a special tag!" on the majority of unix-based hosts. Deployment was uploading via FTP, just like it was with HTML. There's just so little conceptual distance or friction between static HTML and dynamic document/app, the pit of success is right there to fall into (granted, the peak of further success has some rocky roads out of that pit, but by then you've got momentum!).

On commodity hosting, Perl got typecast as a CGI tool instead. Which had its own power (CGI is kinda the OG serverless)... but not as easy a jumping off spot for anybody who was doing HTML.

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

#168

I love Perl. I use almost none of its more esoteric features, and just write "classic procedural" code, mostly using command-line utilities instead of third-party modules for anything I don't want to write myself (mainly cryptography), and I am so fucking happy not having to deal with breaking changes in my language, a rare quality these days. I used a machine with a 9-year-old distro on it for a few months, and all…

Yeah, I agree with you. For fun I built Perl 1 a couple years ago and was amazed at how similar it was to Perl 5. In fact most of the test suite from Perl 1 runs unmodified on Perl 5. The subroutine calling syntax was different (it used `do xxx();` I think) so those tests fail. But unfortunately, some Perl devs in recent years keep thinking that what they need to do is break stuff to "modernize". They keep eyeing goa…

> But unfortunately, some Perl devs in recent years keep thinking that what they need to do is break stuff to "modernize".

Isn't it the whole point of Raku (previously Perl 6)?

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

#169

I love Perl. I use almost none of its more esoteric features, and just write "classic procedural" code, mostly using command-line utilities instead of third-party modules for anything I don't want to write myself (mainly cryptography), and I am so fucking happy not having to deal with breaking changes in my language, a rare quality these days. I used a machine with a 9-year-old distro on it for a few months, and all…

Curious - is there a reason to use Perl (Wall's latest version, 5 or whatever) in 2022 if one has no familiarity with the language? What would be the major advantage of using Perl over its closest analogues, some bastardization of Bash and Python?

You can think of Perl as a super AWK. That's really the genesis of it's design philosophy, hence all the special automatic variables and modes to implement processing loops on the command line. From a scripting standpoint, the language is designed to be used with much less ceremony than Python and its ilk.

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

#170
post #91

Modernism: "Less is more"—Mies van der Rohe Postmodernism: "Less is a bore"—Robert Venturi ————— Guided by these famous quotes, if I were to call a programming language a "Modernist" language, I'd think of something that prizes elegance. It can't just be a small language, it has to be a small language with a few features powerful enough to actually do more. I would think of languages like Scheme or Smalltalk or C as…

> Perl might fit that bill

may i submit https://metacpan.org/pod/Acme::Bleach

Post reply on HN