News for hackers. Stuff that matters.
Re:How I built the IMDb message boards, in 2001 by ars on Tuesday February 07, 2017 @11:55AM (#13590638)
That was great to read.

As soon as he said mod_perl I knew where things were headed. Having used both mod_perl and PHP (and ColdFusion - anyone remember that?), perl was just a nightmare to use well for this.

Then when he talked about the custom templates written in perl? That's why PHP was invented, because at its core it is a template language. (i.e. the pages are HTML, with code inside them, rather than code, and HTML is treated as a string.)

I suspect that if the forums had been written in PHP they would not be getting shut down right now.

And yes, I know that people love to hate on PHP (including the author who said he disliked PHP because he didn't use it). But sometimes the tools you choose make a huge difference.

It was a great writeup though, really brought back memories.

Re:How I built the IMDb message boards, in 2001 by ukyrgf on Tuesday February 07, 2017 @12:16PM (#13590832)
I thought it was odd that he says the cool kids were using Perl. I taught myself Perl from a book in the late 90s and couldn't find any kind of welcoming community on the internet, while PHP was the complete opposite. Since it was made for the web it flourished there; PHP even had user comments on its own documentation!
Re:How I built the IMDb message boards, in 2001 by colinstrickland on Tuesday February 07, 2017 @12:26PM (#13590917)
yeah, i'm British, and I kind of mean 'cool kids' to be a slightly self-deprecating ironic phrase. I meant that all the people I knew that were doing more interesting things seemed to be doing perl, so I followed that path. Filter bubbles were still a thing, even with less online communities
Re:How I built the IMDb message boards, in 2001 by vvanders on Tuesday February 07, 2017 @01:04PM (#13591213)
Yup, PHP back then had one of the best documentation pages out there. It's hard to explain how big a deal it was(esp before the days of stack overflow).
Re:How I built the IMDb message boards, in 2001 by aeontech on Tuesday February 07, 2017 @02:28PM (#13591902)
Absolutely! I honestly think that if PHP didn't have those incredibly accessible documentation pages, it would never have taken off in the way it did. It was StackOverflow before there was StackOverflow.
Re:How I built the IMDb message boards, in 2001 by lupin_sansei on Thursday February 09, 2017 @08:14PM (#13612542)
Yes it was a stroke of genius for php to add user comments to the bottom of the page describing each function/method etc. the examples in those comments were often much better than the documentation itself. I remember in early 2000s trying to persuade someone at CPAN to add comments to the bottom of CPAN, but they didn't get that they actually had to be on the page at the bottom for anyone to read them.
Re:How I built the IMDb message boards, in 2001 by segmondy on Tuesday February 07, 2017 @04:35PM (#13593050)
In the late 90's the cool kids where using python. I was on the Perl bandwagon and in 1999 I bought "Learning Python" and never wrote a line of Perl again.
Re:How I built the IMDb message boards, in 2001 by cutler on Tuesday February 07, 2017 @08:20PM (#13594821)
Let's not forget HTML::Mason which was Perl's answer to PHP but with the overhead of mod_perl. I thought it was at least as good of what PHP had to offer back then. The only argument for PHP vs. Mason was ease of deployment as Mason was arguably more feature-rich.
Re:How I built the IMDb message boards, in 2001 by proaralyst on Tuesday February 07, 2017 @12:10PM (#13590781)
Are you suggesting that if the boards were written in PHP they'd still be alive or that they'd have been shut down long ago?
Re:How I built the IMDb message boards, in 2001 by ars on Tuesday February 07, 2017 @12:11PM (#13590786)
That they'd still be alive. Mainly because maintenance, and equally important, new features, would be easier.

The poor reputation of PHP is from bad PHP by bad programmers, use a good programmer (as he seems to be) and the "boost" you get from using PHP would lead to much easier to maintain code.

i.e. the same boost that lets a bad programmer get something running in PHP can take a good programmer and make him even better.

Perl is a powerful language, but it's not well suited for making web pages.

Re:How I built the IMDb message boards, in 2001 by rwmj on Tuesday February 07, 2017 @12:57PM (#13591151)
I'm sorry, but this is nonsense. About the same time as the article's author (1999-2002), we wrote a huge discussion site all in Perl, and it was pretty elegant. All the code was compiled with strict, all warnings fixed. The code was properly modular. We even post-processed the code with a linter (similar to pylint).
Re:How I built the IMDb message boards, in 2001 by ars on Tuesday February 07, 2017 @01:15PM (#13591311)
And did you forget about slash? It still exists and is maintained. Even PHP itself was originally written in mod_perl.

I didn't say you can't write good stuff in mod_perl, but rather it's slower and harder. Using perl as a template language is simply using the wrong tool for the job, that's all.

And I say this having done both.

Think about the site you wrote: Did you have to spend a lot of energy and time writing modules to make handling HTML easier? Did you write functions to deal with form input?

Was the site successful because you essentially wrote an HTML handling framework?

Re:How I built the IMDb message boards, in 2001 by sciurus on Tuesday February 07, 2017 @06:05PM (#13593842)
Your argument is that PHP is better than Perl for web development because PHP is a better suited for use directly as a templating language? That may be true, but I don't think it's particularly relevant given the long existence of templating engines for both. The PHP developers I know don't use PHP as their templating language anymore. They use Twig, Smarty, Blade, etc...
Re:How I built the IMDb message boards, in 2001 by segmondy on Tuesday February 07, 2017 @04:38PM (#13593077)
I have been in an environment, where there is some legacy Perl scripts that run, everyone is terrified to update it even tho it's a PHP shop. I looked at the code thinking it would be a nightmare, but no. It's actually good clean code. So it's not nonsense, some folks absolutely refuse to engage in new adventures. They would be ready to hack all over it if it was node, but Perl? won't touch with a 10 feet pole.
Re:How I built the IMDb message boards, in 2001 by kyberias on Tuesday February 07, 2017 @01:39PM (#13591472)
I don't think the reason of shutdown is anything technical. They're not shutting it down because of perl and they wouldn't be keeping it alive because of PHP.
Re:How I built the IMDb message boards, in 2001 by colinstrickland on Tuesday February 07, 2017 @12:19PM (#13590859)
I wouldn't claim to be a good programmer, but I would point out that back then my exposure to PHP was PHP version 3, and version 4 was only just getting established.
Re:How I built the IMDb message boards, in 2001 by ars on Tuesday February 07, 2017 @01:26PM (#13591390)
Don't sell yourself short.

It's easy to see in hindsight that mod_perl was a mistake, but back then it was hardly obvious - in fact it seemed like mod_perl was poised to take over.

Personally I only switched to PHP around 2003/2004 when I realized it was more productive than perl, so I'm not faulting you at all.

I would have chosen the exact same language as you in 2001. Or maybe ColdFusion if it was a windows shop.

PS. Sorry for coming across as critical, I didn't mean it that way. I was talking only in a retrospective kind of view.

Re:How I built the IMDb message boards, in 2001 by tyingq on Tuesday February 07, 2017 @06:24PM (#13594003)
Personally I don't think mod_perl was the issue. It was the lack of a decent lightweight framework for web apps. They did appear eventually (Dancer, Mojolicious), but too late once they were mature enough.
Re:How I built the IMDb message boards, in 2001 by cutler on Tuesday February 07, 2017 @08:26PM (#13594856)
Ever heard of HTML::Mason? See my other comment on this thread. Considering that embedding HTML in PHP has been frowned upon for over 15 years I can't see how PHP as used in, say, Laravel is any different from Perl/Mojolicious or Ruby on Rails. Around the time the author built the IMDb boards, if I remember, Smarty was preferred over embedding PHP a la Rasmus Lerdorf at which point PHP lost its "made for the web" advantage.