A collection of example programs demonstrating the Oxide programming language.
| Example | Description | Difficulty |
|---|---|---|
| hello-world | The classic first program | Beginner |
| variables-types | Variable declaration and types | Beginner |
| functions | Function definitions and calls | Beginner |
| control-flow | Conditionals and loops | Beginner |
| classes | Object-oriented programming | Intermediate |
| Example | Description | Difficulty |
|---|---|---|
| pipe-operator | Function chaining with pipe operator | Beginner |
| null-coalescing | Default values with ?? operator |
Beginner |
| string-methods | String manipulation functions | Beginner |
| ranges-comprehensions | Range generation and list comprehensions | Intermediate |
| functional-programming | Map, filter, reduce, and more | Intermediate |
| resource-management | Defer, with statements, type checking | Intermediate |
| Example | Description | Difficulty |
|---|---|---|
| ogre-hello-world | Your first cross-platform GUI app | Beginner |
| ogre-counter-app | Flutter-style counter with state | Intermediate |
| ogre-material-form | Material Design login form | Intermediate |
| ogre-todo-app | Complete todo list with filtering | Advanced |
Run OGRE apps on any platform:
ogre run # Desktop
ogre run ios # iOS Simulator
ogre run android # Android Emulator
ogre run web # Web browser| Example | Description | Difficulty |
|---|---|---|
| http-server | Basic HTTP server | Intermediate |
| rest-api | RESTful API with CRUD | Advanced |
| Example | Description | Difficulty |
|---|---|---|
| cli-tool | Command-line utility | Intermediate |
| file-watcher | File system monitoring | Intermediate |
| Example | Description | Difficulty |
|---|---|---|
| concurrent-downloads | Async/await concurrency | Advanced |
| memory-pool | Custom memory allocator | Advanced |
| Example | Description | Difficulty |
|---|---|---|
| csv-processor | CSV parsing and analysis | Intermediate |
| json-transformer | JSON transformation | Intermediate |
Each example contains:
main.ox- The Oxide source codeREADME.md- Documentation and expected output- Sample data files (where applicable)
To run an example:
cd <example-folder>
oxide run main.ox