MurphyA/hacker-news huggingface dataset:
Show HN: Sapphire – A 12MB language with native UI and good performance
by foxz | 2025-12-28 15:30:45+00:00
Hi HN,

I’ve been building Sapphire, a lightweight, batteries-included programming language written in C++. I wanted a language that was fast enough for systems work but simple enough for quick UI tools, all while remaining a single, portable binary.

You can try it out here: github.com/foxzyt/Sapphire

I just completed a major overhaul of the VM. By migrating from a switch-case dispatch to Direct Threading (Computed GOTOs), I achieved a performance boost of 1000% over the previous architecture. It currently handles 100 billion iterations in ~9 seconds on a consumer CPU without a JIT.

What you can do with it right now:

Run UI apps instantly: It has a built-in Immediate Mode UI (SapphireUI). No external DLLs or complex setups required.

Portable scripts: The entire environment (VM + UI + Networking + JSON) is a 12MB standalone binary.

Compiled Bytecode: Use sapphire compile to turn scripts into .sbc files, skipping the parsing stage for near-instant startup.

How to try it:

Download the binary from the link above.

Run test scripts from the /tests folder.

No signups, no emails, just a portable executable.

I’m looking for contributors: Maintaining a language, its standard library, and a custom UI engine is a huge task for one person. I'm looking for people to help with the core VM development, documentation, and the standard library. If you're interested in systems programming, VM architecture, or UI engines, I'd love to have you on board!

I'll be around to answer any questions about the VM architecture, the bytecode serialization, or the UI implementation.
by puildupO | 2025-12-28 15:30:57+00:00
I used to ship my app with a JavaScript first mindset. It felt fast on my own laptop, but users on weak phones, slow networks, or locked down corporate browsers kept running into sticky pages and half awake UI.

After I finally measured what I was shipping, I realized most of the client code was not adding value. It was just making hydration heavier, breaking accessibility, and hiding simple HTML solutions.

The post walks through the process I used to cut around 80 percent of the JS without going full “no JS”: listing real interactions in human language, leaning on native elements like details and dialog, using bundle analyzers, and deleting dependency creep. It also shows the small performance and accessibility checklist I use now.
by abbefaria27 | 2025-12-28 15:31:30+00:00
It does get easy to read, but then you unlock a deeper level of misery which is trying to work out the semantics. Stuff like implicit type conversions, remembering the rule of 3 or 5 to avoid your std::moves secretly becoming a copy, unwittingly breaking code because you added a template specialization that matches more than you realized, and a million others.
by GuB-42 | 2025-12-28 15:32:07+00:00
If training AI is a copyright exemption, and it is likely to be the case, then the license is irrelevant.

If it is not then the trained AI is a derivative work, which the license should allow as long as it is publishable under the same license to be considered open source or free software.

In any case, I don't think an anti-AI clause would serve a meaningful purpose on open source software. You can however make your own "source available" license that explicitly prevents its use on AI training, and I am sure that some of them exist, but I don't think it will do much good, as it is likely to be unenforceable (because of copyright exemptions) and will make it incompatible with many things open source.
by Zigurd | 2025-12-28 15:32:32+00:00
A large part of the data center bubble is crypto mining operations that pivoted to AI. That was a very squishy part of the business already. They have no credible pivots left.

Some of that will get absorbed by market leaders including OpenAI. In the short term that's good for OpenAI. They could pick up some bargains, and doing so will divert some attention from their unachievable growth plans.
by metadope | 2025-12-28 15:33:23+00:00
> Small English nitpick:

> 2x? x is a multiplier.

Translation of English is often problematic because of the multiple valid interpretations of simple words, and concepts that have many synonyms.

The solution here is to use arithmetic to supercede English. It may then become apparent that what is meant is x as a denominator.

Translate x into 'times', and then think of 'times' not as strictly multiplication but instead as an iteration (which, after all, is what multiplication is), and that might get you closer to what is meant, which is a standard arithmetic inversion of multiplication to division.

> Saying something is 2x smaller or 2x shorter or 2x cheaper doesn’t make sense

It does, if you do the inversion. Something 2 times smaller is half (1/2) as big.

Two ways of saying the same thing is half the fun of learning English!
by renegade-otter | 2025-12-28 15:33:28+00:00
Installed Mint on my GAMING Windows system, uninstalled Steam on Windows. All is well.

While at it, nuked my old MacBook Pro and Air with Mint too - not like they are getting updates anyway.

It can be done, it should be done. These commercial operating systems have enshitified to a critical point and are beyond repair.
by UniverseHacker | 2025-12-28 15:33:34+00:00
If white fat converts to beige fat, it is going to be burning a lot more calories, so you ultimately would have to eat more to maintain a stable body weight. It’s not clear to me that this would negate the benefit.

If it does negate the benefit than that would suggest that the entire benefit from the beige fat is from putting the body in a calorie deficit, and you would then expect the exact same effectiveness from calorie restriction. A quick search shows that there does seem to be an anti cancer therapeutic benefit from calorie restriction, so this seems at least plausible.

So this raises the research question of if increasing calorie intake to keep weight stable completely negates the anti-cancer benefits of increased beige fat or not. I’m curious if that has been investigated yet.
by martin-t | 2025-12-28 15:33:46+00:00
There's a web post and a web post.

The source I linked is written by a historian[0] - a guy who actually studied how this kind of stuff happens. You'll also notice that his post uses a fairly high standard of proof - using 2 different definitions of fascism and using only the wannabe-dictator's own statements to show he satisfies all points.

There's also a YouTube video and a YouTube video. Here's an actual lawyer talking about the legality of the proto-dictator's actions: https://www.youtube.com/watch?v=hybL-GJov7M

[0]: https://acoup.blog/about-the-pedant/
by otterley | 2025-12-28 15:33:51+00:00
> But that dependency is created by the application logic, not assumed globally in advance.

Not necessarily. If you allow users to perform arbitrary operations on the data, all bets are off.

> We shouldn’t impose a universal timeline just because some future operation might depend on some past one. Dependencies should be explicit and local: if two operations interact, they share a causal scope; if they don’t, they shouldn’t pay the cost of coordination.

Application developers can already avoid that cost by using separate databases for different data domains. That’s very explicit and effectuates intent rather nicely.
by Yash16 | 2025-12-28 15:34:09+00:00
I agree with you — the model itself is strong. The real challenge is prompting. Not everyone knows how to write detailed, high-quality prompts, and that’s exactly the gap we’re solving with https://picxstudio.com .

We’re building curated prompt collections and an AI agent that uses prompt templates + RAG-based knowledge to generate better prompts automatically. In some cases, structured (JSON-style) prompts give much better results — but getting those right consistently is hard and honestly very trial-and-error.

Our goal is simple: users shouldn’t have to be prompt experts to get high-quality results.
by Brajeshwar | 2025-12-28 15:34:09+00:00
The idea is not about One Perfect/Right solution/tool. Explore them and modify them to how you react and which ones work for you. Use multiple tools (plain-text as default, another App with the team, Notebooks for yourself), etc. For someone struggling with too many options, perhaps a little nudge to some direction is what they needed. At the end of the day, It Depends. https://brajeshwar.com/2024/it-depends/
by pessimizer | 2025-12-28 15:34:38+00:00
It's called the GPL, and it's what Open Source was created afterwards to undermine. It would be nice if people just used it, rather than appealing to spirits to make Open Source into what it explicitly is not.

It is already entirely clear that LLMs have absolutely no permission to use GPL code for something that is being redistributed without full source, before they were even invented. AI companies are arguing fair use, as another top level comment emphasizes, in order to make an end run around any licensing at all. Dithering about coming up with magic words that will make the AI go away, or creating new communities while ignoring the original community around the GPL, is just silly.
by toss1 | 2025-12-28 15:34:50+00:00
Yes, there will likely be that phenomenon, but will it occur faster than the approx 2% level of optimum inflation?

>>The only real solution there is for governments to look at social housing, and also to try to produce A glut of house building.

Creating a universally-available baseline lodging situation for everyone is certainly a public good that would yield a LOT of benefits from eliminating homelessness (benefiting not only the homeless but also everyone who their problems affect) to promoting family stability.

Whether the best way is to incentivize a glut, subsidize social housing, or just provide a housing stipend for anyone in need, another system, or some combination of all-of-the-above should be subject to study and experimentation.
by jakelazaroff | 2025-12-28 15:35:07+00:00
Note that pure HTML and CSS implementations of tabs using <details> and <summary> fail to meet several important accessibility criteria [1].

While you can make something that visually appears to act as a set of tabs, building it accessibly unfortunately still requires JavaScript.

[1] https://adrianroselli.com/2019/04/details-summary-are-not-in...
by throw123h1z1q | 2025-12-28 15:35:27+00:00
Trump Jr. also got in in September via 1789 Capital, where he is partner. After that Nvidia got permission to export GPUs to China.

In the meantime, Musk and Chamath have the gall to complain about the kleptocracy in democratic states and the poor suppressed billionaires:

https://xcancel.com/elonmusk/status/2005287147507769442#m

I wonder when Chamath will sit again on Tucker Carlson and tell a sob story about having self doubts.
by jadsfwasdfsd | 2025-12-28 15:35:53+00:00
When A and B are disjoint, you don't need the tag unless you for some reason you require that `Maybe<Maybe<T>> != Maybe<T>` holds true and don't like the collapsing semantics of unions where `Maybe<Maybe<T>> == Maybe<T>`

In practice, the cohabitants in Option/Result types are almost always disjoint. So you spend time wrapping/unwrapping Some/Ok/Err for no value add.
by convolvatron | 2025-12-28 15:36:00+00:00
I reflexively downvoted you. There has to be room for the evolution of operating systems and the maturation of new systems developers. this division of code into 'things we're allowed to understand' and 'the magic that we can't touch' has really been counterproductive for everyone.

but I realized that in the past decade or so all of my kernel experiments are being done in little baby kernels. virtualization and the sheer volume of open source makes this a perfectly good path. and frankly Linux isn't that lovely to work in and extend.

the current situation with kernel modules and symbol resolution is a crappy boundary that really gets in your way as a developer, and from a security perspective is really just crime scene tape.

so we should really try to clean up and harden production systems, and understand that we will need the playground to inform that activity. right now we have neither, and this clearly belongs in the playground.
by sejje | 2025-12-28 15:36:04+00:00
Man, a marketing landing page for a calendar. That's really something.

I doubt HN is your market. Everything about that page made me want to run in fear. And I don't trust your download link.

I expected some dude's blog with an .xlsx upload or something. I would have a lot more trust there.

What am I giving up by using yours? What's in it for you?
by ilaksh | 2025-12-28 15:37:38+00:00
I think you can write whatever you want in a license. Lawyers and tradition don't have supernatural powers or anything. So you could say something like "Non exclusive non revocable license to use this code for any purpose without attribution or fees as long as that purpose is not for training AI, which is never permissible."

Little to no chance anyone involved in training AI will see that or really care though.
by pojntfx | 2025-12-28 15:38:22+00:00
Open Source means OSI-approved license in the software context. Some government examples of this being explicitly mentioned:

- Canada/British Columbia: https://www2.gov.bc.ca/assets/gov/government/services-for-go...
- European Union (this applies to all EU member states): https://eur-lex.europa.eu/eli/reg/2024/2847/oj/eng - search for "Free and open-source software is understood" in the text
- Germany (the EU definition already applies here, but for good measure): https://www.bsi.bund.de/DE/Themen/Verbraucherinnen-und-Verbr...

Words have meaning!
by roxolotl | 2025-12-28 15:39:08+00:00
The thing that’s weird about this though is it isn’t enshitification. I don’t want to defend the worsening of software quality/ux/ui for monetary gain but at least it’s somewhat rational. This is not a change that emphasizes profit driven changes over user driven ones. Maybe I’m missing some profit motive but it just seems like an awful design choice.

Edit: Not to disagree though. I too have a Linux gaming pc and are helping friends do the same.
by design2203 | 2025-12-28 15:39:32+00:00
Yes that’s exactly what I mean.

I’m working on stuff that I can’t say too much about. But let’s just say there is a way out from this - but it will require the smartest minds and folks starving for change to come together and create the change we want. Sometimes an environment that creates a desperate need for change can be a good thing.

It’s not going to happen via politics. It has to come by being creative from the outside in.
by nickpsecurity | 2025-12-28 15:39:34+00:00
I considering it now. Aside from correctness verification, the main reason we'd use a limited language for packet inspection is in case the policy is malicious. How often is that the case?

For most people, they trust most or all of the code running on their machine. They certainly trust their firewall policy to not be malware. If you already trust it, using a better, safe language might be helpful. In many cases, eBPF will be fine.

This isn't the first time this has been done. SPIN was an operating system in Modula-3 that allowed type-safe linking of code into the kernel, balancing safety and performance.
by huhtenberg | 2025-12-28 15:39:47+00:00
Margins need to be a bit larger.

When printed, "2026" at the top is cut in half and at the bottom "31st" cells are cut right through the slab of 1. On the left side all but last few pixels of dates are cut off, and the last column is visibly narrower than the rest.

This is in Firefox on Windows.
by lewisjoe | 2025-12-28 15:39:52+00:00
This. A language that doesn't adapt (accumulate shitpile of baggage from other languages over changing times) will be a dead language eventually.

English will always have my respect for being open/inclusive and adaptive.

Interesting fact: If you are looking for a spoken language with the cleanest/composable grammar - it's Sanskrit. The panini grammar is actually like a programming language where sentences are just compositions of lower level similar units.

But like I said it's practically dead (not used as a spoken language). But interestingly used as a proxy language for translation and other nlp tasks due to it's clean grammar :)
by twodave | 2025-12-28 15:39:52+00:00
Fair enough, though production does impact price to a degree. For oil this is less important than some other commodities, but it’s still a factor. But this is really a tangent from the central argument that is: oil exploration isn’t so important if we already aren’t producing from many existing known sources, and exploration itself is only sort of loosely tied to selling the end-product in terms of sales.
by dijit | 2025-12-28 15:40:13+00:00
What are you even talking about?

The parent is right.

I'm quite literally the first person to bash Windows for being a shitty operating system, but the requirement for signed modules puts a massive barrier to entry for cheaters, where Linux can load just about anything.

If every system call can lie to you, there's a few things you can do, but it's not many.

I know this because I've actually done a lot of due diligence on anti-cheat.

One mechanism I attempted to employ was to replay initalisation vectors and determinism of inputs; this means I could replay your session out of band and witness the same outcomes. If there was variation then there's a fault. Except as soon as you introduce floating point numbers there's no more determinism... Oh well.

The other was to watch for "impossible" things, but then you need to run full complex physics simulations for every client. If your game requires you to effectively buy an i7-11700k for every user then you'd have to sell your game for a lot more money, and limit how long they can play - nobody wants this.

The third option was to score our best players and anyone who performs better than that gets their behaviour tracked. The problem is, coming up with a scoring system that's server side is much harder than you think.

GameDevs don't actually like paying a shit load of money for anti-cheat (that also breaks their debugging systems and causes bugs: a wonderful combination)... so if you've got a better way: join the industry and fix it. You'll be a moderately wealthy person.
by roryirvine | 2025-12-28 15:40:54+00:00
They switched focus to Windows around 1988, I believe - it was around the same time they started using the MCA bus (I believe they ended up as most successful non-IBM MCA vendor), so perhaps they had been convinced by the hype around Windows being a sort of interim OS/2?

Whatever the reason, the Qi-386 (and its ISA-based derivative Xen-i) was often combined with the Deskside Environment Pack, consisting of a trackball, infrared smartcard reader, and Win/386.

My dad's small publishing company had a bunch of them, running Aldus PageMaker and FreeHand. Lovely machines, and about half the price of the equivalent Mac IIs!
by techjamie | 2025-12-28 15:40:57+00:00
If you publish to GitHub, also mind that you grant them a separate license to your code[1] which grants them the ability to do things, including "[...] the right to do things like copy it to our database and make backups; show it to you and other users; parse it into a search index or otherwise analyze it on our servers [...]"

They don't mention training Copilot explicitly, they might throw training under "analyzing [code]" on their servers. And the Copilot FAQ calls out they do train on public repos specifically.[2]

So your license would likely be superceded by GitHub's license. (I am not a lawyer)

[1] https://docs.github.com/en/site-policy/github-terms/github-t...

[2] https://github.com/features/copilot#faq
by actionfromafar | 2025-12-28 15:41:04+00:00
As someone coming from RAII to C#, you get used to it, I'd say. You "just" have to think differently. Lean into records and immutable objects whenever you can and IDisposable interface ("using") when you can't. It's not perfect but neither is RAII. I'm on a learning path but I'd say I'm more productive in C# than I ever was in C++.
by evanelias | 2025-12-28 15:41:47+00:00
They applied for a trademark and were rejected due to the term being too generic/descriptive. It has nothing to do with whether they hold IP.

That list doesn't appear to be "legally binding" in a general sense; to me, the way you worded that implies "there is a law saying OSD is the definition of open source in this country" which is very far from the case.

Instead that list appears to be specific cases/situations e.g. how some US states evaluate bids from vendors, or how specific government organizations release software. And many things on that list are just casual references to the OSI/OSD but not laws at all.
by ElijahLynn | 2025-12-28 15:42:20+00:00
"Once, a soldier entered the residential area after coming into contact with radioactive material. His hands turned a necrotic black, like charred wood. The authorities didn’t just isolate him; they traced his entire trajectory and burned every single item he had touched. A friend of my father lost his entire sofa because of this. Witnessing such scorched-earth containment makes the modern definition of nuclear power as the ‘cleanest energy’ completely incomprehensible to me."
by kristintynski | 2025-12-28 15:42:24+00:00
Interactive Simulation:
https://cliffordtorusflow-git-main-kristins-projects-24a742b...

Github repo with code/tests:
https://github.com/ktynski/riemann-hypothesis-toroidal-proof

After watching Budden get publicly executed for his AI-assisted Navier-Stokes claim, I almost didn't post this. But I have no reputation or academic career to worry about, so why not.

I'm not claiming I fully proved RH. I'm claiming I might have found the geometric reason it has to be true—and I built something you can actually play with.

The core insight: The critical strip isn't a strip. It's a torus. The functional equation ξ(s) = ξ(1-s) folds it. And zeros? They're not random points—they're caustic singularities trapped at the throat where the torus pinches.

What if RH was always a geometry problem disguised as number theory?

The Gram matrix has a cosh structure. That's not a coincidence. That's a throat.

Zeros are pressure minima. The critical line is a symmetry axis. This is fluid dynamics.

Riemann couldn't see it because WebGL didn't exist in 1859.
I visualized what he couldn't. Now I can't unsee it.

This connects RH to Navier-Stokes. Yes, that Navier-Stokes.
Two unsolved Millennium problems. Same geometric skeleton.
Coincidence? Maybe. But the visualization will haunt you.
Roast me. Cite me. Either way, look at this torus first.
by cogman10 | 2025-12-28 15:42:52+00:00
You'd write it like this

void bar() {
try (var f = foo()) {
doMoreHappyPath(f);
}
catch(IOException ex) {
handleErrors();
}
}

File foo() throws IOException {
File f = openFile();
doHappyPath(f);
if (badThing) {
throw new IOException("Bad thing");
}
return f;
}

That said, I think this is a bad practice (IMO). Generally speaking I think the opening and closing of a resource should happen at the same scope.

Making it non-local is a recipe for an accident.

*EDIT* I've made a mistake while writing this, but I'll leave it up there because it demonstrates my point. The file is left open if a bad thing happens.
by Igrom | 2025-12-28 15:43:59+00:00
谢谢你的文章，太有意思了。这么神秘的故事容易吸引人，万一里面犯了少许语法上的错误，还会有人介意吗？人工智能用起来却可能正事与愿违，让大家质疑你对故事加以过夸张或编造。我建议，第二部不用机器翻译，手动翻译翻译吧。回复人消息，自己写也更好。

Thank you very much for the article, it was super interesting. The mystery in the story draws people in, and people surely won't mind a couple of grammatical mistakes. But you have to watch out: the use of AI makes it easy for people to suspect that the story might've been embellished. For the second part, it might be better to try translating it manually; the same goes for writing replies.