News for hackers. Stuff that matters.

leg100

Re:Hacking OpenAI on Friday September 18, 2026 @04:49AM (#49751726)
One is an observation the other is not, it's a description of what it is; one is a posteriori, the other is a priori (contrary to what you say).

They're not comparable.

Kenny Dalglish, Liverpool FC, 1985-1990.
Re:I'm Coding by Hand on Saturday April 18, 2026 @02:34PM (#47818292)
I'm not sure if that's the case. Of course one has always been able to copy or plagiarise open source code. The value of open source projects is that they continue to be maintained by people that understand the code base. LLM's lifting that code doesn't change that.
Re:America's richest 10% now hold 60% of the nation's wealth on Sunday December 28, 2025 @05:51AM (#46410155)
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.
Re:Horses: AI progress is steady. Human equivalence is sudden on Tuesday December 09, 2025 @05:35AM (#46203416)
> 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.

Re:Garibaldi, History's Sexiest Revolutionary? on Sunday November 23, 2025 @07:04AM (#46022899)
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.

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @01:37PM (#45541596)
> 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.

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @09:58AM (#45539155)
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.
Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @06:24AM (#45537224)
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/

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @05:43AM (#45536969)
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

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @05:31AM (#45536893)
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.

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @05:10AM (#45536741)
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

Re:I Switched from Htmx to Datastar on Friday October 10, 2025 @04:49AM (#45536635)
> ...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.

> These payment processors seem to be basically levying a 1-3% tax on a nations entire GDP

You're exaggerating for effect. GDP is the total value of all goods and services sold or bought; only a fraction of which is paid for with a credit card. I doubt an F35 is purchased with a Visa.

None of that is contrary to "moving money at speed to make wealthy people more wealthy".
Re:Show HN: Kubernetes Spec Explorer on Thursday December 12, 2024 @01:34PM (#42401916)
I like the version diffs.

Perhaps add an "expand all" button to avoid clicking individually on properties to see their descriptions?

I usually rely on the official generated docs (all on one giant page):

https://kubernetes.io/docs/reference/generated/kubernetes-ap...

Re:Britain buys semiconductor factory for defence purposes on Sunday September 29, 2024 @04:47AM (#41685868)
Because it's questionable whether that's even possible.
Re:Britain buys semiconductor factory for defence purposes on Sunday September 29, 2024 @04:46AM (#41685864)
Newport is in South Wales.
What? They did hold off. Their actions matched their words.
Re:Building Bubbletea Programs on Saturday August 31, 2024 @01:24PM (#41410335)
Indeed a typo, well spotted, it should return the model as well.
Re:Building Bubbletea Programs on Saturday August 31, 2024 @12:26PM (#41409906)
Thank you. Out of curiosity, what do your "TUI managers" do for your apps?
Re:Building Bubbletea Programs on Saturday August 31, 2024 @12:22PM (#41409889)
Good point. I'll update this section to more clearly refer to the use of go routines in particular outside of the event loop.
Re:Bubble Tea v1.0.0 released on Thursday August 29, 2024 @05:59AM (#41389092)
I've put together some tips for building Bubble Tea programs:

https://leg100.github.io/en/posts/building-bubbletea-program...

No, it's definitely passed by value:

https://go.dev/play/p/mIehOwUWz95

A map is implicitly a pointer to the underlying map structure. When you pass a map, you're passing a copy of a pointer.

Show HN: Pug, a TUI for Terraform

https://github.com/leg100/pug

Pug is a full screen terminal user interface for terraform.I wanted a tool that could scale terraform without leaving the terminal. There are plenty of SaaS products (terraform cloud, etc), and yes there is terragrunt but its interface is sorely lacking. I want logs to be organized and easily accessible. I also wanted to view and manage state resources at scale without endlessly rattling out...

( Read More... | no comments | 4 points | on HN )
I've built a TUI for terraform:

https://github.com/leg100/pug

It's built using Go and the bubbletea library. It's been a breath of fresh air compared to building a web app, simpler and faster to develop and test. And of course far more responsive than a web app could ever be.

The degree to which the housing crisis is a global phenomenon is generally understated.

Instead articles focus on individual countries and lay the blame on their particular circumstances and policies, not the bigger picture.

It was a different era. I'm sure the town's people were discreet. Nonetheless word would have percolated. Hundreds of men would have come from out of town to build the thing and then returned. Did they keep stum? If they didn't who would have they told? There's no internet forums. You could tell a newspaper but they would either be patriotic or they would try to enquire further and get nowhere.

What matters is did the soviet's know? There is still much to be declassified.

And of course it's all a bit silly. In the event of an attack would any of this actually pan out and function as it should?

Older »