Scripture Playground
A language inspired by scripture. Learn it one small experiment at a time.
Start with a few words.
A Scripture program begins with genesis. Use praise to print a value, then close the block with amen.
genesis:- Begin the main block
praise- Print a value
amen- Close a block
Try this Replace "Hallelujah" with your own greeting. Run it again and watch the output change.
Tab indents. Press Esc, then Tab to leave the editor.
Output
ReadyWhat will your code say?
Run the example to see its output, then change a line and try again.
Interpreter details
Expected output for the original example
Hallelujah
A small syntax guide Keep the essentials close.
Begin & print
genesis:
praise "Hello"
amen
genesis
is the main block.
praise
prints one value. Close each block with
amen
.
Name & change
let there be count = 3 make it so that limit = 10
Variables can change:
count = 4
. Constants declared with
make it so that
cannot.
Define & return
commandment double(n):
rejoice n * 2
amen
Call it with
double(21)
. Use
rejoice
to return a value from a function.
Compare & react
prophecy (count == 2):
praise "It happened!"
amen
Watches global variables. Runs when an assignment changes its condition from false to true.
Use a new line or
;
between statements. Strings use double quotes. Arithmetic works on
numbers, and subtracting two times gives elapsed seconds;
+
does not join strings. Comments and string escapes are not supported
yet.