ramsey,
@ramsey@phpc.social avatar

OH: “A lot of the stuff that Python gets praised for being fast at, PHP now outperforms Python at doing, but it’s a story we’re not really telling. We should be telling that story.”

alper,
@alper@rls.social avatar

@ramsey Nobody ever praises Python for being fast at anything.

ramsey,
@ramsey@phpc.social avatar

Credit to @auroraeosrose for this quote. I didn’t originally credit her because I’ve massively paraphrased a conversation she and I had, but this paraphrase is the gist of what we said.

bluGill,
bluGill avatar

@ramsey If I'm looking for speed I'm going to write in C++ or Rust. If I'm looking for fast development of small scripts I'm looking at python. I haven't done php in more than decade, but python has always been there for me with a clean syntax that makes writing code a easy.

ramsey,
@ramsey@phpc.social avatar

@bluGill The context wasn’t speed of development but speed of the interpreter. Of course, compiled languages will usually outperform interpreted languages.

For me, I usually reach for PHP for fast development of small scripts; PHP has always been there for me with a clean syntax that makes writing code easy. 😉 (But that’s likely more because of our familiarity with the languages than a feature of the languages themselves.)

wimg,
@wimg@phpc.social avatar

@ramsey if only PHP had better async natively built in...

ericmann,
@ericmann@tekton.network avatar

@ramsey the biggest thing I like Python for is data science. If we had the equivalents of numpy and pandas in PHP, it would go a long way. Even further proper Spark integration and CUDA support.

I'm not super strong in C but I'd love to work with someone to see if we could tackle any of these things and give PHP a fighting chance against Python for DS.

Ollivdb,
@Ollivdb@nrw.social avatar

@ericmann @ramsey
Imho the main problem is that Pytgon is a multipurpose language while PHP is for web only.
When we'll get a fast interpreter or maybe a precompiler for PHP to use the language on Desktop, mobile, IOT or general as standalone apps, THAT would be the game changer in my eyes 🙂

isotopp,
@isotopp@chaos.social avatar

@Ollivdb @ericmann @ramsey all this exists, today, and works. You are not aware of that and that is exactly what the OP says.

eBerdnA,
@eBerdnA@chaos.social avatar

@isotopp @Ollivdb @ericmann @ramsey I stopped using PHP for side projects some years ago. What would be a good starting point to get on overview of current best practices and what the eco-system has to offer nowadays? Or is the lack of such a resource basically what the OP is implying?

isotopp,
@isotopp@chaos.social avatar

@eBerdnA @Ollivdb @ericmann @ramsey

I recently wrote a bunch of command line programs to compare memory usage and speed of programs instantiating a very large number of identically structured objects, in Perl, PHP and Python.

PHP performed closer to Java than to Python or Perl, it was much, much faster, and that already out of the box, with a bit of tweaking easily 5x to 10x better.

And yes, this is not widely communicated.

isotopp,
@isotopp@chaos.social avatar

@eBerdnA @Ollivdb @ericmann @ramsey

Also, I personally know about for example composer, but I would be hard pressed to name functional PHP equivalents to black, click, numpy or matplotlib, things that I am using every day in Python (my name is in the phpcredits() output, but I haven't done PHP in the last 20 years).

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • PowerRangers
  • khanakhh
  • magazineikmin
  • hgfsjryuu7
  • rosin
  • vwfavf
  • Youngstown
  • slotface
  • everett
  • thenastyranch
  • mdbf
  • kavyap
  • Durango
  • anitta
  • ethstaker
  • osvaldo12
  • InstantRegret
  • cisconetworking
  • GTA5RPClips
  • modclub
  • ngwrru68w68
  • cubers
  • tacticalgear
  • normalnudes
  • tester
  • Leos
  • provamag3
  • All magazines