DEV Community

Art
Art

Posted on

Vertical Slice: Speech-to-Markdown Editor, LLVM UI Codegen, and Landscape Split - in Our Own Language

We're building SMS - a statically-typed language that compiles to native ARM via LLVM. The runtime is ForgeRunner (C++ / Godot). The editor is ForgeStudio, which is itself written in SMS.

Today we shipped a vertical slice that touches every layer of the stack simultaneously. That's the point of a vertical slice: prove that the whole column works, not just one tier.

Here's what we built.


🎙️ Continuous Dictation in SMS

The new SpeechRecognizer component looks like this in SML (our declarative UI language):

SpeechRecognizer {
    id: mic
    language: "de-DE"
    mode: clean
    filters: "zdf,wdr,applaus,musik"
}
Enter fullscreen mode Exit fullscreen mode

mode: clean activates post-processing: filler words, broadcast noise artifacts, and applause markers are stripped before the text reaches your app logic.

The dictation flow works like this:

  1. mic.listen() starts recognition
  2. mic.result fires with a partial result
  3. SMS accumulates it into pendingText and immediately calls mic.listen() again - continuous dictation
  4. A confirmRow appears the moment dictation starts: Stop / Confirm / Cancel
  5. Each action sets isDictating = false before calling mic.stop() - no race conditions

The previewLabel uses wrap: true so long dictated text wraps instead of stretching the confirm buttons off-screen. Small detail, big UX difference.

Build 28.


🖥️ Landscape Auto-Split

ForgeRunner now listens to mainWindow.orientationChanged. When the device rotates to landscape, the editor automatically splits into two panes: raw SMS/Markdown on the left, live preview on the right.

In portrait mode, toggle buttons let you switch between edit and preview. In split (landscape) mode, the toggle buttons hide themselves - because they're redundant.

The toolbar is compact: fontSize between 14–18. Everything stays reachable with one thumb.

Build 34.


⚙️ LLVM Codegen: UI Property Assignment

This is the layer most people don't see, but it's the one that makes everything else possible.

SMS now generates native LLVM IR for integer and boolean member assignment on UI objects:

sms_native_llvm_set_ui_int_prop
Enter fullscreen mode Exit fullscreen mode

When your SMS code writes label.fontSize = 16, it doesn't go through an interpreter. It emits LLVM IR that gets compiled to a native ARM instruction. The UI property is set at the machine level.

This is how ForgeStudio runs on Android without a JVM.


📝 Live Markdown Preview

The editor now renders a live Markdown preview on every textChanged event. Split mode shows both panes simultaneously. Portrait mode lets you toggle between them.

The preview is rendered natively inside ForgeRunner - no WebView, no Electron, no browser engine.


🔧 Infrastructure

run.sh: FORGE_ANDROID_JAVA_HOME and adb PATH fix
Enter fullscreen mode Exit fullscreen mode

This one line represents about two hours of debugging. Android toolchain path resolution on Linux is a special kind of suffering. It's fixed now.

One clarification worth making: Java is only a build-time bridge. The Android SDK requires a JDK present to package and sign the APK, that's it. There is no JVM at runtime, no Kotlin, no Compose. The app runs as native ARM code via ForgeRunner (C++/Godot). Java touches the build pipeline and nothing else.


Why vertical slices?

A vertical slice is a complete feature that works end-to-end: from the user's voice, through SMS logic, through LLVM codegen, through the native UI layer, rendered on an Android device.

It's the opposite of building layers in isolation. It's proof that the full stack is alive.

We're on Codeberg. Build something weird.


Part of the Forge 4D ecosystem - declarative UI, native compilation, no cloud required.

Top comments (0)