This page is an English fallback. I have not published a Español translation of this generated reference yet.
Examples#
I have 248 NanoLang examples on disk. This table is generated from those files; I do not maintain a second count by hand.
| Example | Source | Track | Build | Purpose |
|---|---|---|---|---|
| Datetime Library Demo | examples/advanced/datetime_demo.nano | modules | local, external-deps | Demonstrate date and time operations using the datetime module |
| Error Handling Patterns | examples/advanced/error_handling_patterns.nano | unclassified | unspecified | Demonstrate comprehensive error handling strategies in NanoLang |
| libevent Timed Loop Exit | examples/advanced/event_example.nano | modules | external-deps | Schedule an event-loop exit and dispatch until that timeout expires |
| FFI (Foreign Function Interface) Tutorial | examples/advanced/ffi_tutorial.nano | unclassified | unspecified | Step-by-step guide to calling C functions from NanoLang |
| Libc Module Demo | examples/advanced/libc_demo.nano | unclassified | unspecified | Demonstrate calling C standard library functions through the libc module |
| Assert With Task | examples/advanced/mac_assert_with_task.nano | unclassified | unspecified | Demonstrate automatic issue creation from failed assertions using MAC tasks |
| MAC Task Basic Usage | examples/advanced/mac_basic_usage.nano | unclassified | unspecified | Demonstrate querying and creating MAC tasks for programmatic issue management |
| MAC Workflow Automation | examples/advanced/mac_workflow_automation.nano | unclassified | unspecified | Demonstrate programmatic issue management and automated triage with MAC tasks |
| Extended Math Functions Demo | examples/advanced/math_ext_demo.nano | unclassified | unspecified | Demonstrate scientific calculations using extended math module functions |
| Math Helper Module | examples/advanced/math_helper.nano | internal | module | Provide basic arithmetic helper functions as a reusable module |
| Module Introspection Demo | examples/advanced/module_introspection_demo.nano | unclassified | unspecified | Demonstrate querying module metadata at compile-time using introspection |
| Namespace System Demo | examples/advanced/namespace_demo.nano | unclassified | unspecified | Demonstrate NanoLang's namespace system with public/private visibility |
| Performance Optimization Techniques | examples/advanced/performance_optimization.nano | unclassified | unspecified | Demonstrate performance best practices in NanoLang |
| Regex Demo (Full) | examples/advanced/regex_demo.nano | unclassified | unspecified | Showcase both one-shot and compiled regex operations with tiered API |
| Regex Demo (Simple) | examples/advanced/regex_demo_simple.nano | unclassified | unspecified | Demonstrate one-shot regex operations with a simple Pythonic API |
| SQLite Prepared CRUD | examples/advanced/sqlite_simple.nano | modules | external-deps | Create, read, update, and delete rows with prepared statements and bound values |
| File Processor | examples/advanced/stdio_file_processor.nano | unclassified | unspecified | Demonstrate file reading, filtering, transforming, and writing with the stdio module |
| AST Module Demo | examples/advanced/stdlib_ast_demo.nano | unclassified | unspecified | Demonstrate programmatic AST node creation and metaprogramming capabilities |
| Testing Strategies and Best Practices | examples/advanced/testing_strategies.nano | unclassified | unspecified | Comprehensive guide to writing effective shadow tests |
| UI Code Display Demo | examples/advanced/ui_code_display_demo.nano | unclassified | unspecified | Demonstrate a graphical code display widget using SDL and TTF rendering |
| Unicode String Operations Demo | examples/advanced/unicode_demo.nano | unclassified | unspecified | Demonstrate grapheme-aware unicode string handling and operations |
| Unsafe Blocks Demo | examples/advanced/unsafe_demo.nano | unclassified | unspecified | Demonstrate the unsafe keyword for marking potentially dangerous operations |
| libuv Loop Inspection | examples/advanced/uv_example.nano | modules | external-deps | Create an empty libuv loop, poll it without blocking, and close it |
| Vector2D Module Demo | examples/advanced/vector2d_demo.nano | unclassified | unspecified | Demonstrate 2D vector mathematics using the vector2d module |
| Vector2D Physics Simulation | examples/advanced/vector2d_physics_simple.nano | unclassified | unspecified | Demonstrate a simple 2D physics simulation with gravity and collision |
| IPC Message Schema | examples/agentos_ipc_schema.nano | applications | local | I model a small IPC envelope with explicit concrete message records |
| Offline Issue Triage | examples/ai_github_agent.nano | applications | local | I show deterministic issue prompt construction without contacting GitHub or an LLM |
| Array Utils API Lesson | examples/api_lessons/array_utils_api.nano | modules | local | I show the focused array utility API for sorting strings |
| Audio Helpers API Lesson | examples/api_lessons/audio_helpers_api.nano | modules | external-deps, audio | I show the raw PCM to WAV helper call with deterministic missing-input behavior |
| Binary API Lesson | examples/api_lessons/binary_api.nano | modules | local | I show binary encode and decode helpers with Result-returning reads |
| Collections HashMap API Lesson | examples/api_lessons/collections_hashmap_api.nano | modules | local | I show my string HashMap wrapper, including traversal, mutation, and explicit cleanup |
| Set API Lesson | examples/api_lessons/collections_set_api.nano | modules | local | I show the string Set API with add, membership, values, remove, and clear |
| std::diagnostics API Lesson | examples/api_lessons/diagnostics_api.nano | modules | local | I show building Loc/Span/Diagnostic values and formatting an error report |
| dispatch API Lesson | examples/api_lessons/dispatch_api.nano | modules | external-deps | I show creating a serial queue, dispatching async work, and synchronising via group_wait |
| Environment API Lesson | examples/api_lessons/env_api.nano | modules | local | I show environment variable and argv access |
| Examples Diagnostic API Lesson | examples/api_lessons/examples_diag_api.nano | modules | local | I emit JSON-line diagnostics for examples that need machine-readable status. |
| Filesystem API Lesson | examples/api_lessons/fs_api.nano | modules | local | I show path helpers, glob matching, and a deterministic file round trip |
| GLUT Helpers API Lesson | examples/api_lessons/glut_helpers_api.nano | modules | external-deps, graphical | I show the GLUT helper calls that should run only after an OpenGL context exists. |
| std::json API Lesson | examples/api_lessons/json_api.nano | modules | local | I show parsing a small JSON document, reading typed fields, and round-tripping back to string |
| std::log API Lesson | examples/api_lessons/log_api.nano | modules | local | I show configuring log level, writing info/warn/error, and reading the level back |
| std::math::array_ops API Lesson | examples/api_lessons/math_array_ops_api.nano | modules | local | I show elementwise array math, reductions, normalization, and distance helpers. |
| std::math::complex API Lesson | examples/api_lessons/math_complex_api.nano | modules | local | I show complex arithmetic in rectangular and polar form. |
| math_ext API Lesson | examples/api_lessons/math_ext_api.nano | modules | local | I show the extern-FFI math_ext bindings for inverse trig, logs, hyperbolics, and floats |
| std::math::extended API Lesson | examples/api_lessons/math_extended_api.nano | modules | local | I show extended math helpers: trig, logs, constants, and angle conversion |
| std::math::Mat4 API Lesson | examples/api_lessons/math_matrix4_api.nano | modules | local | I show 4x4 transforms for points and directions. |
| std::math::Quat API Lesson | examples/api_lessons/math_quaternion_api.nano | modules | local | I show quaternion construction, normalization, multiplication, and vector rotation. |
| std::math::Vector2D API Lesson | examples/api_lessons/math_vector2d_api.nano | modules | local | I show the std::math 2D vector API with pure functions and reflection |
| std::math::Vector3D API Lesson | examples/api_lessons/math_vector3d_api.nano | modules | local | I show 3D vector arithmetic for geometry and physics code. |
| std::math::Vector4D API Lesson | examples/api_lessons/math_vector4d_api.nano | modules | local | I show homogeneous coordinates and 4D vector helpers. |
| Nano Highlight API Lesson | examples/api_lessons/nano_highlight_api.nano | modules | local | I show HTML and ANSI syntax highlighting for small NanoLang snippets |
| std::peg2 API Lesson | examples/api_lessons/peg2_api.nano | modules | local | I show compiling a named PEG2 grammar, parsing input, and reading rule_name + span |
| std::peg API Lesson | examples/api_lessons/peg_api.nano | modules | local | I show one-shot pattern matching and capture extraction with the minimal PEG engine |
| Preferences API Lesson | examples/api_lessons/preferences_api.nano | modules | external-deps | I show playlist preference save/load and preference path helpers |
| Process API Lesson | examples/api_lessons/process_api.nano | modules | local | I show process execution, exit codes, spawned processes, and pipe cleanup |
| proptest API Lesson | examples/api_lessons/proptest_api.nano | modules | local | I show one tiny forall_int run with a trivial integer property |
| pt2_audio API Lesson | examples/api_lessons/pt2_audio_api.nano | modules | external-deps | I show the ProTracker audio playback surface without requiring a real MOD file. |
| pt2_module API Lesson | examples/api_lessons/pt2_module_api.nano | modules | external-deps | I show the ProTracker MOD-file API surface (load/info/free) without requiring a real file |
| PT2 State API Lesson | examples/api_lessons/pt2_state_api.nano | modules | external-deps, audio | I show ProTracker playback, position, channel, pattern, and sample state calls |
| PyBridge API Lesson | examples/api_lessons/pybridge_api.nano | modules | external-deps | I show Python bridge initialization, import, call, get, set, release, and shutdown |
| PyBridge Matplotlib API Lesson | examples/api_lessons/pybridge_matplotlib_api.nano | modules | external-deps | I show the matplotlib bridge rendering call with an inline PNG response |
| Result API Lesson | examples/api_lessons/result_api.nano | modules | local | I show the generic Result union as a small success-or-error contract |
| SDL_image Safe API Lesson | examples/api_lessons/sdl_image_safe_api.nano | modules | external-deps, graphical | I use the safe SDL_image wrappers so example code does not carry unsafe blocks at each texture call. |
| std::lib API Lesson | examples/api_lessons/std_lib_api.nano | modules | local | I show the standard library root import and its version constant. |
| Stdio API Lesson | examples/api_lessons/stdio_api.nano | modules | local | I show stdio file handles through safe size/existence helpers and raw close |
| StringBuilder API Lesson | examples/api_lessons/stringbuilder_api.nano | modules | local | I show efficient string construction without repeated raw concatenation |
| stdlib::tidy API Lesson | examples/api_lessons/tidy_api.nano | modules | local | I show the legacy stdlib/tidy.nano code-formatter helpers |
| Vector2D API Lesson | examples/api_lessons/vector2d_api.nano | modules | local | I show 2D vector construction, arithmetic, and a small interpolated path |
| WebSocket API Lesson | examples/api_lessons/websocket_api.nano | modules | local | I show the WebSocket client handle lifecycle without requiring a live server |
| Nanoamp Playlist Harness | examples/audio/nanoamp_playlist_harness.nano | unclassified | unspecified | No purpose metadata yet. |
| SDL Audio Player | examples/audio/sdl_audio_player.nano | unclassified | graphical, external-deps | Interactive audio player with music playback, sound effects, and volume control using SDL_mixer |
| WAV Audio Playback | examples/audio/sdl_audio_wav.nano | unclassified | external-deps, audio | Plays a user-provided WAV file using SDL_mixer to verify audio output |
| MOD Audio Visualizer | examples/audio/sdl_mod_visualizer.nano | unclassified | graphical, external-deps | Plays MOD tracker files with real-time waveform, VU meters, and multiple visualization modes |
| NanoAmp Music Player | examples/audio/sdl_nanoamp.nano | unclassified | graphical, external-deps | Pixel-perfect Winamp tribute with playlist management, directory browsing, and audio visualizations |
| ProTracker Clone | examples/audio/sdl_tracker_shell.nano | unclassified | graphical, external-deps | Full-featured ProTracker-style MOD player with file browser, ModArchive search, pattern viewer, and audio visualizations |
| Bench sample | examples/bench_sample.nano | internal | local | Two tiny zero-parameter workloads for nanoc --bench |
| Cross Backend Hello | examples/cross_backend/hello_cross_backend.nano | learn | local | Provide one small program suitable for native, VM, and WASM backend smoke tests |
| JSON Demo | examples/data/json_demo.nano | modules | local | Demonstrates JSON parsing, creation, and array manipulation using the json module |
| Coverage Demo | examples/debug/coverage_demo.nano | unclassified | unspecified | Demonstrates coverage tracking and execution tracing using the stdlib coverage API |
| Logging Demo | examples/debug/logging_demo.nano | unclassified | unspecified | I show every structured log level and use categories to trace a calculation |
| Property Test Math | examples/debug/property_test_math.nano | unclassified | unspecified | Property-based testing of algebraic properties for addition, multiplication, abs, and max |
| Property Test Sorting | examples/debug/property_test_sorting.nano | unclassified | unspecified | Property-based testing of bubble sort verifying length preservation, ordering, and idempotence |
| LLM Diagnostics Type Mismatch | examples/diagnostics/llm_diags_type_mismatch.nano | experimental | expected-failure | Provide an expected-failure input for --llm-diags-json |
| Emacs buffer helpers | examples/emacs/emacs_buffer.nano | internal | local | Point, region, and text reconstruction for the SDL editor |
| Emacs keymap helpers | examples/emacs/emacs_keys.nano | internal | local | Prefix keymap for the SDL Nano Emacs editor |
| Init | examples/emacs/init.nano | unclassified | unspecified | No purpose metadata yet. |
| Nano Emacs | examples/emacs/nano_emacs.nano | showcase | graphical, external-deps | Windowed SDL editor with NanoLang as the extension language |
| CUDA Fluid Simulation | examples/fluid_sim.nano | applications | external-deps | GPU-accelerated 2D fluid simulation using NVIDIA Warp via the Python bridge |
| Asteroids | examples/games/sdl_asteroids.nano | unclassified | unspecified | Full arcade Asteroids game with lives, score, asteroid breaking mechanics, and thrust physics |
| Checkers | examples/games/sdl_checkers.nano | unclassified | unspecified | Full-featured checkers game with AI opponent, king pieces, mandatory jumps, and multi-jump support |
| Pong | examples/games/sdl_pong.nano | unclassified | unspecified | Two-player Pong game with authentic 1972 style, blocky score display, and UI widget controls |
| OpenCL Julia Flow | examples/gpu/julia_flow.nano | showcase | Animate a dense Julia set on CUDA or OpenCL and show it as an SDL texture | |
| GPU Matrix Operations | examples/gpu/matmul.nano | modules | gpu, external-deps | Demonstrate 2D GPU launch patterns over matrix-shaped data |
| GPU Reduce Sum | examples/gpu/reduce_sum.nano | modules | gpu, external-deps | Demonstrate a parallel reduction using GPU atomics |
| GPU SAXPY | examples/gpu/saxpy.nano | modules | gpu, external-deps | Demonstrate the SAXPY benchmark pattern on the GPU |
| GPU Vector Add | examples/gpu/vector_add.nano | modules | gpu, external-deps | Show the smallest useful GPU vector kernel |
| GPU Vector Scale | examples/gpu/vector_scale.nano | modules | gpu, external-deps | Demonstrate one-load one-store GPU scaling |
| Boids Flocking Simulation (Parallel) | examples/graphics/sdl_boids.nano | unclassified | unspecified | Visual flocking simulation with parallel force computation via dispatch groups |
| SDL Drawing Primitives | examples/graphics/sdl_drawing_primitives.nano | unclassified | unspecified | Demonstrates SDL rectangle drawing and basic rendering functions |
| Falling Sand Simulation (Parallel Physics) | examples/graphics/sdl_falling_sand.nano | unclassified | unspecified | Interactive cellular automata physics sandbox with parallel column-strip updates |
| Fire Effect | examples/graphics/sdl_fire.nano | unclassified | unspecified | Classic demoscene fire simulation with palette-based heat propagation and cooling |
| Forth IDE | examples/graphics/sdl_forth_ide.nano | unclassified | unspecified | Split-pane SDL terminal IDE for the NanoLang Forth interpreter |
| Game of Life (SDL) | examples/graphics/sdl_game_of_life.nano | unclassified | unspecified | Conway's Game of Life cellular automaton with colorful cell aging visualization |
| Glass Sphere Raytracer | examples/graphics/sdl_glass_sphere.nano | unclassified | unspecified | Real-time raytracer with refraction, Fresnel reflections, and a checkerboard plane |
| SDL_image Complete Demo | examples/graphics/sdl_image_demo.nano | unclassified | unspecified | I introduce SDL_image loading, scaling, rotation, flipping, tinting, and alpha blending in one window |
| Sprite Sheet Animation | examples/graphics/sdl_image_sprite_animation.nano | graphics | graphical, external-deps | Select timed source rectangles from one PNG sprite sheet |
| Tiled Scrolling Background | examples/graphics/sdl_image_tiled_background.nano | unclassified | unspecified | Demonstrates tiled repeating backgrounds with scrolling using SDL_image |
| Mouse Click Test | examples/graphics/sdl_mouse_click.nano | unclassified | unspecified | Tests mouse click event detection alongside keyboard event polling |
| NanoViz 3D Music Visualizer | examples/graphics/sdl_nanoviz.nano | unclassified | unspecified | I combine SDL audio levels with five OpenGL visualizations. |
| Particle Explosions | examples/graphics/sdl_particles.nano | unclassified | unspecified | Interactive particle system where mouse clicks spawn colorful explosions with gravity |
| 2D Physics Simulation | examples/graphics/sdl_physics_demo.nano | unclassified | unspecified | Real-time bouncing ball simulation with gravity, collisions, and elasticity |
| Whitted-Style Ray Tracer | examples/graphics/sdl_raytracer.nano | unclassified | unspecified | Classic recursive raytracer with real-time reflections, shadows, and interactive camera |
| Starfield Hyperspace | examples/graphics/sdl_starfield.nano | unclassified | unspecified | Star Wars-style hyperspace starfield with stars flying from center outward with motion trails |
| Procedural Terrain Explorer | examples/graphics/sdl_terrain_explorer.nano | unclassified | unspecified | Infinite procedural terrain with Perlin noise, biomes, fog of war, and camera controls |
| SDL Streaming Texture | examples/graphics/sdl_texture_demo.nano | modules | graphical, external-deps | Upload and render a new ARGB8888 pixel pattern every frame |
| Extended UI Widgets | examples/graphics/sdl_ui_widgets_extended.nano | unclassified | unspecified | Showcases all UI widgets including buttons, sliders, text input, dropdowns, spinners, and tooltips |
| Hello Package | examples/hello_pkg/main.nano | modules | local | Show the smallest package with a nano.toml manifest and a real entry point |
| Deterministic File Pipeline | examples/integration/file_pipeline.nano | learn | local | Write fixed local input, read it, transform it, and verify the output file |
| Full-Featured REPL | examples/language/full_repl.nano | unclassified | unspecified | Comprehensive REPL with persistent variables, function definitions, multi-line input, and multi-type evaluation |
| Six-script greeting | examples/language/i18n_six_scripts.nano | unclassified | unspecified | UTF-8 string literals in English, Mandarin, Hindi, Spanish, Arabic, and French |
| Advanced Math Functions | examples/language/nl_advanced_math.nano | unclassified | unspecified | Demonstrates built-in math functions including sqrt, pow, rounding, and trigonometry |
| Affine Resource Demo | examples/language/nl_affine_resource_demo.nano | learn | local | I transfer and dismantle a simulated file handle |
| Array Bounds Checking | examples/language/nl_array_bounds.nano | unclassified | unspecified | Demonstrates runtime bounds checking for array access in compiled code |
| Array Complete | examples/language/nl_array_complete.nano | unclassified | unspecified | Comprehensive test suite covering all array operations including literals, access, length, and creation |
| Array Functional Patterns | examples/language/nl_array_functional.nano | unclassified | unspecified | Demonstrates transform, predicate, and reduction patterns on arrays |
| Array Inference | examples/language/nl_array_infer.nano | learn | local | Show array element type inference from literals |
| Boids Flocking Simulation | examples/language/nl_boids.nano | showcase | local | Simulates emergent flocking behavior using cohesion forces, speed limiting, and world wrapping |
| Calculator | examples/language/nl_calculator.nano | unclassified | unspecified | Arithmetic operation dispatcher demonstrating function composition and string formatting |
| Checked Math Demo | examples/language/nl_checked_math_demo.nano | unclassified | unspecified | Demonstrates safe arithmetic operations that catch overflow, underflow, and division by zero at runtime |
| Comparison Operators | examples/language/nl_comparisons.nano | unclassified | unspecified | Demonstrate all comparison operators and boolean logic in prefix notation |
| For Loops | examples/language/nl_control_for.nano | unclassified | unspecified | Demonstrate for-in loops with ranges, nested for loops, and accumulator patterns |
| If/Else and While Loops | examples/language/nl_control_if_while.nano | unclassified | unspecified | Comprehensive tests of if/else branching, while loops, nested loops, and combined control flow |
| Match Expressions | examples/language/nl_control_match.nano | unclassified | unspecified | Comprehensive demonstration of match expressions on union types for pattern matching |
| CSV Employee Processor | examples/language/nl_csv_processor.nano | unclassified | unspecified | Demonstrates a filter-map-fold pipeline on employee data for payroll processing and analytics |
| Data Analytics Engine | examples/language/nl_data_analytics.nano | unclassified | unspecified | Builds a complete analytics pipeline using map and reduce for functional data processing |
| Self-Hosting Demo | examples/language/nl_demo_selfhosting.nano | unclassified | unspecified | Demonstrates import aliases and modular code composition as a foundation for self-hosting compilation |
| Dispatch Counter | examples/language/nl_dispatch_counter.nano | modules | external-deps | Demonstrate the dispatch queue API shape with a simple counter workload |
| Dispatch Pipeline | examples/language/nl_dispatch_pipeline.nano | modules | external-deps | Demonstrate fan-out and fan-in with dispatch queues |
| Dispatch Stats | examples/language/nl_dispatch_stats.nano | modules | external-deps | Demonstrate serialized state updates through a dispatch queue |
| Enums | examples/language/nl_enum.nano | unclassified | unspecified | Demonstrate enum definition with auto and explicit values, and enum-to-int conversion |
| Extern Character Functions | examples/language/nl_extern_char.nano | unclassified | unspecified | Demonstrates calling C character classification and conversion functions via extern declarations |
| Extern Math Functions | examples/language/nl_extern_math.nano | unclassified | unspecified | Demonstrates calling C math library functions via extern declarations for trig, exponential, and rounding |
| Extern String Functions | examples/language/nl_extern_string.nano | unclassified | unspecified | Demonstrates calling safe C string functions (strlen, strcmp, strncmp) via extern declarations |
| Factorial | examples/language/nl_factorial.nano | unclassified | unspecified | Demonstrate recursive function calls and shadow testing |
| Falling Sand Simulation | examples/language/nl_falling_sand.nano | unclassified | unspecified | Simulates particle physics with gravity and collision using a grid-based cellular automata approach |
| Fibonacci Sequence | examples/language/nl_fibonacci.nano | unclassified | unspecified | Classic recursive algorithm with multiple base cases |
| Filter, Map, and Fold | examples/language/nl_filter_map_fold.nano | unclassified | unspecified | Demonstrates classic functional programming patterns using first-class functions |
| First-Class Functions | examples/language/nl_first_class_functions.nano | unclassified | unspecified | Demonstrates passing functions as parameters to higher-order functions |
| Float Operations | examples/language/nl_floats.nano | unclassified | unspecified | Demonstrates floating-point arithmetic, math functions, and circle area calculation |
| For-In Array | examples/language/nl_for_in_array.nano | learn | local | Demonstrate for-in iteration over dynamic arrays |
| Forth Interpreter (FIG Forth 83) | examples/language/nl_forth_interpreter.nano | unclassified | unspecified | Complete implementation of the FIG Forth 83 standard word set as an interactive interpreter |
| Function Factories v2 | examples/language/nl_function_factories_v2.nano | unclassified | unspecified | Demonstrates function factories that return functions and apply them via higher-order helpers |
| Function Return Values | examples/language/nl_function_return_values.nano | unclassified | unspecified | Demonstrates functions that return other functions as values |
| Function Variables | examples/language/nl_function_variables.nano | unclassified | unspecified | Demonstrates storing functions in variables, calling them, and passing them around |
| Functions (Basic) | examples/language/nl_functions_basic.nano | unclassified | unspecified | Demonstrate function definition, parameters, return values, recursion, and function composition |
| Conway's Game of Life | examples/language/nl_game_of_life.nano | unclassified | unspecified | Simulates cellular automata with birth, death, and survival rules on a 2D grid |
| Generics Demo | examples/language/nl_generics_demo.nano | unclassified | unspecified | Comprehensive demonstration of NanoLang's generic type system using List<T> with monomorphization |
| Global Counter | examples/language/nl_global_counter.nano | modules | external-deps | Demonstrate module-scope mutable state guarded by dispatch support |
| HashMap | examples/language/nl_hashmap.nano | unclassified | unspecified | Demonstrates basic HashMap creation, insertion, lookup, and size operations |
| HashMap Word Count | examples/language/nl_hashmap_word_count.nano | unclassified | unspecified | Demonstrates using HashMap to count word occurrences in an array of strings |
| Hello World | examples/language/nl_hello.nano | unclassified | unspecified | The traditional first program - verify your NanoLang installation works |
| Logical Operators | examples/language/nl_logical.nano | unclassified | unspecified | Demonstrate boolean logic operators (and, or, not) in prefix notation |
| Integer Match | examples/language/nl_match_int.nano | learn | local | Demonstrate integer literal pattern matching |
| Matrix Operations | examples/language/nl_matrix_operations.nano | unclassified | unspecified | Demonstrates 2D matrix operations using nested arrays with creation, access, sum, and scaling |
| Maze Generator and Solver | examples/language/nl_maze.nano | unclassified | unspecified | Generates a procedural maze and solves it with greedy pathfinding using grid-based data structures |
| Mutable Variables | examples/language/nl_mutable.nano | unclassified | unspecified | Demonstrate the difference between immutable (let) and mutable (let mut) variables |
| Arithmetic Operators | examples/language/nl_operators.nano | unclassified | unspecified | Demonstrate all arithmetic operations in prefix notation |
| PEG2 CSV | examples/language/nl_peg2_csv.nano | modules | local | Demonstrate parsing CSV with the PEG2 grammar module |
| PEG2 Expressions | examples/language/nl_peg2_expr.nano | modules | local | Demonstrate arithmetic expression parsing with PEG2 |
| PEG2 JSON | examples/language/nl_peg2_json.nano | modules | local | Demonstrate JSON structural validation with PEG2 |
| Pi Calculator | examples/language/nl_pi_calculator.nano | unclassified | unspecified | Computes pi using multiple methods (Leibniz, Machin's formula, C math library) with configurable precision |
| High-Precision Pi (Machin's Formula) | examples/language/nl_pi_chudnovsky.nano | unclassified | unspecified | Calculates pi to up to 1000 decimal places using Machin's formula with timing and verification |
| Prime Numbers | examples/language/nl_primes.nano | unclassified | unspecified | Checks primality and lists prime numbers using trial division with shadow tests |
| Prime Sieve (Eratosthenes) | examples/language/nl_primes_sieve.nano | unclassified | unspecified | I replace the trial division from nl_primes with a sieve for the million-number benchmark |
| Random Sentence Generator | examples/language/nl_random_sentence.nano | unclassified | unspecified | Generates random nonsense sentences by reading words from the system dictionary |
| Result Propagation | examples/language/nl_result_propagation.nano | learn | local | Demonstrate Result values and explicit short-circuit error propagation |
| Snake Game | examples/language/nl_snake.nano | unclassified | unspecified | Implements a text-based snake game with AI-controlled movement, collision detection, and scoring |
| String Interpolation | examples/language/nl_string_interp.nano | learn | local | Demonstrate f-string interpolation and automatic value conversion |
| String Operations | examples/language/nl_string_operations.nano | unclassified | unspecified | Demonstrates character access, classification, and conversion functions on strings |
| Structs | examples/language/nl_struct.nano | unclassified | unspecified | Demonstrate struct definition, instantiation, field access, and passing structs to functions |
| Tic-Tac-Toe | examples/language/nl_tictactoe.nano | unclassified | unspecified | Implements a text-based tic-tac-toe game with win detection, board display, and automated demo play |
| Runtime Tracing | examples/language/nl_tracing.nano | modules | local | Record function spans and named events with my tracing API |
| Type System | examples/language/nl_types.nano | unclassified | unspecified | Demonstrate all data types in nanolang (int, float, bool, string, void) |
| Tuple Types | examples/language/nl_types_tuple.nano | unclassified | unspecified | Comprehensive demonstration of tuple literals, field access, return values, and disambiguation |
| Union Type Construction | examples/language/nl_types_union_construct.nano | unclassified | unspecified | Comprehensive tests for constructing union variants with fields, computed values, and pattern matching |
| Union Types | examples/language/nl_union_types.nano | unclassified | unspecified | Demonstrates tagged union (sum type) definitions with generic and non-generic variants |
| Unsafe Blocks Demo | examples/language/nl_unsafe_demo.nano | unclassified | unspecified | Demonstrates unsafe blocks for marking explicit trust boundaries around FFI and unchecked operations |
| Word Frequency Counter | examples/language/nl_word_frequency.nano | unclassified | unspecified | Counts word frequencies in text using a data transformation pipeline with normalization and stopword filtering |
| Large Project Package | examples/large_project/main.nano | modules | local | Show a real package entry point that imports multiple local modules |
| Large Project Models | examples/large_project/src/models.nano | modules | local | Provide shared records for the large project package |
| Large Project Pricing | examples/large_project/src/pricing.nano | modules | local | Keep price arithmetic in a package module |
| Example Discovery Library | examples/lib/example_discovery.nano | internal | local | Discover example files and parse structured metadata headers |
| Launcher UI Library | examples/lib/launcher_ui.nano | internal | graphical, external-deps | Render the examples launcher UI |
| Process Manager Library | examples/lib/process_manager.nano | internal | local | Manage child processes for the examples launcher |
| Resource Monitor Library | examples/lib/resource_monitor.nano | internal | local | Read process resource stats for launcher children |
| Source Editor Library | examples/lib/source_editor.nano | internal | local | Maintain text buffers and file edits for the examples launcher |
| MuJoCo Cartpole Feedback | examples/mujoco/mujoco_cartpole_balance.nano | modules | external-deps | I read simulated state, compute a feedback control value, and apply it through MuJoCo. |
| MuJoCo OpenGL Cartpole | examples/mujoco/mujoco_opengl_cartpole.nano | modules | graphical, external-deps | I load an MJCF cartpole, step it with MuJoCo, and draw body and site state with OpenGL. |
| MuJoCo OpenGL Drop Lab | examples/mujoco/mujoco_opengl_drop_lab.nano | modules | graphical, external-deps | I step a small MuJoCo contact scene and draw the moving bodies through OpenGL. |
| MuJoCo OpenGL Geom Browser | examples/mujoco/mujoco_opengl_geom_browser.nano | modules | external-deps | I draw a MuJoCo model from geom metadata instead of hard-coded body names. |
| MuJoCo OpenGL Robot Sorter | examples/mujoco/mujoco_opengl_robot_sorter.nano | modules | graphical, external-deps | I move balls from a source bin to a target bin while a simple MuJoCo arm performs the cycle. |
| MuJoCo State Audit | examples/mujoco/mujoco_state_audit.nano | modules | external-deps | I load a model without graphics, set state and control values, and print the state I actually advanced. |
| Nano Tools Lint | examples/nano_tools_lint.nano | tools | local | Demonstrate source code linting and diagnostics using the nano_tools module |
| HTTP Hello World Server | examples/network/http_hello_world.nano | modules | external-deps, interactive | Demonstrate the simplest possible HTTP server in NanoLang |
| Static File Server | examples/network/http_static_server.nano | modules | external-deps, interactive | Serve static files from a directory using the NanoLang HTTP server |
| OpenGL Rotating Cube | examples/opengl/opengl_cube.nano | unclassified | unspecified | Renders a colored rotating 3D cube using legacy OpenGL immediate mode with GLFW and GLEW |
| OpenGL Lit Atelier | examples/opengl/opengl_lit_atelier.nano | unclassified | unspecified | High-polygon GLUT solids under four moving coloured lights |
| Modern OpenGL Hello Triangle | examples/opengl/opengl_modern_hello_triangle.nano | unclassified | unspecified | Renders a colored triangle using modern OpenGL with GLSL shaders, VAO, and VBO |
| Modern OpenGL Postprocess | examples/opengl/opengl_modern_postprocess.nano | unclassified | unspecified | I apply an animated screen-space wave shader to a checker texture. |
| OpenGL Particle Fountain | examples/opengl/opengl_particle_fountain.nano | unclassified | unspecified | Simulates a particle fountain with gravity using GL_POINTS and alpha blending |
| OpenGL Solar System | examples/opengl/opengl_solar_system.nano | unclassified | unspecified | Renders an animated solar system with hierarchical transforms, lighting, and materials using GLUT primitives |
| Utah Teapot | examples/opengl/opengl_teapot.nano | unclassified | unspecified | Renders the iconic Utah teapot with six shader modes, interactive rotation, zoom, and on-screen HUD overlays |
| OPL Hello World Output | examples/opl/examples/output/hello.nano | unclassified | unspecified | Generated OPL runtime skeleton that executes plan-based workflows |
| OPL AST Definitions | examples/opl/opl_ast.nano | unclassified | unspecified | Define AST node types and shared data structures for the OPL compiler toolchain |
| OPL AST Builders | examples/opl/opl_ast_builders.nano | unclassified | unspecified | Provide builder functions for constructing OPL AST nodes as JSON objects |
| OPL CLI | examples/opl/opl_cli.nano | compiler | local | Command-line interface for parsing, validating, and compiling OPL programs |
| OPL Code Generator | examples/opl/opl_codegen.nano | unclassified | unspecified | Generate NanoLang source code from OPL AST intermediate representation |
| OPL Compiler | examples/opl/opl_compile.nano | unclassified | unspecified | Compile OPL parsed AST into intermediate representation for code generation |
| OPL JSON Helpers | examples/opl/opl_json.nano | unclassified | unspecified | Provide JSON utility functions for the OPL compiler toolchain |
| OPL Lexer | examples/opl/opl_lexer.nano | unclassified | unspecified | Tokenize OPL source code into a stream of tokens for parsing |
| OPL Lexer Driver | examples/opl/opl_lexer_driver.nano | unclassified | unspecified | Test driver that exercises the OPL lexer with sample input |
| OPL Parser | examples/opl/opl_parser.nano | unclassified | unspecified | Parse OPL token streams into abstract syntax trees |
| OPL Parser Driver | examples/opl/opl_parser_driver.nano | unclassified | unspecified | Test driver that parses an OPL file and compares AST to expected output |
| OPL Validator | examples/opl/opl_validate.nano | unclassified | unspecified | Validate OPL AST for semantic correctness and constraint checking |
| OPL Validate Driver | examples/opl/opl_validate_driver.nano | unclassified | unspecified | Test driver that exercises OPL validation on sample input |
| Bullet Soft Body Beads (Console) | examples/physics/bullet_beads_simple.nano | unclassified | unspecified | Console-only soft body physics test showing a deformable bead falling through an obstacle |
| Bullet Soft Body Beads (Visual) | examples/physics/bullet_beads_visual.nano | unclassified | unspecified | Visualizes continuous soft body beads falling through a plinko-style obstacle course using SDL |
| Bullet Bouncy Balls | examples/physics/bullet_bouncy_balls.nano | unclassified | unspecified | Interactive mouse-driven bouncy ball spawner with adjustable gravity, randomized obstacles, and a ball pit |
| Bullet Mega Stack Collapse | examples/physics/bullet_rigid_megastacks.nano | unclassified | unspecified | Simulates a field of leaning block towers collapsing under gravity with real-time collapse tracking |
| Bullet Soft Body Beads (Modern) | examples/physics/bullet_soft_body_modern.nano | unclassified | unspecified | Modernized soft body plinko simulation with continuous bead spawning through rotating obstacles |
| Bullet Soft Body Hourglass | examples/physics/bullet_softbody_hourglass.nano | unclassified | unspecified | Streams of deformable soft body spheres squeeze through an hourglass funnel with particle lifecycle management |
| NanoLang Playground Server | examples/playground/playground_server.nano | tools | external-deps, interactive | Web-based interactive playground for writing, running, and exploring NanoLang code |
| Property Test Laws | examples/properties/sort_idempotent.nano | learn | local | Demonstrate passing property tests for integer and boolean laws |
| Explicit Record Projection | examples/row_poly_records.nano | language | local | I show the concrete record conversion used while open row types remain unsupported |
| Example Test Runner | examples/run_examples.nano | tools | local | Compile and verify nanolang examples using the shared examples library |
| SDL Example Launcher | examples/sdl_example_launcher.nano | tools | external-deps, graphical | App-store-style browser for NanoLang examples with auto-discovery, process management, and source editing |
| Game of Life (NCurses) | examples/terminal/ncurses_game_of_life.nano | unclassified | unspecified | Conway's Game of Life cellular automaton rendered in the terminal with ncurses |
| Matrix Digital Rain | examples/terminal/ncurses_matrix_rain.nano | unclassified | unspecified | Iconic falling green characters effect from The Matrix rendered with ncurses |
| Snake Game | examples/terminal/ncurses_snake.nano | unclassified | unspecified | Interactive terminal snake game with scoring, food spawning, and collision detection |
| Test the Proof Boundary | examples/verified/break_the_proof.nano | modules | local | Separate NanoCore semantic guarantees from executable function tests |
| Checksum Validator | examples/verified/checksum_validator.nano | unclassified | unspecified | Test pedagogical checksums and state their trust and integrity limits |
| Financial Order Validator | examples/verified/financial_order_validator.nano | unclassified | unspecified | Test a pedagogical pre-trade policy and state its trust boundary |
| Medical Dosage Calculator | examples/verified/medical_dosage.nano | unclassified | unspecified | Test a pedagogical dosage policy and state its trust boundary |
| PID Controller | examples/verified/pid_controller.nano | unclassified | unspecified | Test a bounded integer PID model inside the NanoCore trust boundary |
| Semantics Walkthrough | examples/verified/proof_trace.nano | unclassified | unspecified | Illustrate selected formal rules without claiming to extract a Coq proof trace |
| Sensor Voting System | examples/verified/sensor_voting.nano | unclassified | unspecified | Test a pedagogical sensor voter and state its trust boundary |
| Safety-Critical State Machine | examples/verified/state_machine.nano | unclassified | unspecified | Test a pedagogical transition table inside the NanoCore trust boundary |
| Verified and Typechecked | examples/verified/verified_vs_unverified.nano | modules | local | Show what the trust report classifies without equating verification with correctness |
| NanoVM Example Launcher | examples/vm_example_launcher.nano | tools | nanoisa | Browse and run the sandboxed vm_*.nvm example bytecode from inside NanoVM |