Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
matchu
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
by
matchu
11y ago
I'm not sure that they are. You just need to model the concept of state as the function's input/output, as functional programmers are eager to do :) If we start in state x, then apply operation f, the resulting state is f(x).
32.
▲
by
matchu
11y ago
Don't they have to be pure in order to be idempotent? If you might get a different virtual DOM even when props/state are unchanged (not pure), then re-rendering the component might update the DOM even when props/state are unc
33.
▲
by
matchu
11y ago
Rendering a React component satisfies the f(f(x)) definition, too! We just need to consider the component's props/state to be constant, which is the scenario that the article describes. In general, the act of rendering a React com
34.
▲
by
matchu
11y ago
When they say "applied twice", they're not talking about two independent applications to the same initial value. (That's a test for functional purity, not idempotence.) Instead, they're referring to the following se
35.
▲
by
matchu
11y ago
Well, it categorically denies that "Facebook is always listening using your microphone," regardless of which feature we're talking about. But that's also really easy phrasing to write a loophole for :P
36.
▲
by
matchu
11y ago
One reason is that managing an open-source community requires a huge investment in communication. If you're not in a position to run a community, it makes sense to avoid doing things that suggest otherwise. People will ask questions
37.
▲
by
matchu
11y ago
In terms of reach, a native app seems like a pretty big win. KA are aiming for global reach, and, in countries like India where tons of folks are running on old devices, any bandwidth or performance upgrade is significant. Native apps save
38.
▲
by
matchu
11y ago
I don't know much about type theory, so I suspect that my intuition is wrong, but the phrase "intersection type" violates my intuition. If I have Printable and Drawable interfaces, which each describe a set of behaviors, then
39.
▲
by
matchu
11y ago
That's true, but I don't feel like it's relevant. React's inline styles API satisfies the principle of least power: you can only pass to it a mapping from string keys to string/number values. It's possible that
40.
▲
by
matchu
11y ago
Not on first load. The cache needs to be populated somehow. I agree that it's a special case, but it's one we shouldn't just ignore.
41.
▲
by
matchu
11y ago
The payload probably won't increase as much as we'd think thanks to gzip, and you can apply the styles via server-side rendering rather than waiting for the JS to load. We also need to consider the time from request to a ready pag
42.
▲
by
matchu
11y ago
If they're really that repetitive, then gzip should eliminate almost all of the bloat. We also need to think about number of round-trips. If you're on an old phone on a 3G connection in India, the extra round-trip from requesting
43.
▲
by
matchu
11y ago
Check out the format for an inline style: { background: "red", fontWeight: "bold" } It's just a Javascript mapping from strings to strings. That's a very un-powerful language, and that&
44.
▲
by
matchu
11y ago
Yeah, I dunno. I could buy the argument that a modal on launch isn't always evil (maybe it's a signin prompt), so we don't want to just block that kind of UI outright; we instead want some heuristics to tell us whether the mo
45.
▲
by
matchu
11y ago
I'd be interested in the primary copy operation storing history by default, but also having a secondary copy operation that throws results away after some period of time - or maybe can only be pasted once?
46.
▲
by
matchu
11y ago
If anyone tries to make that argument, the counter will be simple: "We want developers to make native apps! That's why we're making App Indexing a thing." There's definitely some advantage to keeping people on the
47.
▲
by
matchu
11y ago
True. This is probably one of the big reasons that they're trying to make native apps more spiderable by search engines: they want Google Search to continue to be the Internet's entry point, regardless of what app you're usin
48.
▲
by
matchu
11y ago
I'm not sure what makes this abuse. Curating the content you serve isn't just okay ; it's one of the key value propositions of a search engine. The problem is when a content provider, for whatever reason, intentionally curat
49.
▲
by
matchu
11y ago
I think you're right that Google are worried about users moving to a market where they're not relevant. That's why Google have made a point of becoming relevant: they have a mobile OS, a mobile app market, and a mobile app ad
50.
▲
by
matchu
11y ago
No need to slippery-slope this one. Google have been very consistent about ranking exclusively based on UX quality. Once they actually decide to rank based on something else, then we can start raising a fuss about it. Until then, the sn
51.
▲
by
matchu
11y ago
Hm, I never really realized that the rest of the world was better at visualizing than I am, but I'm definitely below average. My ability to imagine vividly comes very rarely, and, when I'm trying, I can usually only conjure a smal
52.
▲
by
matchu
11y ago
Gotcha. Perhaps the article would be better off using a word like list instead of array, to avoid the additional semantics that C attaches to that word. In any case, I think I agree that dereferencing an address should return the byte to th
53.
▲
by
matchu
11y ago
Hmm, yeah, void pointers are weird. I'd be inclined to say that its start and end address are the same and it's a range over 0 bytes of memory, and the fact that dereferencing fails is an artifact of the dereferencing operation it
54.
▲
by
matchu
11y ago
Yep. A pointer is a memory range, but it supports a cast operation that allows you to change the pointer type, and therefore the end address. I think we agree, right? :)
55.
▲
by
matchu
11y ago
Memory addresses are exactly analogous to array indices, and suffer from exactly the same semantics issues. After all, low-level memory is just an array of bytes. We do have a convention that dereferencing a memory address returns the 8 b
56.
▲
by
matchu
11y ago
The key is that Heroku is trying to support all major web app frameworks, whereas GAE only supports the GAE framework. The tradeoff is super interesting: using their framework allows them to hella optimize the instance for you, but you'
57.
▲
by
matchu
11y ago
Heroku's value-add is that you don't need a system administrator: if they support the services your app needs, then they automate system administration for you. Digital Ocean will sell you a VPS (essentially a machine) and grant y
58.
▲
by
matchu
11y ago
I think it's probably solid feedback if you include more tangible action items. What's an example of wordiness in the text? What would be a better phrasing? What don't you like about the layout? Why? Don't feel back abou
59.
▲
by
matchu
11y ago
Ruby offers an abstraction that other languages don't. That doesn't mean that using the abstraction is a bad habit. I agree that C-style for-loops can be handy, but the prevalence of this shorthand doesn't make it good pedago
60.
▲
by
matchu
11y ago
The difference isn't the actual print operation; it's all the boilerplate that has to go around it. In Ruby, `puts "Hello World"` and you're done. The most you have to explain is puts and string literals. In C#, you
More ›