NovaAndrom3da / Germanium

A dynamically typed language

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

This software is DISCONTINUED!

There is a project rewrite under a new name, sol, available here.

βš— 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

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 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!

~ This is a comment
print("Hello, World!");

➰ Functions & Return Statements

func myFunc(a as Bool = true) {
  if (a) {
    return "Yes";
  } else {
    return "No";
  }
}

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

➿ Loops

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
  }
}

About

A dynamically typed language

License:MIT License


Languages

Language:Python 98.7%Language:Shell 1.3%