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

Did they ask the original authors of Radix why it's the way it is?

Exactly this. OP fails to understand that there are reasons why it was done this way, and that someone who spent thousand of hours working on this might know something that they don't.

Well, usually, the reasons are to support every single use-case. A great selling point, but ultimately why I don’t like using things like this and importing loads of other libraries. Most of the code your importing is for some other user and any one app will probably be using a slither of the functionality.

I know if the lib is written well then you won’t be introducing unused code into your code base but you still often are left with an overly complex scaffold or other infrastructure to support all the stuff you’re not using. Just use a radio button for gods sake.


"There are reasons" is a pretty bland defense of why something was done in a bad way. You'd have to show that the reasons are valid, which I highly doubt. Also, somebody spending thousands of hours on making a worse version of something existing, isn't a good justification either. That's on the level of counting lines of code as a measure of productivity.

Perhaps this is the original PR for the Radio/RadioGroup[1].

It does seem the complexity was a deliberate decision.

[1] https://github.com/radix-ui/primitives/pull/121


Half of that complexity springs from the requirement of being able to put any element as the radio button. If you’re willing to say “you can only use anything that can be expressed with CSS applied to the <input type=radio>, including psuedoelements” (which is plenty for thing like shadcn), it melts away.

The other half of it looks to come from an overloaded Label component which should probably have been split into two. There’s a reason that HTML has <fieldset> and <label> as different things. The implementation is also trivially incorrect: role=label isn’t a thing. Other parts of it are wrong or dubious too. In general, if the HTML way of expressing something isn’t permitted, the ARIA way of expressing the same thing is probably wrong too.

And so it goes, through the entire system. They assume you might want something ridiculously complex, and so they complicate and make worse the normal case.


Can here to say this exactly. Not saying they don’t raise an interesting point but the complete lack of curiosity why a group of experts in simplicity and accessibility decided to take this path is jarring

> a group of experts in simplicity and accessibility

According to who? This alone is a pretty damning case against such a claim.


Okay, what exactly are those reasons?

Why does it need so much complexity to draw a radio button that doesn't look all that different to the normal one you'd get with a perfectly ordinary <input> field, except it takes around ten seconds to draw and then doesn't work properly?


I mean, that much is obvious just based on casual reading of a few articles/discussions about "modern" front-end dev.

I am 100% convinced that "Modern" front end developers are in fact, afraid of CSS and HTML. Like, "it will steal my eyeballs and look back at my face with them" scared.

Nothing else explains things like this, tailwind, JSX components, etc. Nothing. There is no explanation besides absolute morbid fear of the underlying technology - because the browser support has improved immensely but apparently they're all deathly scared of using it.

Before you tell me that I don't know what challenges these problems solve: I was primarily doing front-end development.... 20ish years ago. One of my first jobs in the space was adapting the client side code for a J2EE app - mostly this meant removing an IKEA worth of tables and using CSS - in IE6 of all fucking things. Subsequently I created reusable UI frontend components (i.e. output some HTML, maybe this little bit of corresponding JS, you'll get a usable interactive components in a browser) for two different organisations.

I have said it before and I'll say it again. I think JavaScript developers heard about (or saw over someone's shoulder) how J2EE guys had ant/etc build toolchains, and had abstraction like FactoryFactoryImplementationFactoryBuilderFactory and said HEY THAT LOOKS COOL, and if it's harder to understand they can't fire me!!

It's like NIH syndrome but for an entire community of people whose primary goal is chasing the shiny, followed closely by resume padding.


well said!

In 2020, radio buttons weren't easily stylable in all mainstream evergreen browsers. That's usually the case why some components are over engineered. Of course they should have simplified them when all browsers fell in line, but tech debt is hard.

TIL, thanks a lot!


You can also create indices directly on expressions, including json_extract etc.


> For example, switching to another branch automatically checks out the active commit of that branch.

    git switch $BRANCH


> I would love something like that too use as a macro pad: keys that have arbitrary meaning you can reference. Keys that behave differently depending on context, and show you the context in real-time. That would be incredibly useful.

You might want to have a look at Elgato's Stream Decks.


(2017)


In 2017, a typo was fixed. The content is from 2013: https://cgit.freedesktop.org/wiki/xorg/log/Development/X12.m...


Yet I'm still running X11, with Wayland still struggling and no X12 in sight.


Not sure it's fair to call it struggling when it's the default in just about every distro and has been smooth and stable for years.


I think it's fair, since every one of those distros ships an X11 fallback. I desperately want Wayland to succeed but exaggerating its current wins won't get us there.

I don't want this post to focus on the negative, though, so I'll suggest a more positive argument: the people who would have been responsible for a hypothetical X12 instead decided to make Wayland. I can't think of a body of experts more likely to make a correct decision, so I have confidence in Wayland as the path forward.


I mean, before Wayland every distro shipped with a text console as a fallback to X11


Fair. I'll admit there are a few rough edges, mainly caused by some apps (Slack) having older versions of certain libraries that makes some functionality (like screen sharing) break.


Shipping a fallback doesn’t mean the alternative is not in daily use.


I'm not up to date on the Linux desktop ecosystem. In what sense is Wayland struggling?


Dudemanguy wrote about its deficiencies 2022-06-11 [0], ex lack of feature parity with X11 and self imposed limitations like only allowing integer scaling (ie to get 1.5 scaling, it uses x3/x2 scaling). For some perspective, consider checking other hn reader reactions to this post [1].

[0] https://dudemanguy.github.io/blog/posts/2022-06-10-wayland-x...

[1] https://news.ycombinator.com/item?id=31752760



It doesn't work reliably on any GPU I own, for any stable version of a linux distro I use. One GPU is too old, the other is too nvidia.


To be fair, I'm on an five-year old laptop with NVIDIA and since last year it almost works well enough to be a daily driver. For some weird reason Chromium doesn't render at all, even though Chrome does. That's the only remaining bug of significance.

Whereas when I tried a year before I had to bail after an hour because many applications would just have a black screen.

It kind of feels like it will take only one more year for this to work well enough (except then the laptop might be so old hardware support ends up lacking)


Wayland uses linux’s gpu abstraction (drm) to work and that’s it. If it fails to work than linux also does, so your setup has some issues.


I have to disable hardware compositing on X11 to get a reliable desktop (and HW rendering in individual apps like firefox). I'm not sure if something similar is possible on Wayland.


It doesn't sound like X11 is running reliably for you either


I restart X11 only when either there's a power failure longer than the battery on my UPS, or I upgrade my kernel, so it's reliable enough.


Having to disable compositing doesn't sound very reliable.


If it works, it works. And some of us never bothered installing a compositor in the first place, so it's hardly a high bar.


Obviously it doesn't work if your workaround is disabling it. It is either bad hardware, or buggy driver. For the latter, it has to be some obscure hardware; popular hardware would have it fixed.


Okay, let's enumerate.

Option 1: Wants to used hardware acceleration, fails, allows you to disable it and actually use your computer.

Option 2: Wants to use hardware acceleration, fails, refuses to allow you to disable anything, literally cannot display graphics.

One of these works, even degraded. The other does not.


I don't dispute that. My claim was, that both options you mention are broken, and for that one "working", "limping" would be a better term.

Certainly not something you would architect a display system around.


I have been using linux for over 20 years and reliable hardware acceleration has always been more "miss" than "hit." This goes all the way back to having to disable hardware cursors on my very first linux setup. I hear the amdgpu driver is pretty solid, and the i915 driver I use on my laptop is great. Nvidia is just a mess (nouveau and the nvidia binary drivers are differently buggy) and the radeon driver is complete garbage.


My first linux machine was 386 with Trident 9000, running Slackware, so I'm pretty aware how linux hardware support developed over time. Maybe I was lucky in picking my hardware, but buggy basic functionality was a big exception (minor bugs were there, like in amdgpu cursor not picking the same LUT as the framebuffer, and being jarring white compared to redshifted desktop; incidentally, windows driver had the same issue at the same time).

Not implemented functionality - sure. I've never got TV out running on Radeon 7500 (RV200) during early 2000s, for example. But basic functionality (today), like freezing texture mapping on a hardware, that has 3d driver implemented and that driver comes with distro, no. But then again, maybe I was lucky in my picks.


Not obscure, just old. ATI Radeon HD 5000 series.


That doesn’t depend on the protocol, I think most implementations can simply choose a so-called “dumb” backend instead of hardware composition.


I've been running Wayland for years. It does everything X11 does at this point and is better in some ways.


Wayland is X12.


2013 is when the format was converted to markdown. No idea when the content is from.


Looks like it started in 2007 [0], though the content was pretty different, there were some updates over the years, and the current version is indeed from 2013 [1]

[0]: https://web.archive.org/web/20071123130628/https://www.x.org...

[1]: https://web.archive.org/web/20131222002042/https://www.x.org...


wanted to see if it was committed on april 1st


> Bonus: I now have zero interest in buying a Steamdeck.

It's still an absolutely amazing piece of hardware. So definitely play around with it, if you ever come across one.


These are single-sided, the Steam Deck requires a single-sided M.2 2230. Agreed that frame.work should mention that in their shop listing.


they (starlabs) charge via usb-c and have two usb-c ports.


Is there any chance to get this faster sync algorithm into rsync itself?



Your "different approach" sounds almost exactly like the approach proposed in the fine article for the "ESP too small" case (a case which you assume as a given).


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

Search: