Wyrd

Build Statusarrow-up-right Coverage Statusarrow-up-right

Wyrd is a strongly-typed toy programming language whose syntax is partially inspired by Ruby langarrow-up-right.

Although it may be a personal project, it is evolving in high speed. 🔥

Check out new released Wryd documentation here!arrow-up-right 🚧Under Construction 🚧

Wyrd programming language compiles its code into JavaScript. The primary goal would be to write Front-End code and Back-End code (NodeJS) using Wyrd programming language. I may want to try writing React (or Vue) component code using Wyrd lang if possible.

Why the "Wyrd" Name?

Wyrd although officially pronounced as "weird", but sometimes I accidentally pronounce it as "w-ei-rid". However, personally I think both of them are okay.

Wyrdarrow-up-right is a concept in Anglo-Saxon culture roughly corresponding to fate or personal destiny. The word is ancestral to Modern English weird, which retains its original meaning only dialectically.

The cognate term in Old Norse is urðr, with a similar meaning, but also personalized as one of the Norns, Urðr and appearing in the name of the holy well Urðarbrunnr in Norse mythologyarrow-up-right.

Install CLI

Install the CLI globally:

npm install -g @wyrd/cli

Check if the CLI is installed successfully:

which wyrd

Create a simple "Hello world!" program and the file name will be hello.wyrd:

# hello.wyrd

def greet(msg: Str): Str => msg
def greet(prefix: Str, msg: Str): Str do
  prefix.concat("! ").concat(msg)
end

greet("Hello", "Wyrd is awesome!")
greet("Wyrd is created by Alexius!")

Run the program:

It should compile into hello.js file with the following content:

Congratulations! You've just compiled your first Wyrd program!

You can also view the wyrd-cli repositoryarrow-up-right for more information about the usage of CLI.

@wyrd/cli is in early development, there will be more features released such as more compilation options. (e.g. the minify option which compiles the minified version of the program)

Table of Content [WIP]

Supported Syntax Rules

Method Invocation

Wyrd Code

Compiled Result

Function Invocation

Wyrd Code

Compiled Result

Comment

Wyrd Code

Compiled Result

Maintainers

Last updated