A simple language for simple programming
// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
// how to help
// readme
Pluma
Pluma programs end in .pluma.
# this is a comment
let x = 42
let
let name = value creates a variable.
also let name be value creates a variable.
let age = 21
age = age + 1
print "hello"
print 'how are you?'
print 1 + 2
input
let name = input "Your name? "
print "Hi " + name
Operators
| Operators | Meaning |
|---|---|
+ - * / // % ^ |
add, subtract, multiply, divide, integer division, modulo, power |
> < >= <= == != |
comparisons |
and or not |
logic |
-x |
negative number |
if / else
if age >= 18 then
print "adult"
else
print "minor"
while
let i = 0
while i < 3 then
print i
i = i + 1
foreach
foreach n in numbers then
print n
range
foreach n in range from 0 to 10 then
print n
Break/Continue
continue skips the rest of the loop code and continues to the next iteration
break interrupts a loop entirely
function and return
function add with a, b
return a + b
print add with 2, 3
Lists
list with a, b, c creates a list. list with null creates an empty list.