[–]▶ No.851295>>851321 >>851445 >>851981 [Watch Thread][Show All Posts]
https://archive.fo/2018.01.11-205122/https://github.com/npm/registry/issues/255
Many packages suddenly disappeared
> massive issue for us because of this. Please resolve asap
> @antoniobrandao It is possible. I have re-published some of the packages that were missing with the code that was available on git-hub. The original author has deleted his NPM account and dropped all his packages. But it seems like NPM keeps dropping packages. No idea why.
▶ No.851298
Is this the power of Specdown?
▶ No.851305
▶ No.851321>>851329 >>851456 >>856691
>>851295 (OP)
Not the first time this happened, there was a widescale issue due to the same reason (dev of a very popular package killed their repo because of drama or some shit, every site using the library, which was a lot of them, became outright unusable for a week or so).
Or is it the same one?
▶ No.851328>>851481
>check npm repo on github
>1,290 open issues
▶ No.851329>>851334 >>852331 >>856692
>>851321
That almost makes me want to become a nodejs developer just to make and subsequently memory-hole a highly depended package.
▶ No.851334
▶ No.851338>>851340 >>851344 >>851666
>try to do something with node
>everything has millions of dependencies
>dependencies have dependencies
>it never ends
I have no fucking idea how node ever got popular considering it's easily the worst thing ever.
▶ No.851340>>851343
>>851338
There is nothing wrong with node itself, you just have to stop being a fucking nigger and downloading libraries instead of writing code yourself.
▶ No.851343>>851346
>>851340
>There is nothing wrong with node itself
Except for the fact that it uses javascript
▶ No.851344
>>851338
Low barrier to entry, and thus you have low quality programmers.
▶ No.851346>>851347 >>851349 >>851499
>>851343
There's nothing wrong with javascript either. It's certainly better than trying to script in php.
▶ No.851347
>>851346
>`script´
What the hell do you mean by that you faggot?
If you want to `script´ then use perl or if you're gay, python.
▶ No.851349
>>851346
>eating vomit is better than eating shit
▶ No.851416>>851418
Is webdev still fairly lucrative? It seems that every other day I hear loads of shit about it, and most of it doesn't sound good.
>The OP for starters
>Someone shills a new framework or new library
<"React has saved me so much time and frustration, will change JS as we know it 10/10"
>Some retard complains about a library not doing something the way they want it, usually follows that up with shilling something else that "totally fixed everything" instead of actually writing their own code
>Articles upon articles in literally-who blogs that contain copypasted code that magically fix a problem without any explanation of how or why
To me the the webdev/JS landscape sounds like it's too convoluted and fucked to put any effort into.
▶ No.851418>>851431 >>851660
>>851416
Did you know Facebook put a license clause on React that says they can remove your right to use the library if you criticise them?
▶ No.851431>>851438 >>851441
>>851418
I didn't, but that doesn't really surprise me. I wish there was some kind of exploit that could be used to fuck over the modern web as we know it. Something really devious, something that would make people think twice about trusting every script that runs on their browser. If anything like that was found or is ever properly exploited, the framework of the nu-web would fucking implode. Wishful thinking, I guess.
▶ No.851438>>851451
>>851431
I bet normalfags would notice if bitcoin miners really took off.
▶ No.851441>>851451
>>851431
Slip in some code to a major library which randomly causes some words to turn into racial slurs.
▶ No.851445>>851464 >>856693
>>851295 (OP)
Good.
Actually, it's time for an os to be built from the ground up in a single, simple and powerful language.
No systemd also.
▶ No.851451
>>851438
Most probably wouldn't at first. I'd imagine they'd just throw their phone or laptop in the garbage and buy a new one like they always do when their device starts to slow down. In the long run they'd notice, although I'd imagine that would lead to devs getting sneakier with their miners.
>>851441
Would be funny as hell, but not that practical or impactful in the long run.
▶ No.851456
>>851321
It's a new one, which makes the problem that much worse.
npm have been scolded for this before, you can delete your package and your package name becomes instantly available to be used, perfect for malware.
npm worked so that package must be the package right? Nope.
▶ No.851464>>851565
>>851445
Lua already exists.
▶ No.851499>>852081
>>851346
I use PHP at work and while it's a very quirky language, I still prefer working in it to Javascript.
▶ No.851527
>>851525
for fucks sake dude use the nsfw checkbox
▶ No.851528>>851530 >>851533 >>851565
>>851525
That bicep is bigger than mine and I have been /fit/ for years.
▶ No.851530
>>851528
it is mostly fat I think.
but, I know some other women, which do have nice biceps.
▶ No.851533
>>851528
Get into martial arts, you might just start producing more testosterone.
▶ No.851565>>851650
>>851528
I'm sure the biceps is barely there, most of that is just fat tissue.
>>851464
I know you're just shitposting, but the first thing I noticed about Lua is how close it is to JavaScript, but less shit. If only they dropped variables being global by default and had 0-indexed lists it would great.
▶ No.851650>>851671
>>851565
Lua had no integer types until version 5.3, is that true?
(and js still doesn't have them?)
▶ No.851660
>>851418
i believe they removed that
▶ No.851665>>851677 >>851705
If you're ever in the unfortunate position of having a node_modules directory, you should look in it for a good laugh. Just fucking look at this shit.
/*!
* is-number <https://github.com/jonschlinkert/is-number>
*
* Copyright (c) 2014-2015, Jon Schlinkert.
* Licensed under the MIT License.
*/
'use strict';
var typeOf = require('kind-of');
module.exports = function isNumber(num) {
var type = typeOf(num);
if (type === 'string') {
if (!num.trim()) return false;
} else if (type !== 'number') {
return false;
}
return (num - num + 1) >= 0;
};
Somebody looked at this an thought this is a good idea to have as an dependency with a readme and a full copy of the mit licence.
Also in its dependency kind-of:
[...]
var type = typeof val;
if (type === 'boolean') return 'boolean';
if (type === 'string') return 'string';
if (type === 'number') return 'number';
if (type === 'symbol') return 'symbol';
if (type === 'function') {
return isGeneratorFn(val) ? 'generatorfunction' : 'function';
}
[...]
Yes, kind-of just returns typeof for the types used! You can't make this shit up!
▶ No.851666
>>851338
It was the next trendy thing for a while.
▶ No.851671>>851674 >>851695
>>851650
Lua still doesn't have integers, the deal with 5.3 is that the number type is represented as an integer sometimes behind the scenes for speed improvements.
Give lua a chance anon, you might find you like only having 9 or so types.
▶ No.851674
>>851671
>Lua still doesn't have integers
>Give lua a chance
No????????????
▶ No.851675
https://www.lua.org/pil/2.3.html
>The number type represents real (double-precision floating-point) numbers. Lua has no integer type, as it does not need it. There is a widespread misconception about floating-point arithmetic errors and some people fear that even a simple increment can go weird with floating-point numbers. The fact is that, when you use a double to represent an integer, there is no rounding error at all (unless the number is greater than 100,000,000,000,000). Specifically, a Lua number can represent any long integer without rounding problems. Moreover, most modern CPUs do floating-point arithmetic as fast as (or even faster than) integer arithmetic.
Wow this is top pajeet. Either go full high level and provide big integers like python or provide fixed width integers. Everything else is just retarded.
▶ No.851677>>851687 >>851705
>>851665
also this: number-is-nan
'use strict';
module.exports = Number.isNaN || function (x) {
return x !== x;
};
With full copy of the MIT licence, package.json and reame, of course.
▶ No.851687>>851705
>>851677
Other full modules include:
/*!
* is-odd <https://github.com/jonschlinkert/is-odd>
*
* Copyright (c) 2015-2017, Jon Schlinkert.
* Released under the MIT License.
*/
'use strict';
var isNumber = require('is-number');
module.exports = function isOdd(i) {
if (!isNumber(i)) {
throw new TypeError('is-odd expects a number.');
}
if (Number(i) !== Math.floor(i)) {
throw new RangeError('is-odd expects an integer.');
}
return !!(~~i & 1);
};
var toString = {}.toString;
module.exports = Array.isArray || function (arr) {
return toString.call(arr) == '[object Array]';
};
'use strict';
module.exports = function (x) {
var type = typeof x;
return x !== null && (type === 'object' || type === 'function');
};
I dont Know What's worse, putting a licence on 3 lines of code or importing 3 lines of code with a full copy of a licence.
▶ No.851695
>>851671
>you might find you like only having 9 or so types
nope, that sucks
language without integer type cannot be taken seriously
▶ No.851698>>851700
>>851692
then explain how
function (x) {return x !== x;}
replaces isNan. How does comparing a variable to itself do that?
▶ No.851700>>851703
▶ No.851703>>851706
>>851700
that only works if the variable is literally NaN, if its a string and jou want to check if its numeric it wil
behave differently as Number.isNaN.
▶ No.851705
>>851665
>>851677
>>851687
this is the current state of web programming
it makes me kind of sad, tbh
▶ No.851706>>851707 >>851834
>>851703
nevermind I'm an idiot who thought isNaN would check if it is numeric or not
▶ No.851707>>851771 >>851834
>>851706
Wait that is what isNaN does wtf
▶ No.851771
>>851707
>30 year old hack to allow in-band signalling of FPU errors
>Combined with insanity of implicit casting
What did you expect there? Sane and reasonable behaviour?
▶ No.851834>>852360 >>856694
>>851706
>>851707
>NaN is a type
>method checks if something is NaN or not
>get buttflustered when it tells you that a string is not NaN
There are a lot of things wrong with javascript, but isNaN is not one of those things.
[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]((![]+[])[+!+[]]+(![]+[])[!+[]+!+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]+(!![]+[])[+[]]+(![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]]+[+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[!+[]+!+[]+[+[]]])()
▶ No.851901
>>851525
>>851699
>those asymmetrical child rape eyes
Every time.
▶ No.851981
>>851295 (OP)
>javascript on suicide watch
>not about jailbreaking an apple watch and using nodejs to read its heartrate monitor
fucking dropped
▶ No.851983
>>851699
>>851525
Absolutely disgusting.
▶ No.852008
>>851699
who the fuck is it?
▶ No.852081>>852084
>>851499
if (variable.hasOwnProperty('property') && variable.property.hasOwnProperty('property2) && etc, etc)
Me too, mainly for this reason.
if (isset(variable['property']['property1']) ...
▶ No.852084>>852087
>>852081
I like lodash for shit like this.
if (_.get(variable, ['property1', 'property2']))
▶ No.852087>>852127
>>852084
Yeah, i use lodash for this usually too. But, for work, we have a bulk import system where we need to write data transformation scripts and lodash isn't included with it.
So at first I was, painstakingly, doing that shit manually.
Now I just paste the following snippet in:
fromDotNotation: function(obj, path) {
var i = 0,
path = path.split('.');
for (; i < path.length; i++) {
if (typeof obj[path[i]] === 'undefined' || !obj[path[i]]) {
return '';
}
obj = obj[path[i]];
}
return obj;
},
▶ No.852090
>IPFS devs warned people before padding debacle
>nobody listened
>it happened
>now it's happening again
most jej
▶ No.852127
>>852087
>still using var
ES6 const and let nigga. Also this is slightly faster for loop expression checking
for (let i = 0, il = path.length; i < il; i += 1) { }
▶ No.852331>>852338
>>851329
This is quite possibly the most useful thing we can do to improve the health of the internet.
And I like it, because this tactic has a proven track record. Infiltrating and attacking from within is quite effective, historically celebrated, and very difficult to defend against, especially when it comes from many different vectors.
We could fix javascript. By fix I of course mean destroy and purge all record of it's existence as punishment, while erecting a 50ft granite statue at the center of the world's largest landfill shaming the creators.
▶ No.852338
>>852331
Without Javascript they'll just use some other cancer to fuck with your internet experience. The language isn't the cause of your suffering.
▶ No.852360
>>851834
Yeah, but it is still confusing to look at. Old Man Crockford is right when he says that, when writing code, you should avoid confusion above everything else (sans the code working properly, of course).
▶ No.856682>>856692
▶ No.856691
>>851321
This is why shit should be cloned and served locally.
>but anon, if google goes down not being able to get the fonts for your css will be the least of your problems
NO, FUCK YOU
▶ No.856692
>>851329
I highly doubt that it will work second time. After left-pad fiasco npm changed rules for removing package (now you can't if someone depends on you). And with their security tools (there was a minor fuckup caused by them recently) you probably will not be able to change it to something malicious.
>>856682
It is.
▶ No.856693>>856754 >>857656
▶ No.856694>>856741 >>857658
>>851834
What does this code do? I'm not pasting it anywhere fuck no.
▶ No.856741
>>856694
Paste it in Ideone, idiot.
▶ No.856754
▶ No.857658
>>856694
It's the stock example from jsfuck.
false => ![]
true => !![]
undefined => [][[]]
NaN => +[![]]
0 => +[]
1 => +!+[]
2 => !+[]+!+[]
10 => [+!+[]]+[+[]]
Array => []
Number => +[]
String => []+[]
Boolean => ![]
Function => []["filter"]
eval => []["filter"]["constructor"]( CODE )()
window => []["filter"]["constructor"]("return this")()