logoalt Hacker News

grahamlee • today at 7:11 PM • 6 replies • view on HN

Difficulty: no existing model is trained on Truss. They have been trained on examples of design by contract in other languages (Ada, Eiffel, Java etc) and would do a better job with those and with contract-enforcement rules. Or even with grammar-constrained output and those languages.

Source: I also tried writing an agent-optimized language (for concision and adaptability, not correctness), then I measured.


Replies

spankalee • today at 8:29 PM

This is not my experience at all. LLMs universal translation abilities let them pick up new languages really easily, especially if they borrow from existing languages and are consistent.

I've been building a new programming language, Zena [1], for a year and modern Claude and Gemini have absolutely no problem generating the code with about a 300-line skill: https://github.com/elematic/zena/blob/main/skills/zena/SKILL...

(I also happen to be adding contracts and formal verification for gen AI, maybe similar to Truss, but that targets Wasm for sandboxing).

[1]: https://zena-lang.dev/

➕ show 2 replies
brightball • today at 8:02 PM

I saw a talk this year from one of the Pony Lang folks talking about this exact problem and how they essentially taught Pony to Claude.

https://carolina.codes/speakers/2026/redvers-davies

It was really interesting. Pony is also deeply underrated.

➕ show 1 reply
malloc2048 • today at 9:43 PM

raise hand

Here someone else who tried to write a coding agent optimized programming language, but I asked it to optimize for cost. Using less tokens is an obvious one but while working on it the actual engineer (LLM) decided that saving on tokens would be marginal savings compared to being able to write the same quality code by a cheaper model. But it never found out how.

After a couple of hours seeing benchmarks in which it lost from Python on pretty much everything, it told me to give up. I did.

➕ show 1 reply
capv • today at 7:30 PM

+1. You cannot teach AI a new programming language with prompts. In order to be efficient the language has to be in its "brain", i.e., AI's neural network has to be trained on large number of samples.

➕ show 2 replies
latentsea • today at 7:51 PM

If any such language gets adoption or even seems like a promising direction, I think in this day and age it should be trivial for the labs to RLVR it into the model with synthetic data.

Edit: if you use local models you could probably fine-tune or do a LoRA for it yourself.

rfgplk • today at 7:34 PM

Incorrect. Models can actually adapt to new syntax quite easily, even with zero training material. Of course that does depend on how truly novel your syntax && constructs are, but generally speaking if you don't deviate too-too far from conventional wisdom you should be fine. My language is quite exotic in fact and frontier LLMs have no trouble writing it, as long as you supply a .bnf file.

➕ show 3 replies