News for hackers. Stuff that matters.
Re:How come PHP seems so much faster than Rust? by osrec on Saturday September 28, 2019 @10:09PM (#21104536)
While your observation is true to some degree, I do remember ASP, Cold fusion, CGI and a few other more obscure technologies way back when.

Perhaps I was quite late to the party though - I only started programming in 1999 (got a computer for my 11th birthday!) - so I'm not sure what it was like before then.

Re:How come PHP seems so much faster than Rust? by javagram on Saturday September 28, 2019 @10:36PM (#21104649)
ASP and ColdFusion both required license fees at the time I believe (asp the Windows server license and CF of course the CF license)

CGI just would run any type of script. Originally that was typically Perl but PHP surpassed Perl for a variety of reasons. PHP could be run either through CGI or through mod_php in Apache. There was also a mod_perl I believe and a few others but php is what web hosts typically installed in the early 2000s.

Re:How come PHP seems so much faster than Rust? by im3w1l on Sunday September 29, 2019 @08:57AM (#21106766)
Why did php beat perl?
Re:How come PHP seems so much faster than Rust? by klodolph on Sunday September 29, 2019 @12:36PM (#21108004)
Someone with better knowledge might step in here.

From https://perl.apache.org/about/history.html

> "PHP was also around already, and was an embarrassing witness to Perl's greatest weakness for server-side programming: that embedding Perl was a pain. Although the hooks were there for embedding Perl, they were both undocumented and buggy.

My other take on it is that PHP is like TypeScript, in that the path to adopting PHP from HTML is simple enough—just rename your HTML files with a .php suffix and you can add dynamic elements—or not. Just like how you can rename your JavaScript code with a .ts suffix and add types—or not.

Personally, I remember writing a few Perl CGI scripts. But I ended up using PHP for any quick-and-dirty dynamic stuff.

Re:How come PHP seems so much faster than Rust? by Kye on Sunday September 29, 2019 @11:55AM (#21107732)
The web. Making a typical language output HTML required a lot of hoop-jumping or inventing a web framework in a time before Django and Rails. PHP was its own web framework.
Re:How come PHP seems so much faster than Rust? by horizone on Sunday September 29, 2019 @09:28AM (#21106910)
Personally, I switched from Perl to PHP around 2002 (I could be wrong with the year) as I wanted to move from flat file dbs to MySQL. I wouldn't say that it beat Perl, it was just made web development more accessible. I still wrote in Perl after that, but for server side scripting (processing, cleanup etc).
Re:How come PHP seems so much faster than Rust? by wvenable on Sunday September 29, 2019 @02:15PM (#21108654)
Perl was just as inscrutable then as it is now.
Re:How come PHP seems so much faster than Rust? by tjpnz on Sunday September 29, 2019 @11:19AM (#21107522)
Easy to write and easy to deploy. But that was a double edged sword.
Re:How come PHP seems so much faster than Rust? by wvenable on Saturday September 28, 2019 @10:41PM (#21104670)
> I do remember ASP, Cold fusion, CGI

This is the competition that PHP was so much better than.

Re:How come PHP seems so much faster than Rust? by Sir_Vival on Sunday September 29, 2019 @01:46AM (#21105344)
I had a job 5 or 6 years ago where I needed to maintain/add to a website using ColdFusion. I actually kind of liked it, compared to PHP. That said I wasn't doing anything especially complex, which might have changed my mind.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @02:23AM (#21105457)
CGI yes, ASP certainly not.
Re:How come PHP seems so much faster than Rust? by untog on Sunday September 29, 2019 @08:15AM (#21106598)
ASP required a license. That alone made PHP superior for many people.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @10:46AM (#21107303)
Cheaper definitely, superior not.
Re:How come PHP seems so much faster than Rust? by untog on Sunday September 29, 2019 @02:11PM (#21108629)
Why are the two separate? Of course you include cost when evaluating with option is superior.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @02:42PM (#21108826)
Because to be superior, the tooling and libraries also have to be superior.

PHP was only free beer with a clunky language and 3rd class DB support.

MySQL couldn't hold a candle to real RDMS back then, versus what was available with ODBC connectors.

Re:How come PHP seems so much faster than Rust? by untog on Monday September 30, 2019 @03:36PM (#21118920)
> Because to be superior, the tooling and libraries also have to be superior.

Perhaps that is your definition, but the dictionary disagrees.

Re:How come PHP seems so much faster than Rust? by pjmlp on Wednesday October 02, 2019 @02:41AM (#21133904)
Your dictionary definition I guess.

https://dictionary.cambridge.org/dictionary/english/superior

I don't see definitions about being cheaper as sign of quality, quite the opposite.

Maybe you would like to share your dictionary as well?

Re:How come PHP seems so much faster than Rust? by purerandomness on Sunday September 29, 2019 @11:23AM (#21107543)
ASP was inaccessible for younger developers, tinkering with a linux box after school.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @11:33AM (#21107601)
That is a very regional example.

Getting access to a Windows box was never a problem in countries with more flexibility towards piracy.

80 and 90's Portuguese students could get whatever they wanted from shaddy shops that used to copy books and software.

Booklets with 200+ items on them.

Re:How come PHP seems so much faster than Rust? by wvenable on Sunday September 29, 2019 @02:08PM (#21108605)
Classic ASP was terrible; if you're thinking ASP.NET then that did not exist at the time.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @02:40PM (#21108819)
Using OCX from ASP, written in Delphi, VB and C++ Builder, alongside VB Script, was definitely better than PHP 3.
Re:How come PHP seems so much faster than Rust? by wvenable on Sunday September 29, 2019 @03:19PM (#21109092)
Shared hosts didn't let you use anything but VBScript and JScript. Using COM components was a non-starter for the majority of users -- which is entirely the point.
Re:How come PHP seems so much faster than Rust? by pjmlp on Sunday September 29, 2019 @05:43PM (#21109799)
The ones that offered IIS instead of ASP via Apache surely did, depending on the price plan.
Re:How come PHP seems so much faster than Rust? by wvenable on Sunday September 29, 2019 @08:41PM (#21110760)
There is no ASP via Apache. ASP was only ever hosted on IIS and given the huge security implications of running custom binaries on IIS in a shared environment, it almost wasn't ever done.

I started doing ASP development before my web host suggested it was cheaper and easier to do PHP. They had both Linux and Windows shared hosting at the time.

Re:How come PHP seems so much faster than Rust? by pjmlp on Monday September 30, 2019 @01:35AM (#21112032)
Sure there was one

http://www.apache-asp.org/faq.html

I was only wrong regarding the language, it made use of Perl instead.

Re:How come PHP seems so much faster than Rust? by wvenable on Monday September 30, 2019 @02:35AM (#21112295)
One esoteric library that was not mainstream. It's completely unrelated (and utterly incompatible) to Microsoft's ASP. I'm not even sure why you'd bother to bring it up -- what point does this make?
Re:How come PHP seems so much faster than Rust? by pjmlp on Monday September 30, 2019 @03:45AM (#21112676)
That PHP only got where it is today because of cheap hosting, down to the level of free beer, nothing more.
Re:How come PHP seems so much faster than Rust? by wvenable on Monday September 30, 2019 @11:35AM (#21116447)
That doesn't explain how it beat a number of other technologies at the time -- including well established ones, like Perl.
Re:How come PHP seems so much faster than Rust? by pjmlp on Monday September 30, 2019 @05:40PM (#21119927)
Sure it does, cheap hosting. Many ISP only offered Perl with mod_perl, or telnet/cgi access, in the more expensive variants.

The cheapest of them all was PHP with files being dumped via FTP upload.