Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/novaandrom3da/germanium

A dynamically typed language
https://github.com/novaandrom3da/germanium

programming-language

Last synced: 21 days ago
JSON representation

A dynamically typed language

Awesome Lists containing this project

README

        

# This software is DISCONTINUED!
There is a project rewrite under a new name, sol, available
[here](https://codeberg.org/rehuman/sol).

# โš— Germanium
Germanium is an open source, dynamically typed language written
in python. It focuses on runtime speed, user readability, and
cross-compatibility. It offers both a compiled and Just-In-Time
system.

## ๐Ÿคจ Why Germanium?
Germanium is written in a way to be easily minified and quickly
processed. It is also written to improve program developers'
experiences with programming by providing an easy-to-write but
feature-filled language.

## ๐Ÿ”ฌ Getting Started
```bash
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Froggo8311/Germanium/main/tools/web-install.sh)"
```
Using either the prebuilt or the source versions will be different
for each setup. The compiled interpereter will be more efficient
in terms of speed, but the source build is useful for Germanium
development, allowing the develeoper to quickly change and run the
program without having to wait for a build to finish. If you choose to
use the compiled version, you can download a prebuilt version for
your operating system and architecture if available, or build from
source.

### ๐Ÿ”ญ Build from Source (Compiled)
You can build from source using the tools provided in the
`install_src.py` file.

#### Prebuilt
Prebuilt packages coming soon. At the moment, only the source version
is available.

### ๐Ÿงช Run from Source (Just-In-Time)
For source builds, we reccommend using the
[latest version of PyPy](https://www.pypy.org/download.html)
for the best results and speed, but CPython will also work.
Make sure you are using the correct one when running the
install script, unless you are building from source.

## โŒจ Examples
### ๐ŸŒŽ Hello, World!
```ge
~ This is a comment
print("Hello, World!");
```

### โžฐ Functions & Return Statements
```ge
func myFunc(a as Bool = true) {
if (a) {
return "Yes";
} else {
return "No";
}
}

print(myFunc(true)); ~ "Yes"
print(myFunc(false)); ~ "No"
```

### โžฟ Loops
```ge
func loop() {
while (true) {
print("This only runs once.");
break;
}

myList = ["a", "b", "c", 1, 2, 3];
for (i in myList) {
print(i); ~ Prints: 0 1 2 3 4 5
print(myList[i]); ~ Prints: a b c 1 2 3
}
}
```