Pluvial 1.0 — now stable

Pluvial

Start simple, go far.

rainfall.pv
# sum the values that clear the thresholdfn total_rain(days, min) {  let sum = 0.0  for mm in days {    if mm >= min { sum += mm }  }  return sum}let week = [4.2, 0.0, 12.6, 3.1]print("rain: " + total_rain(week, 1.0))#=> rain: 19.9

What is Pluvial?

Pluvial is a statically typed, compiled programming language. Source code is compiled to bytecode, which runs on a lightweight virtual machine written in C. It is designed to be simple to learn, easy to read, and fast to run.

Playground

See it in action

hello.plu
# your first Pluvial programprint("Hello, world!")#=> Hello, world!
greet.plu
fn greet(name) {  return "Hi, " + name + "!"}let msg = greet("Ada")print(msg)   #=> Hi, Ada!
numbers.plu
let nums = [1, 2, 3, 4, 5]let evens = nums.filter(fn(n) { n % 2 == 0 })let doubled = evens.map(fn(n) { n * 2 })print(doubled)   #=> [4, 8]