* added windows binaries for 0.16
* check-in release notes for 0.16
* checked in linux binary for scopes 0.16
Documentation is available online.
qualifiersof
to query qualified type of values [5f025d952ad9]__drop
is a view [17cff061862f]& type
constructs immutable reference by default, analog to @ type
[929c91751d51]mutable
can also be applied to reference types [929c91751d51]free
refusing to free opaque pointers [a5f9fe21fe66]sc_list_compare
when one of the lists is empty and the result is unequal [f1a836d4e237]SourceFile
so repeatedly opening the same file refreshes content for new access [430da3204013]sh
command which allows to execute shell commands [1098c145fe1f]"-c" <path>
for options
will write an object file to the specified location [2858f372e4f4]console.sc
[9adc7e0e0266]compile-object
requires a target triple to be specified [d9f0bfc1cac1]abs
(sabs
) not correct for unsigned types. sabs will now always perform the abs operation, while abs will leave unsigned integers as-is. [58ea46f5597b]compile-object
takes additional file kind argument and can now also generate assembly, llvm plaintext and llvm bytecode [7ae23e7c5afb]let
only binds new names after all expressions have been processed [882a99aaf71e]defer
using view inference [3c5fd789d4ef]sc_argument_list_new
now takes number of values and value array [eec8c397e9f5]sc_argument_list_append
[eec8c397e9f5]'swap Array
[fb4d3c3cac7e]deref
moves unique arguments [42d2c01eee48]static-if
breaking if the next expression does not start with a symbol [780bbae9eae6]a is T
expression to sugar-match
to match a constant value type without unpacking it [fade136cd5aa]enum
parser [fade136cd5aa]enum
sugar now works analog to struct
, permitting to define methods in the enum body. tags can be added procedurally at compile time using tag
[eb3e10e5385e]enum.__repr
combines names for tags using the same indices [eb3e10e5385e]sc_const_null
to allow creating constant null instances__dispatch
spice to Enum
as a way to safely and efficiently unpack contents [2851f9736e78]enum
sugar to its own module [6390ea67af27]struct
sugar to its own module [fea133adb1a6]key
to set a computed argument key at compile time [e224bfa5c121]'unpack-keyed
to tuple
to allow unpacking tuple arguments with keys [e224bfa5c121]tuple
will unpack with keyed arguments if elements have keys [071500c99cbd]enum
can be unpacked with dispatch
sugar [071500c99cbd]enum
syntax, to make tuple definition the default [f1b278041fcc]dispatch
will only unpack tuples [f1b278041fcc]using
evaluates argument. if argument is a type, and said type exports a scope via '__using
attribute, this scope can will be embedded in the local scope [eafef7433f21]enum
tags can be imported with using
[eafef7433f21]dupe
now creates unique copies of views, which makes it both powerful and dangerous [9a2cfdd32864]compile-glsl
now takes additional GLSL version parameter in first place; if version is set to 0, the most recent default is used [693e892869c4]new
and delete
, as heap values are no longer autofreed, so it makes no sense to pretend we have high level primitives to deal with them [66a8e9485455]let
not failing when the right hand side contains too many arguments and the left hand side isn't variadic [eae6dc7dd146]test-compiler-error
also catches syntax errors now [eae6dc7dd146]@
[742ed6c653e5]sc_compile_object
not being able to be linked dynamically [840ad4ec461c]sc_compile_object
to fix library calls crashing on windows [6f44049f0848]'__methodcall
[fb53ae7aecbf]Box
as new module; Box
allocates and wraps heap pointers uniquely and ensures that they are properly destroyed. It currently only forwards cast operations, getattr
and methodcalls. Box.view <value>
can be used to get a view to the managed object. [446a419c602b]Box
forwards countof
and @
operators [05518b5c0827]UTF-8
module [dcb14c92a5b2] [05d22a6cb662] [3eb3dda8bd3a]protect
to cast a pointer to read-only [74d1b669ed2f]pointer
[74d1b669ed2f]i8, i16, u8, u16
in vec-type constructor [79534cf1234d]empty?
and countof
used on list constants folds at compile time [0018fee62b27]unpack
can be used on list constants [0018fee62b27]strtoll
and strtod
.0?..
is no longer parsed as an octal number. Instead, the 0o
prefix must be used.0b
, 0o
and 0x
can be used with floating point numbers. [9956b3ca826a]integer->string
, bin
, oct
, dec
, hex
to convert integers to strings [53c2a5cbb282]as?
that made it perform the same as imply?
[153f188e5784]sc_symbol_style
to C API [b886448914a7]sc_value_block_depth
to query the block depth of typed values [beb2a2096180]nullof
translates to const constructorundef
produces pure value instead of instructionmove
and insertvalue
accept constants and undefineds as movable [c0f87e30eef8]undef
node [2cd9dd44294c]bitcast
is now an instruction node [9a2e4f38b26e]?
has its own value kind [ebf7dfa6c0bf]extractvalue
and insertvalue
are instructions [439c53efe6c8]getelementptr
is an instruction now.getelementref
is directly implemented via bitcast and getelementptr instructions. [614dd7d2fea1]insertelement
, extractelement
and shufflevector
are now instructions [df155240631e]alloca
, malloc
, free
, load
and store
are now instructions [5c5bd71b2ae2]assign
and deref
are implemented with store
/load
instructions [bfc989ea2d7f]icmp
and fcmp
are now instructions [9f2bd3c73523]move
, view
and dupe
are no longer instructions [a0c525d3ec61]repeat
, break
, raise
and return
[78d321706868]cast
instruction type [e3aa46645de7]OrderedMap
permits different key type [3f43422317e1]sc_scope_set_symbol
and sc_scope_del_symbol
sc_scope_bind
and sc_scope_unbind
'set-symbol
, 'set-symbols
, 'define-symbol
and 'define-internal-symbol
from Scope
objects'bind
, 'bind-symbols
, 'define
and 'define-internal
to Scope
objectssc_scope_next
and sc_scope_next_deleted
iterate by index rather than key [b1fa0fdbcb20]'define Scope
[dc2e28edd3a0]ptrtoref
and reftoptr
casts do not generate instructions [bd29af1f88c8]sinh cosh tanh asinh acosh atanh
instruction support for SPIR-V backend [246dd3af635a]atan2
builtinatomicrmw
instruction for LLVM and SPIR-V backends [2c91137d7933]glsl.std.450.*
namespace [adab679d54b7]atomic*
functionssigned?
[8580fec568a0]GLSL.std.450.*
[55e9ecd92397]cmpxchg
instruction for both LLVM and SPIR-V [0059ee2965a3]
GLSL: implemented atomicCompSwap
[bc0baa33a8b3]findLSB
[4936cb4ecb82]OpSelectionMerge
instructions for condbr branches [6397c4e06c73]__barrier
instruction to specify barriers in shadersbarrier
, memoryBarrier
, groupMemoryBarrier
, memoryBarrierImage
, memoryBarrierBuffer
and memoryBarrierShared
[4261febe179a]gl_PointSize
, gl_ClipDistance
and gl_InstanceID
spirv.OpEndPrimitive
and spirv.OpEmitVertex
as intrinsic [63cce58625f5]gl_WorkGroupSize
[732bd007a708]fragment_depth
hinting, dFdx
, dFdy
, fwidth
[2098aa672f9d]!
from builtin symbols (set-execution-mode
, discard
, etc.) [af2018e6eec8]smoothstep
[2ff3151f7575]fract
[042927b3b073]argumentsof
to statically unpack the elements of an arguments type [69e6e4a64d00]DispatchIndirectCommand
and DrawArraysIndirectCommand
structs [31aff94c734a]test-compiler-error
had been taken off so the test for enums would fail. Fixing. [3cb581694633]package.path
into require-from
[17386fe6cf99]**
can now be used as prefix operatorpow
is now an alias for **
[9dd6e6c9b1b2]**
becoming unavailable for float vectors [f70985cd3c2e]sc_global_new
no longer takes location and binding argumentssc_global_set_location
and sc_global_set_binding
sc_global_set_descriptor_set
[edc5b7f78780]cons
and list
produce constant lists when all arguments are constant [97aecd322454]sc_main
into sc_init
. after calling sc_init
, the entire scopes environment is ready to use. [8beb43b9412e]range
will cause generator to deref from
on init [81fb26e7199a]sc_packed_tuple_type
, allowing to construct 1-byte packed tuple types'packed tuple
method as well as tuple.packed-type
to enable static and dynamic construction of packed tuple types [3c0e24ee345a]struct
supports optional packed
keyword after subtype qualifiers to indicate a packed tuple storage typepackedtupleof
constructs a packed tuple [469da889c2c9]spirv.OpSampledImage
to exported SPIR-V intrinsics [9100a5fc0014]-->
expression piping sugar to itertools module [26a8d38551e8]string.collector
to build simple string collector sinks [a908da961ab6]'range
method for strings to iterate substrings [dc1476ec1a42]join
to support joining two or more generators that return the same value type [f71474d90657]'lineage
method for scopes to iterate all inherited scopes [a35cbcf8a50a]Map
raising the MapError
factory instead of instantiating a value [0103fe033c48]do
block type for switch
blocks, which allows to collect all fallthrough switches with pass
exclusively, rather than having to ensure that the last statement uses case
.pass
block must not be followed by case
blocks, but can only be followed by pass
, do
or default
blocks.do
block must follow one or multiple pass
blocks. [0cb40a1ecbf2]'offsetof
method for types as well as static operator offsetof
which, when passed composite type/value and integer index or symbol, returns the byte offset of the element or field. [7b545c2fbd7b]getattr
, guaranteeing that getattr
will always succeed at runtime [01fbb4174c8b]sc_type_field_index
throws an error when the field does not exist [b20b8f2f5f2f]sc_scope_at
, sc_scope_local_at
raise error if key is not a constant [907982548137]Scope
objects have been rewritten to become immutable mappings, which means that mutating a scope always creates a new one.'bind Scope
no longer operates in-place but returns a new Scope
object. The same goes for bind-symbols
.Scope
constructor only accepts optional parent
argument. Reparentng can be done using 'reparent Scope
or 'unparent Scope
indirect-let
form to allow setting hidden predefined symbols.'module-docstring Scope
. [8d4bc7342fc8]chain-typed-symbol-handler
which allows to register a compile type symbol handler. see test for usage example.and
and or
always forward variadic arguments whole [e840143d6ff0]ipair
to itertools allowing to pair arguments from generators [10a79f4bda62]N == 2
using import
not importing anything [1b8a4fff908c]uniqueof
and viewof
to allow building function signatures that use unique types [684f8e47edf5]mutable
applied to referenced incomplete typenames resulting in a read-protected reference [e04e6f6bb49c]sc_type_compatible
to check compatible pointer and reference types [1ad765925f2f]swap
to core which allows to safely exchange the contents of two references [1e764ea78eb6]va-map
and getattr
on structs [7b851bdc7a01]sc_string_match
returns indices of found substring in addition to boolean indicating success [dd5b43c29fa6]script-launch-args
function generated for main module [0c9032e918a0]typeof
qualifier in imported C declarations [3948a1b84061]Array
: support for resizing arrays [ce823497be87]exec-module
because it breaks tests [6b53d6a5cc6a]@
for vector
[fe468d5048ae]integer
[ca0d31e09681]f80
and f128
floating point types [9b2ed63b367f]CEnum
[2d66a1b4c617]=
operator to not attempt to cast the left hand side [ef0a4b65d095]read-eval-print-loop
takes a global scope as argument [815e62d1f610]rrange
for reverse iteration of ranges [5eb96b92da95]compile-glsl
and compile-spirv
use different target environments.ExecutionModeOriginUpperLeft
[4c0638865cd5]read-eval-print-loop
hides logo by default [0ea2905ce6c7]enum
module exports Option
constructor which allows to store null references [13612bed5091]reftoptr
and ptrtoref
stripping view qualifiers from viewed plain types__drop
for enums [fe4350211702]enum
: Option
can be implicitly converted to bool
and passed to conditionals directly.enum
: Option
allows safely popping the value to a function for safe deconstruction. [49e409aa2988]enum
: implemented 'swap
method for Option
which allows to drop the previous value on a mutable before supplying the next one [7b8d1fc1e0e6]sc_const_int_words_new
to create integer constants larger than 64 bitsspice-quote
correctly quotes big integer constants [972af3794e9f]fn
and inline
, fn...
and inline...
no longer bind the function name locally, but make it available under this-function
[883707f5185d]'swap Option
for a simple swap-out [c059d5da17ec]char
from coreUTF-8
: added char
operator that converts string constants to 32-bit unicode values [ac5bd84fb9c8]console
for removal of char
[8167456726e1]gvec2
, gvec3
and gvec4
supertypes [114a011fa541]sc_import_c
and include
return C symbols sorted into individual subscopes struct
, union
, enum
, define
, const
, typedef
, extern
include
no longer accepts code blocks in next line; instead, the macro discerns between include file and code block by presence of a newline character at the endinclude
: removed import
modifier; instead, include
always returns a constant scope objectinclude
: removed filter
modifier, as symbols can no longer be imported into the local scope [9aa3d537c621]sc_import_c
allows specifying a scope with which to replace typesinclude
supports new using
option which allows to specify a scope to replace types [b72d2efd5f36]byval
attributes missing from parameters and call attributes [c062be65cfa1]run-stage
, using
and scope inheritanceusing
allows passing any expandable expression, but expects it to resolve as a scope [ce189c5d606e]using
allows specifying a sugar time expression for filter
[463a4a2b2a61]typeinit
mention to initializer lists section [94d247b82e8e]GlobalString
value type and sc_globalstring_new
API functionimply
and as
attempt to cast the qualified type if the stripped type doesn't work [1f178fef0546]sc_global_string_new
to take a buffer and size instead of a string objectsc_global_string_from_cstr
[ea13c504b049]string
classGlobalString
class which encapsulates global strings compiled with modules [197bb857f4a7]Set
[8f589f2c5a0c]Map
[59f0229b4a12]vectorof
constructs constant vector when all converted arguments are constant [3d13f52fe1d2]Map
and Set
both evaluate to true if they're not empty [b21a7c2c8be3]enum
: enum type fields are no longer bound to constructors directly, but to their type descriptors, which provide the constructor. Usage doesn't change, but field attributes can now directly be queried. See test. [a00f3787fcda]try
/except
has been expanded by a try
/else
form, where any kind of exception is caught and the raise type can be polymorphic (as it is being ignored) [a316b318b9ce]for ... in
/else
form to allow users to provide a fallback break value [69f4d53ff388]repeat
in fold ... for ... in
so that the loop can be skipped provided the current state [ce4eead16343]tuple
supports unordered comparisons [fbe0c1380d95]try
when an except
or else
block is missing [5696d5daf330]Accessor
, calling the type with the value and key to be looked up.property
module and test, allowing to define python or java style properties for arbitrary types [190b1de9ad7c]getattr
forwards calls directly to the closure [b2755ef4f05a]fn...
/inline...
will query an argument type's __typematch
method if available and the argument doesn't match directly, enabling users to write types that perform pattern matching and conversion only [5ee6b9a44760]encoder
forwards individual characters rather than chunkstupleof
and arrayof
return constants when all arguments are constant [24f5edeac94f]CStruct
supertype with all-constant initializers will produce a constant [2ebf65df42a1]fn...
: added support for inlining the first case into the declaration [7fe0a6abd575]Symbol
constructor returns constant if argument is also constant [35802be5d4bd]global
is initialized with pure value only once, allowing to use global
to implement persistent variables in functions [203f0282a169]Option
type to its own module, Option
Option
: 'unwrap
now merely asserts that the value is available; try-unwrap
raises an UnwrapError
[f2fc3086f841]RC
, a reference counted Box
[1b9c66527b31]Option
typename [3c10770d5a95]Option
: perform correct coercion when implicitly converting values to options [a92b6ae9cc74]Array
: added 'pop
method to allow removing last element [72dd75ff7237]Array
: implemented 'last
method to view the last element of an array [909b615c03df]RC
module and type to Rc
[5c3a3f8fc3e6]repeat
and break
builtins for loop
bodies [13cda9c3a915]Rc
: changed storage type so that payload type can be incomplete at the time of declaration [4ead13458680]Rc
: added support for weak references using Weak
; weak references can be upgraded to strong references using Rc
, and Rc
can be implicitly converted to weak references [d31f9cdf385b]Rc
: drop function hints returning void so it can be used recursively [dc2c7c95874b]Array
: added 'reverse
method, returning a generator that iterates the array in reverse [1696e97a1b04]Array
: added remove
function to remove a value at a given index [a8c4e0eb859d]Rc
: fixed a condition where deleting a strong reference would delete a weak one which would take it upon itself to delete the refcounter storage as the strong reference had already set its refcount to zero [d183bb5c9070]Array
: added 'insert
method which allows to insert a value at a specific index [1e4a06557bee]Array
: support for passing extra parameters to 'sort
which are forwarded to the key function [6c0d07c3b6c8]Rc
: added singleton test [5514201b9c49]rrange
overshooting when from
is zero and the counter is unsigned [04d97f1df4cb]alloca
, malloc
, alloca-array
and malloc-array
propagate view qualifier to generated typesEnum
, Option
: fixed payload extraction not propagating view attributes correctly [3fbc15daa33c]Rc
: ensure Rc.clone
properly dereferences source pointers when duping [87c87fcbd7e3]Rc
: fixed assignment error when assigning strong references directly [74118464ab51]Option
: renamed 'unwrap
to 'force-unwrap
and 'try-unwrap
to 'unwrap
Rc
: 'upgrade
no longer returns an option but raises an UpgradeError
Rc
: 'force-upgrade
causes a runtime assertion when it fails [94b3cfa730c3]Rc
: Weak
can be instantiated as an empty weak referenceRc
: 'clone
method (aliased through Rc.clone
) for Weak
can be used to duplicate weak referencesRc
: added equality test for weak references [5231803703c2]Rc
: fixed an issue where 'upgrade Weak
would omit a dereference [cdd618c6c32a]test_rc.sc
[c1721f510e7d]testing/makemain.sc
[30583020c347]String
type [6d92e54d4c3b]test_all
[779df13a6702]str
supertype and sc_str_type
constructor [f7cdbbcf24f0]str
[ebe78003d69e]-->
operator from itertools to chaining
modulepermutate-range
generator [dbd87b15f4ac]==
for Nothing
and Enum
[b824fb9781d7]Enum
: small simplifications, improved test [bd9db49a2676]Map
: singled out Set
class into its own Set
module [6360efa21342]Nothing
, Rc
and Enum
[38ad42cf817d]Map
, Set
: added support for specifying custom hash function [545c53b5df36]swap
accidentally moving argumentsSet
: insert
returns a reference to the inserted keySet
operations for unique values [c32d5879c264]Set
[378c540e2414]sc_anchor_new
[48e8e75079bd]enum
: only set special methods when there are no user defined versions [d98d3522ad44]enum
: added 'apply
method that allows to call an inline for all payload branches [7b89feb102f2]enum
: method 'apply
does not call function argument for default branch [70a858c1451f]Set
: fixed 'insert
returning the wrong index if a value was newly inserted [ee25fa596ddb]array
and vector
types generating huge types [21ea62c3b423]enum
: fixed apply
returning no valuesMap
: fix for inserting unique values [d59d4a47a73a]Map
: more fixes for unique value types [314852df2e0e]sc_type_is_unsized
function, allowing to query if a type is unsized, as element-count will now always return 0 for unsized types'unsized?
method for type
unsized?
static operator to check for an unsized type at compile time [14806e5edfd3]property
: fixed certain implicit conversions failing [400e714131b4]from
: improved debug info__typeattr
[f677df768442]methodsof
accessor binder that can be used in conjunction with from
test_from
[12f622ed0743]Rc
: fixed returned refcounts to no longer be viewsCapture
: fixed captures not working when captured arguments are non-plain [4b8e07ff9abc]dispatch
form from enum
to core [21ced7098fec]locals
no longer splits up scopes when a dynamic symbol is in the scope [9a5476946a3c]property
: methodcall and toptr
/toref
operator supportRc
: none
can be converted to an empty weak reference [27ffe3f7d8ee]switch
cases are coerced to the type of the switch argumentif
uses the new mechanism to coerce conditional arguments to boolean type in favor of the __tobool
method [f43f124656a6]libc
namespace to C
[8430933436d9]Enum
: allow comparing enums to field definitions [f543219644eb]icmp
and fcmp
instructions no longer propagate view status to exit argument [39e5743d6b70]struct
: non-constant field initializers turn into autogenerated constructor calls [283bb360720b]0
and 1
literals in vector element accessors [ecb3ceda547c]enumerate
allows specifying a type for the enumerator [974a84124515]array
type constructor supports multi-dimensional definition [0f394de291f7]bitcast
allowing casts between types of unequal sizebitcast
not allowing casts from vector to integer [61d3bc2ed380]matrix
storage type to represent matrices in SPIR-Vglm
: use native matrix storage type for mat-type
instances [0c144b406ec3]extractvalue
, insertvalue
, extractelement
and insertelement
return constants when all arguments are constant [7205074644b3]distance
in core [8c3b7d24bbcf]mod
operator to perform euclidean division [de4ed1e0c150]mod
to perform floor division as well [ac49a36a693a]test_spirv_loop
and structured selection errors in validator [e2b11990aa7c]if/elseif/else
constructvalue-kind-if
node in favor of value-kind-cond-template
sc_if_*
API functionssc_cond_new
API function [eeadb6082f44]Capture
: fixed invalid implicit conversion of template not producing a cast error [390d9380c323]glsl
: locations, bindings and sets for uniforms, buffers and varying parameters can be of a type that implicitly casts to i32
[f5c965515f4e]Rc
: call operator is forwarded correctlyglsl
: initial work on separate sampler types [ce355331ca22]sc_spirv_to_glsl
API function for debugging spirv shaders / spirv cross [6f867dd7d7d6]Set
: fixed discarding being broken when the element type is uniqueSet
: added pop
function [da073d23ab09]repr
no longer attaches type signature to string when __repr
is defined [9e99eda60a19]type
in addition to typedef
, with the exact same syntax. analogously, type+
has been added as a synonym to typedef+
[daae3023f29b]tupleof
constructs a viewed tuple when some arguments are viewsCapture
: proper handling of all-unique and some-view capture argumentsCapture
: ensure captured values are dropped when capture is dropped [73dd0e0c0b0c]copy
protocol; most basic plain types are copyable by default; types that implement __copy
can be duplicated using the copy protocol.Rc
: retired Weak.clone
and Rc.clone
in favor of copy protocol [862ad025febb]bitreverse
, ctpop
, ctlz
and cttz
instructions for CPU and GPU [59c6d9fe1a6c]ctpop
to bitcount
and removed ctlz
and cttz
findmsb
and findlsb
which work analog to their GPU counterparts [6488874570c0]findlsb
when value is zero [230512bb1d9e]typematch
syntax to allow constructing type matchers in overloaded function arguments [5d9bb751c2b6]in
infix operator, which allows to check for the presence of an element within a value of aggregate typetuple
, Map
and Set
support in
operator [25888d6027bf]not
autowraps arguments in a list when mulitple arguments are passed [bad8806132f9]not
now allows specifying more than one argument, which will treat all arguments in a new expression [4656e5df784e]va@
supports selecting arguments by key rather than index [a2de646dd889]signed integer <width>
or signed <integer-type>
can be used to construct / convert integer types_:
is a valid alias for Arguments
raises
can be used as an infix operator [b0b66ba9cded]<-:
operator for nicer function construction [70b847a649b8]gnu++14
viewing
on plain values [6a37f4a6be82]sc_prompt_*
API functionssc_set_autocomplete_scope
sc_prompt_*
str:
to prefix:
[85f246ab9c44]"
can be escaped, all other characters are taken as-is. [db870a62221a]String
module [dca56f71b439]update_docs
script and regenerated reference [9f43f844af69]find-module-path
to core [43b91c76cef7]