Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
tmpfile
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
7 ms
·
31.
▲
by
tmpfile
7y ago
It seems the demo is focused on "How to Export Trevor.io Results to Google Docs" on first pass. It breezes past the whole Build Query part, probably since the example query was so trivial. I would've expected a demo more repr
32.
▲
by
tmpfile
7y ago
You're right, my implementation was not a drop-in replacement for replace. How about this? String.prototype.replaceAll = function (n, sub) { let t, f = "g"; if (n instanceof RegExp) { t = n.source;
33.
▲
by
tmpfile
7y ago
this. 100% this.
34.
▲
by
tmpfile
7y ago
Yikes! It's a lot of effort to reduce memory use. They might be better off creating a new Go entrypoint/server that can call into CPython to reuse all their existing/tested modules (treat their Python as a microservice called
35.
▲
by
tmpfile
7y ago
I agree. I would think replaceAll would behave like the following: /* Usage: > 'abcdefabc'.replaceAll('abc') 'def' > 'abcdefabc'.replaceAll('abc', '+') '
36.
▲
The New Field of Twistronics: Take 2 Sheets of Graphene and Twist
(nytimes.com)
2 points
by
tmpfile
7y ago
|
0 comments
37.
▲
by
tmpfile
7y ago
Sure, if everyone decides to host their own files, a CDN would never be used. Although, there are benefits to using a CDN, so it's likely the try-shared value could exist and would be useful. Note the proposed scheme doesn't preve
38.
▲
by
tmpfile
7y ago
One way to prevent a CDN from seeing every request for a shared resource could be a new attribute that allows serving the resource locally if the resource is not in the shared cache. For example, <script src="/jquery-3.4.1.min.