If node.js is so bad, how come there isn't anything better than node.js?

If node.js is so bad, how come there isn't anything better than node.js?

Other urls found in this thread:

theregister.co.uk/2016/03/23/npm_left_pad_chaos/
haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/
github.com/channelcat/sanic
blog.digg.com/post/141552444676/making-the-switch-from-nodejs-to-golang
wiki.haskell.org/Parallelism_vs._Concurrency
github.com/audreyt/node-webworker-threads
github.com/doowb/ansi-colors#Related
twitter.com/SFWRedditVideos

There is Golang, which is much better

Every damn workplace asks for Node.js knowledge. Should I actually bother learning this shit?

If you want a high paying job, yes, you should

Nodejs isn't bad. It does what it's supposed to. Javascript can be written well. Unfortunately, mass produced pajeet-tier JS work gives both JS, and consequently Nodejs a bad rep. I learned it just because it's in very high demand at the moment, and while I'm not enthusiastic about it, Electron (built on node) is very useful for cross-platform development and is becoming more popular.

Golang is still being fleshed out, but has solid potential to be "better" than Nodejs. Needs more widespread adoption.

RoR also has the advantage over Nodejs of being very fast to develop in. JS, written well, is still not as pleasant or intuitive a language as Ruby.

node.js is great for handling lots of realtime async requests

Node JS is superior to all web App program
Web socket work so f* fine and fast
Working tiwh Nginx , it's so easy

Well, I guess it ain't going anywhere. Shouldn't be too difficult to learn either. At least I won't get bored over the summer.

Django with Python is superior in every way possible

you can use web socket ?

every language supports web sockets

aeh ok ^^

Is php worth learning still?

Of course.

Yes. There is also a lot of high-paying job for it.
I've heard that it was going to die for 15 years at least.
Bullshit. It won't go away anytime soon.
Too powerful and useful, you can throw any php app even on a shitty Pajeet server lost in the middle of India. + Frameworks like Symfony make it extremely scalable and powerful.

inb4 : t. SensioLabs shill

Here in the Midwest most employers don't even know what it is. Spent a year working with it for nothing.

there is

its called php and python

Isn't Django the king of web development?

i would love it if it handled json data nicely but it doesn't at all it's fuckin trash

Even if it dies, you'll end up working in legacy systems. Which is C-O-M-F-Y

javascript is an awful language and I can't wait for wasm to kill its stranglehold on web programming

ppp

The problem with JS in general is that its a very permissive language, and you can make a lot of really shit code fast if you dont know what you are doing. But that dosent mean that Node.js is inherently bad, it can be blazing fast and stable if you're aware of what you are doing and follow some basic rules.

There is it. Its called Clojurescript

There's nothing inherently wrong with Node.JS. The problem is what people do with Node.JS.

The ecosystem has half a billion different task runners and frameworks built on top of Node. These things seem to be on an endless quest to abstract ever further from what's actually going on and make the whole thing impenetrable to people who can't spend the time necessary to keep up.

The community has developed an obsession with pulling dependencies for some infernal reason, case in point, the removal of left-pad (an 11 line library that added a single function for padding the left side of a string) broke the entire Node ecosystem because more than a few people thought that was something it was worth taking on another dependency for.

Node.JS itself claims to be fast, it's proponents claim it's fast and it simply isn't. Compared to any compiled language it's hopelessly slow and the lack of true multi-threading means it scales like shit, especially if it has to do any non-trivial processing in a request handler.

While I appreciate the utility of Electron in a world where there aren't really good cross platform languages (at least, not when the mobile ecosystems are considered) and when it seems to make things that look twice as good as what any other UI toolkit can manage, it's an abomination that is annihilating the concept of performance at an alarming rate.

Here in Finland every "programming"-related job requires Node, Javascript, CSS, HTML and Ruby on Rails. Sometimes C#, Python and Django are a plus. Rarely see other languages in the job requirements.

Move away from Helsinki you dumb nu-male.

electron is a shit show and will continue to be until they either sort out chrome memory usage or drop it for something else

It ain't much better outside Ring 3.

Crystal is MUCH better and has 3x speed

Its annoying to hear the way the developers claim that having little web handling functionality is an advantage or that it helps grow a "community"

>Hello this is your first tutorial for node
>Download these five packages to get started
How do I do this stuff in node?
>You don't need to worry about that, just use the packages
What if I don't want to rely on packages that seem to break every year?
>Too bad, you probably don't want to be part of our community

define better

The power of nodejs is the community behind it


>theregister.co.uk/2016/03/23/npm_left_pad_chaos/
>haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/

>If node.js is so bad, how come there isn't anything better than node.js?

Flask + Zappa + AWS Lambda

Right now it's a darn nice tool for building a back end that can quickly adapt to the needs of a growing company. However I would recommend something else like Golang or Java once you start doing the second or third major rewrite of your codebase.

There is something OBVIOUSLY better. C++14 with C++ Core Guidelines make. It is type safe and memory safe, not insecure as old C++. Do I need to say anything about speed, compatibility with old code, compatibility with system libraries ABI without wrapping, reputation, usefulness, job opportunities?

C++ is not and will never be memory safe or type safe. But ever since C++11, it has been easy to write programs which are.

All we need now is a proper modules system and I'll be happy. Oh, and variants.

>isArray package
>one line of code
>800k downloads/day

my sides

>C++ is not and will never be memory safe or type safe
It is. Just use clang-tidy.

>variants
LOLOLOLOLOL

What's a good site for learning Node?

What's wrong with variants?

Redpill me on this Sup Forums

node vs Django?

expressjs.com
But take this in consideration

Just implement it with an union. It's just a shared memory area. Such concept does not exist in strong typed languages.

Bare unions don't carry information about the type it currently contains. To gain any degree of certainty about need to box it in a struct with an additional enum to tell you what type it really is, and by the point you implement all the member functions to deal with it you just have a shitty handrolled std::variant.

>you just have a shitty handrolled std::variant
actually I don't have one and I never needed a variant

You're not thinking with types then. As far as POOlangs go, C++'s type system is pretty great.

You mean flask?

>node.js is great for handling lots of realtime async requests
I dont think you know what
>real-time
means user.

>C++'s type system is pretty great
I know. There is more than one way of working with such "variant" problems. It's best if the type is evaluated on compile time because it is faster. Faster is better. My opinion.

I have to be quite honest that nothing I used before matches nodejs in plain productivity. The
amount of modules this shit has and how quick is to set it up is just obscene.

>The us had two of the worst people to vote into office why wasn't there anything better

People are lazy to find alternatives, and just bitch about their option

>uhh I ordered a club sandwich, and I got a club sandwich.

>just bitch about their option
so what is your technical perspective of node compared to other languages

theres old and good, never beat, php + mysql stack

One second, I'll see if I can find a library that defines it for me.

From the Github of this package:
>DEPRECATED: Just use Array.isArray directly.

node is fine imo.

go has a shity type system that I rather stay dynamic or actually compile from typescript (a language with generics).

>the year is 2020
>web assembly 2.0 is released
>supports DOM manipulation and vulkan
>allows me to write entire the backend + frontend in either C++ or Java
>outperforms js poojeet code by a factor of 10
>able to deploy 3D games at 80% native performance
>all js developers either get pushed out of the industry or are forced to learn a real language
>node.js and electron die and are ridiculed like cobol is today

How likely is this?

>node.js and electron die

>implying making browsers more efficient won't just make people start deploying games in an electron wrapper

Once electron supports web assembly as a complete replacement for js it will stop being shit, will it not? But it's still pointless. Why download an electron app when I can just access it in the browser and get literally the same results? Why would anyone download discord? If people want to make GUIs with HTML and CSS fucking deploy them via the browser.

I'm fapping to your comment, that'd be great.

Personally, my Electron app scrapes data from a webpage, and then plays those videos back.

I decided on Electron because I didn't want to learn a whole framework to do nice looking UI, and play videos and stuff.

I'd make it in a web browser, but cross-origin requests are blocked by browsers, and requested video URLs are locked to the IP of the client the data was requested from, so I can't do that part on the backend.

Overall, performance is pretty good: at most 5% CPU and 30MB memory usage. My main gripe is the 100+MB application size (~40MB zipped), but even for that I wrote an in-app updater that only downloads the necessary files.

It's good enough that I and some of my friends use it regularly.

>Golang
>Elixir

JS belongs on front-end and it should stay there

>"is there anything better then node.js?"

github.com/channelcat/sanic

Django or any MVC framework is easier to learn IMO

They're completely different things.

First of all the phrase "Node vs Django" doesn't actually make sense. Node.js is a runtime environment for JavaScript. Django is a web framework for Python.

Second, people ITT saying things like "Go is better than JS" don't understand the basics of how programming languages work. Go is a synchronous, statically typed procedural language with concurrency features. JavaScript is an untyped asynchronous scripting languages.

The reality is different tools make sense for different jobs.

Async languages like JS make it easy to handle massive amounts of IO throughput. But you're always going to get some idiot running encryption algorithms and writing to databases from their Node server.
Synchronous languages, on the other hand, make it easy to crunch CPU intensive tasks and read and write from memory. Concurrency makes this even more powerful. But you're always going to get some idiot spending 3x the effort to manage concurrent code just to get close to the performance of a naturally asynchronous solution.

If you want to build services at scale, you'll need both to work efficiently. But for your hobby project it literally doesn't matter so pick the one you prefer.

>Async languages like JS make it easy to handle massive amounts of IO throughput.
no it fucking doesn't. Point in case: blog.digg.com/post/141552444676/making-the-switch-from-nodejs-to-golang

>Our Node service may have handled incoming requests like champ if all it needed to do was return immediately available data. But instead it was waiting on a ton of nested callbacks all dependent on responses from S3 (which can be god awful slow at times). Consequently, when any request timeouts happened, the event and its associated callback was put on an already overloaded message queue. While the timeout event might occur at 1 second, the callback wasn’t getting processed until all other messages currently on the queue, and their corresponding callback code, were finished executing (potentially seconds later). I can only imagine the state of our stack during the request spikes.

nodejs is great if all you know is javascript and you haven't finished the tutorial yet. Maybe if you're going to develop a blog afterwards for yourself. But practically it falls short as soon as you try to scale it in a real world environment.

>how come there isn't anything better than node.js?
There is.

H H
E E
C A L L B A C K
L L


no thanks, even cobol is better

Mijn neger

> webdev
> high paying
kek

You can choose to not use callbacks or libraries that use them.

A A
S W
Y A
N I
C T

Clojure.

you dont know what youre talking about and are just LARPing, node does not have dependencies, when you install a node package it installs all dependencies with the package so it never needs updating and is frozen at its version

are you actually suggesting that C++ be used as a backend web programming language?

Yeah the file size is actually the major issue at the moment.
It includes too much shit you don't need.
It needs a compiler that can detect what features your application is actually using and only compile a package that supports those features.

>Go is a synchronous, statically typed procedural language with concurrency features. JavaScript is an untyped asynchronous scripting language.
Javascript is not asynchronous, the node framework uses callbacks to fake concurrency, there is absolutely nothing in the Javascript language itself that handles asynchronous functionality

theregister.co.uk/2016/03/23/npm_left_pad_chaos/

>Not posting the high-res version

>some patent infringement case at repo level gets packages removed
thanks Mr Larper for that needless info that only makes you look like more of a Larper

>fake concurrency
what the fuck does that even mean?

Only CIA niggers use Node. Real white non-pajeet men use PHP. That's why it powers 6 of the 10 most popular websites in the world.

haneycodes.net/npm-left-pad-have-we-forgotten-how-to-program/

node.js is cancer.

It means there is no actual threads, you have an event loop that listens for callback functions that get fired when they return data

concurrency doesn't require multiple threads. you must be confusing it with parallelism

wiki.haskell.org/Parallelism_vs._Concurrency
>Concurrency can be implemented and is used a lot on single processing units, nonetheless it may benefit from multiple processing units with respect to speed.

also github.com/audreyt/node-webworker-threads

>code reuse is bad

Every Js git repo I've ever cloned has node_packages in its .gitignore. Nobody checks in the packages, even when dependencies are declared with soft/fuzzy versioning and there are hundreds of them.

I don't get it either. Whole lotta trust they're putting in something they have no control over which could easily be compromised. Same reason I never use CDNs for popular scripts

github.com/doowb/ansi-colors#Related Projects

26 modules/packages, each of which is a single line of functional code.
Cancer. The fact you're trying to defend this practice is abhorrent.

>you must be confusing it with parallelism
no, having callback functions wait on a queue is a very fragile way of handling concurrency, any one of those functions that spend too much time processing can block everything

Code reuse isn't bad, creating a dependency on an external resource which you do not control just to accomplish a trivial task is usually bad

>Nobody checks in the packages, even when dependencies are declared with soft/fuzzy
you have a choice between letting node autoupdate to the latest version or freezing all the packages, most web developers will freeze their package versions which eliminates any dependency breakage

I bet you put all your code in one file too.

Will you be learning a real language as well?

>writing backends in C++

So, go ahead and do that.

Been there, done that. While there I rewrote the TCP and UDP.