MurphyA/hacker-news huggingface dataset:
by mg | 2025-05-09 15:27:46+00:00
Hyper syntax:

<tr :for="user of users"> <td>${ user.name }</td> <td>${ user.email }</td> <td>${ user.age }</td> </tr>

EJS syntax:

<% for (user of users) { %> <tr> <td><%= user.name %></td> <td><%= user.email %></td> <td><%= user.age %></td> </tr> <% } %>

I prefer EJS, because all you need to know is "<% begins JS" and "%> ends JS". Everything else is just plain HTML and JS.

The EJS website: https://ejs.co
by WorldMaker | 2025-05-09 15:27:57+00:00
JSX does not have any inherent data structure, it immediately converts to function calls. React is well known for taking the JSX calls and converting them to a reusable data structure, but that's React's thing and React's data structure is somewhat unique to React, other virtual DOM's have different data structures.

You can do "immediate mode" JSX. There's nothing technical stopping you, and there are at least a few libraries out there that do.
by 0xTJ | 2025-05-09 15:27:58+00:00
They chose between two candidates chosen via the US presidential primaries. Party members vote for delegates, who vote for a presidential candidate. Republicans chose Trump, then people who voted Republican at the election chose him over the alternative=.

He did not hide his fascist and dictatorial desires and he was open about how he wanted to dismantle the government. When he lost in 2020 he threw a fit and tried to have people do a coup. People did in fact elect him, I can just hope that his actions don't leave too much lasting damage here in Canada. (Maybe de-funding US science will help start to reverse decades of brain drain.)
by tauoverpi | 2025-05-09 15:28:42+00:00
I forgot to add that "like I don't need to keep asserting that a for-loop counter is an int." is exactly what is happening with a dynamically typed language that is exactly what the runtime ends up doing unless it has a built-in range type to avoid that overhead and the loop variable cannot change while looping. With a static type checker that can be eliminated upfront as the compiler knows that it's an int and not suddenly a string as it's impossible to change the variable's type once it's defined thus all of the overhead of RTTI can be erased.

Javascript has to check on each iteration that the item is an int and for arrays that the length of those arrays hasn't changed underneath along with a bunch of other things as the language doesn't guarantee that it can't change. Even the JIT compiler in use has to check "is this path still that I expect" as at any point the type of the variable used in the loop can change to something else which invalidates the specialization the JIT compiler emitted for the case of it being an int. When you don't use languages with static types you push all of this work on runtime which makes the program slower for every check it needs to do while offering none of the advantages you have with static types.

Thus with a for loop in say C you don't assert that it is an int each time you statically constrain it to be an int as the loop condition can well be based on something else even if int is the more common to use. For example in zig `for` only takes slices and integer ranges with any other type being a compile-error:

var example: [1 << 8]usize = @splat(0); for (&example, 0..) |*num, int| num.* = int;

This is not more work than what you'd do in a dynamically typed language.
by sokoloff | 2025-05-09 15:29:09+00:00
Should government’s role be to prevent all dumb decisions that affect only the people/families making dumb decisions?

I think auto liability insurance (or an equivalent bond posting) should be mandatory, because it protects others. I don’t think theft or collision insurance should be mandatory (and in fact don’t carry it on some of our cars).

Insure against losses that you couldn’t withstand. Don’t (or self-) insure against those that you can easily withstand. No government intervention needed there IMO.
by mjevans | 2025-05-09 15:29:18+00:00
(DEI:) Instead of focusing on any aspect of someone's genetics of beliefs, efforts should instead be made to provide opportunity to those without. Not at the inherent cost of others whom are qualified but in the sense of doing what a government should do: civil infrastructure.

Everywhere should have plentiful good quality housing, medical, schools, everything else that is part of the infrastructure of society.

Give those kids, and even the poor workers, nutritious meals to ensure they are ready to function as members of society.

Welfare / unemployment 'insurance' shouldn't be about just getting a paycheck, they should be about connecting those without work to work that benefits society and the people who are now getting a job or furthering training towards a job rather than sitting around hoping someone will hire.

Generally: government (of the people, by the people, for the people) should be about stewardship of the commons, the shared space between private areas.
by shadowgovt | 2025-05-09 15:30:15+00:00
So it turns out the Philosopher's Stone is real, it just involves a 10,000-ton detection apparatus, a 17-mile-diameter accelerator tube as a source of prima, and a quark-gluon plasma.

Alchemists just had a skill issue.

(ETA: technically, so do the physicists if one wanted to actually get gold out of these interactions; the gold nuclei are coming out of the interactions with highly-random trajectories and just spalling into the collector or the downstream pipe, where the nuclei fall apart under the wild energies of a nearlight-velocity interaction. Can't use the gold if you can't slow it down to human-hands speed. Of course, at the energies and quantities we're talking about, it'd be cheaper to go into the asteroid belt, find a gold-heavy one, tow it to Earth, and dump it in a convenient ocean if you really want a bunch of gold).
by troyvit | 2025-05-09 15:30:16+00:00
> there are better ways to do that.

That's the crux, for sure. The problem with DOGE though is that instead of creating better ways of doing anything, they just seem to eliminate doing those things at all.

Now we not only don't have a better way of doing a thing that might have been necessary, but we don't even have the sub-optimal way of doing that thing, so now it's not getting done at all.

Edit: Bringing it back to the article, if a person with access to 'a "core financial management system" belonging to the Federal Emergency Management Agency' was foolish enough to let their system get hacked, are we really finding a better way to do things, or are we being a little too careless?
by PurpleWeb | 2025-05-09 15:30:19+00:00
Hi HN,

I've built TheFootball.News (https://thefootball.news), a web app to tackle information overload for football fans.

It aggregates news from various sources and allows users to personalize their feed by preferred leagues, teams, players, and article languages. A key feature is the use of an AI model (via DeepSeek API as noted in our changelog) to standardize entity names – e.g., "Man U," "Man United," and "Manchester United" are all recognized as the same entity for consistent filtering and search. This helps ensure users don't miss news due to naming variations.

The system also prioritizes fresh content with strict date filtering and offers daily email summaries based on user preferences.

I built this to create a cleaner, more relevant football news experience.

Would love to get your feedback Thanks!
by _djo_ | 2025-05-09 15:30:35+00:00
Not trying to argue, though blame is deserved for those who voted for Trump this time around.

I'm not saying that out of anger, that's just the nature of democracy and that the corollary of a voting public being able to choose their leaders means they're responsible when they make bad choices. That, in turn should trigger national debates, reflection, and reform hopefully, else the US will continue to head down an ever-increasingly authoritarian and populist path.

I certainly don't want the US to go down that path, nor do I enjoy seeing the damage being done now. I just believe that if we coddle voters who made terrible political choices they're just going to keep making those bad choices election after election.
by __jonas | 2025-05-09 15:31:30+00:00
> This is an oldschool example using external CSS, which is no longer the "idiomatic" way to build React compomnents:

Where does this claim come from?

classNames and an external CSS file is literally the first suggested way to do styling according to the docs:

https://react.dev/learn#adding-styles

I don't doubt that tailwind and shadcn and such are popular, but they are not even mentioned in the react docs, so I don't think you can call it the 'idiomatic' way
by nobleach | 2025-05-09 15:32:07+00:00
Extremely hard to tell an HR person, "Right-click on here in your Workday/Zendesk/Salesforce/etc UI and export a protobuf". Most of these folks in the business world LIVE in Excel/Spreadsheet land so a CSV feels very native. We can agree all day long that for actual data TRANSFER, CSV is riddled with edge cases. But it's what the customers are using.
by roenxi | 2025-05-09 15:32:25+00:00
You'd be involved in a million times more war. There are too many conflicts for that sort of thinking to work.

The lessons from WW1/2 were (1) don't be involved in the first few years of a World War, they are empire wreckers and (2) after a war, winners should invest in the economic success of the losers and (3) more Bismarck. Being even more aggressive would hardly have helped, the Europeans were all aggressive. Turns out aggression as a strategy led to ... more and bigger wars. Who'd a thunk it.
by hajile | 2025-05-09 15:32:46+00:00
This makes no fundamental argument aside from "we decided to change things to be different from what is in the Bible".

The clear reference was to the overseer of a church or what would be considered a pastor or priest. All bishops are priests.

Mark 10:8-9 KJV

[8] And they twain shall be one flesh: so then they are no more twain, but one flesh.

[9] What therefore God hath joined together, let not man put asunder.

This shows that even if you considered bishops to be a new creation, they shouldn't abandon their family for the position. And of course, the order of deacons isn't necessary of commentary as it is specifically addressed in the next part of 1 Tim 3.
by mock-possum | 2025-05-09 15:33:36+00:00
I’m really not a fan of the comparisons between the react code and the nue code - it comes off as disingenuous.

Just as an example that catches my eye - the complex table react example includes sorting icons, but the nue example doesn’t. If you remove features then of course there’s going to be less lines of code.

Feels like it’s strawmanning rather than ironmanning.
by dralley | 2025-05-09 15:33:47+00:00
They're pushing a 55% budget cut. There is absolutely no universe in which you can justify that with rhetoric around "DEI" science. This is going to cut very, very deep into basic STEM / biomedical research.

They're cancelling mRNA research, they're flagging research that uses words like "trauma" or studies how medications impact men and women differently. There's no sensible agenda behind all of this, it's just backlash and destruction done haphazardly. This is no different from the Department of Defense deleting the Tuskegee Airmen from the website because "DEI", except far far more consequential.
by wavemode | 2025-05-09 15:34:16+00:00
I think the idea is, assuming you have already resolved to disparage the company

in that case, rightfully you should not take the money regardless of the amount.

but, if it's a tiny amount of money (tiny enough to indicate that the company probably isn't going to bother coming after you in court) then you can maybe consider taking it anyway and accepting the miniscule risk

whereas receiving a vast sum of money would carry a much larger risk of legal action
by jfengel | 2025-05-09 15:34:19+00:00
Medicare drug price negotiations? The kind that Republicans have always opposed? The thing enabled by the Inflation Reduction Act, which every Republican opposed and Trump has been trying to overturn?

Great. I don't even care that he'll take credit for something Biden did. I don't think this is the best way to go about it, but I'm not going to quibble. Reducing drug prices is good.
by cge | 2025-05-09 15:34:20+00:00
Concretely: at a European university, we are hearing from American researchers who would have been above our ability to attract previously, and who are directly telling us that they're interested in applying for positions because they have been directly affected by these funding cuts and antics.

This could end up being an opportunity like the one the US had in the 1930s and 40s for any country able to take advantage of it. Whether Europe or China will benefit more remains to be seen. I have been reminding people that, before the 1930s, Germany had the best university system and research in the world. And it's particularly sad, because in my personal experience, culturally, and organizationally, American research universities and research culture have traditionally been much better and much more conducive to good research and real collaboration, then Europe or China.
by os2warpman | 2025-05-09 15:34:36+00:00
>Elementl

Missing vowels + no plan + a leadership team stacked with MBAs, investment bankers, and FAMILY MEMBERS?!?= bullshit private equity "play".

Let me predict what is going to happen: a team of connected "playaz" are going to get real companies with cash and the government to give them money to shake up the nuclear market.

Then the leadership team is going to hire a token staff of scientists, engineers, and public policy folks.

They are going to have a groundbreaking ceremony for a facility (not a reactor, like an R&D facility or "rapid innovation incubator" or something) that is highly publicized and subsidized by state and local business development grants and credits but will either never be finished or never fully staffed.

Nothing will happen for four years until they either fade out of existence or declare defeat due to "regulatory and market conditions" with nothing to show but some powerpoints and press releases.

The hundreds of millions of dollars that flowed into the organization is never spoken of or seen again.

Then a couple of years later they'll register another .io domain with missing vowels and start all over again.
by azakai | 2025-05-09 15:34:37+00:00
This is indeed unfortunate, but on the other hand, multivalue's benefits are probably very small.

Inside functions, there is perhaps a 1-3% code size opportunity at best (https://github.com/WebAssembly/binaryen?tab=readme-ov-file#b...), and no performance advantage.

Between functions there might be a performance advantage, but as wasm VMs do more things like runtime inlining (which becomes more and more important with wasm GC and the languages that compile to it), that benefit goes away.
by WorldMaker | 2025-05-09 15:34:49+00:00
> Also, in order to transform JSX into individual rerunnable functions, we'd need a whole different transpiler.

I don't think you would. `<Component prop="example" />` gets converted by current transpilers into `jsx(Component, { prop: "example" })`. The `Component` itself is passed as is. In the case of Components that are just functions, that passes the function as-is, as a function you can just call as needed.

JSX was built for "rerunnable functions". It's a lot of how React works under the hood.
by josephcsible | 2025-05-09 15:34:56+00:00
> Devoción began limiting customers' WiFi use to two hours during weekdays after remote work skyrocketed during COVID.

> Customers must get a code through an app to access the internet, and it's shut off entirely on weekends.

Who's doing remote work in coffee shops on weekends? Wouldn't it have made more sense to completely unrestrict the Internet then, rather than completely shutting it off?
by timschmidt | 2025-05-09 15:35:10+00:00
I've spent most of my life voting green. I don't see myself as closely affiliated with either dems or republicans. I find that there are policies each of them engage in that I agree and disagree with. I really appreciate substantive discussion of policy. Which there seems to be less and less of every year, and more and more each side seems to be arguing and fighting against their own boogey-man version of the other side. Skewed, stretched, and exaggerated to extremes in a meme-laden propaganda war against each other.

I find that this does little to help either side understand the (often legitimate!) concerns of the other. It seems like there is an inexorable wedge being driven between both sides, by both sides. I'm not sure how we address that. And I'm not sure how to reconcile the factors which drive each side without addressing it.
by jmull | 2025-05-09 15:36:09+00:00
It's not a question of HTML's syntax.

1. HTML is a widely implemented standard. What you learn and know about HTML, and what you create with HTML is widely applicable. Not so much for your HTML alternatives, like Aberdeen.

2. HTML is what the browser accepts, which means you end up dealing with it anyway, just with a transformation in between, making things harder. The bigger the transformation the harder it is. To develop with Aberdeen you still need to know HTML, but you also need to know Aberdeen and how it transforms into HTML. And, you typically end up needing to learn how to mentally transform backwards as you debug, e.g., using the browser dev tools, looking at problem HTML, and deciding how to change the Aberdeen code to fix it.
by overflow897 | 2025-05-09 15:36:13+00:00
Genuine question but did folks feel poor during the heyday of the middle class? It seems like there was a period post-ww2 where you could make a living wage and still buy a house and sends your kids to college.

I'm not sure what the answer here is, but it does seem like this is something that has existed. Consumerism was pretty rampant in the 50s and 60s when a lot more was still made in the US.
by __jonas | 2025-05-09 15:36:16+00:00
Interesting, what is the origin of that syntax (EJS)?

I know it from Elixir [0] and strongly dislike it there, I was under the assumption in comes from Ruby [1] since so much of Elixir is Ruby-inspired, is this JS version the original one?

[0] https://hexdocs.pm/eex/EEx.html

[1] https://github.com/ruby/erb
by phkahler | 2025-05-09 15:36:24+00:00
Yeah, a 4K display is about 8 megapixels so at 60fps you need to write 480M pixels per second. That's feasible with a single CPU depending on the complexity of the rendering. Multi-core can get more work done per pixel. You'd still be writing highly optimized code to render fairly simple things if they require a full screen update.
by hermitcrab | 2025-05-09 15:37:16+00:00
CSV is a questionable choice for a dataset that size. It's not very efficient in terms of size (real numbers take more bytes to store as text than as binary), it's not the fastest to parse (due to escaping) and a single delimiter or escape out of place corrupts everything afterwards. That not to mention all the issues around encoding, different delimiters etc.
by sophacles | 2025-05-09 15:37:20+00:00
> Isn't the point of a memory safe language to allow programmers to be sloppy without repercussions, i.e., to not think about managing memory and even to not understand how memory works

No. The point is even the best programmers of unsafe languages regularly introduce both simple and subtle bugs into codebases while being careful about handling memory correctly, and therefore we should use languages that don't even allow those bugs for most every use case. Using these languages still allows crap programmers to waste GBs of correctly allocated and handled memory, and good programmers to write tight, resouce-sipping code.

Dependencies are orthogonal to this.
by timschmidt | 2025-05-09 15:38:04+00:00
I think it's worthwhile to consider that what you said here:

> Not trying to argue, though blame is deserved for those who voted for Trump this time around.

> I'm not saying that out of anger, that's just the nature of democracy and that the corollary of a voting public being able to choose their leaders means they're responsible when they make bad choices. That, in turn should trigger national debates, reflection, and reform hopefully, else the US will continue to head down an ever-increasingly authoritarian and populist path.

Is almost to a word how the Right feels about the Left as well. We're watching that play out. Conflict escalation is even less fun on the societal scale.
Show HN: Extreme Router – A High-Performance, Plugin-Driven JavaScript Router
by liorcodev | 2025-05-09 15:38:21+00:00
Extreme Router is a radix-tree-based, plugin-driven JavaScript router designed for speed and extensibility. It features:

Blazing-fast lookups using an optimized radix tree.

Extensible plugin system to customize route matching.

Universal compatibility across Node.js, Bun, Deno, and browsers.

Zero dependencies, lightweight yet powerful.

Built-in support for parameters, wildcards, regex patterns, and optional segments.

Benchmarked for high performance under stress.

Ideal for high-traffic applications, custom routing needs, and scalable architectures.

Check it out! Open to feedback, contributions, and ideas.
by punnerud | 2025-05-09 15:38:42+00:00
GIL is like a "red-cap" on the head for the CPU-core running the task, so you would not be able to run true Async without GIL. Have to hand the "red-cap" back, for the next task.

Instead of using a global lock ("red-cap"), Python objects have introduced a specialized reference counting system that distinguishes between "local" references (owned by a single thread) and "shared" references (accessed by multiple threads).

In that way enabling to remove GIL in the long run, now starting with making it optional.
by vanviegen | 2025-05-09 15:39:01+00:00
> Nice little library, but as it's signals based, it would be nice to make it compatible with the signals proposal (https://github.com/tc39/proposal-signals)

Based on the current proposals, it seems that a signal can only contain a single atomic value, for which changes can be tracked. Aberdeen's `proxy` can efficiently wrap complex data structures (objects within arrays within objects, etc), tracking changes on the level of primitive values (integers, strings).

For that reason, I wouldn't really call Aberdeen signals based.

Yeah, "what data to sync and when" describes the problem quite nicely! And indeed, it's entirely different from this library, except that I have a partial solution in mind that may fit Aberdeen rather well... We'll see. :-)
by specialist | 2025-05-09 15:39:07+00:00
Yes but:

> He is clearly not working for billionaires...

Not working for Wall St or Main St.

It's a food fight between opposing elites. ("The grass suffers when elephants fight.")

As you surely know, some do advocate crashing our economy, enabling them to seize even more power. They use shibboleths like dark enlightenment, free enterprise, taxation is theft, yadda yadda.
by crazygringo | 2025-05-09 15:39:53+00:00
I've never been to a restaurant without backup menus.

Even if they have QR codes, they have some paper menus or tablets.

And it's not even for people without devices or logins -- it's because phone batteries run out and they run out all the time. Restaurants don't generally make a lot of profit, and they need every customer they can get.

Do you bother to ask? Or do you just assume?
by wing-_-nuts | 2025-05-09 15:39:55+00:00
I run ABS on my laptop, and the main issue I run into is that when my laptop changes networks (i.e my vs my parents wifi), it completely breaks syncing. I wish you could set up a server and say 'this will be available on x,y, or z ip, try them all'

The android app does allow you to download audio books for offline listening, which I use a lot when driving. Unfortunately the 'playlist' doesn't seem to just autoplay the next book. I don't like interacting with my phone behind the wheel. Not sure if it has an android auto app or not.