Pocketlang is a small, fast and friendly language

A dynamic typed, highlevel language language designed for scripting and embedding easily. Supports object oriented programming, higher order functions, closures(wip), fibers, garbage collection and more.

Get Started

What pocketlang looks like?

With mixed syntax of ruby and python, that can be learned in less than an hour, and it's easy to embed into another application for scripting. Here is a smaple pocketlang code.


# Python like import statement.
from lang 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

Concurrent

Pocketlang's fibers (lightweight threads) allows you to write parallel tasks easily, without worrying about thread safety.

Learn more

Embeddible

You can use PKVM as any other libraries in your application. It's specifically designed to be embedded in other programs.

Learn more

Garbage Collected

With the pocketlan's garbage collector you can write code without worrying about memory management.

Learn more

REPL

The interactive prompt of pocketlang will makes it easier to test and play with it on the command line.

Learn more

Try it now #

code editor

Run

output

...