WalkthroughsGenerated projectsSource linksRunnable output

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

00

Basic authoring

Install language contexts, emit forms, and work with generated pointers.

Learn more
01

Multiple languages

Use the shared authoring model across more than one target grammar.

Learn more
02

Live evaluation

Connect emitted code to runtime adapters for interactive execution.

Learn more

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.

C / pthreads

Hello from native threads

A small generated C project using pthreads.

Learn more
OpenResty / Lua

NGX hello

A generated OpenResty project demonstrating Lua emission and server integration.

Learn more
OpenResty / runtime

NGX live evaluation

A generated server for evaluating Lua through the runtime workflow.

Learn more
Terminal UI

Counter

A generated Blessed-style terminal counter application.

Learn more
Terminal UI

Fetch

A generated terminal application demonstrating data fetching.

Learn more
Terminal UI

Game of Life

A generated terminal Game of Life project.

Learn more

2.1    Source and build links

Generated repositories are outputs. The authored source and project-generation definitions live in src-build/play.

C pthreads

Source

The Hara-authored program.

Learn more
C pthreads

Build

The std.make project definition.

Learn more
NGX hello

Source

The authored Lua/OpenResty program.

Learn more
NGX hello

Build

The generated project definition.

Learn more
NGX eval

Source

The authored live-evaluation server.

Learn more
NGX eval

Build

The generated project definition.

Learn more

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