Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/v420v/ibu
A statically typed compiled language inspired by HolyC
https://github.com/v420v/ibu
assembly compiler holyc ibu language programming-language self-hosting
Last synced: about 2 months ago
JSON representation
A statically typed compiled language inspired by HolyC
- Host: GitHub
- URL: https://github.com/v420v/ibu
- Owner: v420v
- License: mit
- Created: 2023-07-10T14:32:00.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-17T13:41:55.000Z (about 2 months ago)
- Last Synced: 2024-11-17T14:33:19.721Z (about 2 months ago)
- Topics: assembly, compiler, holyc, ibu, language, programming-language, self-hosting
- Language: Assembly
- Homepage:
- Size: 59.6 KB
- Stars: 15
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
The Ibu programming language
[Changelog]() |
[Docs](docs/docs.md) |
[ドキュメント](docs/docs_jp.md)[![CI](https://github.com/v420v/ibu/actions/workflows/ci.yml/badge.svg)](https://github.com/v420v/ibu/actions/workflows/ci.yml)
- No strict type checker
- No C-like pointer arithmetic
- No function-like macros
- No `break`, `continue` stmt. Use `goto`
- Allows `13 <= age < 20` instead of `13 <= age && age < 20`
- Variable length args `func(...)` can be accessed with built-in variables `argc i64` and `argv *i64`
- The compiler is written in itself
- Default args don't have to be on the end (WIP)```go
#include "std/header.ibu"func main() i32 {
let age i32 = 19;if 13 <= age < 20 {
printf("Teen-ager\n");
}return 0;
}
```## Installing the Language
```zsh
$ git clone [email protected]:v420v/ibu.git
$ cd ibu
$ make up
$ make ibulang
$ make init
```## How to Use the Compiler
A simple example compile and run hello world
```zsh
$ ./ibuc main.ibu | as - -o main.o
$ as -o lib/runtime.o lib/runtime.s
$ ./ibuc lib/linux-syscall/linux-syscall.ibu | as - -o lib/linux-syscall.o
$ ./ibuc lib/std/std.ibu | as - -o lib/std.o
$ ld -o main main.o lib/runtime.o lib/linux-syscall.o lib/std.o
$ ./main
```[documentation](docs/docs.md)
[documentation[日本語版]](docs/docs_jp.md)