News for hackers. Stuff that matters.

oliverkyss

If the curation process allows joke packages to pass through, it is completely useless. Looks like the only difference from npm is extra bureaucracy then.
Re:Apple proposes new web 3D graphics API on Wednesday February 08, 2017 @06:32AM (#13597481)
But why male models?
Re:Migrating Pinterest profiles to React on Thursday November 03, 2016 @09:42AM (#12863846)
What wheel does React reinvent?
Re:Migrating Pinterest profiles to React on Thursday November 03, 2016 @09:40AM (#12863821)
What question? You seem to have already decided on the answer without asking anything.
Re:Taking PHP Seriously on Friday October 14, 2016 @11:14AM (#12708602)
So when you do calculations with important numbers, you just push the results to the store without checking them and hope for the best? NaNs can happen in any language with floats, it's just that some languages also use exceptions in some situations.
Re:Taking PHP Seriously on Friday October 14, 2016 @07:19AM (#12707342)
Why would that be surprising? NaN as a result definitely means that you cannot multiply array by object in JS either. JavaScript uses IEEE 754 special values, not exceptions on arithmetic errors (eg 1/0 returns Infinity instead of throwing). If you bother to learn the language, it doesn't surprise you.
Sorry, I meant "11" (String), same result as with JS.

see here: https://repl.it/Cqeq/0

That's not true, you're going from string _and_ an integer, because '*' is a binary operator. (And it isn't communicative as shown here, which is another 'problem')

But that's not really the point, crdoconnor seems to think that languages should throw an error in cases like this, not just keep the type of the first argument.

Java: 11

I guess companies should stop using Java for big enterprise applications with tons of dependencies. Or this isn't a problem because programmers usually know the basics of the language they are using. And if they don't, then that is the problem, not the language.

btw, Python: '1' * 3 -> '111'