https://github.com/silent-brad/epos-lang
The Epos Programming Language
https://github.com/silent-brad/epos-lang
compiler epos go llvm nix
Last synced: 6 months ago
JSON representation
The Epos Programming Language
- Host: GitHub
- URL: https://github.com/silent-brad/epos-lang
- Owner: silent-brad
- License: other
- Created: 2025-10-06T19:05:28.000Z (6 months ago)
- Default Branch: master
- Last Pushed: 2025-10-08T00:11:45.000Z (6 months ago)
- Last Synced: 2025-10-08T02:32:18.312Z (6 months ago)
- Topics: compiler, epos, go, llvm, nix
- Language: Go
- Homepage:
- Size: 40 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Epos
_The programming language of epic poetry_
Epos is a functional statically typed programming language that compiles to LLVM IR.
Epos draws inspiration from [Lua](https://www.lua.org/), [Nim](https://nim-lang.org/), [Elixir](https://elixir-lang.org/), [Gleam](https://gleam.run/), [Go](https://golang.org/), and [Rust](https://www.rust-lang.org/).
> NOTE: The Epos compiler requires Nix to build.
Example code
```epos
# Single line comment
#[
#[
Multi line comment (can be nested)
]#
]#
print("Hello, World!")
# Names can be use "_" and "-"
fn add(a: int, b: int): int
a + b
end
print(add(1, 2))
fn factorial(n: int): int
match n == 0
true -> 1
_ -> n * factorial(n - 1)
end
end
print(factorial(5))
regular_string: string = "Hello, World!"
multi_line_string: string = [[
Hello, World!
]]
boolean: bool = true
num: int = 42
array: list(int) = {1, 2, 3}
record Person
name: string
age: int
favorite_color?: string
end
person: Person = @{
name: "John Doe",
age: 42
}
```
## Setup
- Run `nix build`
## Command to run
- Run `./result/bin/epos ./examples/hello.epos`
- Run `./build/hello`
## Notes:
- This is in active development