Is my brain broken somehow? I'm either at my desk or on my phone/tablet a good 75-80% of my waking hours, and have all this information and entertainment at my fingertips, and I'm _still_ bored half of the time or find my mind wandering or thinking about all sorts of things happening around me when I least expect it.
at least a top-level metadata property can be explicitly defined in a .json.schema[0] and formalized, rather than being some kind of ad-hoc pre-processor step you have to evaluate before actually using the JSON data. I didn't even know about that approach before I read your comment but it instantly makes more sense to me in terms of maintainability and interoperability.
> As for the empty array of dependencies to emulate the previous componentDidMount method, this was indeed the original message in 2019. I am almost certain — though I can't find this online now — that Dan Abramov subsequently tweeted to not rely on the empty dependencies array as a guarantee that the useEffect only fires once per component's lifetime.
This is one of the big reasons why I personally dislike React and the community around it. They seem to envision at the start certain ways to do things, and push them to the point of being "this is how you do X". Then, after not very long at all, the old way is discovered to be bad and inefficient and buggy and hard to reason about or whatever, now do it this other way. Repeat three or four times until a new API is created or something.
This also means that going from project to project can feel very whiplash-inducing. The code you find is not even dependant on the version of React that's installed, but on how the community was feeling about the "best practices" around the time that particular project was started.
I remember when render props were a thing. Then I remember when they stopped being considered a thing and now the new thing to do was HOCs.
Things like React Router also being wildly different between versions, or at least v3 -> v4. I remember needing to find out how to achieve certain behaviour with v3, only to then try to find that the docs only existed for v4 (which was the newest at the time), and addons that helped me with my original problem also only existed for v4. (Then React Router was no longer the Best Thing, so let's all switch to Reach Router... then back to React Router when it was again considered the new hotness. I may have forgotten one or two others in there, I just stopped paying attention around that point.)
Another example is CSS scoping, which is a complete non-issue with vanilla Vue and Svelte. But in React land you have styled-components, emotion, styled-jsx, and who knows what else in which you don't write CSS, but JS that looks like CSS but not quite, enough to throw me off every single time.
The whole periodic shifting of opinions about useEffect from "this is your componentDidUpdate replacement" to "use a linter to warn you about the footguns that we can no longer fix, also use one of these hooks instead" is just one more thing that adds to the frustration of having to work with a React-based project.
I'm actually starting to wonder if Facebook isn't so much "writing" React, but "discovering" it. Much like how we didn't quite invent fire, and we had to figure out how to use it properly over many, many thousands of years.
The funniest thing about this is that Sketch used to claim that it was impossible for them to port it to other platforms (i.e. Windows or Linux, let alone web) because only Mac OS had the kind of APIs the app needed to even work.
> uses proof of stake- doesn’t do energy intensive mining
I have an honest question that I haven't seen answered anywhere, and I'm not smart enough to answer it for myself by reading papers and whatnot.
Assume whatevercoin currently uses PoW and takes X energy to mine a single coin, but would take X/100 energy to mine it under PoS.
What stops people from simply throwing the 99/100 leftover energy from X into more mining operations, rather than just being content with the one and the leftover energy?
Or put another way, if mining a single coin suddenly costs 1/100 of what it used to, why would I not just mine 100 coins now?
It just all sounds to me like what happens when there's an increase in computational power/speed/capacity/whatever in PCs. When you can process a thing ten times as fast, you don't just do one thing ten times faster; you do ten things at once.
Well, because it's not like PoS is just making PoW more efficient. You have no way to turn that extra energy into more stake.
It's like if I paid you previously for every strawberry you bring me, and now I pay you for how old you are. Previously, for 100 strawberries I gave you $20, and now for every 20 years you are old, I give you $20/hr. Now you need far fewer strawberries to make the same amount of money, but that doesn't mean you can now make more by giving me strawberries. You have no way of converting strawberries into age.
Thanks, I think I kind of get it now. But now my follow up question is, what stops me from just recruiting, say, nine other people at least as old as me, give them each 10 strawberries, and then collecting the payout afterwards?
Mining economics depend on the mining reward. It doesn't get bigger if more people mine. The rewards just get spread out over more/larger participants until profits are tiny via difficulty adjustments.
The mining effort depends simply on the reward, and the reward is calibrated to the security needed. Bitcoin is highly secure, but the security model is essentially 1:1; if the network is secured with a billion dollars of mining effort, it will cost on the order of a billion to attack it. So it's expensive.
PoS can have a better security model, maybe 1:100 against network attackers. So you can reduce mining rewards and maintain a given security level.
Non proof-of-work "mining" typically requires another resource. Proof-of-stake rewards you based on your holdings, so additional mining compute power doesn't help.
This intense hatred for Electron has always baffled me. I thought the community in general was in favour of allowing people to create whatever they wanted, however they wanted. More people making software is good! And the community grows because of it, and everything is better. But every time an electron app gets promoted somewhere (HN/Reddit/Twitter/wherever) there is always _someone_ yelling at the developer because they decided to use Electron.
As a javascript developer, I'm sorry that I don't have the patience/smarts/skills/time to learn C++/Qt/GTK/WxWidgets/etc. HTML/CSS/Javascript is all I know and it's probably all I will reasonably stay with for a while because of various circumstances. And Electron lets me use the knowledge I already have to make things.
That's not to say that Electron doesn't have all these issues, of course. But I feel that this policing of how people write their own software (especially when it's something purely done as a hobby and/or just to share something with people) is getting somewhat out of hand.
Here's a hypotetical/philosophical question for the community in general. Given no other alternatives to do X, what is preferable? An Electron app that allows people to do X, or no app at all?
No app at all. Because that leaves a gap in the market for a native alternative.
That means a potential reward for the patient/smart/etc developer who knows native code, which means a better class of developer, which in turn means better software.
And it means more native apps for the platforms, which means a better class of app.
In short, everything is not better when Electron is everywhere. It actively damages the ecosystems of the platforms that host it.
(Still annoyed that Rockstar added BattlEye to GTA Online one day out of the blue, _and_ refuses to set the flag to allow it to work in Linux)