Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
esailija
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
20 ms
·
181.
▲
by
esailija
11y ago
The native API calls such as createElement are pretty expensive (in V8 it's like 10 function calls to finally reach the target C++ function) and you are making a lot more such calls when not using innerHTML.
182.
▲
by
esailija
11y ago
I don't think any of this concerns desktops anyway.
183.
▲
by
esailija
11y ago
So what's your excuse for the popularity of Java, C++ etc?
184.
▲
by
esailija
11y ago
But there is no motivation to use alert. There is a huge reward for spammers to get a yes to a notifications prompt, you can then create them even when the browser is closed or when the user is not even on the website. However even so, they
185.
▲
by
esailija
11y ago
Notifications are necessary for many applications , they are not for traditional websites although sadly that doesn't stop them from requesting permission. Imo the notification feature really should require at least https, like many o
186.
▲
by
esailija
11y ago
The code needs to pass threshold of originality to be copyrightable, otherwise you don't need to care about the license. For example `(new Array(n+1)).join(padChar)` is definitely not copyrightable.
187.
▲
by
esailija
11y ago
Unpublish isn't that bad. He could have just as easily made patch updates to each of his modules with malicious install scripts and/or malicious runtime behavior. Depending on 200 tiny modules, you have 200 different risks vs just
188.
▲
by
esailija
11y ago
It is extremely trivial, just not intuitive. It's much harder to actually come up with a case where you know you even need it.
189.
▲
by
esailija
11y ago
Async/await doesn't only work on promises, it works on any object that has a method named `then`. What's problematic is that you have no control or extension points in the runner so you cannot implement something like Go'
190.
▲
by
esailija
11y ago
http://bluebirdjs.com/docs/api/catch.html
191.
▲
by
esailija
11y ago
I think if you don't even know the basics of something, you should go learn them before discussing it.
192.
▲
by
esailija
11y ago
fizzbuzz npm edition: var zero = require("number-zero"); var hundred = require("number-one-hundred"); var isDivisibleBy5 = require("is-divisible-by-5"); var isDivisibleBy3 = require("is-d
193.
▲
by
esailija
11y ago
The complaint was that JavaScript doesn't have 64-bit integers but only 53.
194.
▲
by
esailija
11y ago
Yes it can https://github.com/rollup/rollup . Webpack 2.x can also do this.
195.
▲
by
esailija
11y ago
It doesn't handle edge cases, it doesn't perform well and it isn't well tested. There is also no documentation. Obviously 30 seconds wasn't enough for you to verify anything at all about this module (namely that it'
196.
▲
by
esailija
11y ago
Yes it does: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Type...
197.
▲
by
esailija
11y ago
53 bits that cannot overflow (it only becomes less accurate) is not enough but 64 bits are, even with the risk of overflow?
198.
▲
by
esailija
11y ago
Firstly, these powerful features are not available unless your site is properly (I.E. fully, absolutely nothing can be plain HTTP) protected by HTTPS. You cannot even create service worker without working HTTPS so any kind of PWA is out of
199.
▲
by
esailija
11y ago
How is it fast? (obviously it was not trustable or well-tested) It is the slowest possible way to implement string padding without any optimization effort whatsoever. This is what I hate about npm, every module claims to be fast even though
200.
▲
by
esailija
11y ago
Even getting a response just so you can know what the original author desires can take a long time and there is no warranties or guarantees that you will even get any response. To me, all the downsides that come with dependencies are not ev
201.
▲
by
esailija
11y ago
I didn't say it shouldn't be part of standard library, I am saying that there is always something that isn't part of the standard library. My point is: if this module was something that shouldn't be part of standard libr
202.
▲
by
esailija
11y ago
The possibility of having bugs in code you don't control (that usually has a clause for no warranties) is an argument for implementing it yourself, not against it. Don't forget how hard it is to get a maintainer even agree on whet
203.
▲
by
esailija
11y ago
I don't understand the standard library argument at all. Standard library is always limited, there is always something that's not included - then what? This has nothing to do with the JavaScript standard library but the insanity o
204.
▲
by
esailija
11y ago
Yes. With dependency you are giving up control and in return you save time in not having to implement the dependency. If the LoC is small you get practically nothing in return and so the only reason to do it is ideological. Many times it is
205.
▲
by
esailija
11y ago
https://en.wikipedia.org/wiki/Record_linkage
206.
▲
by
esailija
11y ago
That shouldn't work since syntactically you are in a middle of a function call where you can only have expressions. This is funny because one of the author's point was that JSX makes that confusing because you would never think to
207.
▲
by
esailija
11y ago
GC is only a small part of a high level language runtime.
208.
▲
by
esailija
11y ago
I think what they meant is that they could use python without having to also ship the implementation like CPython. I mean, that thing is huge. How is it feasible to serve 10mb for a website?
209.
▲
by
esailija
11y ago
The format is just an AST in general, nothing to do with JavaScript. You can even see all the possible instructions here to confirm [1]. 1. https://github.com/WebAssembly/design/blob/master/AstSemanti...
210.
▲
by
esailija
11y ago
There was an experiment ("strong mode")[1] of a subset of JavaScript that is way higher level than asm.js but it failed [2]. 1. https://developers.google.com/v8/experiments#strong-mode 2. https://g
More ›