curv -v
to see all warnings.Curv 0.5 includes a prebuilt AppImage for Linux (see github releases).
make upgrade
commandjgpu
export file format (GPU program as JSON)GLTF
export file formatcurvc
(no longer being built)curv dirname
reads a directory as a Curv program (directory format)#foo
exports as "foo"
. sin
exports as "<function sin>"
.curv -le
, default is new.curv
~/.config/curv
contains defaults for -O options,docs/Config.rst
--depr=
option controls deprecation warningshelp
in REPL is extremely experimental, only partially implementeddocs/REPL.rst
curv --help
. -Oname=value
.value
is an arbitrary Curv expression.viewer
section. [new]render
fieldshader
-- lighting & shadow function for object surface [experimental]lib.builder
with snowman
example [experimental]soroban
examplepolyline
primitiverepeat_finite
primitivecapped_cone
show_axes
to preserve the bounding boxpolygon
primitive (can be non-convex, self-intersecting)a >> into union [b, c]
means union [a, b, c]
dot
)docs/Implementation
(source code structure, lang. implementation)'foo bar'
is an identifier with an embedded space.'if'
is an identifier, not a reserved word. '_
is an escape sequence'
within a quoted identifier.42
or -0.5
sign
function returns -1, 0 or 1sum
added to SubCurva++b
infix list catenation operator(a,b,c)
list syntax; use [a,b,c]
instead"abc"
is now a list of characters."abc" ++ [1,2,3]
is a list of 6 elements. #"a"
is a character literal, and works as a pattern.is_char x
is true if x
is a character value.char
converts an integer or list of integers to a character or string.ucode
converts a character or string to an integer or list of integers.encode
removed, replaced by ucode
.decode
removed, replaced by char
.string
converts an arbitrary value to a string.$_
-> $
and "_
-> "
symbol
function constructs symbol from stringis_symbol
predicate.is_null
predicate (breaking change).a.[i]
is new array indexing syntax. a[i]
is deprecated.r.[#foo]
is same as r.foo
. Syntax r."foo" is deprecated.a.foo.[i] := ...
assignment statementsa.[indexlist1,indexlist2]
a.[i]
indexes a data structure with index value i
a.[[i1,i2,i3]]
yields [a.[i1],a.[i2],a.[i3]]
a.[this] yields
a`a.[tpath[i1,i2]]
yields a.[i1].[i2]
a.[i1,i2]
is a multidimensional array slice,a.[tslice[i1,i2]]
.amend index newelem tree
is pure functional update,tree.[index]:=newelem
without the side effect.is_fun
deprecated, replaced by is_func
and is_primitive_func
error
is a function value (previously was magic syntax)id
-- identity functionidentity
renamed to idmatrix
compose
is generalized to work correctly on partial functionsnot
function; unary !
operator is deprecatedand
, or
, xor
select
[experimental]parametric
records have a call
field that reruns the constructorcall
field.test
definitions, for unit tests in a module, or anywhere elsesc_test
statement, for unit testing SubCurv [experimental]assert_error
statement, for writing unit testslet ...
and {...}
.;
was allowed as separator.where
is deprecated, use let
instead.locative!func1!func2
is a statement, mutates a local variable byuntil
clause for early exit from a for
loopvar
definitions are deprecated, use local
definitions instead.local <definition>
is a generalized local definition, with sequentialdo
expression,let
or in a moduletest
definitions to add unit tests to a module.do
expressions are supported.1..3==[1,2,3]