A lightweight, fast embeddable scripting language.
Go to file
Thakee Nathees 148cd97b8b
Merge pull request #19 from ThakeeNathees/builtin-fn-refactor
builtin function refactored.
2021-05-15 15:09:57 +05:30
cli builtin function refactored. 2021-05-15 14:59:44 +05:30
docs builtin function refactored. 2021-05-15 14:59:44 +05:30
src builtin function refactored. 2021-05-15 14:59:44 +05:30
test fixed: iterator (internal) variables popped twise. 2021-05-15 00:31:31 +05:30
.gitignore docs buildscript updated 2021-05-14 15:14:39 +05:30
LICENSE initial commit 2021-02-07 13:17:58 +05:30
README.md docs buildscript updated 2021-05-14 15:14:39 +05:30
SConstruct builtin function refactored. 2021-05-15 14:59:44 +05:30

PocketLang

PocketLang is a simple and fast programming language written in C. It's syntactically similar to Ruby and it can be learned in less than an hour. Including the compiler, bytecode VM and runtime, it's a standalone executable with zero external dependecies just as it's self descriptive name. The pocketlang VM can be embedded in another hosting program very easily, as static/shared library or a generated single header version of the source, which makes it even effortless.

The language is written using Wren Language and their wonderful book craftinginterpreters as a reference.

What PocketLang looks like

# Python like import statement.
from os import clock as now

# A recursive fibonacci function.
def fib(n)
  if n < 2 then return n end
  return fib(n-1) + fib(n-2)
end

# Prints all fibonacci from 0 to 10 exclusive.
for i in 0..10
  print(fib(i))
end