a programming language for people who would rather write sentences

Code in plain English.

Plainly programs read like instructions to a friend. It checks your program before it runs, explains problems in words, and grows with you from your first say to real websites and chat bots.

~/plainlydemo

Plainly is created and owned by its community author (christy395 on GitHub), MIT licensed. Enzonic does not own Plainly; we host and run a reviewed copy. Upstream repository.

// 01  what plainly is

A language that reads like you think.

Every line of a Plainly program is one sentence. There are no brackets to balance and no semicolons to forget. Names can be several words long, and blocks close with words like end if.

01 Sentences, not symbols

Math uses plus, times and divided by. Text goes after the words.

let first number be 20
let second number be 22
say first number plus second number

02 Checked before it runs

Plainly checks types before anything runs and tells you what went wrong, on which line, in words.

let score be 7
let label be the words points
say score plus label

line 3: 'plus' needs two numbers but got number and text. To join text, use 'followed by'.

03 No null, no surprises

A value that might be missing is a maybe, and you have to say what happens when it is.

let parsed be parsed number of the words 42 end words
let safe be parsed or else 0
say safe

04 Grows into real things

The same sentences build small websites and Discord or Telegram bots, with permissions you declare up front.

allow running a Discord bot
when a Discord message arrives do
reply with the words Hello followed by the message author
end when
start the Discord bot

// 02  language tour

Learn Plainly in nine sentences.

Each stop shows a small program. Open any of them in the playground to change it and run it. Prefer to learn by doing? The interactive tutorial walks through 18 short steps with checks and hints.

Variables

let gives a name to a value, once. set, add and subtract change it later. Names can be up to six words, and followed by joins values with a space.

let my name be the words Sam
let my age be 12
say my name followed by the words is followed by my age
set my age to 13
add 1 to my age
say the words Next year Sam is followed by my age
Sam is 12
Next year Sam is 14

// 03  playground

Write it. Run it. Share it.

Programs run on our servers in a sealed sandbox with no network, or instantly in your browser. Press Ctrl/⌘ + Enter to run. For bigger programs, open the full-screen IDE: files, suggestions, hover docs, live checks and a command palette.

program input for "what the user types"
console
Press run to see what your program says.
sandbox: sleeping no network · 5 s · 256 MB · 64 KB output
How the playground keeps your code in a box

No network at all. Programs run in a container started with internet access disabled. A program cannot reach any website, API or other server.

Fresh every time. Each run is a new process, under its own unprivileged user, in an empty temporary folder that is deleted afterwards. Nothing carries over between runs or between people.

Hard limits. 5 seconds, 256 MB of memory, 1 MB per file, 64 KB of output and a handful of processes. Anything past a limit is stopped.

Plain programs only. Websites and bots are refused here; they belong on your own server. Your code is never stored: share links carry the code inside the link itself.

// 04  run it on enzonic

From playground to always-on.

When your program is a bot that should answer all day, or a website people can visit, give it its own server.

  1. Open Create

    Sign in at panel.enzonic.com and choose Create.

  2. Pick "Plainly"

    Choose Bots or Websites, then pick the Plainly card. It runs Enzonic's reviewed copy of Plainly in its own container, and the free tier is included.

  3. Upload and start

    Put your program in main.plain, add your bot token as a secret if it is a bot, and press start.

// 05  credits

Made by its author. Hosted by us.

Plainly

Created and owned by christy395. Released under the MIT License. Source, issues and roadmap: github.com/christy395/plainly.

Enzonic's reviewed copy

We run a frozen fork pinned to upstream commit 70e81dd, reviewed before use, with small hardening patches for hosting. We never pull upstream changes automatically.

Built with

Editor by CodeMirror (MIT). Type set in JetBrains Mono (OFL). Examples and the in-browser compiler come from the Plainly project.

Enzonic Labs

This site is an Enzonic Labs experiment: we host interesting community projects and give them a place to run.