137 points · by vmg12 · 2w ago · 121 comments
"Between two operations nothing moves. Instead of sleeping until an animation finishes, the agent says clock +60000 or clock settle and reads the result. No timing flakes, no waits."
From what I see in https://github.com/expo/exact/blob/main/contract/syntax/src/... and https://github.com/expo/exact/blob/main/contract/syntax/src/... - it's unclear this will scale to the levels of complexity that arbitrary UIs demand.
It looks like a DSL, but it actually isn't - it's just regular javascript/typescript with a very thin 'declarative/markup' veneer. it basically tricks you into thinking you're writing a HTML-like UI-DSL, but it also just so happens to accept arbitrary JS expressions, because it is just regular JS.
But in the end this is a small syntactical difference (how it looks). You could have a custom code viewer that does these translations for you.
till this day you can't use linq to render a sequence of elements. Like people.Select(p => <div>{p.FullName}</div>);
it's such a shame XAML and Razer syntax haven't evolved.
1 - all logic needs to be written in 1 statement. That forces you to use nested ternaries, nullish operators, and array fns where simple workflow controls would read much better.
2 - it’s designed to render html but conflicts with JS and TS, so you can’t have a class attribute, and weird escape hatches around generic fns.
// this
<Box>
{
shouldShowAnswer(user)
? <Answer value={false}>no</Answer>
: <Box.Comment>
Text Content
</Box.Comment>
}
</Box>
// ...can be written like this
const answer = (
<Answer value={false}>
no
</Answer>
);
const comment = (
<Box.Comment>
Text Content
</Box.Comment>
);
const result = shouldShowAnswer(user) ? answer : comment;
<Box>
{result}
</Box>
In React at least, null won't render anything.#2 is a known trade-off, and so marginal and well known that it's almost not worth mentioning it.
Because it's a thin wrapper directly translatable into a JS function call. `className` is JS
Contract actually constrains what it can express rather than having arbitrarily complex expressions. The constraint is actually sort of the point. Because a Contract file is something the compiler fully understands and not arbitrary code it has to run, one source can be type-checked and formally modeled, and behave the same everywhere. For stuff that doesn't fit into these constraints, you use Rust or TypeScript.
In practice, I've found that you do need ways to express stuff like `count > 0 and not loading` and `price.toFixed(2)`, etc., or else you are moving all of that logic into some other programming language which is just worse in terms of being able to express your UI and typically worse in terms of performance.
Contract has literals, templates, field reads, arithmetic, comparison, boolean logic, the conditional, option match, and a set of utility functions like `formatNumber`, `ceil`, `toLowerCase`, etc.
It doesn't have statements, loops, recursion, assignment, first-class closures, reduce and comparator sorts. A fn is a single non-recursive expression.
re: (b). There actually is a formal language specification in EBNF. It's in the repo. And there is a Lean 4 formalization of things.
re: (c) Stdlib across targets. There is a standard lib and it's implemented and tested across all the different targets. Ex. Numbers are IEEE-754 binary64, modeled in Lean, etc.
One difference is that Slint is more mature: it's been 1.x with a stable API since 2023
The main differences I see are that Slint does most of its own rendering whereas Exact tries to use the platform's own renderer (native iOS widgets, etc.). And Exact tries to use CSS for describing styles since agents already know it and it makes it easier to target web without a fat runtime that way.
Not paying for developer tools? No money as well.
Amazing things are happening in this codebase.
I don’t really get why you would ever want your source code formatted like that, with or without LLMs
It's obvious what its game is
This Exact work looks great and I very much hope it succeeds. Qt has Proven this approach works. Now if these folk at Expo can do it at a price that every dev can afford it will get much wider adoption than Qt.
I see these projects and feel as enthusiastic as reading the ingredients of a frozen pizza package.
You can't have multi-platform support without external contributors, and of course you can't have external contributors when one dude is pumping out +2.5M LOC in a week.
If it's just web then it's as crossplatform as vanillajs.
I say this bc I'd be genuinely interested in genuine crossplatform for my client audience of professionals and knowledge workers who, as it stands, are mostly (though not exclusively) Windows users and deserve nice applications.
The UI code you write gets compiled to a "plan" which is sort of like bytecode but constrained and simpler, so a simple Rust state machine (or JS on the web) can execute it (doesn't need a complex virtual machine with a garbage collector, etc.)
The layout is expressed using CSS terms and so the layout engine is just Taffy, a Rust based CSS engine, with a bunch of patches on top of it.
Each host like iOS, web, etc. then draws the UI with native elements (UISwitch, DOM elements, etc.) or by drawing the pixels itself (Linux, etc.)
When I was making a simple vibe-coded app for a hobby group I am part of I finally went ahead with a static hosted web app because everything else quite complex and still used quite a lot of RAM (just for using the f/w).
I think the only better option as of now is – just write native code for each platform. I think the purest cross-platform UI frameowrk is the LLM itself :)
You do not have to use Go, of course C works, and there is a nice wrapper for C++. I have ported gVim, it was a good test that helped me optimize many things, but now I maintain and use it on my desktop with Qt, it is just too good to throw it away. Can also be used with WinUI, Cocoa, FLTK gVim is also nice and slick.
Like... some way to "branch" out of the main development repo and make changes independent of it before "merging" it back in?
A new trend?
It's a long shot for now, though! There are lot of gritty nitty details they have to get right. One of the first issues I can imagine is this framework being great to use with Opus 5.5 but not good enough with i.e. Gemini 4 Argon or DeepSeek v4.1 Flash 1017, due to the overreliance on having AI models write the code.
Yeah, there are a lot of details to get right. James spent hours and hours and hours poring over details on the Duo, for example. And still users keep finding things. Over 3500 commits since the repo was made public 9 days ago and still a lot of things to fix. I think if we get a community going around it, we can make it quite good though. Exciting that people seem to be into it.
lol
> cross platform - no windows, no android
lol
Yeah I don't think so.
I could vibe code all of this myself if I wanted to. But I don't, because I value my time.
I can just vibe code the actual apps and be fine.
The announcement thread covers ways it helps agents, and they sound like things that would help humans, too.
I have been using an internal screenshot feature along with a dump of the component tree. Multi-modal LLMs can be used to read the screenshot and fix issues. The dump can be read by any text based LLM. I made my life much easier.
I saw the Blender UI based framework shared on HN the other day and this one today. I am not sure if I want to continue building my own (although all code is written by agents) or if I should switch. I can take inspiration from the two other frameworks and continue with my own.
It's funny, I'm working on a few different compilers with Claude Code to experiment, and I had an epiphany this morning, we're entering an age in programming, where you could just create your own compiled language (or DSL) for your framework / application effortlessly, it can have whatever requirements you want.
I've also used Claude to help me make Mojo compile under Windows, since they haven't ported it yet, took less than you'd think, downside is the key thing about Mojo is not open source, so I could never port that myself, but at least basic Mojo programs compiled. Might have to try DMD on Apple Silicon next to see...
> Names are CSS's, because names are what you write
> Unsaid presentation is the platform's
Very enlightening /s
I’m all for AI assisted development but please write/review your documentation.