Live data from Hacker News

Perl, the first postmodern computer language (1999)

wall.org

141–150 of 225 posts

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

#141

...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…

mod_perl was stateful and mod_php was stateless.

By that I mean, a mod_perl program was expected to change the execution state for future executions, global variables would remain, etc. There are ways to make that happen in mod_php, but it isn't the default and I don't know if they were available initially. This made it easier to share a mod_php server with many users... A mod_perl really should be suexeced per user (or something) and that's hard. Really, you want to do per user php servers too, but it wasn't obvious back then.

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

#142
post #59

Perl was the first language I used professionally and I used it almost exclusively for years. I don't understand all the negative comments about its use of sigils, I find them useful and I never got the impression that they made the code less readable but maybe that's because I was never taught the gospel of computer science :) I also appreciate the extended backwards compatibility. I still occasionally run decade-ol…

Here's one reason why sigils could be considered to suck. `@array` - array of values. `$array[1]` - get element 1 of the array. `$array` - What do you think this does? Why can't we just `@array[1]`?

Sigils indicate what an operation evaluates to, not what the input type is. You get used to it.

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

#143
post #77
post #9

Earlier quoted context omitted.

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.

I don't understand why Python is touted as some kind of replacement for Perl when there are many things Perl does better and faster. Python isn't even optimised for one-liners so how can it be compared with Perl?

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

#144
post #134

Earlier quoted context omitted.

C++ is absolutely the world's foremost brutalist language.

What? Not even close. C++ is Baroque.

None of its monumental complexity is ornamental. It's all there to expose some inner working of its underlying semantics for the user that needs to access it. It's hard for me to imagine something more brutalist than operator new or partial template specialization.

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

#145
post #59

Perl was the first language I used professionally and I used it almost exclusively for years. I don't understand all the negative comments about its use of sigils, I find them useful and I never got the impression that they made the code less readable but maybe that's because I was never taught the gospel of computer science :) I also appreciate the extended backwards compatibility. I still occasionally run decade-ol…

Other programming languages also have sigils, such as LLVM, etc.

I think that it does not make it less readable.

In some programming languages they will be used to avoid clashes with reserved words, which I think is a good idea.

Some programming languages (such as BASIC) have suffix sigils to indicate data type; some (such as OAA) have both prefix and suffix sigils.

Some programming language may allow multiple sigils together in some cases (e.g. Raku and Free Hero Mesh) (in Raku they called the secondary sigils as "twigils").

The meaning seems to vary depending on programming languages; some are used for similar purposes and sometimes they are used for different purposes.

In Perl, the sigil can indicate scalar vs array (but not numbers vs strings), and in BASIC it can indicate numbers vs strings (but not scalar vs array, which is differently).

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

#146

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?

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

#147

...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…

Everyone was just starting out at pre 2000. Perl was scripting first but PHP was HTML first, as in plain HTML is still a valid PHP and it was easy for people to pick up without having have to see some weird error without the content-type "magic" line and setting the file to "777" to get it working.

But I do like its Unix feeling. Too bad no one uses it anymore and have to move on.

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

#148

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…

> I use almost none of its more esoteric features

Which features do you see as esoteric?

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

#149
post #104
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…

I’m adding SNOBOL to my list of modernist languages. “Everything is pattern-matching” fits the modernist ethos. On the other hand, what about APL? Although the syntax looks just as much like line noise as Perl’s syntax, it is actually a very elegant language. Is APL also a modernist language? https://www.youtube.com/watch?v=a9xAKttWgP4

If you think about it... Smalltalk.

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

#150
post #134

Earlier quoted context omitted.

What? Not even close. C++ is Baroque.

None of its monumental complexity is ornamental. It's all there to expose some inner working of its underlying semantics for the user that needs to access it. It's hard for me to imagine something more brutalist than operator new or partial template specialization.

There's always protected inheritance, a/k/a "was_a," or, "is implemented in terms of."

That's like postmodern furniture design. "This couch was_a giant pair of lips," meaning that although it is implemented as a pair of lips, we'll treat it as type couch.

Same for, "This chair was_a giant baseball glove."

Post reply on HN