[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
So, anon, why aren't you using node.js?
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: 103
Thread images: 16
File: nodejs.png (2 MB, 2560x1440) Image search: [Google]
nodejs.png
2 MB, 2560x1440
So, anon, why aren't you using node.js?
>>
>>53075797
try harder.

this thread will probably only hit 20 replies, if that

that one Linux b8 thread where the faggot was posting blurrycam pics and downloading Rufus.Exe cleared 300

please try harder
>>
>>53075797
because it's been taken over by SJWs along with the rest of github
>>
>>53075873
shiii
>>
I want to.

What can you do with this? I honestly don't know....
>>
>>53076105
Get yelled at by fat trans feminists when you submit PRs
>>
>>53075797
>tfw I'm not using it but the beta programmers I boss around are
shrug.jpg
>>
File: erlang-motherfucker.jpg (60 KB, 1600x1340) Image search: [Google]
erlang-motherfucker.jpg
60 KB, 1600x1340
>>53075797
Because I prefer to use a system actually designed with distribution, fault-tolerance and scalability in mind?
>>
>>53076247
Is that internet explorer as a dark silhouette over a red ominous background ?
It looks as if it's smiling with evil intent...
>>
I don't think Javascript is good for backend.
>>
File: 1451092342539.png (49 KB, 172x159) Image search: [Google]
1451092342539.png
49 KB, 172x159
>>53075797
I do not because:

1. node.js "popularized" unit testing because there's no compile stage and most javascript will accept trash unpredictable code. You'd be insane to run any nodejs stuff in prod without extensive unit tests.

2. asynchronous = unpredictable. A certain level of asynchronous programming is required in networked programming.. but you limit it as much as possible because it creates nebulous logic.
>>
>>53075797
But I already do anon.
>inb4 hurr everything should be written in assembly
>>
>>53075797
It's a meme.
>>
i haven't found a suitable faggy hipster startup yet
>>
>>53077281
>only options are assembly and javascript
>>
File: 1384714360590.jpg (65 KB, 580x346) Image search: [Google]
1384714360590.jpg
65 KB, 580x346
>>53075797
I am, I'm working as node.js developer and make game servers in it.
It is not that bad, but you have to absolutely know what you are doing and structure your code perfectly. The code can quickly turn into shitty mess full of bugs.
Also node.js is slow, hard to debug, don't have strong typing, autocompletion practically doesn't exists and it's as shit as Javascript itself.
But like every other tool, it's good when you use it correctly.

>>53076105
It's good for small internet programs like IRC bot, single-page website working as front-end of your computer/bitcoin miner/whatever, things like 4chan images downloader etc.
>>
>>53075797
>So, anon, why aren't you using node.js?
Because I'm not a web developer (anymore)
>>
because using callbacks for concurrency sucks
>>
>>53075797
I am, my friends tutored me into it
>>
>>53077755
>autocompletion practically doesn't exists
stop using notepad
>>
File: 1454721189151.png (108 KB, 295x194) Image search: [Google]
1454721189151.png
108 KB, 295x194
>>53077755
>autocompletion practically doesn't exists
>he doesn't know he can set up typescript definition files in most editor to get autocompletion even if you don't use typescript
>>
File: 1444967270379.gif (2 MB, 432x600) Image search: [Google]
1444967270379.gif
2 MB, 432x600
>>53077272
>mfw server at work marked "DO NOT LOGOUT ADMINISTRATOR" with thousand cmd-windows running nodejs-shit
>>
>>53075833
>20 replies
REEEEEEEEEEEEEEEEEEEEEE
>>
>>53077845
I'm usign Atom.
Autocompletion does work somehow when you work inside one function or file, but when your program is scattered through many files Atom only remembers tokens you wrote before. It obviously can't deduce what type is something because JS is weakly typed and everything can change unpredictably during runtime.

>>53077888
Well I didn't know. Anyway the project got over 11k lines of code now, so I guess it would be pointless to move to typescript now.
>>
>>53077981
visual studio code gets full autocompletion and maybe atom too

you have to
npm install -g typings


typings init
in the project folder

and then
typings install --save --ambient express
or whatever module you need

then it just werks
>>
>>53077981
>>53078001
also you DON'T need to be using typescript to benefit from its autocompletion, it works even with normal javascript, which I'm using
>>
File: 1364078498750.jpg (61 KB, 1205x881) Image search: [Google]
1364078498750.jpg
61 KB, 1205x881
>backend javascript
>>
>>53078038
get with the times gramps
>>
>>53078064
>not go, using superior goroutines, channels, segmented stacks, type embedding, structurally typed interfaces
get with the times gramps
>>
>>53078001
>>53078008
I did it, and installed atom-typescript package.
But how can I create these typings of my files in project? I managed to generate typings to basic node modules but can't figure out how to do it to my own code.
>>
>>53078273
no idea really, I haven't got to write any modules yet
>>
>>53078285
https://github.com/TypeStrong/atom-typescript/issues/315
Well whatever. Thanks for help anyway.
I just wish I could write this server in Rust.
>>
apt-get install npm && npm install bower && bower install yourmom.js
then grunt install global yourdad.js
and it just werks :^)
>>
>>53075797
I was but now I'm getting bored of it. ES2015 and ES2016 are taking JS in a really lame enterprisey direction. Coffeescript, Dart, Typescript, etc are all just pointless crap and I wish they would go away.

The core language and nodejs I think still excel when it comes to writing quick-and-dirty servers to glue things together but aside from that I would not use it in production. The only server technology that is more of a meme would be ruby on rails.
>>
I prefer getting a response out to the client in less than 500 ms.
>>
>>53075797
Oh but I do - and a better question why the fuck would you use anything else given the chance to use based node?
>>
>>53077171
You don't think?
Or you Don't Learn
>>
>>53077888
He needs Visual Studio or Eclipse to hold his little hand - try atom
>>
>>53078620
sorry I wasn't born learned
>>
>>53078620
Just use vim you cunts
>>
>>53078127
>Not Rust, writing your own multipart form-data parser, manually setting headers, and working directly with byte streams
get with the times gramps
>>
>>53078341
Rust isn't really ready for web yet in my experience. None of the "popular' frameworks are async. If you want async, the only option I know of is rotor-http, which will require a lot of work on your part; e.g. writing a parser for form data.
>>
>>53075797
I use it on work, I only get paid like $500 a month.
>>
>>53078825
that's pretty shit if it's your full time job
>>
>>53075797
>>53078597
Because the standard library makes PHP look solid and Perl look great.
Fucking addons for every little shit.
>>
>>53077755
>It's good for small internet programs like IRC bot, single-page website working as front-end of your computer/bitcoin miner/whatever, things like 4chan images downloader etc

Remove "single-page website" and everything your just said can be replaced with Python that does it better, also for single page website you don't need nodejs, you only need javascript for the front end, its not mandatory for the back end.
>>
It's slow and rapes my server's ARM cpu
>>
But I already am. Just learning for now though.
>>
>>53077272
>1. node.js "popularized" unit testing because there's no compile stage and most javascript will accept trash unpredictable code. You'd be insane to run any nodejs stuff in prod without extensive unit tests.

You'd be stupid to run anything without unit tests, because unit tests catch logic errors and ensure that your code is actually doing what its supposed to do. It has nothing to do with syntax errors. We have linters for that.

>2. asynchronous = unpredictable. A certain level of asynchronous programming is required in networked programming.. but you limit it as much as possible because it creates nebulous logic.

Only if you're a dumbass. Use promises.
>>
>>53079151
By better you mean slower?
>>
>>53075797
Someone please explain why the fuck I should use JS for backend development considering it's 200 times slower than C, 100 times slower than Common Lisp and 20 times slower than Python?
>>
>>53079671
source on these figures pls

Not to question you about it but I'd like some stats for my employer
>>
>>53079671
Use Java only then.
>>
File: 1364045821070.jpg (13 KB, 238x279) Image search: [Google]
1364045821070.jpg
13 KB, 238x279
>>53077921
>not knowing how to run node apps as services

Its not node's fault that you work with retards.
>>
>>53079686
https://benchmarksgame.alioth.debian.org/

That site has gone full web 4.0, it's apparently impossible to get the clear dense result lists now. There were even some threaded demos JS couldn't run because it didn't have the means to do so.

If someone knows where the good old shootout is, pls gib.
>>
>>53079671
Someone please explain why the fuck I should use C for backend development considering it's 10 times slower than manually optimized assembly language.
>>
File: 1452311715509.jpg (145 KB, 1280x720) Image search: [Google]
1452311715509.jpg
145 KB, 1280x720
>>53079671
Node is actually written in C

Because it uses the event loop to actually spend its time doing useful things instead of sitting around waiting for IO.

Its also nice to have no context-switching penalty when switching between frontend and backend, because they both use Javascript which is the best language in the world.
>>
because serializing/deserializing JSON from/into strongly-typed object models on the backend keeps your shit from getting too wacky
>>
>>53075797
Why would I? It's completely useless.
>>
>>53079836
>best language
csscuck detected, opinion discarded
>>
>>53079882
Not liking javascript is a meme-tier opinion.
>>
>>53079882
Not him but it really is the best language available. Ubiquitous, a LISP in C clothing, and after ES6 it's vastly superior to meme languages like Python (which is slowly dying thanks to the terrible Python 3 transition) and Ruby.
>>
File: 1425858988406.jpg (3 KB, 124x87) Image search: [Google]
1425858988406.jpg
3 KB, 124x87
>>53078797
Except I'm making server for mobile game with websockets, not web stuff.
I even made alternative server for that game, synchronous(I didn't used MIO) with threads and non-blocking sockets and it worked much better and was much easier to write. Yet my boss didn't liked rust and wanted to have everything in the same technology so my team have to keep dealing with javascipt.
Rust will never be suitable for web development, it's a system language. But it's pretty great for servers like this where speed and memory efficiency is important.

>>53079151
Yeah, python can do the same and probably more. But it doesn't really mean it's better. I would avoid it just as much as I don't want to write in node.
>you only need javascript for the front end, its not mandatory for the back end.
Yeah, but I was talking mostly about using node as backend to gain information about system/processes. Of course Python and PHP can do it as well.

>>53079882
Rust is the best language for making fast, critical programs like drivers and servers.
Lua is best scripting language.
PostgreSQL is best database.
Pro tip: it's true.
>>
>>53080023
>PostgreSQL is best database.
You honestly have no clue what you're talking about. Why would this ever be considered the best when things like mongoDB and Druid are around.
As time goes on this place gets filled with more and more people who have no clue how the industry works at all.
>>
Because golang and erlang exist
>>
>>53080804
>mongoDB

(You)
>>
>>53080827
>sticking up for shit like PostgreSQL
>in 2016
nice meme kid. Unlike you Ive actually worked on projects that are worth a damn.
>>
>>53080804
Seriously, give me a use case for it?
Other than, some fucking hipster who went from Wordpress > Javascript > NodeJS and now only understands basic JSON.

How is an "object" based database any better from a RDB?
>>
>>53080866
>projects that are worth a damn.
Yeah, you surely worked on project largest than:
>Skype
>SourceForge
>Apple
http://www.postgresql.org/about/users/
>>
>>53080888
Show me a company thats running on a large distributed system using a RDB. Thats your use case right there.
Most companies ditch it because RDBs are complete shit when it comes to multi-master setups. I would know, I oversaw one for 5 years.
>>
File: spaghetti.png (77 KB, 612x355) Image search: [Google]
spaghetti.png
77 KB, 612x355
>>53079671
>20 times slower than Python?
It isn't. Python is literally the slowest. Even Tcl has its moment of glory against it.

CPython was a joke to begin with and while PyPy may be a noble effort, it is seriously too underfunded to get anywhere in the next ten years.
>>
>>53077921
Here you go.
https://github.com/Unitech/pm2
>>
>>53080992

Ruby is the slowest actually
>>
>>53081316
Actually, no. CRuby is faster than CPython these days. What's more important: Ruby has much better - as in actually finished, mature - alternative implementations. Not only for performance, as there is no Python equivalent mruby.
>>
>>53075797
Because Erlang and Elixir exist.
>>
>>53081316
Nah. Ruby 2.0 and greater is faster than CPython on most tasks these days. They've been working on the GC and performance issues while Guido has been jerking off on a version of Python nobody uses. Python 3 is even slower than 2 as well.
>>
>>53080982
KEK

Literally the opposite is true
>>
>>53075797
>he doesn't just use gemini
>>
>>53077928
:^}
>>
File: 1455584596489.jpg (16 KB, 326x241) Image search: [Google]
1455584596489.jpg
16 KB, 326x241
I really enjoy using Perl, and Perl is still a surprisingly viable language for backend web development. Its only issue is async stuff, but everything else out there that isn't node is weird about it too. Probably helps that weird is synonymous with "not standard" in my mind.
>>
>>53081554
Got any proof to back that up?
>>
File: 1385987930368.gif (974 KB, 285x223) Image search: [Google]
1385987930368.gif
974 KB, 285x223
>>53075797
I fucking love node. I love how it just werks. I love that it uses the same language as the front end. I love that I can use ES6 without worrying about browser compatibility. I love that it feels like I'm building the server from the ground up, and I love how Node isn't just for servers, but can be used for other surprising things (such as hardware software).

Though, I hate that the language doesn't feel scalable (I've never been good at making large applications with JS). And I hate hate that there isn't a big CMS for it. It makes it not currently worth using the platform for any reasonably large websites.
>>
>>53082564
>Its only issue is async stuff
No, the biggest issue is deployment and dependencies.
Calling CPAN a working package manager is a fucking lie.
>>
>>53078892
>it's your full time job
yes, but I live in Russia and it's like 45k in our currency. It's very okay salary considering I am not living in moscow.
For example, acerage salary in our city is 20k
>>
>>53083203
This.
I don't love it as much as you, but modern strict Javacript is really nice. It's much nicer and easier to deal with.
>>
>>53083455
ES7
S
7
>>
>>53080804
>>53080866
If you think MemegoDB is greater than PostgreSQL in every way and in every situation, you have no idea what you're talking about, and I'd guess you've never used Postgres. Their are uses for each.
>>
>>53083622
I KNOW MongoDB is greater than PostgreSQL in every way thats relevant. Ive managed an entire companies system using PostgreSQL like I said for 5 years. The benefits of switching to MongoDB or another NoSQL for that company and others Ive worked with were astronomical in scope.
Kids like you believe:
>oh everything has its uses which means everything is equal.
Which is complete horseshit. Of course it has its uses but in general those uses are completely irrelevant in a production environment that actually matters.
I cant believe I had to type all of that.
>>
File: 1440278792837.jpg (127 KB, 550x550) Image search: [Google]
1440278792837.jpg
127 KB, 550x550
>>53083798
>it's better I promise. Just trust me you dumb fucks.
>>
>>53075833
and now we're at 90
because /g/ just loves taking the bait
>>
>>53084081
http://www.dummies.com/how-to/content/10-advantages-of-nosql-over-rdbms.html

for you dummy.
>>
>>53079753
https://benchmarksgame.alioth.debian.org/u32/compare.php?lang=v8&lang2=python3
it appears you're in the wrong
>>
>>53083798
I don't know where the fuck you pulled equality from. But if both have uses (they do, and I challenge you to provide an article from someone reputable that says otherwise), there is no need to place one over the other. You simply use each when you need it.

By your account, I thought I'd provide you with a list of people who only make shit software. http://www.postgresql.org/about/users/
>>
>>53084207
Funny thing is, I had extensive access to the DBS at Berkly.
Guess what, they don't even use the shit. They had a routine years back where they used PostgrSQL and kept the implementation in the documentation.
I would bet my left arm that more than 80% of the people on this list don't actually use PostgreSQL for serious work. All of them are either sub-routines or some small module they tested years ago.
And those of this list that actually do use that shit either are doing irrelevant work or are idiots. Either way they would be better off with something else.
>>
>>53084299
Can I ask what you define as relevant work? I mean Jesus, do we need the elitism? Unless you are doing scientific research, I would define most of what is done with computers to be irrelevant. Honestly, what do most companies produce that is of value? (protip: just because a lot of people use your product doesn't mean it does anything worthwhile)

But I don't go around telling other people their work is meaningless.
>>
File: 1382775445968.gif (2 MB, 200x150) Image search: [Google]
1382775445968.gif
2 MB, 200x150
>>53082887
>>
Have to since one of the clients demands from a mobile project one of the projects managers signed to homologates no only the node but cordova and it's own framework for use.
>>
I have to because of this stupid fucking class.
At the moment I'm trying to figure out how to get a request from the client to nginx to node.js.
>>
>>53075833
20
>>
what is the best way to get into node?

i have a project and i am getting BTFOd
>>
>>53085206
stackoverflow & suicide
>>
>>53078608
I've looked into node.js and it just isn't very good.
>>
>>53085206
download it.
npm install <whatever your project is>
run it
there you go, you're done.
Thread replies: 103
Thread images: 16

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.