Hiss

My WIP hobby programming language implemented in Haskell.

Poorly-drawn Hiss logo

Hiss is my WIP hobby programming language implemented in Haskell and Zig. It is named in honor of a copperhead snake discovered in the basement of my parents’ house, which was then serving as my bedroom.

I’m building Hiss to learn more about compilers, interpreters, and functional programming. (So here’s your disclaimer: it’s neither well-tested nor stable and will almost certainly never be recommended for production use.)

Here’s a sample Hiss program that computes the Collatz stopping time of 27:

// computes k mod n
mod(n, k) = if k < n
            then k
            else mod(n, k-n)

mod2 = mod(2) // partial application of mod

// returns stopping time of n
collatz(n, steps) = if n == 1
                    then steps
                    else if mod2(n) == 0
                         then collatz(n/2, steps + 1)
                         else collatz(3*n + 1, steps + 1)

main() = collatz(27, 0) // should output 111

Try running this program on the playground!

Hiss is:

It supports some cool features from functional programming:

Hiss is open-sourced on GitHub. It has two main components:

hissc and hissvm are still in progress, but they already include:

Planned work includes