There's low-hanging fruit IMHO by testing using semantic naming vocabulary with semantic error vocabulary.
Example macro: assert_approx_eq_with_relative_error!(a, b, err). It's a semantic name that explains more about what it does, and the macro also provides a test failure message that guides the developer, or an AI, toward fixes and documentation.
What I learned is writing semantic testing can help many more kinds of higher-value testing. As a specific example described by the article, I use enumeration testing for proving the UK National Health Service Number validator in Rust is accurate i.e. the test literally checks every number, then I can write tests such as assert_valid_nhs_number("111 111 1111").
Today I added Rust checked arithmetic which detects and protects math bugs such as integer addition overflow and division by zero.
Rust checked arithmetic is built into Rust's standard library (std) via explicit methods on primitive integer types (such as checked_add, checked_sub, checked_mul, and checked_div), which return Option<T> and evaluate to None on overflow. There's a known tradeoff of some speed, which is fine for my purposes because I need reliability more than raw speed.
I'm longtime C coder so I know how to do this in C. Rust strong types and static analysis make it so much easier to do correctly.
Better open source can leverage better ways to learn and contribute IMHO. I'm working on building blocks for open source projects, using comprehensive code annotations to help developers learn, experiment, fix, and remix. I welcome help, advice, criticism.
I tried many open source software projects before starting these, and I'm a longtime open source developer so I highly value all the work from people working on vi and emacs, Daisy UI and shadcn, Rocket and Loco, and more. These projects are all aiming for public nonprofit social good.
These look really cool and are thought-provoking for me, as I was considering starting a friendly editor and a design system myself ha. You should show HN these.
I agree with the spirit of this. I'm a longtime open source developer and generally prefer GPL for my manual code. For my AI-generated code I'm using a multiple choice license of Apache, BSD, GPL, MIT.
If you're curious, here's my newest open source which helps build Rust web services along with Axum: https://github.com/publicprojects-io/axa and you can see the LICENSE.md file.
If you ask who would pay for Apple local models, I would. A Mac Studio high end 512GB costs ~$1000/month for 3 years versus my current run rate of ~$1000/month for five devs for Claude Ultra (or ~$10k/week for Claude Sonnet if I paid API rates rather than Ultra).
If/when Anthropic changes to pure API pricing, or for API-heavy projects, that's when I'd switch to more local models. Of course there are tradeoffs for speed, quality, upgradeability, etc.
I currently run a Mac with 128GB and qwen3.8:27b-mlx. It hits the heat limit of the Mac when working on a 200k LOC codebase for security auditing and hardening for many hours at a time. This isn't as strong/fast as Sonnet, to be sure, yet the cost is only $6K one-time plus the usual electricity, maintenance time, etc.
$10k for Sonnet per week? How did you arrive at that number? It’s quite a huge inference volume. No consumer hardware will give you that level of latency at comparable cost.
$6k is not the only cost - electricity adds up over time. And hardware can fail, redundancy is priced into the token prices and subscription plans. Maintenance is mostly negligible, but some updates/upgrades might regress. There’s a lot to SRE to keep it running at that scale.
I run "npx ccusage@latest weekly" and also spot-check Claude Code sessions via "/usage".
> No consumer hardware will give you that level of latency at comparable cost.
You're right. My belief is the frontier AI companies are currently subsidizing real costs for the purpose of rapid growth customer sign ups, and that in a couple years or so local costs will become reasonable, at least for full-throttle work that's queueable.
Even if one believes the price of models will only go up from frontier AI companies AND believe the local AI frontier will be fast enough at a good enough profile, it still doesn't explain how you're going to beat the price of a place hosting open weight models at scale on shared hardware always maxed out 100% in a place with cheap electricity by buying a single platform up front for 3 years.
Data sovereignty always makes sense in this case because it's explicitly not about cost, but I've not seen a convincing "it's actually cheaper to do it yourself" analysis that came to that conclusion by answering all of these things up front instead of just hoping it'll somehow get better by then.
I did the math once, to run Kimi K3 on a Mac, you'd need to daisy chain 5 Mac Studio M3 Ultras. So $125K. And the latency would be bad.
For good latency, you would need a multi GPU server around $3-600K.
I agree the hardware will catch up and local is the future. For the average person who is sharing there privacy data out willy nilly all the time without much regard, i.e. most people, it makes no sense right now to go local vs. API / subscription given the price differential.
>> DCs still have the advantage of 24x7 use, more efficient DC transformers
> my computer can turn on and is on 24x7.
1. Unless you are running AI queries 24x7 to max out your hardware, a piece of hardware that is idle the majority of the time (even if you had a full-time jobs that used the card 100% literally every single second of your workday, that would still be less than 1/3 utilized) is going to necessarily have way worse $ cost for you than cloud.
2. An idle PC does not use anywhere near the same power as inference running 100%, so I'm unsure why mention that your PC is on 24x7 - does that change things?
3. But even if we ignore both of the above and you had 4 or 5 40-hour per-week jobs that utilized local hardware ~100% every second, it would still be worse in terms of electricity costs, etc. than cloud due to worse AC/DC transformers for a local machine than a datacenter.
> I'm looking at the rate at which the models continue to improve and the pricing / rate limits in the the OpenAI/Codex/Claude/Grok subscriptions.
4. Last year you could have made the case that open models were cheaper, but now it's the frontier labs that are often the cheapest on the cost/task pareto curve.
> … the pricing goes way up. I'd bet that at least the latter is going to happen, soon.
5. Even if we were only comparing open cloud models vs frontier cloud models, is your argument that frontier labs will stop trying to be competitive with the open models?
6. When comparing to local, an obvious alternative would be cloud-hosted open models available from large numbers of providers already - why would their pricing go way up?
Break even is likely for API pricing versus local, at least within a couple of years or so IMHO.
For example one of the projects is a web app that's processing user input, making AI suggestions, generating reports, doing ongoing observability, and running batch processing overnight.
Claude currently does these via API pricing, not Claude Ultra personal.
I can easily see everyone on my team having a Claude subscription, and then we can orchestrate and federate to spend the unused limits. I don’t see how this breaks toc, given we don’t resell. And 1000€ (or dollars) in Anthropic subscription buys billions if not trillions of tokens, if used right.
Why is it that you don’t include costs for the engineer catering to 512gigs system, potentially well saturated in usage? Anyone who understands inference at this level is at least 5k a month.
yes, but you pay the Ultra plan, that's the whole point, isn't it? Let's be honest also - qwen3.8:27b-mlx is nowhere near Sonnet, both in size and cap, and if you do $10k a week of usage, you should know that.
The 512GB server he specified would be running something more like qwen3.8-flash-next, which is probably competitive with sonnet 5 (but still loses to 5.5).
I've tried it out on a 512GB dram server with 2*3090s and it works really quite well. Draws enough power to cost something similar to Luna, though.
Not really. My setup is just a hair cheaper than paying API prices for Luna (and it will do security audits for me). The mac would be even better on power.
I don't think any of these self hosted setups are a good deal when you look at the NPV of the capex plus the power costs, but if you already own the hardware it can be okay or even a slight cost savings.
This is very generous and very welcoming of you! Thank you, I would really appreciative and honored.
I do want to clarify that my "ADRs4AI" ADRs are different, they are "Architectural Deliberation Records" and are directly inspired by Architectural Decision Records, but they are different in that they are seeking to capture not just the outcome but the process. (Another poster was confused and did not realize the distinction, arguing that what I'm suggesting "non-ADRs labeled as ADRs", which is literally true, see https://news.ycombinator.com/item?id=50240908). My records are intentionally more verbose, they are intentionally trying to capture the process not the outcome(/state).
I would love to include ADRs4AI in your repo, but do you think the distinction is okay and can we draw it clearly? And if so, what's the next step? I could not find contributing guidelines.
Oh, separately, the marketplace extension also supports a strict superset of functionality of an Architectural Decision Record:
I maintain a coordinated vulnerability disclosure repo: it explains how to do it well, why it matters to discovers and companies, and links to some relevant concepts.
Coordinated vulnerability disclosure is especially relevant right now because of the PHP disclosure affecting so many people.
Constructive feedback welcome. Free open source. Written by me by hand. Translated into many languages by Sonnet.
I use Loco extensively on many projects and it's great. The creators are very responsive to ideas and questions. Loco feels like it's a perfect halfway point between Axum and Rails.
On my wishlist is batteries-included command-line setup support for database access using Diesel instead of SeaORM because I like formal types, and security tokens using PASETO instead of JWT because I like specific algorithms.
I'm doing this attack surface tactic with Vix IDE, a terminal text editor that helps novices get comfortable with vi, emacs, git, jj, sql, commands, and more.
The prompt I used was "Goal: rework to reduce the attack surface. Process: move features into feature-flag Rust crates. Output: build a minimal version. Questions: Ask me anything."
This past weekend, Claude Fable/Opus/Sonnet together successfully refactored the whole Vix IDE codebase into many separate Rust crates and Cargo features.
This refactor enables a security-oriented user to pick and choose, and also makes it easier for a security auditor to look at one capability at a time.
If you're curious you can see the commit messages by Claude Sonnet. IMHO they're reasonably good.
Is there not a great irony in over a weekend throwing Fable/Opus/Sonnet at your project, refactoring your whole codebase, and the purpose of that project is to teach people to use vi, git, sql and so on. Why would anyone want to learn that in the current day and age, when as you state it can refactor a project over a weekend fairly autonomously?
reply