MurphyA/hacker-news huggingface dataset:
by tuetuopay | 2025-04-09 12:48:05+00:00
You can install a global panic handler to avoid bringing the whole process down. Instead of aborting, take the stack trace, print it, perhaps raise to sentry, and kill the specific "work unit" that caused it. This "work unit" can be a thread of a task, depending on how the application is architected.

This is precisely what Tokio does: by default, a panic in async code will only bring down the task that panicked instead of the whole application. In the context of a server, where you'll spawn a task for each request, you have no way to bring down the whole application (), only your current scope.

(): there could be other issues, like mutex poisoning, which is why nobody uses the stdlib's mutexes. But the general point still stands.
by fastball | 2025-04-09 12:49:23+00:00
That is where Apple's GPTK (Game Porting Toolkit) came into play, and why Whiskey was popular at all. It allows for somewhat seamless interop between Wine and D3DMetal, which is an Apple translation layer from DirectX 11/12 instructions directly to Metal (Apple's Graphics API). Given that the majority of the cycles for video games are consumed by these graphics APIs, having that direct translation layer allows for fairly performant gameplay on Apple Silicon macs.
by taeric | 2025-04-09 12:49:48+00:00
That better way makes a ton of sense, and is what I would expect to be default. Getting page numbers is a flex that just doesn't feel necessary. As I said, I would expect even faster renders if it did present content first. Would edge case into unstable page counts, but I struggle to care on that? Make it an optional setting, and be done with it. Especially as I prefer resizing to keep the current start of page I'm looking at. Something obviously not guaranteed in a resize.
by tuetuopay | 2025-04-09 12:50:24+00:00
This is factually incorrect. The behavior you describe with Elixir (sic) is precisely what most Rust async runtimes do. (sic because it's Erlang that's to thank)

IMHO that is the sensible thing to do for pretty much any green thread or highly concurrent application. e.g. Golang does the same: panicking will only bring down the goroutine and not the whole process.
by cubefox | 2025-04-09 12:50:31+00:00
A similar failure of GOFAI was ABBYY's (a Russian company which was for a long time market leader in OCR software) monumental (multi decade long) attempt of creating advanced translation software entirely based on complex formal grammar parsing.

The story behind it is really interesting. This article was written by someone who worked at ABBYY:

https://sysblok.ru/blog/gorkij-urok-abbyy-kak-lingvisty-proi...

The piece is in Russian but can (ironically) be read in good English by using e.g. the Google Translate feature inside Chrome. Which is of course entirely based on machine learning.

The story is essentially similar to Cyc: symbolic AI/logical AI/GOFAI can produce initially impressive results (ABBYY was way better than early forms of Google Translate), but symbolic approaches doesn't scale well. Big Data + machine learning wins out eventually. The piece above mentions a 2009 piece from Google which put forward this thesis. "The Unreasonable Effectiveness of Data":

https://static.googleusercontent.com/media/research.google.c...

Note that 2009 was significantly before the existence of large language models, transformers, or even AlexNet.
by pornel | 2025-04-09 12:50:52+00:00
Rust can be optionally compiled in a panic=abort mode, but by default panics are recoverable. From implementation perspective Rust panics are almost identical to C++ exceptions.

For servers that must not suddenly die, it's wise to use panic=unwind and catch_unwind at task/request boundaries (https://doc.rust-lang.org/stable/std/panic/fn.catch_unwind.h...)

In very early pre-1.0 prototypes Rust was meant to have isolated tasks that are killed on panic. As Rust became more low-level, it turned into terminating a whole OS thread on panic, and since Rust 1.9.0, it's basically just a try/catch with usage guidelines.
by acdha | 2025-04-09 12:51:44+00:00
Xi cannot afford to look weak, but also doesn’t need to worry about the next election and has a couple hundred other countries to trade with. I think they’re making the fairly rational decision that appeasement will lead to future attempts and are betting that Wall Street has enough influence with Republicans in Congress that they’ll stop delegating tariff powers to the executive branch. You only need a handful of them to break ranks to make this end, so it’s not a bad bet.
by hombre_fatal | 2025-04-09 12:52:16+00:00
I find that it's hard to waste time on HN after your first salvo of the day since the day's frontpage topics are kinda set early on and they change pretty slowly. (Unless, of course, someone is wrong about one of Your Topics and needs your corrections throughout the day.)

And I don't see the point of going past the frontpage unless you want to bicker with someone on yesterday's topics that nobody will ever see. So just get it out of the way early.

— Suddenly selfaware guy who realizes he writes 5 comments a day on HN, kinda like a fat guy giving you weightloss tips. You see, the trick is to not moderate your intake at all.
by alkonaut | 2025-04-09 12:53:25+00:00
But no few would write a process-per-request web server today for example. And if a single process web server handles 100 requests you would then accept that one bad request one tore down the handling of the 99 others. Even if you have a watchdog that restarts the service after the one request choked, you wouldn't save the 99 requests that were in-flight on the same process. Can't you catch_unwind for each request handler, if one chokes then you just ignore that request. If you worry about that messing anything up, then you can tear down and restart your process after that, so the 99 other requests get a chance to complete?
by 0xbadcafebee | 2025-04-09 12:54:25+00:00
I try to use Google. If I put my search question into the Android Firefox url bar and hit enter, Google will show up with some useful answers (if it's not in the AI answer, Google is useless, because there are 5 pages of bullshit before it begins to show me actual web page search results).

But if I then click the Google search text box at the top, and start typing, it takes 20 seconds for my text to start appearing (the screen is clearly lagged by whatever Google is doing in the background), and then somehow it starts getting jumbled. Google is the only web page this happens to.

I actually like their results, they just don't want me to see their results. Weird business model.
by jchw | 2025-04-09 12:54:36+00:00
The thing is, "Apple Silicon" computers are very fast. They are, obviously, not the fastest computers you can possibly buy, but rather than monetize fast CPU cores Apple mainly monetizes SSD and RAM and does minimal segmentation on the CPU, so even the lowest end Mac devices are absurdly fast compared to low end PCs. Rosetta is also pretty fast, depending on the workload, since the hardware is specialized to support fast x86 emulation.

I reckon a lot of games on Apple Silicon would end up GPU bound before CPU bound.
by Rochus | 2025-04-09 12:54:43+00:00
> Since Oberon is as much a compiler as it's a complete system,

The system and the language are two different things (even if they unfortunately share the same name); the language itself doesn't depend on the system. Instead there is a standard library defined in the Oakwood guidelines; the guidelines even define a (primitive) drawing window (XYPlane). The Oberon+ compiler (see https://github.com/rochus-keller/oberon/) includes a foreign function interface and a binding to e.g. the NAppGUI library which is a powerfull cross-platform user interface framework, but also an SDL binding, which is e.g. used by https://github.com/rochus-keller/OberonSystem3/.
by tim333 | 2025-04-09 12:54:52+00:00
>"You look at what happened to the curve last night, that was pretty extreme by anyone's metrics - 2s-10s steepening 30 basis points in a few hours, I've certainly never seen that,"

The 2s-10s spread tends to act a bit like brakes for the economy. The 10 year yield is largely down to inflation and the 2 year largely controlled by the federal reserve. They raise the 2 year above the 10 year to slow the economy if you are getting inflation and lower it if the economy looks like slowing too much and going into recession. This looks like people expecting recession.
Show HN: JØKU – Web game I built if you fancy poker
by batiali | 2025-04-09 12:55:15+00:00
I managed to finish a little passion project of mine – a game called JØKU, where you play Poker Hands on a grid and try to get the highest score.

Continue reading if you are interested about my process.

I'm a recent dad with a full-time job, so those who are in the same position can relate that my free time is almost non-existent. I've had this idea for a game for some time, heavily inspired by playing Balatro. Even though I had made games with Unity before, I thought a lightweight web app was the way to go for this, but the thought of learning a whole new framework was overwhelming.

I was able to get the core idea of the game prototyped on a Sunday afternoon. This first prototype was built with pure JS/HTML/CSS, a single file that was 3k lines long. I showed the prototype to friends and family, and people were hooked! I had more ideas, though, so it was time to refactor the whole thing with a proper web framework.

It's been more or less a month since then, and I've been refining the game, adding features, and polishing it. It was a wild ride, to be honest, and I'm very happy with how it turned out. The current version uses React, Tailwind CSS for styling, Framer Motion for animations, and Firebase for leaderboard / analytics.

What's really cool is that, beyond actually finishing a project in my limited time, I learned a LOT about React and web tech in the process. I've started applying these skills in my full-time job as well, creating dashboards for the tools we are building.

Let me know what you think about the game if you get a chance to play, and ask me if you want to learn anything else about my journey. Cheers!
by taeric | 2025-04-09 12:55:16+00:00
You mistake my comment to mean it isn't hard. It is absolutely a difficult problem with serious edge cases. There are people that have studied it quite heavily.

They are still not a sizeable number in comparison to the number of devs that have enabled different text wrap options. Most of which do not give much thought to a setting that did not appreciably slow things down at all.
by mdhb | 2025-04-09 12:56:18+00:00
I know what you’re saying here and in some academic sense, sure, you’re right.

Back in the real world though, trump voters are explicitly not the kind of people who read, let alone vote based on policy.

They are literally the group of people that people point to in order to say the idea that an economy is actually based on rational actors is one of the most flawed assumptions in the entire field of economics.
by ElevenLathe | 2025-04-09 12:56:21+00:00
I think most voters probably assumed, as has been the case for the entire life of anyone alive today (including during Trump's first term!), that "Republican" meant "good for business" and small-c don't-rock-the-boat conservatism.

There were pre-tremors of this going back decades, but they always seemed far-fetched: surely the business interests in charge of both parties don't wanna fuck up the bag? It turns out that some of them do.
by michaelsshaw | 2025-04-09 12:56:21+00:00
It had one single failure in 13 launches, like 60 fucking years ago. Would you consider that a better ratio than Starship?

Apollo 8, first manned mission of the SV, to the moon and back. Total success. I'd like to see anyone at SpaceX with that kind of balls.

Also, not a fan of your American = better framing. American is often inferior. For example, I only fly airbus because I value my life.
by moooo99 | 2025-04-09 12:56:27+00:00
> For instance: weather apps. Private sector ones are just a vector to track and sell your location data, and they rely on government data anyway.

Or you do it like we do here in Germany and take the dumbest route you can imagine.

We had a very well working publicly funded weather app from DWD (Deutscher Wetter Dienst). The primarily purpose of this app was to warn from extreme weather conditions, but it also included an ad free (because publicly funded) and rather accurate forecast.

Then a private entity sued claiming that the DWD app also providing weather information is unfair competition for private competitors. The won in court and now the publicly funded DWD app has a paywall for a previously free feature.
by Imustaskforhelp | 2025-04-09 12:56:57+00:00
Oh I see a lot of Trump supporters actually call things bidenflation and that this is a pain to fix it.

Off topic but the whole world is kind of looking for a scapegoat / just let's things be and give blame to anybody but just remove tariffs. Some guy named bloomberg twitted a rumour and that was the craziest market action I have ever seen.

It's sound absolutely bonkers, it truly shows the amount of influence just reach has.

And reach is given by algorithms and big corps.

If your money can go up and down legit based on rumours in stocks, i genuinely don't feel much optimistic though the times are dire.

It's really funny, like I can imagine far good things happen more likely even when people would retaliate. Think universal basic income or god forbid, giving american healthcare.

Like doge etc. are literally doing things which cost them money and reputation when they could've just sat and do nothing.

I think this is part of some 1984 plan where we all pretend we are in war with each other for authoritarinism and polarity.

It sends me shivers that the things I am saying are making sense, they should be fiction, but sometimes reality is more harder to believe than fiction.

The times are bleak. We all really need to put aside our capitalistic needs. there is a 60 percent chance of us recession according to many betting markets/ goldman sachs.

If anybody is reaching/wants help. My hands are open to help anybody, it's seriously a time of crisis, times of crisis don't start with saying attention this is one of the worst times. Though i am just a 16 year old boy in india. I just want people to really forget capitalistic needs to help the needy for this one time. I don't want it like the 2008 crisis that the bankers who caused it would just get a slap at the wrist and the people suffering would have no one to look after them.

I urge the world to create peace. Nobody wins in wars
by lo_fye | 2025-04-09 12:57:34+00:00
I was primarily using ChatGPT & Perplexity. Then I started calling B.S. on them, and more often than not their replies were "You're right! Sorry about that!" Simply saying "that's wrong" reveals a terrifying amount of "hallucination" by AI. Far, far more answers stated confidently as fact, turned out to be completely made up.

If I want to play with ideas, I chat with AI. If I need facts, I use search.
by 1659447091 | 2025-04-09 12:57:39+00:00
> The second one leaves out important information.

Did you mean the first one leave out information? The second one includes unnecessary "flair" (extraneous emotive words) that could be used to create negative public opinion about Simpson (or pre-trial public defense of him that makes it difficult for people to admit they judged too soon) before a trial where the evidence will be presented.

Such as: >> were stabbed and slashed to death outside her condominium in the trendy Brentwood neighborhood. The former football star was arrested after fleeing from police in a 90 minute chase along the 405.

Unnecessary things include "football star" and "stabbed and slashed to death" (the gore is not at all necessary and being that they did not have a murder weapon at the time or forensics to determine the cause until some time after the death, it should not be suggested that it was a knife during the reporting of the incident). Also using the term "fleeing" for anyone that did not watch it live may be suggestive that he was reckless (which he wasn't, I watched it -- I am a Houston sports fan even though I don't care much for basketball), and reckless is far more likely to make one think, yep guilty. But he did have police after him which the first one reports in a much more neutral way. Also, "in the trendy Brentwood neighborhood" oh okay, so rich people, I guess I am suppose to grab some popcorn and engage in pre-trial drama now because it wasn't some everyday murder in the unsavory parts of the south side in Chicago, or Inglewood, CA? How is that information useful? The facts of the case presented in the first one already suggest it is not a murder spree so no one in the area need be concerned there is an unknown serial killer creeping around.

*This is in no way what so ever hinting or suggesting at my opinion of the actual outcome of the trial, only more details on my thoughts about the news reporting aspects you replied too.
by 0xbadcafebee | 2025-04-09 12:58:09+00:00
Search engines aren't accurate either, they show you 10,000+ pages for your search query. You probably weren't looking for 10,000 answers. The problem is, they can't read your mind. ChatGPT can show you results you want, just like search engines can, you just may have to tweak your query.
by A_D_E_P_T | 2025-04-09 12:58:13+00:00
> How Palestinians would know they were crossing an invisible line was not made clear to them, the soldiers said. “How they know is a really good question. Enough people died or got injured crossing that line, so they don’t go near it.”

Let me get this straight. First you flatten a huge area of their land. (A 1km perimeter around Gaza, on the Palestinian side, represents roughly ~15% of their already small territory.) Then you kill anybody who happens to wander in, without clear warning? "Mistakes were made," I guess.

I get Israel's concerns, but I really feel like they do as much as possible to be anti-likeable. There's something deeply ignoble and repulsive about fighting a civilian population in such a heavy handed and punitive way.
by tuetuopay | 2025-04-09 12:58:21+00:00
In the context of Tokio, the tokio's native mutexes / locking primitives. For sync code, parking_lot is the de facto replacement for the stdlib's ones.

I don't remember where I read it, but it has been admitted that having synchronization primitives with poisoning in the stdlib was a mistake, and "simpler" ones without it.

for context: a mutex is poisoned should a panic occur while the mutex is held. it is then assumed the guarded data to be broken or in an unknown state, thus poisoned.
by leereeves | 2025-04-09 12:58:46+00:00
I think the strategic angle is important, but I doubt it's part of a long-term plan to start a war with China. I think the more likely concern is that if the US becomes too dependent on Chinese manufacturing, China could impose sanctions on the US to control US foreign policy.

And a similar concern applies if the US lacks the manufacturing capability to wage wars with its own resources. Something we already saw that when we ran out of ammo because of the war in Ukraine.
by littlecranky67 | 2025-04-09 12:59:17+00:00
but at the same time, now Microsoft knows you are using Tailscale (and they use this data in their tracking + analytics). And all the other products. They get a very good insight of your online habbit, because they have a list of all other products and apps you use where you sign in with your microsoft account. And due to the way token refresh works, they even have a good idea how frequently you use each individual one.

And if you for whatever reason get locked out of your microsoft account (and I say this as someone who had this happen with a Google account) your are basically locked out of your online life.

I own my own domain for my email address (xxxx@mydomain.com). As long as I can set the MX record of that domain freely, I can always restore access to my email adress no matter what any email provider decides to do or block me for.
by acdha | 2025-04-09 12:59:28+00:00
Trump is only in power because millions of Biden voters stayed home. His tariff power is not constitutionally specified but delegated by the legislature, who can withdraw it at any time. I think that China, and other world leaders, believe there’s a good chance that a handful of Republicans – who were already having to hide from their constituents – will be willing to join Democrats in repealing or restricting that delegates tariff authority by the end of the month or so. This would certainly be plausible given how their party used to pride itself on free trade and is heavily funded by the Wall Street guys who are eating huge losses right now, not to mention the non-trivial percentage of their voters are watching their retirement portfolios and home equity shrink.
by roenxi | 2025-04-09 12:59:43+00:00
Do a walk through of what you're implying there - you're suggesting the US is going to lump trillions of dollars worth of inflation losses onto the voting public to protect foreign investors. At a time when the public are extremely twitchy and sensitive to price rises.

There is a clear risk that the US will instead lump trillions of losses on foreign investors and attempt to protect the purchasing power of their voters. It isn't like they're fooling anyone either way - they borrowed a bunch and can't pay it back. They can pretend they paid it back but the markets are going to respond to the magnitude of the losses and not the excuses. The leadership may as well let the bulk of the damage fall on people who don't vote in US elections - there isn't any particular reason to do otherwise.

The US could choose to tank their own currency but it'd be more orderly and the incentives certainly could be aligned to formally default regardless.
by lol768 | 2025-04-09 12:59:49+00:00
This is an entire class of vulnerabilities that would've never been possible with XUL, is that correct?

I appreciate they had to move for other reasons but I also really don't like the idea that the DevTools and browser chrome itself now has all of the same security issues/considerations as anything else "web" does. It was bad with Electron (XSS suddenly becoming an RCE) and makes me pretty nervous here too :(
by metalman | 2025-04-09 13:00:22+00:00
I have gone in a slightly different direction, where I use my device to sell goods and services, and aquire parts,components, and specific information to facilitate my selling, and the maintanence and upgradeing of my own personal things. Also I use my screen time to seek out real world events and activities. This has led me to have expectations, as to what I get, as a real reward, and, also forces me to follow through with comitments made on line, in the real.world, therfor the whole thing, becomes self regualating.
by mppm | 2025-04-09 13:00:51+00:00
TSMC is such a (sadly) hilarious "cooperation" story:

1. Hey, TSMC, come to the US, we will give you a fuckton of CHIPS Act money and extend the US military umbrella over Taiwan.

2. Oh, yeah, it turns out building and runnig an advanced fab in the US is 3x more expensive than in Taiwan. Too bad.

3. Hmm, now that you are here, why don't you co-invest into Intel and share some of your IP?

4. No? Here, have some 100% tariffs. Nice doing business with you.
by dep_b | 2025-04-09 13:01:17+00:00
I've quit working on .net solutions a few years ago, but I've built a feature in F# about 7 year ago. While the language was wonderful, the IDE support was very minimal. Documentation and examples were really hard to find. So I don't feel it's really pushed as an alternative.

C#: A lot of LINQ style code was really hard to grok for me. Like a language in a language. The language got really huge in general. While it was fine as a "better Java" for most purposes.