Hacker Newsnew | past | comments | ask | show | jobs | submit | yen223's commentslogin

It depends on whether you're making the breakfast, or someone else is making your breakfast.

Light breakfasts are popular if you have to make it yourself


At least some of the comments here are likely AI-generated

Most people nowadays are not vaccinated against smallpox anymore


You can do both! Better trains and more EVs replacing gas cars can be done simultaneously!


You forget the most important aspect of policy: it can't cost a single dime, and everyone must lie about that. Read the first sentence of the article:

"When California neighborhoods increased their number of zero-emissions vehicles"

Obviously neighborhoods/cities/states didn't increase anything. It was just rich people living there buying fancy cars. Of course, this needs to be described as a great accomplishment of local government.

And nowhere in the article is the obvious solution even suggested: advancing electric car technology so they're cheaper than ICE cars. And I don't mean charging extra tax while cutting public transport to make sure poor people don't go anywhere anymore, I mean fixing the technology so everyone has transport, for less money.


California government has a great claim to advancing the state of the art in EVs (and hybrids and just ICE before that).

Some people credit Tesla with kick starting the EV revolution. Californian governance kick started Tesla.

Their EV efforts go back to the ZEV mandate in 1990.


> obvious solution

Shouldn't the obvious solution be based on observable reality? Which is that there is no technology in sight that will make EVs cheaper to build than ICEs. Otherwise you are praying for a miracle, and that's not a sound policy.


Technological advance can be modeled like anything else. Everything about plug-in EVs is cheaper than ICE cars, except the battery. So you can model exactly what you need to get the same as you're currently seeing with solar panels. You can calculate at exactly what point they'll take over aviation and so on.

I mean, this isn't even a very hard thing to model.


> I mean, this isn't even a very hard thing to model.

Could you please explain in more detail what exactly do you want to model here? Above, you mentioned "advancing electric car technology so they're cheaper than ICE cars". Now as we both know the issue is with the battery, do you just want cars with battery so small that the car is cheaper than an ICE but nobody wants it? Because there is no need to model that, it has been tried and failed.

If you mean modeling battery technology that's not yet available in EVs, good luck with that. There are better batteries available than in mass-market vehicles, but they are not cheaper; cheaper technologies are not as good. Sure, in 10 years the batteries will be much better overall, but we don't really have the luxury of waiting until the technology gets perfect and then scaling that, do we.


I feel like it's worse to force someone to buy something they do not want, knowing full well it's going to materially harm them


We are in agreement.


This is the kind of stuff we have to do because almost all browser <input> elements are terrible in terms of customisability. Especially radios and selects

If you're one of those who think we should just use the default, bear in mind that the default radio button has poor usability for mobile users.


There are lots of ways to style these native controls, though, including ways to start from scratch and retain the accessibility affordances.

I'd be curious to know more about the usability issues you've found on mobile -- I've not had any personally when using radio buttons. I'll readily grant you that 'select' is awful everywhere though!


It’s a lot easier now than it used to be. Radio buttons used to be nearly impossible to style, and I still think they require scripting to de-select— so none in a group are selected after one has been selected. I’ll bet most of the complexity in the article is some combination of keeping support for older browsers, technical debt, and nobody complaining about it because it works.


> bear in mind that the default radio button has poor usability for mobile users

Wrap it in a label, give the label a padding. Boom!


The only <input> that is annoying to style is the “select” one because it’s hard to style the “options”. The rest seem reasonable and quite customizable in my experience.


The date picker still sucks.


I admit I haven’t had to use the date picker in a long time but I looked at the MDN for an example of the default implementation of it and it seemed fine on my iPhone. What issues have you encountered with it? I imagine it’s a different story on desktop browsers.


It’s been good on mobile for a while, and it’s a travesty on desktop.

Then if you want something a little bit complicated you have to do it all yourself.

- What if I need a date range instead of a single date? - What if I have excluded dates? (Only weekdays/only in the future/blackout dates) - What if I want to show other metadata with each day? (Like in a calendar showing each day with some metadata next to it)

Beyond “give a whatever the system thinks is a good date picker that I have no control over” the input with type date isn’t very useful.


Not on mobile. Most internet access these days is mobile.


And even select is fully customisable now if you're targeting modern browsers


really? how?


The article says browser support is limited, but good docs: https://developer.mozilla.org/en-US/docs/Learn_web_developme...



The article explains how to style radio buttons with CSS however you want. What’s the problem with that?


It doesn’t.

It gives a very naive approach that doesn’t support any complex styling.

For that you need to wrap the input and additional styling elements in a ref’ed label.


Out of interest what's an example of styling that the radix/shadcn version enables that their approach doesn't? I was able to (AFAICT) replicate the radix docs example by just moving their styles around: https://codepen.io/mcintyre94/pen/pvbPVrP


In the example they are just using an empty <RadioGroup.Indicator/> for the pip as it is easy to target with a classname, but you can put any content in there instead for e.g. card-style radios (as used for complex selections, like a subscription tier).

By using radix, the underlying behaviour is compliant and identical for each of those implementations - you just change the content. Radix isn't looking at it like an html radio element, it is looking at it as a completely unstyled unique item selector.

The pseudo-element styling approach limits you to 3 layers - the container, and the 2 pseudo elements, none of which you can provide with meaningful content besides plain text. The best you can do is provide a basic styles and set background image. For anything else you need to use labels to either wrap the radio (in which case you can access state via sibling selectors) and/or ref them with "for" (in which case you cant access the state).


Wrapping it in a label is the idiomatic and correct way, and should be done even when not styling. Perhaps especially when not styling.

Putting an adjacent label is also possible, but scales poorly due to needing unique ids.


Can you give an example please? What kind of complexity are we talking about?


Any kind of nested markup: styled content, additional animation layers, etc.


Author here. Can you provide a screenshot or more detail?

I'd be happy to implement an HTML + CSS only solution and share it with you.

Thanks


But is that still less complex than what the author found?


Australia is lucky, we get hot summers and mild winters, which means our electricity demand is highest precisely when we get the most solar.

That's why something like 30% of Australian houses have solar.

That said, grid prices spiked recently. Both a combination of subsidies expiring, and fewer people buying grid power (because of solar) causing fixed costs to be shouldered by fewer people.

It should be pointed out that while electricity prices went up on paper, a lot of people aren't paying those higher prices because they are on solar!


Temperature has nothing to do with the performance of solar. Solar panels perform better when they are cooled.

Also worth pointing out that much of the US is below 49 degrees latitude. Which is south of most of Europe. Washington DC and San Francisco are at a similar latitude (38) as Melbourne (-37). Most of the US is perfectly situated for getting pretty decent solar power around the year. Yes it gets cloudy sometimes. It's usually not continent wide. You can compensate with cables and batteries. The US is far behind because of policy and their local energy monopolists blocking progress. Not because of anything to do with the weather or geography.

Prices have a lot to do with scarcity. Which with monopolists has more to do with the lack of a free market than with a scarcity of resources. Installing solar is about 3-5x more as expensive in the US as in Australia. The permitting process in the US is more expensive than the total cost of buying and installing in Australia. That's a policy problem in the US. All the hand wringing around that topic isn't helping a lot. A bit of pragmatism could improve things a lot and probably very quickly. Australia is showing how to do that. And yes, they have rain there too and you can go skiing pretty close to Melbourne. That isn't stopping them.


I wasn't talking about the performance of solar, only the demand for electricity.

Someone pointed out that the big problem with solar isn't how do we store daytime solar for nighttime use - this is easily solved with batteries. The real unsolved problem is how do we store summer solar for winter use.

Australia doesn't have this problem, not to the extent of other colder places, because we don't need a lot of heating in the winter.


Seems like there are lots of approaches that are technically viable for seasonal storage, hard to work out which one is better cost wise.


The cool thing is you can just try it. The barrier to entry is incredibly low right now. If it works for you, great. If it doesn't work for you, great. At least you know.


That's the real reason the conversation seems pointless. Every thread is full of comments from one group saying how useful AI is, and from another group saying how useless it is. The first group is convinced the second group just hasn't figured out how to use it right, and the second group is convinced the first group is deluded or outright lying.


Yes, I'm in the second group and I have that conviction about the first group based on personal experience with LLMs.

But most hype is not delusion. It's people trying to present themselves as "AI" experts in order to land those well paid "AI" positions. I don't think they even believe what they're saying.


It is incredibly annoying that in the case where the host doesn't know where the car is but opens a goat door anyway, the probability goes back to 50-50


Eh, when you think about it, it makes sense.

Original rules (host knows where car is and always opens a door with a goat):

- 1/3 of the time your original choice is the car, and you should stick

- 2/3 of the time your original choice is a goat, and you should switch

Alternative rules (host doesn't know where car is, and may open either the door with the car or a door with a goat)

- 1/3 of the time your original choice is the car, the host opens a door with a goat, and you should stick

- 1/3 of the time your original choice is a goat, the host opens a door with a goat, and you should switch

- 1/3 of the time your original choice is a goat, the host opens the door with the car, and you're going to lose whether you stick or switch

So even under the new rules, you still only win 1/3 of the time by consistently sticking. You're just no longer guaranteed that you can win in any given game.


We are conditioning out the case where the host picks the door with a car, so there's only two scenarios of equal probability left. Hence 50-50.


Well yes, if you throw out half of the instances where your original choice was wrong, then the chance your original choice was correct will inevitably go up.


But if he doesn't know where the car is, how can he be sure that the door he opens is going to have a goat?


The scenario is the host doesn't know which door has the car, opens some random door, and that door happens to have a goat behind it.

If you were in this scenario, your odds of getting the car doesn't change whether you switch or not


That would indeed be annoying, but I doubt it is the case. If you only consider this scenario, it cannot be distinguished by conditional probability from the case that the host knows, and so the math should stay the same.

As usual, the problem is not an incredibly difficult problem, but just a failure to state the problem clearly and correctly.

Try to write a computer program that approximates the probability, and you'll see what I mean.


https://github.com/yen223/monty_fall/blob/master/Monty%20Hal...

The math is contingent on whether you know the host knows or doesn't know where the door with the car is. This is the counterintuitive bit.


Your program shows exactly what I mean: "Impossible" cannot be non-zero, your modified question is not well-defined.

Yes, of course it depends on the host knowing where the goat is, because if he doesn't, the scenario is not well-defined anymore. This is not annoying, this is to be expected (pun intended).


The scenario is well-defined. There's nothing logically impossible about the host not knowing which door has the car, and still opening the goat door.

"Impossible" in the program just refers to cases where the host picks the car door, i.e. the path that we are not on, by the nature of the statement. Feel free to replace the word "impossible" with "ignored" or "conditioned out". The math remains the same.


No, sorry, it is not well-defined. But I should have been clearer. What is not well-defined? Well, the game you are playing. And, without a game, what mathematical question are you even asking?

You cannot just "ignore" or "condition out" the case that there is a car behind the opened door, the game doesn't make any sense anymore then, and what you are measuring then makes no sense anymore with respect to the game. In order to make it well-defined, you need to answer the question what happens in the game when the door with the car is opened.

You can for example play the following game: The contestant picks a door, the host opens one of the other doors, and now the contestant can pick again one of the three doors. If there is a car behind the door the contestant picks, the contestant wins. Note that in this game, the contestant may very well pick the open door. The strategy is now to obviously pick the open door if there is a car behind it, and switch doors if it is not. I am pretty sure, when you simulate this game, you will see that it doesn't matter if the host knows where the car is (and uses this knowledge in an adversarial manner), or not.

The game you seem to want to play instead goes as follows: If the door with the car is opened, the game stops, and nobody wins or loses. Let's call this outcome a draw, and forget about how many times we had a draw in our stats. But you can see now that this is an entirely different game, and it is not strange that the resulting stats are different than for the original game.


Nobody said he can be sure.


Claude's frontend design skill is an interesting read

https://github.com/anthropics/claude-code/blob/main/plugins/...


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: