A project by Renan Bomtempo

EldritchCodex: Exploring software engineering and mathematics,
learning by building.

EldritchCodex is an open-source project where I build what I want to understand and use: Nodens, a C++23 application framework; Nyar, a Vulkan renderer; and Armitage, an agent that keeps my work grounded in books, documentation and papers. Rendering and simulation remain a big part; other tools will be built on the same foundations. The sources behind all three are in a public Zotero library.

IFRAMEWORK experimental

Nodens

A C++23 framework for building interactive desktop applications quickly, with optional Dear ImGui. Everything is a C++ module, so an app starts with import nodens; and links one static library.

Overview
  • 01 · Windowing

    GLFW windows

    Creates the window, graphics context and input handling, with OpenGL or Vulkan backends.

  • 02 · Lifetime

    Layer system

    An app is a stack of layers. They update in order, draw back to front, and receive input from the top down.

  • 03 · Messaging

    Event system

    Input events pass down the layers. A thread-safe event bus lets any part publish and subscribe to custom events, handled immediately or queued.

  • 04 · Concurrency

    Task system

    Runs heavy work, like simulation and data processing, on worker threads so the render thread stays responsive.

Writing an app

  • An app inherits from Nodens::Application, pushes one or more layers, and calls Run(). Every frame, each layer receives OnUpdate(TimeStep) and OnImGuiRender(TimeStep), and input events routed down the stack arrive in OnInputEvent.
  • Three examples ship with it: circularwave3d (live 2D/3D plots with ImPlot and ImPlot3D), planetaryscan (the event bus and task system working together) and headlesspulse (a loop with no window).
  • Tracy profiling is built in: add ZoneScoped to any layer method.
  • CMake builds every dependency from source, so there is nothing to install by hand.
HelloNodens.cpp a minimal app

                    
IIRENDERER experimental

Nyar

A real-time renderer for Nodens, built on the Vulkan graphics API as a learning exercise. It starts from the Khronos "Drawing a triangle" tutorial and grows, step by step, into a clean rendering API for Nodens applications.

Overview
  • 01 · What

    A renderer for Nodens

    Nyar is the part of Nodens that draws. It is a separate module, so Nodens applications can use it as their rendering backend.

  • 02 · Why

    A learning exercise

    Nyar exists to understand modern real-time rendering by building it, one small working step at a time.

  • 03 · How

    Vulkan and Slang

    It uses current Vulkan, and shaders written in Slang, a modern shading language.

hello-triangle · the first milestone
IIIAGENT TOOLKIT private preview

Armitage

Armitage is an agent toolkit (CLI, skillset, a custom Pi harness and a Claude Code plugin). The model answers from three sources you choose: your Zotero library, a Markdown memory and your workspace code. It runs in the terminal, in Zed or in Claude Code. In Pi and Zed the role you pick sets the workflow: SWE (coder, architect, devops, debug), Tutor or Researcher. Every answer cites its sources, with links that open the Zotero item or the code file at the right page or line.

I built Armitage mostly with AI coding agents, to help me develop Nodens and Nyar. It is a personal, experimental project, and agent tooling is outside my area of expertise.

Overview
  • 01 · Cited

    Every claim has a source

    Each factual claim cites your workspace, your Zotero library or the agent's memory, or it is cut or marked unverified.

  • 02 · Search

    One search, three places

    A single query searches memory, code and your Zotero library together, with the retrieval running fully on your machine. PDFs, EPUBs and saved web pages are all read.

  • 03 · Roles

    One role per kind of work

    Researcher, tutor, architect, coder, debugger and devops, each with a workflow taken from the literature. Read-only roles cannot edit your files.

What an answer looks like

Three illustrative threads in Zed: a code question, a Vulkan question answered from Zotero, and one answered from memory and checked against the code. Every claim is footnoted to its source, and what it cannot source is marked. References are clickable: code opens the file at the cited line, Zotero opens the paper at the cited page or the saved web page at the passage.

EventBus and producer threads Armitage · illustrative
You

How does the Nodens EventBus keep producer threads from blocking while events are being dispatched?

Armitage
  • read src/Nodens/Events/EventBus.cppm228 lines
  • read src/Nodens/Events/EventBus.cpp100 lines

Producers never wait for handlers. QueueEvent locks the buffer mutex only long enough to append the event's bytes to the active write buffer, then returns.1 Flush() takes the same mutex only to swap the two buffers, then runs the handlers on the buffer it swapped out, outside the lock.2 Subscribe, Unsubscribe and QueueEvent may be called from any thread; Dispatch and Flush are meant for the main thread.3

Unsourced. How the buffer mutex behaves under heavy contention: none of the code, docs or papers searched measure it.

  1. src/Nodens/Events/EventBus.cppm:108-112 · QueueEvent locks the buffer mutex, appends the bytes to the active buffer and returns
  2. src/Nodens/Events/EventBus.cpp:66-69, 95 · Flush swaps the buffer index under the lock; handlers run after it is released
  3. src/Nodens/Events/EventBus.cppm:37-39 · thread-safety note on the class
Message Armitage… @ to add context Armitage · Pi
Vulkan synchronization Armitage · illustrative
You

How can a Vulkan renderer like Nyar cut down on synchronization bookkeeping?

Armitage
  • armitage zotero query "image layout transitions and pipeline barriers with synchronization2" -c VZDLWHB25 passages · 2 sources
  • armitage zotero cite 4YKVG2VK -q "Synchronization2 keeps the full barrier dependency in one struct"verified · p. 103

The SIGGRAPH 2026 Vulkan slides name three tools. Timeline semaphores let one semaphore stand for many increasing milestone values that the CPU and GPU can wait on, although swapchain acquire and present still use binary semaphores. Synchronization2, core since Vulkan 1.3, gives clearer dependency and submission structures. Unified image layouts mean fewer layout transitions.1 The Khronos Vulkan Tutorial shows the step they simplify: a pipeline barrier that commits an image layout transition to the command buffer together with its source and destination stages.2

Unsourced. How much these changes save: the slides present them as less bookkeeping, not as measured speedups.

  1. How to Write a Vulkan Application in 2026 · pp. 101-104 · Potter et al. 2026, SIGGRAPH 2026 (Vulkan Documentation Project, free online)
  2. Image Layout Transition · §46.1.14 · Khronos Vulkan Tutorial, Barrier Execution and GPU Synchronization (free online)
Message Armitage… @ to add context Armitage · Pi
Why the reranker is released Armitage · illustrative
You

Why does Armitage release the reranker after every query?

Armitage
  • armitage memory recall "reranker"2 notes · both stale
  • armitage code symbol Reranker1 definition
  • armitage search "reranker keep_alive"3 passages

Memory has the answer but marks it stale, so I rechecked it against the docs and code, and it still holds. The reranker is loaded for one query and then released, and the query path unloads the embedding model first, so the two models never sit in VRAM together.1 In code, Reranker is a context manager whose __exit__ calls close(),2 which moves the model off the GPU, empties the CUDA cache and logs the release.3 The query embedding uses keep_alive=0, which is what unloads that model.4

Unsourced. How much VRAM the loaded reranker takes in total: the docs bound it but give no measured figure.

  1. docs/03-retrieval-pipeline.md:208-211 · bounded VRAM: reranker loaded for one query then released, embedding model unloaded
  2. src/armitage_cli/retriever.py:203-208 · context manager; __exit__ calls close()
  3. src/armitage_cli/retriever.py:302-317 · close() frees the model and the CUDA cache, then logs the release
  4. src/armitage_cli/retriever.py:392, 465 · embedding call defaults to keep_alive=0
Message Armitage… @ to add context Armitage · Pi
↑ TOP