Readit News logoReadit News
leg100 commented on America's richest 10% now hold 60% of the nation's wealth   bsky.app/profile/rbreich.... · Posted by u/doener
leg100 · 3 months ago
At a glance, I'm not seeing a big difference in share of wealth between now and 1989. I'm not sure, then, what Robert Reich's point is, to say that the richest 10% "now" hold 60% of the nation's wealth, nor how he can come to the conclusion that it is "eating" the economy alive. Nor what the point is of providing a chonological graph, a graph which doesn't provide any actual percentages, nor a source. He's an accompolished economist, he can do better than that if wants to point out the egregious unfairness of society. Or is this the quality of argument on x.
leg100 commented on Horses: AI progress is steady. Human equivalence is sudden   andyljones.com/posts/hors... · Posted by u/pbui
leg100 · 3 months ago
> In 1920, there were 25 million horses in the United States, 25 million horses totally ambivalent to two hundred years of progress in mechanical engines.

I really doubt horses would be ambivalent about this, let alone about anything. Or maybe I'm wrong, they were in two minds: oh dear I'm at risk of being put to sleep, or maybe it could lead to a nice long retirement out on a grassy meadow. But they're in all likelihood blissfully unaware.

leg100 commented on Garibaldi, history's sexiest revolutionary?   historyextra.com/period/v... · Posted by u/thomassmith65
leg100 · 4 months ago
The article gives the impression "Italy" was always a nation in the making for all of history, just waiting to "unify". It talks of a "national rebirth".

But it's an invention. It never previously existed. Yes the penisula was referred to as Italy for a long time and the language is shared across the area and there are cultural similarities. But none of that automatically makes a nation - you don't have to think hard of counter examples. History could have panned out differently. It still could.

I think the bourgeoisies have been enormously successful in giving the impression that these nation states, whether it be Italy or Germany, or India, etc, that they're inevitable, they're permanent and anything else is a perversion. And Garibaldi was one such whose brilliance was to forge a nation so quickly from so many disparate states.

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
nchmy · 5 months ago
some quibbles

D* doesnt only use SSE. It can do normal http request-response as well. Though, SSE can also do 0, 1 or infinite responses too.

Calling datastar's pro features "necessary" is a bit disingenuous - they literally tell people not to buy it because those features, themselves, are not actually necessary. Theyre just bells and whistles, and some are actually a bad idea (in their own words).

Datastar is 11kb and that includes all of the htmx plugins you mentioned (sse, idiomorph) and much more (all of alpine js, essentially).

leg100 · 5 months ago
> Calling datastar's pro features "necessary" is a bit disingenuous

I didn't. I said:

> * Datastar has a paid-for Pro edition, which is necesssary if you want certain behaviours. HTMX is completely free.

I don't need to spell out why this means something very different to what you think it means.

I'll happily concede on the other two quibbles.

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
lmz · 5 months ago
Isn't that only a problem if it advertised pro features there without mentioning the fact that they're paid? If it didn't then you could just be happy with the free features, no?
leg100 · 5 months ago
I'd expect it to make it explicit this is a freemium product, with free features and paid features. Nothing is given on the home page to indicate as such.
leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
gwd · 5 months ago
One frustration I have with OOB elements in HTMX:

1. If the element is out-of-band, it MUST have `htmx-swap-oob="true"` in it, or it may be discarded / cause unexpected results

2. If the element is not out-of-band, it MUST NOT have `htmx-swap-oob="true"` in it, or it may be ignored.

This makes it hard to use the same server-side HTML rendering code for for a component that may show up either OOB or not; you end up having to pass down "isOob" flags, which is ugly and annoying.

leg100 · 5 months ago
I think Datastar has the better approach here with making OOB the default. I suspect HTMX's non-OOB default makes more sense for very simple requirements where you simply replace the part of the DOM from which the action was triggered. But personally, situations where OOB is necessary is more typical.

Interestingly, elements sent via the HTMX websocket extension [1] do use OOB by default.

[1]: https://htmx.org/extensions/ws/

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
bargainbin · 5 months ago
I’ve not tried Datastar in anger but I have tried HTMX after all the hype and it quickly became unmaintainable.

My dream was having a Go server churning out all this hypermedia and I could swerve using a frontend framework, but I quickly found the Go code I was writing was rigid and convoluted. It just wasn’t nice. In fact it’s the only time I’ve had an evening coding session and forgotten what the code was doing on the same evening I started.

I’m having a completely opposite experience with Elixir and Phoenix. That feels like an end to end fluid experience without excessive cognitive load.

leg100 · 5 months ago
Did you use templ [1] for server side templating? It supports something called fragments, which may help with HTMX [2].

[1]: https://templ.guide/

[2]: https://templ.guide/syntax-and-usage/fragments

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
leg100 · 5 months ago
I don't think the article does a good job of summarising the differences, so I'll have a go:

* Datastar sends all responses using SSE (Server Side Events). Usually SSE is employed to allow the server to push events to the client, and Datastar does this, but it also uses SSE encoding of events in response to client initiated actions like clicking a button (clicking the button sends a GET request and the server responds with zero or more SSE events over a time period of the server's choice).

* Whereas HTMX supports SSE as one of several extensions, and only for server-initiated events. It also supports Websockets for two-way interaction.

* Datastar has a concept of signals, which manages front-end state. HTMX doesn't do this and you'll need AlpineJS or something similar as well.

* HTMX supports something called OOB (out-of-band), where you can pick out fragments of the HTML response to be patched into various parts of the DOM, using the ID attribute. In Datastar this is the default behaviour.

* Datastar has a paid-for Pro edition, which is necesssary if you want certain behaviours. HTMX is completely free.

I think the other differences are pretty minor:

* Datastar has smaller library footprint but both are tiny to begin with (11kb vs 14kb), which is splitting hairs.

* Datastar needs fewer attributes to achieve the same behaviours. I'm not sure about this, you might need to customise the behaviour which requires more and more attributes, but again, it's not a big deal.

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
rubenvanwyk · 5 months ago
I recently read this: https://drshapeless.com/blog/posts/htmx,-datastar,-greedy-de...

Which states some of the basic (great) functionality of Datastar has been moved to the Datastar Pro product (?!).

I’m eager to support an open source product financially and think the framework author is great, but the precedent this establishes isn’t great.

leg100 · 5 months ago
It's also pretty shady that no mention is made of Datastar Pro on the home page [1]. You might well be well on the way to integrating Datastar into your website before you stumble across the Pro edition, which is only mentioned on the side bar of the reference page [2].

[1]: https://data-star.dev/ [2]: https://data-star.dev/reference/datastar_pro#attributes

leg100 commented on I switched from Htmx to Datastar   everydaysuperpowers.dev/a... · Posted by u/ksec
leg100 · 5 months ago
> ...To accomplish this, most HTMX developers achieve updates either by “pulling” information from the server by polling every few seconds or by writing custom WebSocket code, which increases complexity.

This isn't true. HTMX has native support for "pushing" data to the browser with Websockets or SSE, without "custom" code.

u/leg100

KarmaCake day563September 4, 2011
About
github.com/leg100

louisgarman at gmail dot com

View Original