Live data from Hacker News

Perl on Rails (2007)

bbc.co.uk

21–30 of 66 posts

Re: Perl on Rails (2007)

#21

Ruby is well known as the “bad parts of Perl” so there’s a beautiful horror here. It’s also funny that Ruby is the slowest of the dynamic languages, and that Perl is much faster. They created a magnificent mind bending nightmare.

I think of Ruby as "The Perl that Python wanted to be"

Re: Perl on Rails (2007)

#22
post #14

Earlier quoted context omitted.

> Perl is a great language I don't write Perl often, which probably explains why every time I go back to it (we have a legacy Perl app), I get tripped up, over and over again, by the sigils, and the rest of the visual noise — and I can't help wondering, why?. Why can other scripting languages deal perfectly fine with the ambiguity that Perl resolves with a dollar sign as opposed to a percent sign, or an at-sign, or a…

> Why [does Perl use a lot of weird punctuation] Because that’s how it started, and it maintains absolutely fantastic backwards compatibility. All languages have foibles… > Why do I need to [declare variables prior to use] Because this isn’t Python

>fantastic backwards compatibility

Yeah, Perl 6 was so fantastically compatible it took so many decades to come out they had to rename it something else so as not to confuse people.

>Because this isn’t Python

Perl 6 isn't Perl, either.

Re: Perl on Rails (2007)

#23
post #15

Earlier quoted context omitted.

Looks like a mixture of React and AWS Lambda https://www.bbc.co.uk/blogs/internet/entries/8673fe2a-e876-4... https://static.files.bbci.co.uk/core/storybook/index.html?pa... > The vast majority of the BBC’s webpages are rendered on AWS, using React. React’s isomorphic nature allows us to render the pages server-side (for best performance) and then do some further updates client-side. > Increasingly, the rendering happ…

> render the pages server-side (for best performance) and then do some further updates client-side. I am curious, how does this imapct SEO?

I'm guessing the main part of the content (for example the news story) is rendered server side, the client-side adds any personalisation if the user is logged in etc and adds panels for 'related'/most liked/read more news stories etc.

This means the content can be both crawled for SEO and cached (there's cache hit and fastly headers in their responses)

Re: Perl on Rails (2007)

#24

Earlier quoted context omitted.

> Why [does Perl use a lot of weird punctuation] Because that’s how it started, and it maintains absolutely fantastic backwards compatibility. All languages have foibles… > Why do I need to [declare variables prior to use] Because this isn’t Python

>fantastic backwards compatibility Yeah, Perl 6 was so fantastically compatible it took so many decades to come out they had to rename it something else so as not to confuse people. >Because this isn’t Python Perl 6 isn't Perl, either.

It's not called Perl 6 anymore for exactly this reason.

Re: Perl on Rails (2007)

#25

Comments are hilarious, especially knowing some of those people commenting most critically had recently been working at FM&T. At the short stint I did at the Beeb I spent a lot of time doing code for date maths using SSI and Perl before they decided to completely rewrite what we were doing in Flash. Perl is a great language, and Catalyst and Mojolicious are rock solid, as is DBIx::Class. I work all day with TypeScrip…

Every time I try to write Perl, between the sigils, weak support for numbers, and the archaic-feeling way of handling parameters in subroutines, I come away slightly disgusted. The convenience of the text processing routines is not a novelty or productivity improvement compared to other languages nowadays. And Perl seems slower than Python now on the kinds of workloads where I would be tempted to use Perl. What am I missing?

Re: Perl on Rails (2007)

#26
post #20

Earlier quoted context omitted.

Don't forget there's also "state $var" and "local $var", which declare other types of variables. They're there because they.. are useful. Same as why there's "var", "let" or "const" in JS. Different scoping / types of variable slots for the interpreter. A "my" variable declares a variable valid in the current scope; an "our" variable will be available at the package level; a "state" variable is initialised only once,…

`let` and `const` expand and replace `var`; and make variable declarations more intuitive by removing var's hoisting and adding block-level scoping (which the programmer doesn't need to care about if he doesn't wish to). What this means is that one can just use var if they are happy with it, or use let and const without the var. Not so with Perl. There is no "legacy mode", with all the awkward punctuation of decades…

I'm not defending the sigils because they are terrible, but the reason you can't just get rid of them is that they are actually used.

For instance:

my @arr = ("Larry", "Moe", "Curly");

my $len = @arr;

will store 3 in $len. Application codebases and libraries make use of this kind of thing everywhere.

You can find some of the reasoning why in interesting essays like this: http://www.wall.org/~larry/natural.html

Larry Wall was trying to incorporate some natural language features in Perl, unsuccessfully in this case but I would say it went very well in others.

Re: Perl on Rails (2007)

#27
post #14

Comments are hilarious, especially knowing some of those people commenting most critically had recently been working at FM&T. At the short stint I did at the Beeb I spent a lot of time doing code for date maths using SSI and Perl before they decided to completely rewrite what we were doing in Flash. Perl is a great language, and Catalyst and Mojolicious are rock solid, as is DBIx::Class. I work all day with TypeScrip…

> Perl is a great language I don't write Perl often, which probably explains why every time I go back to it (we have a legacy Perl app), I get tripped up, over and over again, by the sigils, and the rest of the visual noise — and I can't help wondering, why?. Why can other scripting languages deal perfectly fine with the ambiguity that Perl resolves with a dollar sign as opposed to a percent sign, or an at-sign, or a…

> ..every time I go back to it I get tripped up, over and over again, by the sigils, and the rest of the visual noise

From what I remember of writing Perl - it is a lovely language to write, but not to read. I remember going back to my own code and thinking what the hell am I doing here.

Re: Perl on Rails (2007)

#28
post #13

Earlier quoted context omitted.

Python is actually slower than Ruby

I assume Python 3.0 ~ Python 3.10 are slower than Ruby. https://programming-language-benchmarks.vercel.app/python-vs...

Interesting to see these results! I wonder how Ruby 2.x would stack up in this same benchmark.

Re: Perl on Rails (2007)

#29
post #14

Comments are hilarious, especially knowing some of those people commenting most critically had recently been working at FM&T. At the short stint I did at the Beeb I spent a lot of time doing code for date maths using SSI and Perl before they decided to completely rewrite what we were doing in Flash. Perl is a great language, and Catalyst and Mojolicious are rock solid, as is DBIx::Class. I work all day with TypeScrip…

> Perl is a great language I don't write Perl often, which probably explains why every time I go back to it (we have a legacy Perl app), I get tripped up, over and over again, by the sigils, and the rest of the visual noise — and I can't help wondering, why?. Why can other scripting languages deal perfectly fine with the ambiguity that Perl resolves with a dollar sign as opposed to a percent sign, or an at-sign, or a…

just re-read this comment you wrote, where you list out all of the rules that you forget, and you'll be on easy street
Post reply on HN