HNHacker News
TopNewBestAskShowJobs

halflife

960 karma · joined October 9, 2020

submissionscomments
halflife··on The React2Shell Story
Of course, the only question is in what way the programming language pushes you. You can TS code where every variable is assigned “any” type, that would void all type safety. Is it possible? Yes. But someone needs to bend the languages will to do that.

Classes have inherent state, and methods which encapsulate logic. That pushed you to create separate logic bundles.

Functions are callable scripts. There are no rules. I’ve seen too many components that invoke tens of hooks, and hundreds of lines of state management. Most classes I’ve seen never reached that. Were there classes that were too big? Of course, but at least there was logic separation with methods.

halflife··on The React2Shell Story
I’ve done plenty of hooks. Also class components. Also angular.

You are writing code for an object that is inherently stateful, in a stateless design pattern. Instead of embracing state, you crate escape hatches and plugins to tap into your state, and then more escape hatches inside those escape hatches to tap out.

It’s react rendering model leaking into your code. Let’s imagine react changes the rendering paradigm, and components are rendered once with only state updates. Almost all of your hooks become useless. The fact that you need to think about react internal every time you create a component is such a bad API choice that I’m amazed it still exists, and being expanded.

halflife··on The React2Shell Story
Just having an interval inside a component used to be trivial, but with hooks becomes tedious. Only the barebones simple ultra basic stuff became simple. Everything else? Harder.
halflife··on The React2Shell Story
I am all around developer, working with typescript from at least 2015.

I’m not exactly sure what complication you mean. Lifecycle method sucks, yeah, but you replaced them with lifecycle hooks. So the same mental overhead but now in a pseudo stateless functions, with state full escape hatches.

halflife··on The React2Shell Story
React was ruined from the moment they abandoned class components and introduced hooks. Vercel is just continuing the trend of hype against common sense.
halflife··on All my clients wanted a carousel, now it's an AI chatbot
These chatbot and google login are my most hated feature of current web.

Obviously it just a script embedded in the page, so it has not actual place in the design. So the effect, especially on mobile, is this dance of starting to read a page, have it obscured by annoying popups, and trying (and failing) to close the popup with the hidden 12x12 pixels x button.

Just like the entire ads market, it’s all forgery to drive up clicks so owners can say to the clients that there is interaction.

Don’t get me started on the recent YouTube ads on iPad that place a banner that sits on top of the video, hiding subtitles, and closing it is behind a menu that requires you to be a brain surgeon specialist in order to interact with, instead of clicking the ad itself. I currently have 15 tabs in safari for ads that I inadvertently clicked.

halflife··on The React2Shell Story
Whoda thunkit that

- blurring the lines between client code and server code

- creating a brand new protocol for communication between trusted and untrusted actors

- and with all of that allow the protocol to serialize code and not just primitives

Would be a tremendously stupid idea. And for what? To lock developers further into the react ecosystem. What a shitshow react continues to be.

halflife··on iOS 27 is adding a 'Create a Pass' button to Apple Wallet
Will this work only with scannable codes? Or with NFC as well?
halflife··on Test
It failed
halflife··on Metal Gear Solid 2's source code has been leaked on 4chan
I can’t believe I watched all that, and KH3. I still understand nothing.
halflife··on Metal Gear Solid 2's source code has been leaked on 4chan
Holy shit
halflife··on Metal Gear Solid 2's source code has been leaked on 4chan
That’s great, now do kingdom hearts
halflife··on A network smuggling Starlink tech into Iran to beat internet blackout
Anywhere? North Korea? Sudan? Houthi’s Yemen? The hyperbole broke the charts…
halflife··on A network smuggling Starlink tech into Iran to beat internet blackout
Wow, there are no words. You would rather live in Tehran or Tel Aviv?
halflife··on Show HN: Turning a Gaussian Splat into a videogame
This is better, but I think that a demo with more reflections and radiosity would be much more impressive
halflife··on Show HN: Turning a Gaussian Splat into a videogame
I’m trying to understand from the video why this is better, it looks like a normal high resolution textures with precooked shadow maps.

It has no dynamic lighting or effects, which makes the video look like a high quality game from 2006.

halflife··on Used La Marzocco machines are coveted by cafe owners and collectors
“They all do it” - all rancilio silva, not every coffee machine.

Thought to add that context for people unfamiliar with coffee machines.

halflife··on Used La Marzocco machines are coveted by cafe owners and collectors
No! I had this machine, the skeleton is made of iron (the black colored parts), it completely rusted away for me in a couple of years. Very bad design decision on Rancilio.

100% stainless steel or bust.

halflife··on Extra minutes of morning sunlight before 10 a.m. improves sleep quality
Waking up earlier makes you sleep earlier. Gotcha.
halflife··on NYC to open municipal grocery store in 2027
It really depends on the countries culture
halflife··on NYC to open municipal grocery store in 2027
Subsidies can go to small businesses owners. Not just large corporations.
halflife··on NYC to open municipal grocery store in 2027
military commissaries are subsidized with taxes.

So would these stores have lower prices because of tax subsidies? What prevents rich people from exploiting these subsidies?

halflife··on NYC to open municipal grocery store in 2027
Yes, and some people do that.

Some consumers go to specific stores to purchase specific qualities of brands.

But most do not, especially for convenience products. You get it where you can.

halflife··on NYC to open municipal grocery store in 2027
Interesting. I think it really depends on the competitiveness of the market.

In a highly competitive market, every cost saved would be passed to the consumer, obviously this is simplistic microeconomics and doesn’t actually works this way.

In my city, there’s a supermarket approximately every 150 meters. Food cost is high, but for the entire country. Actually research shows that food cost is higher in low density towns where there is much less competition.

halflife··on NYC to open municipal grocery store in 2027
Also in Israel, stable basic products (like milk) have a government mandated pricing, not even subsidized. It’s a good idea in its simplistic form, and works well most of the times, but once every 2 years you get a crunch where the manufacturers just decline to produce products at a loss, so we don’t have milk or butter for 2 weeks.
halflife··on NYC to open municipal grocery store in 2027
Grocery costs has to come from some formula. If the mamdani stores actually do sell at a lower cost, where did the discount come from?
halflife··on NYC to open municipal grocery store in 2027
So they have an unfair advantage over the competition.

Or it’s just a way to neutralize the ineffectiveness of the management, since it’s not profitable based, who’s going to be fired?

halflife··on NYC to open municipal grocery store in 2027
It’s about supply and demand. Luxury grocers provide a shopping “experience”, where low cost grocers do not. In a luxury neighborhood it would make sense the shoppers are looking for experience more so than low cost.
halflife··on NYC to open municipal grocery store in 2027
Because than people won’t come to your store. People buy where they can purchase the maximum of their shopping cart in a single place.

That is why you have loss leader grocers, where they pull people with dramatic discounts on specific items, but the total cart costs the same

halflife··on NYC to open municipal grocery store in 2027
Of course, there is a term called coercive monopoly. It exists especially in large infrastructure projects where the startup cost is tremendous so only government, or a single entity without the possibility of competition can enter.

Groceries are not one of these. If you have a problem of high grocery costs, there are many better ways to tackle that other opening a government owned store. But it does make for a great photo op.

← PreviousPage 4 of 12Next →