Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alexander-koch/golem
Compiler / Interpreter for the Golem programming language
https://github.com/alexander-koch/golem
compiler programming-language
Last synced: about 2 months ago
JSON representation
Compiler / Interpreter for the Golem programming language
- Host: GitHub
- URL: https://github.com/alexander-koch/golem
- Owner: alexander-koch
- License: gpl-3.0
- Created: 2018-12-21T09:49:22.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-21T10:01:26.000Z (about 6 years ago)
- Last Synced: 2024-04-24T16:14:55.936Z (9 months ago)
- Topics: compiler, programming-language
- Language: C
- Size: 554 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- AwesomeInterpreter - golem
README
# Golem
Golem is a statically typed, object-oriented programming language.
# Example
```rust
using corefunc fib(n: int) -> int {
if n < 2 {
return n
}
return fib(n-2) + fib(n-1)
}let t0 = clock()
let mut i = 0
while i < 5 {
println(fib(28))
i := i + 1
}
let elapsed = clock() - t0
println("Elapsed: $elapsed")```
# Features
- Easily readable and learnable
- **Normal** object-oriented features (classes, method calls, etc.)
- Immutablitiy of everything by default
- Explicit mutable declaration
- Statically, strong-typed
- Automatic type inference
- **NULL** is not possible to create or use
- Option types
- Fast, garbage collected bytecode VM# Installing
Golem is written in C99, and has been tested to run on Linux and Windows.
A Makefile is used to build the compiler.```sh
$ make
$ golem your/file/here.gs
```Use `make DEBUG=1` to generate the debugger.
To generate the immediate representation tool, run `make ir`.
More features can be enabled/disabled in the Makefile.# Info
For more information about the syntax see [Syntax](Syntax.md).
This project was used in the german science competition "Jugend forscht" 2016.# Licence
Licensed under GNU GPLv3.
Copyright (c) Alexander Koch 2017