Why stop at Emacs? Native apps you or an AI reprogram in Clojure while they run ...

@best

Why stop at Emacs? Native apps you or an AI reprogram in Clojure while they run github.com · 22 points · 18 comments · HN thread

TL;DR AffrescoUI is an open-source native UI engine (C++23, OpenGL) whose applications are defined as Lisp programs or JSON documents in a sandboxed Clojure dialect. Users or AI agents can change a running app through reviewed, undoable revisions, with no rebuild or restart. The author says all the 2026 code was written by Claude Code, and the project ships thirteen example apps.

  • Apps are named Lisp definitions (defscreen, defview, defn, defcommand) built into one document that the engine draws natively; each app also has an equivalent JSON version.
  • Every change is a revision: an AI agent's proposal is previewed live and applied only after the user accepts it, or auto-applied under allow rules; rules are allow, ask or deny.
  • Changes are stored as SHA-256 commits with undo that keeps later changes, and a change set can be exported as a portable file to install in another app.
  • The engine supports OpenGL 4.1 core or ES 3.0, WebGL2 in the browser, and CI builds on Linux, Windows and macOS; it is Apache 2.0 licensed.
  • The stated benchmarks are a typical edit of 28 tokens, and the Lisp dialect passes 163 of 186 everyday Clojure forms as the same value.
  • The unsigned v2.0.0 downloads trigger macOS and Windows warnings; building from source with CMake 3.25+ and a C++23 compiler is recommended.

Discussion The thread is mostly enthusiastic and conceptual, centred on malleable software and whether Lisp suits AI-driven editing. Commenters point to related projects (a Smalltalk-style environment, Babashka, a Python live-dev tool, a financial-consulting app), and the author replies to most of them, often noting plans such as an MCP server or simplifying the examples. The main skeptical thread asks whether a Lisp with less training data is a good choice compared with mainstream statically typed languages, and whether the macro-heavy code needs a very strong model.

  • Live-modifiable environments are a natural fit for AI (many): Several commenters argue that Smalltalk, Lisp and similar self-modifying runtimes suit AI agents because code is data and changes can be made while running. Some say a Lisp runtime could become a strong environment for AI.
  • Lisp's training-data and typing disadvantage (some): One commenter questions choosing Clojure over statically typed languages because of training-set and validation benefits. Another says the untyped, macro-heavy code may need a very strong LLM, and the author suggests Sonnet-class models as a minimum.
  • Similar projects already exist (some): Commenters share their own work: an Emacs-like editor written with LLMs, a Clojure-based tool called bb, a financial-consulting app with a similar approach, and a Python live-development tool.
  • Interest in applying the idea beyond editors (a few): A commenter asks for a harness that morphs into any software, and the author agrees that the idea should extend to everyday apps beyond the editor.

Links from the comments

#lisp #clojure #nativeUi #ai #malleableSoftware #opengl