I've been doing this with one of my VM projects and hit message caps really quickly, threads start stalling out.
In the end I needed to use a coordinator.md file to backdoor messages and locking state in a pull instead of push model to keep them running overnight.
I need a lot of inter-thread comms because my app has to build a kernel inside itself and then replace itself to run tests which meant I was hitting concurrency and load issues with multiple sessions trying to run things like benchmarks against their own work tree.
Thanks for linking this. I've reached a point I need to overhaul one of my MacOS apps and these laws are the perfect find.
What's the best approach to applying these in practice? Should I evaluate every screen with each of these laws in mind or should I evaluate the app entirely one law at a time?
Agreed here - routing and subscription pricing made tokens cheap. More interested in quality and cost per outcome than a generic savings. Benchmarking is older. Would like to see benchmarking outlining full wall to wall, telemetry, CPO, COO, etc. using foundational models against lesser known or job specific with rigid tooling lists, etc.
Our benchmarks shows that it best solver. Solves more than Claude on Opus while using glm 5.3, but still benching new models with most recent version.
The point here it has flexibilty in config, supervisors, automatic learning and also utilizeing jev-like models to gain maximum of efficiency while keeping solving rate intact
I have most of my apps in it without much trouble.
One of my recent ones had a very complicated form and state management.
AI really struggled with HTMX in that use case.
Like the form might work but the page would take 30s to load. Or some state would randomly drop or a toggle wouldn't work after changing a dependency.
If I rewrote that in react it would have one shot it without a doubt. Some things are just better models for different problems.
For the record I eventually got enough tests in place to keep the agent honest and the HTMX version is now a lot faster anything I could have got out of react but yeah, it was an adventure.
I think HTMX has a wall where it makes sense to pivot to something else. In your case I’d imagine using something like Svelte would get you the same speed benefit over React but without the extra work required to get the agent to cooperate.
I tried to vibe code with HTMX and experience was miserable. I must admit i did it half a year ago using gemini flash, but compared to vibe coding with React at the same time with the same agent it had so much trouble with things that i expected to be trivial that i had to scrap the idea of trying HTMX.
It helps if you've already got a decent codebase built in it with standard patterns covered.
Most of my sites start as a copy of an existing site as if it's a framework and then I clear out the product and just use the shell to build from. The result is that the agent is pretty good at replicating existing patterns and if I ever hit something similar I can just tell it to look up prior art in other projects.
The initial learning curve was definitely there, and I still hit edge cases as mentioned above. I just don't have to resolve the "how do I handle auth + middlewre + htmx targeting for a form in an admin screen (for a random example).
I judge languages by how they look. JavaScript is a wall of const/async/await these days, which is ugly. Functionality aside (the APIs have gotten pretty decent), the language has gotten uglier. It used to be nice and nuanced even with boilerplate. Closures and prototype inheritance is neat. Walls of const are not. Does every enclosed function need a million consts for every expression?
Also, it’s a language where everything happens somewhere else. Not here and now, somewhere else on some other event. That sucks for the small stuff.
Async JavaScript using callbacks had a learning curve, but once you learned how to contain it and treat callback indentation as an opportunity to refactor it felt similar to coding in lisp.
The problem was the learning curve, and the fact you had to rewire your brain a bit compared to coding in something procedural.
Yes, I keep saying this. Async await is like loading spinners - a fix for a problem that shouldn't exist in the first place.
As much as possible should be happening locally, synchronously on the computer, in-process, or at least without yielding your thread context (and even then there are things like page faults which async/await wont save you from, they are 'invisible' to a regular developer).
While you might dismiss this idea, page faults used to be THE leading cause of delays back when hard drives were the norm.
That JS supports await isn't nearly as much a problem as the fact that it defensively defers execution any time it encounters one.
This hurts most badly for iterators.
Files are usually read from disks in chunks of 64K bytes. If you present the data as an async byte iterator you'll get 65,534 defensive deferrals, and one actual wait.
If you have ten layers of transformation it will be 655,350 defensive deferrals and 10 real waits.
These defensive deferrals aren't so expensive in terms of CPU time, but they ARE very expensive in terms of wall clock time. All other work must be halted so the event loop code can run. Eventually synthetic deferrals dominate the wall clock cost of running the program. This isn't hypothetical either. Here's someone trying to build steam parsing on Node and finding that it's too slow to be useful: https://github.com/nodejs/node/issues/31979
> it defensively defers execution any time it encounters one
That's a (bad) JS design choice, for example C# doesn't do this. Actually I'm pretty sure even in JS, async/await gets transpiled to state machines, so I think this is easily fixable by shipping a new transpiler implementation that only defers when necessary.
I get your point, but I don't think we should go back to oldschool yield-based iterators to hack around a broken implementation.
I would like to see official support for `Symbol.streamIterator` and for the `for await?(item of iter)` syntax which would transpile to code like you see here (or all the way down to regenerator state machines if needed).
reply