Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
thomasfoster96
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
18 ms
·
31.
▲
by
thomasfoster96
8y ago
I’m not sure about you, but I consider JavaScript running in my browser not being able to write arbitrary text to files to be a good thing. Otherwise, Node.js can do exactly what you just said Python and MS Basic can do.
32.
▲
by
thomasfoster96
8y ago
Reading through the JMAP website [0], I'm actually wondering whether whoever's behind JMAP has looked at GraphQL. There seem to be a lot of similarities (especially the "why not REST" section). [0] https://jma
33.
▲
by
thomasfoster96
8y ago
This is true of syntax, but it’s not true of the language semantics. There is plenty of perfectly valid JavaScript that isn’t valid TypeScript, so integrating TypeScript into the ECMAScript standard would require something similar to ES5’s
34.
▲
by
thomasfoster96
8y ago
It sounds like I probably haven’t gone deep enough into macro territory then. Still, when having to do things with JS/Python/C++ I’ve wasted many afternoons down the rabbit hole of trying to glean information from Github Issues, s
35.
▲
by
thomasfoster96
8y ago
From personal experience Rust has the lowest “Google search to error message” ratio (if that’s a metric) of any programming tool I’ve used. It’s genuinely a delight to use after having to deal with error messages from various JavaScript too
36.
▲
by
thomasfoster96
8y ago
Tok Pisin and other English-based creoles are not simplified English though – they’re languages in their own right where English has served as a major influence. I don’t think that many English speakers would view Tok Pisin inflecting verbs
37.
▲
by
thomasfoster96
8y ago
> It is definitely possible but there’s so many more places you could make a mistake if each custom Hook has to do bookkeeping like this. I don't know if I could write or extend the code you wrote without making quite a few mistakes
38.
▲
by
thomasfoster96
8y ago
This is how I would have hypothetically done it with WeakMaps: https://gist.github.com/thomasfoster96/c4a20053c747196f027fc...
39.
▲
by
thomasfoster96
8y ago
Here’s what I mean: https://gist.github.com/thomasfoster96/c4a20053c747196f027fc... > A key design goal is that creating a custom Hook is easy. You should be able to literally copy paste part of your component (e.g.
40.
▲
by
thomasfoster96
8y ago
> How are you going to compose Symbols? I would’ve used a WeakMap with Symbol keys that mapped to a list or object containing Symbols. Sorry if I’m just overlooking something obvious, but most of the examples that I’ve seen to explain wh
41.
▲
by
thomasfoster96
8y ago
That’s not really all that different to everyone moving their CSS-in-JS and GraphQL queries out of a functional component body though, is it? This is kind of exactly the scenario Symbols seem to have been intended for. Also... a nitpick, bu
42.
▲
by
thomasfoster96
8y ago
I think this post has actually pushed me back towards Symbol keys perhaps being a good idea. The useFormInput() example under Flaw 3 seems rather contrived – wouldn’t you just pass a Symbol key to useFormInput and it would then pass the key
43.
▲
by
thomasfoster96
8y ago
> sigh, I meant real skin in the game, i.e. you would face another 4 years in opposition if Murdoch and mates politicized your "support of ISIS". I mean, in this scenario most Labor MPs keep their jobs, while thousands of peopl
44.
▲
by
thomasfoster96
8y ago
> The only reason you can say this is because you have no skin in the game. If you were in Parliament, faced with a fringe issue (I don't think it is, but the vast, vast majority of Aussies do, probably because they don't under
45.
▲
by
thomasfoster96
8y ago
Labor quite clearly did not do what they could under the circumstances. If the Opposition is incapable of actually opposing something they had serious reservations about they aren’t really trying.
46.
▲
by
thomasfoster96
8y ago
This is a very sympathetic interpretation of Labor’s actions. Passing a law despite admitting it needed a few amendments at the very least, with a vague verbal agreement that it might be amended sometime in the first half of the next year,
47.
▲
The Cube Rule of Food Identification
(cuberule.com)
15 points
by
thomasfoster96
8y ago
|
5 comments
48.
▲
by
thomasfoster96
8y ago
> Web Components are directly implemented by browsers so you don’t need a “Web Components library”. I mean a collections of components like Polymer. Unless you plan on maintaining everything yourself, both React and Web Components share
49.
▲
by
thomasfoster96
8y ago
That isn’t really an argument for React or any other framework going out of fashion in the next few weeks though? It seems rather contrived to think that Web Components are inherently better because they’re standardised. React isn’t using u
50.
▲
by
thomasfoster96
8y ago
> and will be brittle because of the global nature of js and css. Modules have existed in JavaScript for several years now, and there are numerous solutions for dealing with global CSS (CSS Modules, Glamor, etc). There are many large pro
51.
▲
by
thomasfoster96
8y ago
I’m not sure what your point is. React components can use Shadow DOM if they want, but they don’t have to. Neither do Web Components. React components can be rendered to DOM nodes, but they can also be rendered to lots of other things.
52.
▲
by
thomasfoster96
8y ago
Huh? React does support Shadow DOM and other Web Components APIs [0]. You can use Web Components in React components just fine. [0] https://reactjs.org/docs/web-components.html
53.
▲
Investigating Jeanne Calment’s Longevity Record
(leafscience.org)
4 points
by
thomasfoster96
8y ago
|
0 comments
54.
▲
by
thomasfoster96
8y ago
Was “Sir” a translation? “Master” vs “mister” is annoying because technically there are a lot of rules about the use of one or the other, but these rules differ considerably between countries. Apparently in parts of the US it would be rude
55.
▲
by
thomasfoster96
8y ago
There are a number of websites now which ask me for my “name as it appears on your card” when doing transactions/bookings, which seems like a decent solution. I’ve also had had hotels ask for a card number or some form of ID, which als
56.
▲
by
thomasfoster96
8y ago
I know people see No. 29 on this list and decide that their product or service will only be used by English speakers of European descent, but from experience even with these extraordinarily low requirements for testing most services fail. I
57.
▲
by
thomasfoster96
8y ago
For what it’s worth Array.from() [0] lets you pass a map style callback as its second argument, so Array.from(yourStr.matchAll(yourRegex), yourMapFn) works. [0] https://developer.mozilla.org/en-US/docs/Web/Jav
58.
▲
by
thomasfoster96
8y ago
I actually didn’t look hard enough: there is a proposal[0] for something that could be called ‘BigDecimal’ in ECMAScript, but it’s a stage 0 proposal[1]. As for why a decimal type hasn’t progressed further in ECMAScript you’ll want to read
59.
▲
by
thomasfoster96
8y ago
There isn’t a BigDecimal proposal anywhere, the authors are just making it clear that their proposal is limited to integers.
60.
▲
Geologists Find Part of the Grand Canyon in Tasmania
(motherboard.vice.com)
3 points
by
thomasfoster96
8y ago
|
0 comments
More ›