This site is version 0.0.1. Most of the code on this site is drafted by an agent and needs review. I apologize
for the AI-speak, we are working on rewriting it!
The program’s map: every function and which calls which.
There’s no recorded run of this program yet.
Shift+Enter in a cell runs it and moves to the next. Running a cell runs every cell above it too, as one program.
[1]lines 1–21
# A few numeric functions, in real Viv syntax.defarea(r) {
return3.14159* r * r
}
deftwice(n) {
return n + n
}
# calls another function; unary minus and parenthesesdefshifted(x) {
returnarea(x) --(1.0)
}
print(area(2.0))
print(twice(21.0))
print(shifted(2.0))
# SPDX-License-Identifier: MIT OR Apache-2.0# SPDX-FileCopyrightText: 2026 The Viv authors