[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y ] [Home]
4chanarchives logo
is node.js /g/ approved?
Images are sometimes not shown due to bandwidth/network limitations. Refreshing the page usually helps.

You are currently reading a thread in /g/ - Technology

Thread replies: 86
Thread images: 11
File: dkTVMqw.png (17 KB, 548x213) Image search: [Google]
dkTVMqw.png
17 KB, 548x213
is node.js /g/ approved?
>>
>>54837814
No.
>>
>>54837814
it's our favorite language
>>
>>54837814
>if (
>if(
It's funny how webdevmonkeys can't even code in their """superior""" language
>>
>>54837814
>callbacks
>mixed quotes
>string concatenation
>`== true`
0/10 would not hire
>>
>>54837814
It's a meme.
>>
of course
its' webscale
>>
>>54837814
Node + typescript = godmode
>>
node replaces PHP
>>
>>54837864
>>`== true`
Wow. Do people really not know that you should use '==='?
>>
Masturbating is the only thing /g/-approved.
>>
>>54837950
Are you trolling? You shouldn't use it at all for booleans.
>But you can't be sure that it's a boolean.
Then there's something wrong with your code.
>>
>>54837814
>simicolons
you are truly worse than the jews.
>>
>>54838201
you are retarded.
ever since es5 you should only use ===
>>
>>54838201
This. Don't fight JS on truthy/falsey, lean into it and take advantage of it, you can get creative.

>>54838293
Yes, but `=== true` in this scenario is still a code smell. See above.
>>
>>54838156
>not doing nofap
pleb confirmed
>>
File: 1405986993826.jpg (48 KB, 1280x720) Image search: [Google]
1405986993826.jpg
48 KB, 1280x720
>>54838293
>===
>>
>>54837814
Node.js is a shitshow just like everything else created by code camp tier javascript webdevs.
>>
>>54837814
>is node.js /g/ approved?
As you can see from this thread, absolutely not. Quite the opposite. If, however, you instead ask
>is node.js useful and practical for creating web application backends?
the answer is yes. It's extremely well supported and in wide use by everyone ever. It has many shortcomings but tooling mostly makes up for them.

It's possible to create shitty codebases with it, but also possible to write large, solid, readable, maintainable, performant ones. Tip: Use ES6 religiously, use Promises to minimise callback hell, don't be afraid to make very liberal use of the extreme number of tiny support libraries instead of re-inventing the wheel, and use a testing framework.

I've been using it for work for the last ~6 months. I was unhappy at first, having been convinced of its awfulness by all the internet memery. The truth is that, if you know what you're doing and do things right, it's absolutely fine and in fact has many advantages.
>>
>>54838201
>Are you trolling?
I was.
>>
>>54837814
Sublime Text and that awful monokai theme aren't. And JS is shit, everyone knows that
>>
>>54838862
>JS is shit, everyone knows that
I don't. Explain how is shit.
>>
>>54838759
>advantages
Such as?
>>
>>54838999
Webfag please go
>>>/g/wdg is this way
>>
File: Capture.jpg (105 KB, 1268x603) Image search: [Google]
Capture.jpg
105 KB, 1268x603
>>54838999
>>
>>54839090
>>54839095
So you don't know either.
>>
JS is love, JS is life
>>
>>54839133
JS managed to become the language of the internet - something what Java wanted to be and fair enough failed.
>>
File: 1453020605537.jpg (8 KB, 196x250) Image search: [Google]
1453020605537.jpg
8 KB, 196x250
>>54839130
we r just memeing anon. JS is cool, you do you
>>
>>54837814
Backend dev here. Depend on the project. I highly recommend it for data-lightweight projects mostly based around client-client or spammy client-server communication.
Other than that.. it's fucking javascript man.
>>
>>54839157
no it isn't; stop trolling the pure web devfag
>>
>>54839082
I covered most of them. Popularity, support, availability of staff, library ecosystem, toolage.
>>
>>54839095
fizzbuzzes in haskell have fun
>>
>>54837814
YES
It's the future
>>
>>54837814
Only fags hate JS because the creator voted against their disgusting mockery of marriage.
>>
>>54839153
Java failed because it is too complex, webdevfags couldnt understand it
>>
>>54837814
> Don't let your memes be streams
>>
})})})})})})})}


no thanks
>>
>>54838999
Lots of errors and bugs in the language, stupid shit like callback everywhere, too much syntax sugar (JS is NOT class based ffs, its prototype based or whatever thats called), took the worst style of Java (camelCase...) and inserts fucking semicolons if you dare to use allman style everywhere. And thats only 10% of whats wrong
>>
>>54839315
Yep, that happens. Pic related. But it's perfectly fine in practice, unless you're using a worthless editor.
>>
File: 1460373950727.png (312 KB, 311x445) Image search: [Google]
1460373950727.png
312 KB, 311x445
>>54839315
schemefag detected
>>
>>54838345
>code smell
>>
>>54838759
>Tip: Use ES6 religiously, use Promises to minimise callback hell, don't be afraid to make very liberal use of the extreme number of tiny support libraries instead of re-inventing the wheel, and use a testing framework.

I can confirm, those are god-tier tips.


> The truth is that, if you know what you're doing and do things right, it's absolutely fine and in fact has many advantages.

I reached the same conclusion. ES6 really helped make the language decent.
>>
File: 1458857299199.png (364 KB, 411x411) Image search: [Google]
1458857299199.png
364 KB, 411x411
>>54839467
>extreme number of tiny support libraries instead of re-inventing the wheel

http://blog.npmjs.org/post/141577284765/kik-left-pad-and-npm
>>
>>54838345
>Don't fight JS on truthy/falsey

Agreed. Once you learn JS well, the usage of == versus === will be second nature.

Don't pay attention to people who say to always use ===. There are cases where == will work fine, and is actually a more concise way of expressing the semantics you would want.

Sure, it's a bit more complicated that it would have been if they had designed the language better, but the rules aren't very hard to learn.
>>
>>54839651
Agreed, they have to work on it. But as your link shows, they're addressing the problem by introducing some policy changes.
>>
>>54838759
>make very liberal use of the extreme number of tiny support libraries instead of re-inventing the wheel
Please don't. It's not reinventing if you just put the parts together.
>>
>>54839187
All of those things exist with other platforms though. What about technical advantages that actually make Node better for writing x, y or z types of service?
>>
File: 1464459539705.jpg (50 KB, 432x360) Image search: [Google]
1464459539705.jpg
50 KB, 432x360
>>54839651
https://github.com/jezen/is-thirteen
>>
>>54839266
>Java failed because it is too complex, webdevfags couldnt understand it
Java is shit easy, its like sticking together lego blocks. It failed because all the libraries are built into the language, Java is a platform that traps you into only using Java for everything and having to wait for people who maintain the Java platform to provide features
>>
>>54839860
https://github.com/jackdcrawford/five
>five.tooSlow() // 5, with a ~500 millisecond delay
Kek
>>
>>54839363
What is typescript, fucking pajeet
>>
>>54840374
>not PureScript, Elm or GHCJS
kys
>>
>>54837814
No

Go away
>>
>>54837814
>if(!user.local.isRegistered == true)
what the actual fuck
>>
>>54840615
>not writng in ocaml and compiling to javascript
>>
File: 1464203119912.jpg (30 KB, 367x390) Image search: [Google]
1464203119912.jpg
30 KB, 367x390
>>54841148
>not writing in Rust and compiling to WebAssembly
>>
>>54838999
It's just the opinion of retards that can't figure it out and at the first road block go "REEEE FUCK THIS LANGUAGE".

JS is a beautiful, versatile language but admittedly not always the correct tool for the job.
>>
>>54837814
Python Flask will consume all.
>>
>>54837814
Yes.

>>54837864
You don't have a choice :^)
>>
>>54839082
>High performance (V8 is fastest compiler ever written for a dynamic language)
>Functional
>>
File: wormactuated1cn.webm (1 MB, 880x732) Image search: [Google]
wormactuated1cn.webm
1 MB, 880x732
An obligatory physics simulator written in JS.

>mfw /g/ can neither physics nor javascript
>>
>>54842341
>what is LuaJIT
>>
>>54842407
i can write that in java in 25 minutes
>>
>>54842407
>JS physics simulator
Welcome to hell.
>>
>>54837814
Fuck no
>>
>>54842726
plz do

>>54842769
Just 4x slowdown compared to C++. I can always port it or some parts of it to C++.

>>54842686
LuaJIT is already abandoned, it has been ~3 years as it has been superseded by V8.
>>
>>54837814
of course
it's web scale
>>
>>54837859
>webdevmonkeys

Still looking for a job? Living with your parents?
>>
>>54841228

Fuck off rust cuck
>>
>>54842826
>Just 4x slowdown compared to C++
It's more than that if you consider the lack of proper multithreading.

But I digress. Quick visual projects in javascript can be fun.
>>
>>54838630
JavaScript is more efficient than Python. Just drop the meme. JS is the scripting language of the future.

https://benchmarksgame.alioth.debian.org/u32/compare.php?lang=v8&lang2=python3
>>
>>54842940
Honestly though, python is still more useful for server side stuff.
>>
>>54842726
You can't even fizzbuzz. And you can't write any kind of physics simulator in Java.

So fuck off and shut the fuck up, kid.
>>
>>54839860
>We own the name 'thirteen'
How is this allowed? Owning a LITERAL NUMBER AS a Name?

Csptcha: Saint Yves square
>>
>>54842407
>snek simulator
>>
File: 1463051103089.jpg (36 KB, 640x480) Image search: [Google]
1463051103089.jpg
36 KB, 640x480
>>54843021
being this mad
>>
>>54841228
> WebAssembly
Does this even exist?
>>
>>54843282
I don't know if there's a working beta or anything but it is in the works
>>
>>54839860
>is(2003).yearOfBirth(); // true

Oh jesus. This is great.
>>
>>54842940
>V8 engine which compiles JS down vs interpreted Python 3 with no PyPy

Yep, seems like a reasonable comparison...
>>
Let's try again, but in a different approach:

Are you a NEET?

Do you approve of node.js?
>>
>>54843476
>NEET
no
>approve of node.js
no
>>
>>54843346
If Python were standardized (like ECMAscript) and PyPy would support 95% CPython libraries it would make sense to compare them directly. But these assumptions do not hold. I like PyPy though and I have used it. The 10-15x speedup is very real on my data manipulation tasks.

>>54842920
>But I digress. Quick visual projects in javascript can be fun.
Yup. And once you are done with the exploratory phase you can always port to C++.
>>
>>54837814
absolutely not. they are braindead retards still doing php.
Thread replies: 86
Thread images: 11

banner
banner
[Boards: 3 / a / aco / adv / an / asp / b / biz / c / cgl / ck / cm / co / d / diy / e / fa / fit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mu / n / news / o / out / p / po / pol / qa / r / r9k / s / s4s / sci / soc / sp / t / tg / toy / trash / trv / tv / u / v / vg / vp / vr / w / wg / wsg / wsr / x / y] [Home]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
If a post contains personal/copyrighted/illegal content you can contact me at [email protected] with that post and thread number and it will be removed as soon as possible.
DMCA Content Takedown via dmca.com
All images are hosted on imgur.com, send takedown notices to them.
This is a 4chan archive - all of the content originated from them. If you need IP information for a Poster - you need to contact them. This website shows only archived content.