Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Yin and Yang
Php usually performs better than js.
Js source tends to be less shit than php
That said, if it doesn't multithread, I don't use it on a server. -
Root797954yMeh.
Both are terrible for vastly different reasons. They also have their place. JS’s place is making webpages a little nicer. PHP’s place is 1995. 😉 -
kiki353894y@SortOfTested php usually performs better than nodejs? You being wrong is a rare thing, I know, but now you’re wrong unfortunately
-
kiki353894yWhy care about other people’s opinions though? I arbitrarily assign weights to people. Opinion of George Hotz or Hakon Wium Lee has the weight of like 10 points to me, opinion of some rando that knows nothing but php 5.4 and it’s all his fucking world and it’s his religion because “damn that stupid frontend faggots”... his opinion has a negative weight. If he says “X sucks” I take a look at X and chances are it’s decent
-
theuser47814yJS is fine in backend for scripting, util and other small tasks you would usually do with a dynamic language. You can even use Deno these days.
-
The everyone hates JS/PHP would is a dumb generalisation IMO.
They both have their places, pros and cons.
I'm personally more on the JS side (including Node.js) but if I need a backend that needs to handle loads of request and be efficient I'll learn Go/Rust (depending on the use case and team) and use that instead.
Just like in other communities, some people have the "I hate X" as their personality or something as silly as that, so there will always be a few people who hate a language (the most common ones being PHP, JS, Java and Python).
In any case, that shouldn't deter you from using what suits your needs (regardless of it being in our out of your comfort zone). -
I honsetly admire JS over php. I think its better than php.But lets face it
THERE ALL SHIT -
@uyouthe
The only thing node is exceptional at is regex. Even that advantage has dwindled of late. -
kiki353894y@SortOfTested you’re talking about newest php? If so, you are maybe right because I haven’t tried them personally. I have hopes for deno though
-
@uyouthe
It's a snail race, honestly. It doesn't excite me.
I linked heni some trivial .net code the other day that was able to spin up, reflect properties on an object's RTTI, process all cmdline arguments from -,--,--k=v, grab the appropriate properties and serialize the typed object structure in 207ns avg over 3000 serializations, aggregate 0.6ms for a 2 point structure with ignorable data in args. They're also launching a scripting story with top level async/await for the runtime that is looking with 10ms startup overhead in dotnet 5 preview 5, which means the java ecosystem will follow suit soon after.
Node or php compared to that is a looking more and more like a bugatti vs a monkey on a tricycle. -
wicho25604y@SortOfTested also could you extend on if it isn't muktithreaded, you don't use it on a server?
Both are honest questions -
@wicho
- less shit
Better typing support, you'll rarely see a 3000 line js source file.
- multithreading
The scale model of spinning up multiple processes of the same application to accommodate n-core hardware configurations is broken. You pay bootstrapping, runtime, cache costs n-times, and it forces you to the slowest IPC models and inevitably bottlenecks. Multi-threaded applications share the same memory and require no IPC to saturate a given hardware configuration. -
wicho25604y@SortOfTested Gotcha! Thanks,
But a 3000 lines source files doesn't talk shit about a language, it talks about the developer.
I've seen 3000k lines on Python and C#. Not in JS still cause I haven't touched it on a backend side.
Is JS implicitly multithreaded? Python is not, but I love Python's implementation of it -
theuser47814y@wicho Nope, it does have Event Loop in order to execute async, but there is no concurrency. Not really sure what "implicit multithread" means though.
-
wicho25604y@theuser Thanks, what I'm trying to say is that you don't have to explicitly code in a multithreaded way. It will take whatever it can run in MT mode and run it without you actually coding it that way.
-
@wicho
There's this concept that exceptions don't make the rule. You can hand waggle all you want, it doesn't make it less true 😋
Neither php, or js are multi-threaded -
wicho25604y@SortOfTested I thought you said js was multithreaded. for that I'm sorry
I'm not defending any languages, I've seen shit in all of them. -
kiki353894y@SortOfTested rust is better blah blah blah. I’m happy that I only have to know one language to write everything I want and it’s fast enough
-
@uyouthe
It's whatever you want to do. For me it's the difference between losing my ownership stake to VCs due to overcapitalization and dictating the terms of my cash out. I can't afford be flippant about my resource overhead. -
kiki353894y@SortOfTested please elaborate. How exactly is that abstract performance difference in some cases is related to business stuff?
-
@uyouthe
We've run the same workloads on node, and dotnetcore (APIs) and micronaut (graphql). I needed 5-10x the hardware to run the same work on node at reasonable load.
I can't justify node for workloads when I can save 3 senior FTEs worth of cloud resources using other runtimes. Conversely, I also wouldn't consider user some shit like Blazor for the front end. Boils down to No golden hammers. -
kiki353894y@SortOfTested ah, this. Now I understand. My projects are just child’s play compared to yours
-
@uyouthe
That's not true, they have different requirements 😋
I have annoying customers pounding the crap out of the servers. Don't get into this business. -
kiki353894y@SortOfTested my peak was when my static html page I made in two hours got product of the day award
-
kiki353894y@SortOfTested why use bitwarden when you can have the C R U S T Y T O W E L A P P
thanks for the idea
I literally won't ever understand:
Everyone hates JavaScript and despises using it.
Everyone also hates PHP.
So to get rid of PHP smh we decided to use js in the backend, too? And that shit is working and a lot of people enjoy this? Everything is fucked up
random