Skip to content

v0.103.0

Choose a tag to compare

@github-actions github-actions released this 09 Oct 16:10
· 167 commits to master since this release

madc v0.103.0

The TUI facelift release. Everything since v0.102.1: madcide's terminal UI
grows into the GUI's shape — a menu bar, a toolbar, framed panes with a gutter,
tab strips and a status bar, floating dialogs, the mouse, and Dark+ colour —
verified by golden screens on POSIX and genuine Windows. Under the hood the
compiler holds every name as an interned handle and ranks embedded headers from
a build-time table, roughly halving the dialect compile's work, and madcide
opens every file named on its command line with Help shown in the editor. No
language surface changed.

Features

  • The TUI facelift. madcide's terminal UI now looks and works like its GUI.
    It draws box-drawing frames with a line-number gutter and current-line
    highlight, tab strips over the editor's open files and a status bar docked at
    the bottom, a menu bar reached by F10 / Alt+letter / the mouse with framed
    dropdowns, a toolbar whose buttons show icon glyphs (▶ Run ▾ ■ Stop) with a
    Run dropdown, and dialogs, pick lists and prompts as centred floating windows:

    madcide --tui program.c      # the full IDE in the terminal — menus,
                                 # toolbar, tabs, dialogs, and the mouse
    

    Full mouse support — presses, drags held with a button, the wheel, and caret
    placement by pointer — acts on whatever the grid last painted under the
    pointer, so an overlay wins. The chrome is themed in VS Code Dark+, and when
    the terminal's locale is not UTF-8 every box glyph spells in ASCII.

  • The Terminal tab keeps its program's colours. A program run in madcide's
    Terminal tab now shows its colours and attributes — bold, dim, italic,
    underline, blink and inverse; the 8 colours and their bright twins; the xterm
    256-colour palette and 24-bit colour — with every byte keeping the pen it was
    written with.

  • madcide opens every file named on its command line. madcide a.c b.c c.c
    opens all three in the editor's buffer ring, the first one shown; an ro
    after a file opens that file read-only, and a file named twice stays one
    buffer. Before, a second file was refused as an "unexpected argument". The
    single-file faces (-c, --mcp, --lsp, --serve) still refuse a second
    file.

  • Help pages open in the editor. A help page opens in the editor pane's Help
    tab, and a new Help Index docks in the sidebar; choosing a topic row opens it
    in the editor. Help Contents opens the contents page and shows the index, and
    Help ▸ Help Index toggles it.

  • Namespace names get their own colour. The highlighter colours a
    namespace-name — a namespace or alias definition, an alias target, a
    using-directive, and every qualifier before :: — as namespace, and a
    scoped enum before :: as its type rather than a namespace.

Fixes, internals and process

  • Faster compiles from interned names. The compiler core holds every name as
    madc::dis::istring, an 8-byte handle to a process-wide deduplicated
    spelling, so a name copy is 8 bytes and == is a pointer compare; parse-cost
    falls about 13–14% across the C++ and C workloads. A system header's
    include-guard is now decided in the one lex that reads it, not on a second
    full-text read.

  • Embedded headers ranked by a build-time table. Whether a system directory
    shadows an embedded header is decided when madc is built, not probed on disk
    or in the pack on every compile; the dialect parse-cost workload drops from
    143.5M to 72.4M instructions (−49.6%). The build-time shadow table also covers
    the generated darwin prelude and Windows header fallbacks, fixing the darwin
    forest pack.

  • var.c_str() is a real borrow. A string-kind value's c_str() returns a
    borrow of the carrier's own payload — std::string's contract — instead of
    copying into the 8-slot per-thread ring, where a held pointer silently changed
    under a later write; an ASan sweep of 66 madcide/ui tests shows no remaining
    heap-use-after-free.

  • Sanitizer builds instrument the fiber runtime. ASan fiber hooks name the
    live ucontext task stack across every context switch, so a C++ throw unwinding
    on a task no longer reports a spurious stack-buffer-overflow; the madcide/ui
    ASan sweep dropped from 5 findings to 0.

  • REPL line editor. Meta-b / Meta-f / Meta-d fire again when a terminal
    sends Alt+b / Alt+f / Alt+d as one burst, so backward-word, forward-word and
    kill-word work.

  • Owner gates and lane tooling. Three owner gates recognise the definitions
    they guard again after the names-as-istring change moved return types off
    std::string. A change confined to the application set (tools/, the madcide
    tests, the TUI goldens and their driver) now stales only the application lanes
    (gui, tests-jit) instead of every lane.

Validation

Every platform lane's full suite green, on the shipped packed -O2
madc-release, at 5fb46c910 / 57e54306e content. The one engine change
after that, the TUI pane clip (include/madcdis/tui_model.h), and the madcide
changes ran: the madcide/TUI test group 77/0 on JIT, EXE and OBJ; the seven
fast conformance lanes; the TUI golden screens on genuine Windows 11, 32/32; and
the arm64 Mac's native full suite at the release commit, 2014/0.

lane result
Linux (packed -O2, headerless) 2011/0/0TO/43skip, plus 34/0 with headers on disk
Linux native artifacts JIT 2045/0/0TO/9skip, EXE 1864/0, OBJ 1864/0
Windows (packed PE under Wine, headerless) 1966/0/0TO/88skip, plus ondisk-win 1/0
Windows (full suite, owner Windows 11) 1966/0/0TO/88skip
macOS arm64 (Mac mini 14.8.4, native, libc++) 2013/0/0TO/41skip, mac battery 12/0
macOS Intel (MacBook 15.7.4, native, libc++) 2015/0/0TO/39skip, mac battery 12/0
aarch64 long-double lane green (aarch64_ldouble_lane)
macOS build lane release-macos + package-macos rc=0 on both arches
Homebrew (Linux bottle) 2045/0/0TO/9skip
parse-cost profiling gate 0 red of 6
static gates 0 red of 100

Commit-tier conformance lanes at the same content: c-testsuite 220/0, c-torture
1617 passed / 7 failing (0 outside baseline), c2mir-tests 368/0, gui 30/0 (EXE
30/0, OBJ 30/0), index-c 50/50, commonmark 664/6 (0 outside baseline).

See CHANGELOG.md for full details.