This guide explains how to run, understand, and inspect the code examples under the examples/ directory.
Every example is in its own folder and contains:
- Source Script: The
.txssource code. README.md: Explanation of how the code works.expected.txt: The exact output printed by the program when executed.
Run an example using the tech compiler:
# Navigate to the example folder
cd examples/hello_world
tech run hello.txsYou can verify that output matches expectations:
tech test| Folder | Focus | Key Concept covered |
|---|---|---|
| hello_world | Core | Simplest output prints |
| calculator | Math | Functions and math operators |
| todo_cli | State | Lists and maps manipulation |
| guess_number | Logic | Ranges, loops, conditionals |
| http_server | Network | Web routing and mock testing |
| json_parser | Data | Encoding/decoding maps |
| file_reader | File System | IO file writes and reads |
| oop | Models | Classes, inheritance, overriding |
| modules | Imports | Multi-file namespaces |
| collections | Types | Loops over list and maps |
| generics | Polymorph | Parameterized types |
| error_handling | Errors | try/catch boundaries |
| async | Concurrency | Event loops and futures |
| threads | Parallel | Thread spawns & mutexes |
| web_api | Fetch | External GET API calls |