Javascript

Why do people (read: women and nu-males) love this utter shit language so much?

Other urls found in this thread:

github.com/chrippa/ds4drv
github.com/rdepena/node-dualshock-controller
twitter.com/SFWRedditImages

The same reason why neckbeards love C.
It's the first language they learn and they think they have the right to write everything in that language because they know it top to bottom.

b-b-but you're a WHITE MALE!!!

Because it's super common. Popularity spreads, bro.

I plan on learning Dart, apparently it is a good alternative?

Its the best scripting language, I like Ruby and Python but both Ruby and Python would make for a shitty browser language compared to Javascripts prototype OO. People who hate JS are just tards who cant program and cant give any reason for why its bad. PHP is bad, PHP has been replaced by Ruby and Python for backend web programming. You cant replace JS, its been tried, none of the replacements are as good.

My Wordbress site runs on Bython now? :DDdddd

Dart is used nowhere and I'm pretty sure even Google is dropping it so there's no point in using it. Learn Typescript instead if you want something a bit more comfy that regular JS.

You can use it to make websites (in the browser and on the server), desktop apps, mobile apps, video games, and with embedded/IoT devices.

It's not "utter shit" because you suck dick at it m8

Why do neckbeards on Sup Forums love C so much if the only thing they can program in it is a FizzBuzz?

>php
You realize only node.js is server side, right? Javascript otherwise runs client side which is a huge security issue. Technically asp is far superior since it does both.

Also don't confuse system scripting language with Web scripting language.

Google is using Dart+Angular 2 a lot recently.

It earns me £50k a year making PWAs for clients. Feels pretty comfy

>Ruby
No, ruby is a meme.
>Python
Idiots using a system scripting language for Web. Why not just run a Web server in bash?

What's your point?

>You realize only node.js is server side, right?
Im saying that neither Ruby or Python would make a good client side language to embed in the browser

>Javascript otherwise runs client side which is a huge security issue.
These security issues are unavoidable on the client weather it be Flash, Java applets, whatever

>Technically asp is far superior since it does both.
lol, MS's answer to applets, wow I see where this is going

>Also don't confuse system scripting language with Web scripting language.
why dont you explain to me the difference, there isnt any but I like to see how retards make shit like this up

He didn't, m8. He was comparing as if they were.

Isnt typescript just a layer over javascript? Seems to ruin the point of learning a different language. I guess it's worth a shot since JS isn't leaving.

>difference
Python requires additional modules to work with Web, Javascript was designed explicitly for Web. You can write a user mode driver in python, doing so in Javascript would be beyond retarded.

>unavoidable security issues
That's why you run server side, which until node was impossible in Javascript (hence php)

Fucking WHITE MALE, please.

Why would writing a driver in Javascript be any more retarded than writing a driver in Python?

Javascript requires Web components to process the language. You now have tons of overhead for a simple task.

Are you retarded?

>nu-males
What exactly about programming made anyone a masculine specimen?

Javascript compilers purposely leave out I/O functionality to make it a more secure language in the browser. There is absolutely nothing about the Javascript language itself that would prevent its use in making drivers compared to Python

Are you? It's pretty clear by this point that you're a Web developer and haven't worked beyond.

It's just a codeword for "people I don't like".

It can be fun to program in because of the fast feedback loop (partly due to it being used for web programming, partly due to it being dynamically typed).

It has warts but these aren't as significant as the warts of many other languages. Most of the risks you face can be mitigated through JSHint and thinking about what you're doing.

Nobody who works with JavaScript loves it. We use it because we have to. We use jquery for convenience. Thank you based John Resig.

Because you can write and run programs that will run on literally every single computer out there.

It's clear that you have no fucking idea how programs are even run.

Because no one has made a better universal client-side web scripting language.

Get to work, OP. You could be the savior. But no, you'd rather just bitch and complain.

Typical.

Python includes io components. That's part of the reason many people use it for embedded prototyping.

And so does node.

>thinks system components can be built in Javascript
This is why I hate dealing with Web developers. You have no fucking clue what goes on under the Web server.

>thinks system components can be built in Python

Wow, people actually built that. I'm appalled. Shit, let's just build a flash-based embedded board, good idea right?

You still haven't given a reason why Python is any better.

>doesn't realize some have been
github.com/chrippa/ds4drv

>Can do this in Java
>Can do this in HTML5
What programs are you referring to? If you're talking about ones with a browser interface, there are tons of other options.

Python: Better for lower-level stuff
Javascript: Better for Web development

I never said one was better than the other in all aspects.

Both are awful for lower-level stuff.

Chef works pretty well, and deals exclusively with Python.

github.com/rdepena/node-dualshock-controller

>Chef
>low level

So the guy who made JavaScript indeed is the ass Mozilla SJWs painted him to be (if for reasons entirely different)?

After looking at benchmarks node does come out in many cases. Javascript drivers are just as much of an abomination as Python drivers. Python isn't a web language, I don't understand why people insist on making it one. Javascript is capable of doing the same things, sure, but for managing thousands of systems, python is and always will be the goto.

With that stated, I think the biggest problem I have with javascript is the pathetically low barrier for entry. Given that it's sufficiently fast if coded CORRECTLY it can be used for many things. Due to the barrier being so low we have 2 billion fuckwits who couldn't code a hello world application in less than 10 lines and 5 people who are actually capable developers.

Please tell me what advantages Python has over Javascript that makes it the goto for managing thousands of systems.

Node is asynchronous. If you run a series of system management commands out of order (as is guaranteed in javascript) you can seriously fuck things up.

>what are promises

>What is working around a programming language to make it do something it wasn't designed for?

>wahh wahh I don't know how to use async
You know there are synchronous versions of pretty much everything in node right? The reason why no one uses them is because blocking the entire thread while waiting for an IO event completely destroys performance.

You realize that's not a problem in Python right?

I learnt Basic first and now I'm a #C++ missile
doest that make me alpha?

It's not a problem in node either when you use the synchronous versions, but that's fucking retarded.

>but that's fucking retarded.
And why you don't use node over Python for system management.

I like Python and all, but you're a retard for thinking it's low level

Holy shit you are fucking retarded.
Do you even know why asynchronous programming exists?
Let's say you need to send a command to configure 1000 machines. Each one takes 20 minutes to do. Are you going to send the command to the first one, wait 20 minutes for it to complete, then send a command to the second one, then wait 20 minutes for it to complete, and so on? Because that's what will happen if you try to program synchronously.

>Doesn't understand system management
Ok, here we go:
In Python you send out the same script to thousands of servers. It runs on all server simultaneously for 20 minutes.

In node it runs all out of order unless you programmed around that problem or you used the synchronous version.

Not hard buddy. The cube fits in the square hole.

JavaScript is the worst piece of shit ever designed (or should I say: thrown together by fucking Eich in literally 10 days).

Fuck consistency and transivity:

'' == '0' // false
0 == '' // true
0 == '0' // true

false == 'false' // false
false == '0' // true

false == undefined // false
false == null // false

null == undefined // true
'\t\r\n' == 0 // true


Fuck sanity:

typeof null == 'object'; // true
typeof NaN == 'number'; // true
NaN == NaN // false


Here's a great idea: automatic semicolon insertion!

// guess what this function returns, I dare you:
function f() {
return
{
foo: 'bar'
};
}


If that didn't blow your mind, how about this:

(Number.MAX_VALUE + 999) == Number.MAX_VALUE; // true
(Number.MAX_VALUE * 1.1) == Number.MAX_VALUE; // false, Infinity


Speaking of numbers, all numbers are 64-bit, except if you plan to do any bitwise operation at all, in which case they're silently converted to 32 bits, than back to 64 again:

Math.pow(2,31) == 2147483648 // true, as expected
1

Because node is pajeet tier javascript piece of crap. JS is a shit language which is massively overused. Never use node for anything. Ever/

>the interpreter is the language

Okay. That makes perfect sense.

>In Python you send out the same script to thousands of servers. It runs on all server simultaneously for 20 minutes.
Ok, and how do you know when all those servers have finished so you can send the next script?

Common, easy to use, useful.

>not using ===

You don't even understand the language. Kys.

>Send the next script
The point is you don't need to send another script. You're not consuming resources on the sending server and it's all done on each server around the same time. If you need to you can implement logging for later review.

And how do you get the information so that you can write the logs? How can you know that the script succeeded? What if it failed? Do you just leave the machine there doing nothing?

Not him but how would you do it with node?
In any case you will need a response.

>How can you know that the script succeeded? What if it failed?
If you wanted it to report back you write to a database hosted on the sending server. Alternatively you can have each server log to itself and parse them centrally (by collection).

To add:
Putting them in a database makes them universally accessible. If you wanted to parse them using anything else it's easy.

Ok, and how do you collect them? Are you going to send a request for the first one's result, wait for it to come back, then send a request for the second one's result, then wait for it to come back, then send a request for the third one's result, then wait for it to come back, for all 1000 of them?

>send a request
Stop thinking in Javascript. You have the ability to load anything you need to from the client to the server at any point throughout the script.
If you chose to parse by collection you would copy the log file back (invoking scp or similar).

because no hard typing and they just have to make a collage of other people's work

But your function that sent the scripts already executed and returned. How are you going to check when the logs are ready?

He's not an ass, he was just the guy who had to invent a language under a week to do stuff like showing an alert box or change some text. JavaScript was not designed for the shit retards wanted it to do. It should've been replaced the moment people wanted to do more than simple document tricks.

ITT: Nerds arguing about shit that companies have pretty much already solved.

Use the best language for the job you fucking retards. Knowing one language (or in JS's case 4 fucking supersets of itself) is a quick ride to becoming useless.

because reality has such a bizarre bias for irony that SJWs slobber all over a language thrown together by a homophobe.

They have either populated the database or (if you chose to collect) are files local. You can write whatever application you want to parse the database and monitor hosts. If it exists in the database, it succeeded. If not, it failed. If it has an error, fix it (you should have written the script to give you sufficient information).

[] === [] //false

So an EVENT LOOP? Like what Javascript has?

Why couldn't we have had Scheme in the browser?

...

>using == and not ===
>permisive typing is what allows JS to let retard programmers make stuff that 'just werks' so they dont have to sift through non-important type errors

In the sense that you're part of the loop? I guess. Javascript would require having an application running during the whole process, wasting resources on every server. Node has to be run as a daemon whereas Python does not. To monitor, you monitor the database. This leaves you with fewest resources used and lowest bandwidth utilization.

>It should've been replaced the moment people wanted to do more than simple document tricks.
people keep saying this and yet no one can give an example of a language that JS should be replaced with because there is none, this is just mouth-foaming basement dwellers who have never done anything beyond C

That's because "is" checks to see whether or not its the same fucking object, not value equality

As a front end or back end? Java is superior as a back end. HTML5 is a better option for front end.

How are you monitoring the database? With a fucking cron job? What if your configuration server needs to do something after all the machines are ready? Are you going to restart Python and your script every fucking second to check whether it's ready?

>HTML5 is a better option for front end.
oh the lulz

Python 2.7.12 (default, Jul 18 2016, 15:02:52)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 5 is 5
True
>>>

>What if your configuration server needs to do something after all the machines are ready?
Still not getting how batch management works. If something needed to be done, it's included in the original script.You never need to send additional commands.

>Are you going to restart Python and your script every fucking second to check whether it's ready?
If you write the script in Python you can include a loop to monitor (the server sending the scripts out would have a different script entirely).

Have you ever fucking heard to RSYSLOG or FUCKING SYSLOG or ANY OTHER log centralization system made in the last fucking 5 years?

>Speaking of numbers, all numbers are 64-bit, except if you plan to do any bitwise operation at all, in which case they're silently converted to 32 bits, than back to 64 again:
what the fuck why would they do this?

And what if a machine fails and you need to allocate more resources to make up for that failure.

Yes, you faggots, I'm using == instead of === to make a point about lack of transivity and consistency in automatic type conversions.

Yes, [] is [] returns False in Python, because those are two different instances. [] == [] returns True as it should. In JS both === and == return false which is retarded.

CPython's implementation keeps an array of all integers between -5 and 256 so that when you create an int in that range, you get a reference to a pre-existing object. Yes, it's retarded too.

>I don't understand it therefore it sucks

Its ok there are plenty of other languages that are a good fit for your skill level

Why are having such issues understanding how modern config management and deploy systems work?

Python 2.7.12 (default, Jul 18 2016, 15:02:52)
[GCC 4.8.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 1000 is 1000
True

...

Why are you having such issues understanding how asynchronous programming works?

You have been exposed, please retire from programming for your own sake