Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zeroplayerrodent/ocanada
Canada themed programming language, eh?
https://github.com/zeroplayerrodent/ocanada
canada esolang esolangs lisp programming-language
Last synced: 17 days ago
JSON representation
Canada themed programming language, eh?
- Host: GitHub
- URL: https://github.com/zeroplayerrodent/ocanada
- Owner: ZeroPlayerRodent
- Created: 2024-06-03T18:01:44.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-06-10T15:14:12.000Z (8 months ago)
- Last Synced: 2024-11-25T04:07:34.016Z (3 months ago)
- Topics: canada, esolang, esolangs, lisp, programming-language
- Language: Common Lisp
- Homepage:
- Size: 79.1 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# OCanada
![OCanada Logo](https://github.com/ZeroPlayerRodent/OCanada/blob/main/OCanada_Logo.png)OCanada is a general-purpose programming language with syntax inspired by Canadian slang, eh?
With functions and keywords named after `hosers`, `canucks` and `mounties`, OCanada provides the most authentic Canadian programming experience, eh?
It functions similarly to [Lisp](https://lisp-lang.org/) or [Ruby](https://www.ruby-lang.org/en/), so if you know those languages you should be able to learn OCanada pretty easily, eh?
## Examples
Here's some examples of OCanada code, eh?
Hello, World:
```
o_canada main []
apologize "Hello, World!"
eh?please main []
```Recursive Factorial:
```
o_canada factorial [value]
oot mountie[value 1]
1
aboot canuck
(value * please factorial [(value - 1)])
eh?
eh?o_canada main []
apologize please factorial [10]
eh?please main []
```Fibonacci Sequence:
```
o_canada fibonacci [times]
syrup {numbers} [0 1]
syrup {temp} 0
syrup {i} 0
play_hockey not mountie[{i} times]
apologize loonie 0 {numbers}
apologize puck 10
syrup {temp} loonie 0 {numbers}
syrup {numbers} tuque {numbers} loonie 0 {numbers}
poutine {numbers}
syrup loonie 0 {numbers} (loonie 0 {numbers} + {temp})
syrup {i} ({i}+1)
eh?
eh?o_canada main []
please fibonacci [99]
eh?please main []
```
## Features- Arbitrary precision integers and floats
- A built-in function for saving your programs as executables
- A standard library filled with useful utility functions
- Dynamic typing
- Eval function for metaprogramming shenanigans
- Local and global variables
- The ability to define custom structures## Get Started!
How to set up OCanada:
1. Clone the OCanada repo to your local machine.
2. Compile OCanada by running `build.lisp` in [SBCL](https://www.sbcl.org/).
3. Keep the executable in the same directory as the `lib` and `programs` directories.
6. Type `./ocanada.exe programs/filename.canada` in your terminal to run a program.Now that you have OCanada set up, refer to the [Language Specification](https://github.com/ZeroPlayerRodent/OCanada/blob/main/specification.txt) to learn how to write programs!