https://github.com/isaacwoods/roo
Little toy programming language with an x86_64 code generator
https://github.com/isaacwoods/roo
language programming-language roo type-safety type-system
Last synced: 9 months ago
JSON representation
Little toy programming language with an x86_64 code generator
- Host: GitHub
- URL: https://github.com/isaacwoods/roo
- Owner: IsaacWoods
- License: mit
- Created: 2016-07-02T16:50:48.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T14:12:22.000Z (over 8 years ago)
- Last Synced: 2025-03-31T21:20:05.171Z (10 months ago)
- Topics: language, programming-language, roo, type-safety, type-system
- Language: C++
- Homepage:
- Size: 2.42 MB
- Stars: 17
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Roo
[](https://travis-ci.org/IsaacWoods/Roo)
Roo is a imperitive programming language that takes concepts from functional programming. Its central goal
is to avoid the kitchen-sink-esque hodgepodge of languages like C++, instead expressing logic through fewer, more powerful
features.
### Aims
* No separation of definition and implementation (no headers)
* Easier build process - nice source and dependency management
* Safety - strong type-checking and powerful expression of programmer intent
* Terse, expressive syntax - no extranious punctuation
It looks something like this:
``` roo
#[Name(example)]
import Prelude
type color
{
r : float
g : float
b : float
a : float
}
fn PrintColor(color : color&)
{
PrintFmt("Color: ({}, {}, {}, {})\n", color.r, color.g, color.b, color.a)
}
#[Entry]
fn Main() -> int
{
#[Debug]
Print("Hello, World!\n")
// Make and print a color
myColor : color{1.0f, 0.0f, 1.0f, 1.0f}
PrintColor(myColor)
return 0
}
```
### Using the compiler
* At the moment, The compiler can only produce executables usable on x86_64, System-V, ELF-compatible systems
* (Temporary step) Run `make prelude` to build `Prelude` (our standard library)
* Run `./roo` to compile and link all the files in the current directory
* Various DOT files will also be produced, which may be converted to PNG with `dot -Tpng -o {file}.png {file}.dot`
### Contributing
Contributions are welcome. Current tasks and long-term goals can be found on the [Trello](https://trello.com/b/zxHvpzTz/roo). Please keep to the style of the existing code.