Home

Awesome

Language guide | Try now in browser | Install | Changelog

ShnooTalk

ShnooTalk is a programming language implemented in C++ using the LLVM compiler framework. ShnooTalk works by being compiled to a custom IR format and then translating that to LLVM IR. It is possible to run ShnooTalk on any runtime that supports the clang compiler. ShnooTalk links against standard C libraries/runtime.

See the tests directory for examples, try out the language in your browser on ShnooTalk Playground.

🛠️ Project under construction, some things may not be fully polished yet 🛠️

Install

Linux (Ubuntu / Arch / Debian / Fedora / RaspberryPi)

curl -sf -L https://raw.githubusercontent.com/RainingComputers/ShnooTalk/main/install.sh | sudo sh

MacOS

curl -sf -L https://raw.githubusercontent.com/RainingComputers/ShnooTalk/main/install.sh | sh

Linux x86_64 AppImage

Download app image from releases page

Installing from source (Ubuntu)

Download the source from latest release

sudo apt install llvm-12 llvm-12-dev
make build
sudo make install

Installing from source (MacOS)

Download the source from latest release

brew install llvm@12
make build
sudo make install

VS Code syntax highlight extension

Install the extension from here

Uninstall

Uninstallation is straightforward and easy

rm -f /usr/local/bin/shtkc
rm -f /usr/local/bin/shtkc-<version>
rm -rf /usr/local/lib/shnootalk-<version>

Getting started

app.shtk

fn main() -> int
{
    println("Hello world")
    return 0
}

Compile and run

shtkc app.shtk -c
clang app.o -o app
./app

(You can also use gcc instead of clang)

Running compiler tests

These are end to end tests which can be used to test an implementation of ShnooTalk. The tests_runner python application is used to run the tests.

Directories

compiler/tests/parser/

This is meant to test the AST generated from the parser.

compiler/tests/compiler/

Test the output executable produced by the compiler and the generated ShnooTalk icode (not the entire IR just the generated function IR instructions only, see -icode-all option).

compiler/tests/ir/

This is meant to test the overall structure of the generated IR (i.e the parts that were not tested in compiler/tests/compiler/ tests).

stdlib/stdlib/tests/

Tests for the standard library

When to add a test?

Where to add the test?

How to add a test?

How to run the tests?

How to generate the test cases?

Project status

For more detailed status see github project or github issues