Sietch Hatz
Welcome to LAIN picture
00I04 — Welcome to LAIN

LAIN is a small C like programming language.

LAIN is a bytecode compiler with a VM written in golang.

The original version of LAIN used a tree walking interpreter. In order to speed up LAIN, this was swapped out to a VM with a bytecode compiler. This change caused LAIN to run about 5x faster than its original tree-walking implementation.

Fibonacci in LAIN:

let fib = fn(x) {
  if (x == 0) {
    return 0
  }
  if (x == 1) {
    return 1
  }
  return fib(x-1) + fib(x-2)
}

puts(fib(34))
— Submit an edit to fibonacci.lain.txt(10 lines)

incoming(1): golang

Last update on 00I08, edited 2 times. +2/4fh ---|||