This repository has been archived by the owner on Sep 27, 2023. It is now read-only.
Release 0.5
#142
Replies: 2 comments
-
@doug-moen , you should also upload the 'Curv-x86_64.AppImage.zsync' artifact to the releases. It is what is used by AppImage updater tools to perform delta updates. |
Beta Was this translation helpful? Give feedback.
0 replies
-
@A-G-D It's done. Thanks for letting me know. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Curv Changes since Release 0.4
There are multiple language changes, with deprecation warnings for old
syntax. You should fix deprecation warnings now if you have old Curv code,
because the old syntax will be removed in a future release. By default,
deprecation warnings are throttled. Use
curv -v
to see all warnings.Features marked experimental are unstable, subject to change.
Platform/Build Support
Curv 0.5 includes a prebuilt AppImage for Linux.
make upgrade
commandFile Import/Export
jgpu
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)Non-JSON data is now exported as a string.
#foo
exports as"foo"
.sin
exports as"<function sin>"
.Command Line
curv -le
, default isnew.curv
~/.config/curv
contains defaults for -O options,is a Curv source file, a record containing {viewer,export} fields.
See
docs/Config.rst
Symbols used in -O options: -Ocolouring=#vertex or -Ocolouring=#face
--depr=
option controls deprecation warningsREPL
help
in REPL is extremely experimental, only partially implementeddocs/REPL.rst
Rendering in Viewer Window
curv --help
.-Oname=value
.What's new:
value
is an arbitrary Curv expression.viewer
section. [new]render
fieldto the shape structure. [new, experimental]
shader
-- lighting & shadow function for object surface [experimental]Shape Library
lib.builder
withsnowman
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]
meansunion [a, b, c]
Compiler and Interpreter
dot
)docs/Implementation
(source code structure, lang. implementation)Curv Language
'foo bar'
is an identifier with an embedded space.'if'
is an identifier, not a reserved word.'_
is an escape sequencerepresenting a literal
'
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.Lists are heterogenous, so
"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 ifx
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 byucode
.decode
removed, replaced bychar
.string
converts an arbitrary value to a string.$_
->$
and"_
->"
symbols are scalars, not lists. They replace 'enum' values in some languages.
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 asr.foo
. Syntax r."foo" is deprecated.a.foo.[i] := ...
assignment statementsa.[indexlist1,indexlist2]
a.[i]
indexes a data structure with index valuei
a.[[i1,i2,i3]]
yields[a.[i1],a.[i2],a.[i3]]
a.[this] yields
a`a.[tpath[i1,i2]]
yieldsa.[i1].[i2]
a.[i1,i2]
is a multidimensional array slice,short for
a.[tslice[i1,i2]]
.amend index newelem tree
is pure functional update,like
tree.[index]:=newelem
without the side effect.is_fun
deprecated, replaced byis_func
andis_primitive_func
error
is a function value (previously was magic syntax)id
-- identity functionidentity
renamed toidmatrix
compose
is generalized to work correctly on partial functionsnot
function; unary!
operator is deprecatedand
,or
,xor
select
[experimental]parametric
records have acall
field that reruns the constructorwith different parameter values. The result is another parametric record,
also with a
call
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{...}
.Previously only
;
was allowed as separator.where
is deprecated, uselet
instead.locative!func1!func2
is a statement, mutates a local variable byapplying one or more functions to the contents.
until
clause for early exit from afor
loopvar
definitions are deprecated, uselocal
definitions instead.local <definition>
is a generalized local definition, with sequential(not recursive) scope. Legal in any imperative context:
do
expression,compound statement, list constructor, dynamic record constructor.
let
or in a module(not actions). Use
test
definitions to add unit tests to a module.do
expressions are supported.1..3==[1,2,3]
This discussion was created from the release Release 0.5.
Beta Was this translation helpful? Give feedback.
All reactions