Examples
Walkthroughs, generated projects, source, tests, and runnable repositories.
Examples are a primary way to understand Foundation Base. Each entry keeps the authored Clojure source, build definition, generated repository, and relevant walkthrough close together.
1 Language walkthroughs
Basic authoring
Install language contexts, emit forms, and work with generated pointers.
Multiple languages
Use the shared authoring model across more than one target grammar.
Live evaluation
Connect emitted code to runtime adapters for interactive execution.
2 Generated project examples
Open the generated repository to see the target project, or open the source and build links to see how Foundation Base produces it.
Hello from native threads
A small generated C project using pthreads.
NGX hello
A generated OpenResty project demonstrating Lua emission and server integration.
NGX live evaluation
A generated server for evaluating Lua through the runtime workflow.
Counter
A generated Blessed-style terminal counter application.
Fetch
A generated terminal application demonstrating data fetching.
Game of Life
A generated terminal Game of Life project.
2.1 Source and build links
Generated repositories are outputs. The authored source and project-generation definitions live in src-build/play.
Source
The Hara-authored program.
Build
The std.make project definition.
Source
The authored Lua/OpenResty program.
Build
The generated project definition.
Source
The authored live-evaluation server.
Build
The generated project definition.
3 Run from this repository
The project aliases and Make targets generate or push several examples. Review prerequisites before running runtime-dependent examples.
lein push-c-000-pthreads\nlein push-ngx-000-hello\nlein push-ngx-001-eval\nlein push-tui-000-counter\nlein push-tui-001-fetch\nlein push-tui-002-game-of-life