Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
nolanl
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
12 ms
·
61.
▲
by
nolanl
11y ago
You're exactly right; ES6 modules can solve this. Rollup (an ES6 bundler) has tree shaking [1] and also smaller bundle sizes in general [2]. [1]: http://rollupjs.org/ [2]: https://github.com/nolanlawson
62.
▲
by
nolanl
11y ago
I'm quoted at length in the article, so I feel obliged to respond. Overall I think it's good, but it misses some nuances. First off, there's a small contradiction about offline storage. The author says that users prefer web a
63.
▲
How to fix a bug in an open-source project
(nolanlawson.com)
3 points
by
nolanl
11y ago
|
2 comments
64.
▲
by
nolanl
11y ago
Author here - thanks a lot! :) I think many of the emerging performance bottlenecks in webdev are on the client rather than the server, so there's definitely a lot more research that needs to be done here. In particular, I feel like th
65.
▲
by
nolanl
11y ago
Hm, that might be due to the autoloop <video>s I have in there (which are great for illustrating the animations, but may be a bit indulgent). Which browser are you on?
66.
▲
by
nolanl
11y ago
Thanks! I totally failed to notice that, but I've filed an issue now: https://github.com/nolanlawson/pokedex.org/issues/9
67.
▲
by
nolanl
11y ago
Thanks! I'm glad there are some true Pokémaniacs out there keeping me honest. ;) In my defense, though, I put this site together in my spare time over the course of the past few weeks, and the data source I used (PokéAPI) is missing so
68.
▲
by
nolanl
11y ago
Author here. I'm no stranger to this situation; I wrote a native Android Pokédex app awhile ago that got DMCA'd: http://nolanlawson.com/2011/05/26/on-pokedroids-removal/ Last time I talked with
69.
▲
by
nolanl
11y ago
Author here. You hit the nail on the head. :)
70.
▲
by
nolanl
11y ago
Thanks for the response! Firefox definitely has some speed issues (FirefoxOS included), but I haven't diagnosed it yet. Chrome on Android is the current "best" experience. As for the back button, yeah, I need to add routing:
71.
▲
The struggles of publishing a JavaScript library
(nolanlawson.com)
2 points
by
nolanl
11y ago
|
0 comments
72.
▲
IndexedDB, WebSQL, LocalStorage – What Blocks the DOM?
(nolanlawson.com)
3 points
by
nolanl
11y ago
|
0 comments
73.
▲
by
nolanl
11y ago
Interestingly, they seem to be using JavaScriptCore instead of V8 as their JavaScript interpreter: https://github.com/facebook/react-native/blob/42eb5464fd8a65...
74.
▲
by
nolanl
11y ago
Well, WebSQL was deprecated in favor of IndexedDB. LocalStorage is also quasi-deprecated (synchronous access == problems), which is why it's not available from a worker either.
75.
▲
by
nolanl
11y ago
For doing database work in a separate thread, you used to be able to access WebSQL from a web worker on both iOS and Android, but sadly that's been dropped as of Chrome 39 and iOS 9: https://github.com/pouchdb/po
76.
▲
by
nolanl
11y ago
Wow, HN commenters are brutal! :) I thought the title captured the spirit of the piece; the problem was that people shared it without discussing the contents. As if to say, "Welp, that's it: Safari is the new IE. After all, some d
77.
▲
Safari is the new IE 2: Revenge of the Linkbait
(nolanlawson.com)
21 points
by
nolanl
11y ago
|
8 comments
78.
▲
by
nolanl
11y ago
I still have a soft spot for WebSQL over IndexedDB - way easier to work with, incredibly powerful, brought the speed and reliability of SQLite. However, WebSQL only ever managed to have one implementation (Chrome and Safari shared WebKit at
79.
▲
by
nolanl
11y ago
Nope, people literally did say things like "a certain company in California." But yeah, I'm exaggerating a bit, because the name "Apple" did come up occasionally. The problem is that when everybody wants to discuss
80.
▲
by
nolanl
11y ago
Yep, I have had to support IE7 and 8. IE6 was, thankfully, a bit before my time. And yeah, the title is pretty clickbaity; guilty as charged! But my blog has no ads, so it's not like I'm making money off of it. I'm just tryin
81.
▲
Safari is the new IE
(nolanlawson.com)
753 points
by
nolanl
11y ago
|
356 comments
82.
▲
by
nolanl
11y ago
You can dual-boot FXOS and Android using MultiROM. I wrote some instructions for Nexus 5 here: https://github.com/nolanlawson/nexus-5-triple-play#readme
83.
▲
by
nolanl
11y ago
Yep, Chrome is pretty great about printing unhandled promise rejections to the console. However, I just tested Firefox and Safari, and neither of them will warn you in that case - not to mention older browsers like Android <4.4 and IE &l
84.
▲
by
nolanl
11y ago
I've got my hands pretty full with Pouch, but I'll take a look! :) Thanks.
85.
▲
by
nolanl
11y ago
That's a fair point, but I think the name itself ("await") tends to communicate the the operation might take a long time. Compare that to multithreaded languages like Java, where it's not obvious that FileInputStream
86.
▲
by
nolanl
11y ago
Those new warnings are FANTASTIC. That's exactly what I meant when I said it's better for your tools to warn you, rather than trying to read and understand some lengthy article. :) BTW for PouchDB, we use bluebird in Node and lie
87.
▲
by
nolanl
11y ago
Yes, but in most code I've seen, that's a typo rather than someone intentionally writing a function that returns a function. You can definitely do it!
88.
▲
by
nolanl
11y ago
This is what I mean: doSomething(function (err) { doSomethingElse(function (err) { doYetAnotherThing(function (err) { throw new Error( "I don't bubble up to the top of the stack, " +
89.
▲
by
nolanl
11y ago
You're right; I'm playing a bit fast and loose with the definition of "equivalent." However, I think it's what most people want when they reach for the forEach(). In that "Promise protips" gist ( https:&#x
90.
▲
by
nolanl
11y ago
naivePromiseAPI() { if (foo) { throw new Error('this will get swallowed!'); } return somePromise(); } Instead you want this: cleverPromiseAPI() { return Promise.resolve().then(function () {
More ›