This repository was 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
Uh oh!
There was an error while loading. Please reload this page.
-
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 -vto see all warnings.Features marked experimental are unstable, subject to change.
Platform/Build Support
Curv 0.5 includes a prebuilt AppImage for Linux.
make upgradecommandFile Import/Export
jgpuexport file format (GPU program as JSON)GLTFexport file formatcurvc(no longer being built)curv dirnamereads a directory as a Curv program (directory format)Non-JSON data is now exported as a string.
#fooexports as"foo".sinexports as"<function sin>".Command Line
curv -le, default isnew.curv~/.config/curvcontains defaults for -O options,is a Curv source file, a record containing {viewer,export} fields.
See
docs/Config.rstSymbols used in -O options: -Ocolouring=#vertex or -Ocolouring=#face
--depr=option controls deprecation warningsREPL
helpin REPL is extremely experimental, only partially implementeddocs/REPL.rstRendering in Viewer Window
curv --help.-Oname=value.What's new:
valueis an arbitrary Curv expression.viewersection. [new]renderfieldto the shape structure. [new, experimental]
shader-- lighting & shadow function for object surface [experimental]Shape Library
lib.builderwithsnowmanexample [experimental]sorobanexamplepolylineprimitiverepeat_finiteprimitivecapped_coneshow_axesto preserve the bounding boxpolygonprimitive (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.42or-0.5signfunction returns -1, 0 or 1sumadded to SubCurva++binfix 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 xis true ifxis a character value.charconverts an integer or list of integers to a character or string.ucodeconverts a character or string to an integer or list of integers.encoderemoved, replaced byucode.decoderemoved, replaced bychar.stringconverts an arbitrary value to a string.$_->$and"_->"symbols are scalars, not lists. They replace 'enum' values in some languages.
symbolfunction constructs symbol from stringis_symbolpredicate.is_nullpredicate (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 valueia.[[i1,i2,i3]]yields[a.[i1],a.[i2],a.[i3]]a.[this] yieldsa`a.[tpath[i1,i2]]yieldsa.[i1].[i2]a.[i1,i2]is a multidimensional array slice,short for
a.[tslice[i1,i2]].amend index newelem treeis pure functional update,like
tree.[index]:=newelemwithout the side effect.is_fundeprecated, replaced byis_funcandis_primitive_funcerroris a function value (previously was magic syntax)id-- identity functionidentityrenamed toidmatrixcomposeis generalized to work correctly on partial functionsnotfunction; unary!operator is deprecatedand,or,xorselect[experimental]parametricrecords have acallfield that reruns the constructorwith different parameter values. The result is another parametric record,
also with a
callfield.testdefinitions, for unit tests in a module, or anywhere elsesc_teststatement, for unit testing SubCurv [experimental]assert_errorstatement, for writing unit testslet ...and{...}.Previously only
;was allowed as separator.whereis deprecated, useletinstead.locative!func1!func2is a statement, mutates a local variable byapplying one or more functions to the contents.
untilclause for early exit from aforloopvardefinitions are deprecated, uselocaldefinitions instead.local <definition>is a generalized local definition, with sequential(not recursive) scope. Legal in any imperative context:
doexpression,compound statement, list constructor, dynamic record constructor.
letor in a module(not actions). Use
testdefinitions to add unit tests to a module.doexpressions 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