180

(joke in the title stolen from a redditor)

Context: some Rust kid vandalized cppreference.com today.

you are viewing a single comment's thread
view the rest of the comments
[-] xmunk@sh.itjust.works 95 points 11 months ago* (last edited 11 months ago)

That kid is an asshole because cppreference is doing the lord's work.

Also, I know that language choice is one of the most important decisions when starting a new project but, personally, I work on a highly performance sensitive project that's written in PHP. If you think you need Rust to be performant or type safe then you don't really know what you're doing yet. It makes it easier and increases theoretical limits - that is all.

[-] istdaslol@feddit.de 25 points 11 months ago

I want to tell the computer what it should do, not what the computer things I can do. That’s why I use scratch

[-] manpacket@lemmyrs.org 19 points 11 months ago

I saw md5 checksum implemented in scratch.

[-] istdaslol@feddit.de 11 points 11 months ago

There is also a whole OS written in scratch. A very basic one but still

[-] Tabugti@feddit.de 7 points 11 months ago

And a RISC-V emulator that runs Linux.

[-] manpacket@lemmyrs.org 8 points 11 months ago
[-] xmunk@sh.itjust.works 6 points 11 months ago

I am happy to answer any and all questions.

[-] manpacket@lemmyrs.org 9 points 11 months ago

Is this a new project that was intentionally started in PHP or something legacy? Any interesting benchmarks? Like minimal wire to wire network processing time and where the bottleneck is?

[-] xmunk@sh.itjust.works 6 points 11 months ago* (last edited 11 months ago)

Our project was something that has evolved from a full web app into a PHP backend fronted by a reactish SPAish thing. Our spool up time to cache our website is 13 ms from a cold start (after provisioning and stuff) so we're pretty good at horizontal scaling. Once cached our overhead is 7ms for framework things. Our page load times across the board calvary wildly with 25ms being our target time but with some very large reports stretching into the seconds range - on those slow pages all those previous numbers are essentially irrelevant and performance is dictated solely by how much we're investing into query caching and tuning.

Personally I'm actually a big fan of PHP, it's incredibly powerful and good with lists (and all good programming is list programming ;P). The typing is strong when enforced and weak when you choose. The lambda and reflection frameworks are robust and it has a number of interesting phpisms like magic functions and variable variables.

[-] CanadaPlus@lemmy.sdf.org 3 points 11 months ago
[-] xmunk@sh.itjust.works 3 points 11 months ago

It's a choice left up to developer but you can have static and runtime type checking enabled for as many functions as you desire. Theoretically you can have collection subtype checking but I'd say that PHP is still quite frail here as proper collection typing lacks any template-style typing but needs dedicated collection types.

[-] herr@lemmy.world 2 points 11 months ago

then you don't really know what you're doing yet.

Can you elaborate on this? How are you guys making PHP so performant? Do you call C programs from it or something?

[-] xmunk@sh.itjust.works 15 points 11 months ago* (last edited 11 months ago)

No, we just use good algorithmic approaches including an emphasis on lazy evaluation. It'd take out application like 20x as long to compute 2+2 compared to one written in C but computation in PHP isn't our main bottleneck - it's efficient network connection handling and psql query performance.

Our PHP code is maintainable and expressive that makes it much easier to tune performance where it counts.

this post was submitted on 30 Sep 2023
180 points (88.5% liked)

Programmer Humor

32050 readers
1556 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS