vegeta

@june

cli based V programming language learning tool

V

v1.2.3 · 20 saves · 1,754 lines · updated 21 hours ago · trusted

20 saves
119 files ⇓ bundle
20 saves
dd6f9104a5affix: align editor cursor and stage Escape navigation (v1.2.3)dev21 hours ago
3b80a7257656perf: stop analyzer polling while idle (v1.2.2)dev22 hours ago
7f90f124949bfix: terminate learner programs after timeout (v1.2.1)dev22 hours ago
8448f21d7db1chore: stop tracking generated Vegeta binarydev22 hours ago
details

Vegeta

Vegeta 1.2.3 is a terminal puzzle game for learning V from first declarations through ORM, C interoperability, compile-time reflection, unsafe code, and cross-platform builds.

It contains 100 compiler-gated puzzles: 20 concepts with one level at each consistent difficulty.

  1. Trace — copy a visible reference.
  2. Modify — change working code.
  3. Fill-in — replace a compiling placeholder.
  4. Assemble — reorder supplied fragments.
  5. Blank — write the program from a plain-language task.

Requirements

  • V 0.5.2 or newer available as v.
  • Bobatea installed with v install tauraamui.bobatea.
  • v-analyzer for live semantic highlighting and diagnostics. Vegeta checks V_ANALYZER, then $XDG_CONFIG_HOME/v-analyzer/bin/v-analyzer, then PATH.
  • An 80×24 or larger terminal.
  • SQLite development/runtime support for the ORM curriculum validation.

The interface uses Bobatea; learner programs run through the installed V compiler.

Run

v run .

Useful non-interactive commands:

v run . --list
v run . --validate
v test .
v fmt -verify *.v
v vet .
v -o vegeta .

--validate compiles and runs every reference, starter, and solution, then compares every solution with its declared output. Loading also rejects duplicate IDs, malformed puzzles, concepts without exactly five levels, and concepts missing any difficulty mode.

Controls

In the concept menu, use Up/Down and Enter. It opens the next unsolved difficulty; completed concepts remain open.

In a normal puzzle:

  • type and edit with the standard cursor, Home, End, Backspace, Delete, Enter, and Tab keys; indentation uses four spaces and delimiters auto-pair;
  • Ctrl-R compiles/runs the answer;
  • Ctrl-H reveals the short hint;
  • Ctrl-N / Ctrl-P moves to the next/previous difficulty;
  • Ctrl-M or Esc returns to the concept menu;
  • Esc from the concept menu quits.

In Assemble, Up/Down selects a fragment and Left/Right moves it. The lower-left pane always shows the resulting V source.

Interface

The game view always uses three panes:

  • upper left: problem, starter/reference, or fragments;
  • lower left: learner input with auto-indentation and highlighting;
  • full-height right: only the explanation and optional hint needed for the current concept.

Compiler failures show raw V output. Output failures show expected versus actual text. Learner programs that run longer than five seconds are terminated so they cannot freeze the game. Solved IDs are stored as JSON at the platform configuration path under vegeta/progress.json.

Sources

The curriculum follows the official V documentation, checked 2026-08-25 (the page reported an update on 2026-08-17). The local textbook The V Programming Language: A Comprehensive Textbook Guide was supplementary. Where examples or terminology differed, the official site and installed V 0.5.2 compiler won.

v-analyzer supplies the live language-server layer. Larpon/vee was reviewed for editor behavior; its experimental buffer was not imported because this game needs one small buffer while highlighting and diagnostics already come from v-analyzer.

See curriculum coverage for the official-topic mapping and the design specification for the learning rationale.