Kiwi programming language
Go
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
ast
doc Let's not worry about newlines Aug 27, 2015
examples Pass stack so built-in funcs can return values Jun 29, 2015
parser Let's not worry about newlines Aug 27, 2015
runtime
scanner Let's not worry about newlines Aug 27, 2015
scope
token Let's not worry about newlines Aug 27, 2015
types Better scope handling Aug 21, 2015
util Add doc comments and minor renames Jun 23, 2015
LICENSE Add LICENSE and README file Jun 22, 2015
README.md
kiwi.go Better scope handling Aug 21, 2015

README.md

Kiwi Programming Langauge

© 2012, 2015 Timothy Boronczyk

This is the README file for the Kiwi Programming Language distribution.

Kiwi is my on-going “forever project” to implement a programming language. Not only is it a learning opportunity, it’s also a playground for me to explore issues in language design.

Kiwi probably won’t be useful to anyone other than me, especially at the rate I get to work on it, but my code is available as free software. You can do whatever you want with it under the terms of the license provided in the LICENSE file. Just don’t come after me if it melts down your computer.

Code Examples

Generate the Fibonacci Series

func fibonacci n
{ 
    if n < 2 { 
        return n
    } 
    m := fibonacci(n - 1)
    p := fibonacci(n - 2)
    return m + p
}

i := 0
while i < 10 { 
    i := i + 1
    fib := fibonacci(i)
    write(fib, "\n")
}

Fizz Buzz

i := 0
while i < 100 {
    i := i + 1

    if i % 15 = 0 {
        write("Fizz Buzz\n")
    }
    else i % 3 = 0 {
        write("Fizz\n")
    }
    else i % 5 = 0 {
        write("Buzz\n")
    }
    else {
        write(i, "\n")
    }
}