We are fucked. This time for real.

I just had some 3 hours Gemini3 session of some 50 interactions, which bootstrapped for me a prototype of the project I wished to build for years. In Just a Couple of Hours, motherfuckers.

Yes, the code won’t compile, and will be full of subtle hallucinations, The markdown files would be more of “wishful thinking” and “confirmation bias” than a formal, rigorous description of the code, but still.

As long as you know what your are doing, is familiar with the underlying principles and concepts, without focusing too much on the irrelevant (yet) implementation details, one could “guide” it to build, lets say, a functional REPL based on the last 60 years of research in Functional Language’s interpreters and the formally and rigorously defined underlying abstractions, which are being used in ML, Ocaml, Haskell and Scheme.

Yes, it will take a lot of time to clean everything up, fix the hallucinations, and make it run, but just getting a principle-guided formal-spec-based prototype it is simply mindblowing experience.

Make no mistake, it has a type-checker, “compiles” to thunks and tracks its Environment changes under MVCC, has transactions, checkpoints and rollbacks, at least in the slop.

I understand that this whole session was a mutual hallucination in a tight feedback loop, while I only have time to skim through the slop, save if for the further analysis and to ask for the next refactoring, while “we both” are sill on it (“in the zone”). It is crucially important for me not to fall out of the “flow” and not to lose the “excitement” and interest too soon, similar to stopping running before at least 9 km.

This is how a real cognitive illusion (called Maya by the Upanishadic seers) actually works “in practice”.

And yet, the slop is not a complete bullshit – it is a “simulation” (an appearance) of actual incremental development (or an evolution, based on the previously discovered “stable forms”) of complex, technically challenging project based on the last 60 years of research in [simplistic] FP languages implementations put on fast-forward.

You can put in another way – imagine that the model guided by your principle-guided wishful thinking wrote for you a [draft of] version of “Crafting Interpreters” book in just a few hours session, which, after prof-reading, will easily beat the paperback one in any metric, including clarity and rigor.

This was done in the Gemini web interface on a whim. I will write everything down structured in the most idiomatic way and then let gemini-cli incrementally refine it up to a “fixed point” when nothing else could be further simplified and clarified, to approach a form of art.

One more time – it is only partially an illusion and an appearance – the semantics of the slop it spews out are real, the code is as constrained ad requested (to strictly well-researched mimic FP patterns, like State Monad-lke composition and idiomatic fallback to the previous validated state on a failure case). So, it can incrementally bootstrap [a prototype of] an “Enterprise-grade” (i.e. worth of millions of dollars) rigorously defined and validated system in just hours instead of moths – that’s a few of orders of magnitude.

The sometimes the whole modules are stateless (no hidden mutable state in principle), with no nulls, no mut, no &mut, no imperative loops and no imperative indexing policies being enforced.

And then the structural type-level guarantees (instead of runtime checks) and the borrow-checker guarantees (instead of relying on a faulty runtime polymorphism) would be applied and “mechanically verified” by he compiler.

Now what?

Stepping back, the whole experience looks like an spontaneous onset of a manic phase which shall inevitably follow by a depression (crashing below the base levels of neuromodulators), but “we” have prototyped a rigorous, principle-guided pure-functional interpreter as the basis of a trading system, which I have successfully procrastinated for years (due to an overwhelming amount of formal specs and technical details to parse through in crappy modern books and crappy internet resources).