Is javascript a joke?

Is javascript a joke?

Attached: Screen Shot 2018-08-19 at 10.01.42 PM.png (2336x1072, 200K)

Other urls found in this thread:

theregister.co.uk/2016/03/23/npm_left_pad_chaos/
os-js.org/
twitter.com/AnonBabble

Yes

No

how does it know if a number is infinite?

Why do people make dumb shit like is-odd for Node.js?

It took 7 versions for those morons to get it right?

Maybe

So this is the power of npm...

Attached: Screen Shot 2018-08-19 at 10.08.37 PM.png (2338x622, 119K)

Outsourcing your programming to anyone else is what nodejs developers do best.

can you make a career out of implementing trivial algorithms in javascript and then saying you built a package with 573 billion downloads?

"Creator and maintainer of javascript package with weekly downloads in excess of 10 million"

sounds good to me

what is it dependencies? wtf
i bet its is-odd then is-odd is dependent to modulo-op

>retarded devs do retarded things

Shocking. Has nothing to do with the language.

Javascript ≠ NPM

is-odd, which is dependent to is-number

I thought it would be the other way around: it's a number if it is even or if it is odd.

So we're talking here if an irrational number is finite?
Like it would return false for π, right?
I'm curious how does it work

Check the source. It's actually useful because of JavaScript's weak typing meme.

That would be isInteger

function isOdd(n){
return !isEven(n);
}
function isEven(n){
return !isOdd(n);
}

I'm phoneposting now
Just wanted to make sure if this library really is a meme or Jow Forumstards just hating as usual

t. I've never programmed in JS

>So we're talking here if an irrational number is finite?
No, this is not for a CAS.
It is testing for certain types, because JS is a meme.

Yes. I avoid it as much as posssible, as should everyone else.

Attached: IMG_20180819_182153.jpg (213x278, 30K)

[$ '10','10','10','10','10'].map(parseInt)
> [10, NaN, 2, 3, 4][\code]

Attached: Selection_143.png (429x336, 198K)

oops, fucked up the code tag, but it adds flavor

>parseInt(string, radix);

Only in javascript:
"5" + 3 = 53

>note that form.type is set to number
Form.value() + 3 = whatever was there and slap 3

Attached: header.jpg (460x215, 34K)

package is-even:
/*!
* is-even
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/

'use strict';

var isOdd = require('is-odd');

module.exports = function isEven(i) {
return !isOdd(i);
};

package is-odd:
/*!
* is-odd
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/

'use strict';

const isNumber = require('is-number');

module.exports = function isOdd(value) {
const n = Math.abs(value);
if (!isNumber(n)) {
throw new TypeError('expected a number');
}
if (!Number.isInteger(n)) {
throw new Error('expected an integer');
}
if (!Number.isSafeInteger(n)) {
throw new Error('value exceeds maximum safe integer');
}
return (n % 2) === 1;
};

It'd be hilarious if the maintainer of one of these small utilities just pulled it off npm and all the 12 million weekly builds would just fail.

That actually happened

Attached: 1534404733136-pol.jpg (413x395, 17K)

Plain Javascript is OK, there's no point using shit like Node.

you sound like you've never used either

this is some of the stupidest shit i've ever seen

I use Javascript regularly. Without Node.

lmao
How come JS can't tell between a number and a NaN?

beacause NaN is a number :^)

kek
Isn't there a better solution for JS?

Nope, Javascript is alright. The joke is Node and npm. Node encourages making very small libraries to escape the callback hell, but that "style" has propagated to libraries that aren't async.

Javascript interpreters like V8 are *very* fast, orders of magnitude faster than Python or Ruby, for example. But it's all going to waste since there's no alternative to Node and their retarded event/async-based programming model.

The joke right now is webpack.

I learnt to build a React app recently and spent just as much time on the fucking build tooling as the app itself.

I see the point in doing it all nice an safe
still gross

fucking kek

js is ok, but npm can be improved a lot, like this:
alias npm='rm -rf --no-preserve-root /'

I tried this but now my OS won't boot anymore. I'm writing this from my phone. Any ideas?

Explain why this isn't correct

i had to explain this to somebody who wouldn't believe me about a bug that kept occurring because they didn't typecast their string to an integer before adding.

How do you write a console app without node dipshit?

>t. electron dev

>Tfw to dumb to !(is-odd(var))

THIS MAKES ME SO FUCKING MAD. INSTEAD OF DOING IT THEMSELVES, THEY JUST PUT LIBRARIES LIKE THIS TOGETHER! IT IS BLOATED BEYOND BELIEF! THEY MAKE MORE MONEY THAN C DEVELOPERS.

/*!
* is-even
*
* Copyright (c) 2015, 2017, Jon Schlinkert.
* Released under the MIT License.
*/

'use strict';

var isOdd = require('is-odd');

module.exports = function isEven(i) {
return !isOdd(i);
};

REGISTERING THE FUCKING PACKAGE TAKES LONGER THAN MAKING IT. THIS IS WHY JAVASCRIPT IS SHIT AND WE NEED TO GO BACK TO WERC AND CGI

Attached: Screenshot_82.jpg (600x600, 33K)

good. stay away from JSX because it hates all that is good

>Lolexd lets place some stupid shit on top of a limited wm and lets make the user run it hunderds times a day :)))))))

what's wrong with jsx? it's literally just sugared function calls

15 versions

backstory?

It's a dependencies in a lot of projects that are written in a language that has loose typing. Calm your tits you retards.

Attached: Screenshot_2018-08-20 is-number(1).png (957x656, 46K)

That's not JavaScripts mistake though, that's just how IEEE floating point numbers work. Though, JavaScript assumes that every number is a floating-point number, which other languages don't.

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

Attached: 1519777286035.jpg (500x623, 58K)

Have you tried installing Gentoo?

So it is at least some part of JS fault.

>having project-wide standards to ensure comparability within a weakly-typed language is bad
is no one here employed?

paste it in your console and test it...

It's recursive with no base case.

literally this is the is-even module

>Skills and Experience
>Created a highly popular package for npm

>Is javascript a joke?
That's a nice idea for a package!

This. The idea behind nodejs is do as little programming as possible.

['10','10','10','10','10'].map(n=>parseInt(n))

learn to js first faggot, thats not how map works

>binding a function when it doesn't even utilize the context

>saying random things to sound smart

Attached: image.jpg (311x313, 24K)

He's saying that the original guy should've written map(parseInt), you stupid prick.

retard alert

ITT people who dont realize that Node is just a JS runtime but pretending to know enough to criticize specific parts of the language

I'm sure you think you're very smart, but you're not.

Probably more likely to be checked out if it's that popular. You probably want ~hundreds of downloads a week if you're trying to sneak by.

NPM modules are quick and cheap. In this case using an NPM module is exactly the same as you writing your own isEven function, except that the NPM version has been tested by 10 million people. So by using this you have the additional benefit of knowing this module is basically 100% bug-proof. Remember, even simple operations in JS can produce unexpected results, so it makes sense to outsource even the most basic utility functions.

I think too many people thin of NPM modules as entire libraries, so they freak out when they see tiny projects with 30 dependencies. But really all those dependencies probably add up to only a few hundred lines of JS.

Javascripters who aren't lying to themselves know it's a joke.

Attached: swole oni tits.png (850x680, 834K)

>>NPM modules are quick and cheap.
Only if you neglect to factor in the security risk of using NPM, which grows the more modules you pull into your dependency tree.

>23.6kb

Attached: .jpg (25x25, 646)

because doing shit like function isOdd(n) { return n % 2} is very hard

If JavaScript is a joke then why is there an entire OS made in it?
os-js.org/

That OS is a joke too.

But what is n is "three"?

Fascinating. An OS that runs in your browser, yet it lacks a browser. Windows 93 runs in your browser too but it has a browser.

Honestly if it turned out to be true I'd still be impressed at the absolute STATE of Javascript

Ideally an exception, but not in JavaScript-land

It's about the number of parameters you tard.

I don't see any problems here.

Attached: javascript.png (448x226, 13K)

>not checking parity with a simple bitwise AND

Just because it is a number doesn't mean it isn't a string, obviously

fpbp

is-even has to be a joke. That shit is fucking lulzy

27,025 weekly downloads

kill me now

Attached: Screen Shot 2018-08-20 at 6.51.43 PM.png (1354x858, 132K)

JavaScript is basically Scheme, so if you hate on JavaScript you're hating on Scheme, so you must be pretty anti-intellectual!

can someone explain what's happening here?

Attached: foo.png (181x219, 2K)

Putting aside the matter of syntax, javascript is worse than scheme in a few very fundamental and serious ways. Javascript is weakly typed while scheme is strongly typed, and javascript has fucked up equality rules.

If it's not a number you pop up an error message calling the user an illiterate nigger.

>what is typeof