cstr int nat nat32 nat16 nat8 float bool err blank char any eq neq not Number is_different neg add mul div mod lt gt le ge sub pow console unsafe_console flush nn print supports_ansi colors set exists bits lshift rshift xor band bor of range next get KB MB GB alloc resize last mutlast mutget len new arena allocated status circular list at char_allocator strdat str copy copy_null_terminated unsafe_temp endpos slice starts_with ends_with contains is_number rotl splitmix64 Rand Hashable hash to_hash_base robinhood_str_entry robinhood_nat_entry robinhood_entry raw is_zero find strmap natmap unpack abs sqrt sin cos log tan floor asin acos atan exp isnan isinf vec mat sparse_element coo float_allocator constvec reduce dot sum mean var std self rows cols constmat mutvec row nnz todense matrix realloc free zero

cstr

cstr - constant string

Defined by the compiler

cstr() -> (cstr)

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 174

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

cstr(cstr cstr, str) -> (cstr)

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 174

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

cstr(unsafe_temp) -> (cstr)

cstr - a cstr description of an error code

Defined in: std/core/error.s line 19

Error codes should not be compared numerically against given numbers, as their numbering changes for different programs. Instead, they should be converted to a cstr string with this function, which can then be compared. This comparison is also one numerical comparison, as care is taken for all cstr to point to the same memory location.

cstr(catch) -> (cstr)

int

int - a signed integer value

Defined by the compiler

Represents values in the range 2^-63 to 2^63-1.

int() -> (int)

int - cast to int

Defined in: std/core/convert.s line 89

Converts a bit representation to the corresponding integer.

int(bits) -> (int)

int - cast to int

Defined in: std/core/convert.s line 29

Overflows are mapped to negative integers and are not protected against.

int(nat) -> (int)

int - cast to int

Defined in: std/core/convert.s line 29

Serves as a tautology function for code that parses on multiple number types.

int(int) -> (int)

int - cast to int

Defined in: std/core/convert.s line 29

May lose information due to truncating.

int(float) -> (int)

int - reads an integer from the console

Defined in: std/core/convertstr.s line 35

int(console) -> (int)

Potential errors:

  1. null pointer
  2. iteration end
  3. iterator range
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. unexpected end of console read
  8. user input was not a float

int - converts a string to an integer

Defined in: std/core/convertstr.s line 147

int(str) -> (int)

Potential errors:

  1. null pointer
  2. invalid int conversion from empty string
  3. invalid int conversion from string with only a sign
  4. invalid integer int from non-number string

int - converts a string to an integer

Defined in: std/core/convertstr.s line 147

int(cstr) -> (int)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. invalid int conversion from empty string
  6. invalid int conversion from string with only a sign
  7. invalid integer int from non-number string

nat

nat - an unsigned integer value

Defined by the compiler

Represents values in the range 0 to 2^64-1.

nat() -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 84

Converts a bit representation to the corresponding natural number.

nat(bits) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 51

Converting a character to a natural number considers its bit representation interpreted as an unsigned number.

nat(char) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(nat) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(int) -> (nat)

Potential errors:

  1. cannot convert negative int to id

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(float) -> (nat)

Potential errors:

  1. cannot convert negative float to id

nat

Defined in: std/core/array.s line 24

nat(nat16) -> (nat)

nat - reads an unsigned integer from the console

Defined in: std/core/convertstr.s line 59

nat(console) -> (nat)

Potential errors:

  1. null pointer
  2. iteration end
  3. iterator range
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. unexpected end of console read
  8. user input was not a float

nat - converts a string to an unsigned integer

Defined in: std/core/convertstr.s line 170

nat(str) -> (nat)

Potential errors:

  1. iteration end
  2. null pointer
  3. invalid nat conversion from empty string
  4. invalid nat conversion from non-number string

nat - converts a string to an unsigned integer

Defined in: std/core/convertstr.s line 170

nat(cstr) -> (nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. iteration end
  6. invalid nat conversion from empty string
  7. invalid nat conversion from non-number string

nat - retrieved unsigned number from 32 bits

Defined in: std/mini.s line 30

nat(nat32) -> (nat)

nat32

nat32 - a 32-bit unsigned integer value

Defined by the compiler

Represents values in the range 0 to 2^32-1.

nat32() -> (nat32)

nat32 - convert unsigned number to 32 bits

Defined in: std/mini.s line 22

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

nat32(nat) -> (nat32)

Potential errors:

  1. nat value too large to pack in nat32

nat16

nat16 - a 16-bit unsigned integer value

Defined by the compiler

Represents values in the range 0 to 2^16-1.

nat16() -> (nat16)

nat16 - convert unsigned number to 16 bits

Defined in: std/mini.s line 14

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

nat16(nat) -> (nat16)

Potential errors:

  1. nat value too large to pack in nat16

nat8

nat8 - a 8-bit unsigned integer value

Defined by the compiler

Represents values in the range 0 to 255.

nat8() -> (nat8)

nat8 - convert unsigned number to 8 bits

Defined in: std/mini.s line 6

The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.

nat8(nat) -> (nat8)

Potential errors:

  1. nat value too large to pack in nat8

float

float

Defined by the compiler

float() -> (float)

float - cast to float

Defined in: std/core/convert.s line 95

Converts a bit representation to the corresponding float number.

float(bits) -> (float)

float - cast to float

Defined in: std/core/convert.s line 20

May lose information because floats are not exact representation of all integers.

float(nat) -> (float)

float - cast to float

Defined in: std/core/convert.s line 20

May lose information because floats are not exact representation of all integers.

float(int) -> (float)

float - cast to float

Defined in: std/core/convert.s line 20

Serves as a tautology function for code that parses on multiple number types.

float(float) -> (float)

float - reads a float from the console

Defined in: std/core/convertstr.s line 79

float(console) -> (float)

Potential errors:

  1. null pointer
  2. iteration end
  3. iterator range
  4. out of bounds
  5. can only define strings on contiguous buffers
  6. can only define strings on non-offset buffers
  7. unexpected end of console read
  8. user input was not a float

float - converts a string to a float

Defined in: std/core/convertstr.s line 183

float(str) -> (float)

Potential errors:

  1. invalid float conversion from empty string
  2. invalid float conversion from string with only a sign
  3. null pointer
  4. invalid float conversion from string without a value after the dot
  5. invalid float conversion from non-number string

float - converts a string to a float

Defined in: std/core/convertstr.s line 183

float(cstr) -> (float)

Potential errors:

  1. invalid float conversion from empty string
  2. invalid float conversion from string with only a sign
  3. null pointer
  4. invalid float conversion from string without a value after the dot
  5. invalid float conversion from non-number string
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers

bool

bool - boolean value

Defined by the compiler

Can only be true or false.

bool() -> (bool)

err

err

Defined by the compiler

err() -> (err)

blank

void - empty tuple

Defined by the compiler

This is the type of non-existent variables, empty parantheses, and functions of no returns.

void() -> ()

char

char - a character

Defined by the compiler

Represents characters in the numeric range 0 to 255.

char() -> (char)

char - treat as character

Defined in: std/core/string.s line 112

The first character of a string is extracted, for example to write c = char \"C\".

char(cstr) -> (char)

char - treat as character

Defined in: std/core/string.s line 106

The first character of a string is extracted, for example to write c = char str \"C\".

char(str) -> (char)

char

Defined in: std/core/convertstr.s line 23

char(console) -> (char)

Potential errors:

  1. unexpected end of console read

any

any - any type

Defined by the compiler

Represents a generic for buffers and pointers for type-independent code that can be matched to a concrete type later.

any() -> ()

eq

eq - equals

Defined in: std/core/numbers.s line 56

Compares the address of two pointers.

eq(any ptr x, any ptr y) -> (bool)

eq - eqqual to

Defined in: std/core/numbers.s line 40

Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.

eq(catch x, catch y) -> (bool)

eq - equals

Defined in: std/core/numbers.s line 26

eq(nat x, nat y) -> (bool)

eq - equals

Defined in: std/core/numbers.s line 26

eq(int x, int y) -> (bool)

eq - equals

Defined in: std/core/numbers.s line 26

eq(float x, float y) -> (bool)

eq - equals

Defined in: std/core/bool.s line 82

eq(bool value, false) -> (bool)

eq - equals

Defined in: std/core/bool.s line 78

eq(false, bool value) -> (bool)

eq - equals

Defined in: std/core/bool.s line 74

eq(bool value, true) -> (bool)

eq - equals

Defined in: std/core/bool.s line 70

eq(true, bool value) -> (bool)

eq - equals

Defined in: std/core/bool.s line 51

This is a compile-time operations that does not evoke any runtime booleans.

eq(false, true) -> (false)

eq - equals

Defined in: std/core/bool.s line 46

This is a compile-time operations that does not evoke any runtime booleans.

eq(true, false) -> (false)

eq - equals

Defined in: std/core/bool.s line 41

This is a compile-time operations that does not evoke any runtime booleans.

eq(false, false) -> (true)

eq - equals

Defined in: std/core/bool.s line 36

This is a compile-time operations that does not evoke any runtime booleans.

eq(true, true) -> (true)

eq - equals

Defined in: std/core/bool.s line 20

eq(bool x, bool y) -> (bool)

eq - equals

Defined in: std/core/string.s line 207

eq(cstr x, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

eq - equals

Defined in: std/core/string.s line 201

eq(str, cstr y) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

eq - equals

Defined in: std/core/string.s line 191

eq(str, str) -> (bool)

eq - equals

Defined in: std/core/string.s line 186

eq(cstr x, cstr y) -> (bool)

eq - equals

Defined in: std/core/string.s line 119

eq(char x, char y) -> (bool)

neq

neq - not equal

Defined in: std/core/numbers.s line 62

Compares the address of two pointers.

neq(any ptr x, any ptr y) -> (bool)

neq - not equal

Defined in: std/core/numbers.s line 48

Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.

neq(catch x, catch y) -> (bool)

neq - not equal

Defined in: std/core/numbers.s line 33

neq(nat x, nat y) -> (bool)

neq - not equal

Defined in: std/core/numbers.s line 33

neq(int x, int y) -> (bool)

neq - not equal

Defined in: std/core/numbers.s line 33

neq(float x, float y) -> (bool)

neq - not equal

Defined in: std/core/bool.s line 90

neq(bool x, false y) -> (bool)

neq - not equal

Defined in: std/core/bool.s line 90

neq(bool x, true y) -> (bool)

neq - not equal

Defined in: std/core/bool.s line 86

neq(false x, bool y) -> (bool)

neq - not equal

Defined in: std/core/bool.s line 86

neq(true x, bool y) -> (bool)

neq - not equal

Defined in: std/core/bool.s line 66

neq(false x, false y) -> (false)

neq - not equal

Defined in: std/core/bool.s line 66

neq(false x, true y) -> (true)

neq - not equal

Defined in: std/core/bool.s line 66

neq(true x, false y) -> (true)

neq - not equal

Defined in: std/core/bool.s line 66

neq(true x, true y) -> (false)

neq - not equal

Defined in: std/core/bool.s line 25

neq(bool x, bool y) -> (bool)

neq - not equals

Defined in: std/core/string.s line 213

neq(str, str) -> (bool)

neq - not equals

Defined in: std/core/string.s line 124

neq(char x, char y) -> (bool)

neq - not equals

Defined in: std/core/string.s line 213

neq(cstr x, cstr y) -> (bool)

neq - not equals

Defined in: std/core/string.s line 213

neq(cstr x, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

neq - not equals

Defined in: std/core/string.s line 213

neq(str, cstr y) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

not

not - logical inverse

Defined in: std/core/bool.s line 61

This is a compile-time operations on the compiler::false type rather than a runtime boolean.

not(false) -> (true)

not - logical inverse

Defined in: std/core/bool.s line 56

This is a compile-time operations on the compiler::true type rather than a runtime boolean.

not(true) -> (false)

not - logical inverse

Defined in: std/core/bool.s line 30

This operates on boolean values at runtime.

not(bool) -> (bool)

Number

nat - an unsigned integer value

Defined by the compiler

Represents values in the range 0 to 2^64-1.

nat() -> (nat)

float

Defined by the compiler

float() -> (float)

int - a signed integer value

Defined by the compiler

Represents values in the range 2^-63 to 2^63-1.

int() -> (int)

is_different

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, nat y) -> (false)

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, int y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(nat x, float y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, nat y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, int y) -> (false)

is_different

Defined in: std/core/numbers.s line 23

is_different(int x, float y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, nat y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, int y) -> (true)

is_different

Defined in: std/core/numbers.s line 23

is_different(float x, float y) -> (false)

neg

neg - negative of a number

Defined in: std/core/numbers.s line 68

neg(nat) -> (nat)

neg - negative of a number

Defined in: std/core/numbers.s line 68

neg(int) -> (int)

neg - negative of a number

Defined in: std/core/numbers.s line 68

neg(float) -> (float)

add

add - add

Defined in: std/core/numbers.s line 73

Adds two numbers of the same type. This is an overload for the + operator.

add(nat x, nat y) -> (nat)

add - add

Defined in: std/core/numbers.s line 73

Adds two numbers of the same type. This is an overload for the + operator.

add(int x, int y) -> (int)

add - add

Defined in: std/core/numbers.s line 73

Adds two numbers of the same type. This is an overload for the + operator.

add(float x, float y) -> (float)

add - pointer addition

Defined in: std/unsafe.s line 54

Adds a natural number offset to a pointer.

Warning: Its usage in unsafe and guarded under std/unsafe.s.
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})

add

Defined in: std/core/string.s line 302

add(edit list, cstr _s1, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

add

Defined in: std/core/string.s line 302

add(edit list, cstr _s1, str) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

add

Defined in: std/core/string.s line 302

add(edit list, str, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

add

Defined in: std/core/string.s line 302

add(edit list, str, str) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

add

Defined in: std/core/string.s line 302

add(edit circular, cstr _s1, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. does not fit in circular arena
  7. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit circular, cstr _s1, str) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. does not fit in circular arena
  7. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit circular, str, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. does not fit in circular arena
  7. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit circular, str, str) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. does not fit in circular arena
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. null pointer
  7. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit arena, cstr _s1, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit arena, cstr _s1, str) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit arena, str, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(edit arena, str, str) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative

add

Defined in: std/core/string.s line 302

add(new CHARS, cstr _s1, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add

Defined in: std/core/string.s line 302

add(new CHARS, cstr _s1, str) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add

Defined in: std/core/string.s line 302

add(new CHARS, str, cstr _s2) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add

Defined in: std/core/string.s line 302

add(new CHARS, str, str) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type
  6. out of bounds
  7. arena is out of space
  8. can only define strings on contiguous buffers
  9. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(new FLOATS, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(edit arena, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

add - vector addition

Defined in: std/sci/vec.s line 71

Grabs an FLOATS for the result as an effect.

add(edit circular, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 71

Grabs an FLOATS for the result as an effect.

add(edit arena, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 71

Grabs an FLOATS for the result as an effect.

add(new FLOATS, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(edit circular, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(edit circular, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(edit arena, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

add - vector addition

Defined in: std/sci/vec.s line 60

Grabs an FLOATS for the result as an effect.

add(new FLOATS, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. different vector sizes

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul

mul - multiply with

Defined in: std/core/numbers.s line 81

Multiplies two numbers of the same type. This is an overload for the * operator.

mul(nat x, nat y) -> (nat)

mul - multiply with

Defined in: std/core/numbers.s line 81

Multiplies two numbers of the same type. This is an overload for the * operator.

mul(int x, int y) -> (int)

mul - multiply with

Defined in: std/core/numbers.s line 81

Multiplies two numbers of the same type. This is an overload for the * operator.

mul(float x, float y) -> (float)

mul - vector multiplication

Defined in: std/sci/vec.s line 106

Grabs an FLOATS for the result as an effect.

mul(edit circular, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 106

Grabs an FLOATS for the result as an effect.

mul(edit arena, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 106

Grabs an FLOATS for the result as an effect.

mul(new FLOATS, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(edit circular, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(edit circular, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(edit arena, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(edit arena, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(new FLOATS, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - vector multiplication

Defined in: std/sci/vec.s line 95

Grabs an FLOATS for the result as an effect.

mul(new FLOATS, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. different vector sizes

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 102

Grabs an allocator for the result as an effect.

mul(edit arena, mat, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. null pointer
  3. column out of bounds
  4. row out of bounds
  5. inner dimensions must agree
  6. iteration end
  7. iterator range
  8. arena is out of space
  9. can only place matrices on contiguous buffers

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 102

Grabs an allocator for the result as an effect.

mul(new FLOATS, mat, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. null pointer
  2. column out of bounds
  3. row out of bounds
  4. inner dimensions must agree
  5. iteration end
  6. iterator range
  7. allocation failed
  8. cannot resize buffers with alloc; it promises no data reallocation
  9. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 90

Grabs an allocator for the result as an effect.

mul(edit circular, vec, mat) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. row out of bounds
  3. column out of bounds
  4. vector length must match matrix rows
  5. iteration end
  6. iterator range
  7. out of bounds
  8. does not fit in circular arena
  9. can only place vectors on contiguous buffers
  10. cannot place vectors on buffer offsets

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 90

Grabs an allocator for the result as an effect.

mul(edit arena, vec, mat) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. column out of bounds
  3. row out of bounds
  4. vector length must match matrix rows
  5. iteration end
  6. iterator range
  7. out of bounds
  8. arena is out of space
  9. can only place vectors on contiguous buffers
  10. cannot place vectors on buffer offsets

mul - vector-matrix multiplication

Defined in: std/sci/mat.s line 90

Grabs an allocator for the result as an effect.

mul(new FLOATS, vec, mat) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. row out of bounds
  3. column out of bounds
  4. vector length must match matrix rows
  5. iteration end
  6. iterator range
  7. allocation failed
  8. cannot resize buffers with alloc; it promises no data reallocation
  9. cannot allocate a buffer of unsized type
  10. out of bounds

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 78

Grabs an allocator for the result as an effect.

mul(edit circular, mat, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. row out of bounds
  3. matrix columns must match vector length
  4. column out of bounds
  5. iteration end
  6. iterator range
  7. out of bounds
  8. does not fit in circular arena
  9. can only place vectors on contiguous buffers
  10. cannot place vectors on buffer offsets

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 78

Grabs an allocator for the result as an effect.

mul(edit arena, mat, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. column out of bounds
  3. matrix columns must match vector length
  4. row out of bounds
  5. iteration end
  6. iterator range
  7. out of bounds
  8. arena is out of space
  9. can only place vectors on contiguous buffers
  10. cannot place vectors on buffer offsets

mul - matrix-vector multiplication

Defined in: std/sci/mat.s line 78

Grabs an allocator for the result as an effect.

mul(new FLOATS, mat, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. null pointer
  2. row out of bounds
  3. matrix columns must match vector length
  4. column out of bounds
  5. iteration end
  6. iterator range
  7. allocation failed
  8. cannot resize buffers with alloc; it promises no data reallocation
  9. cannot allocate a buffer of unsized type
  10. out of bounds

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 71

mul(edit circular, coo, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. null pointer
  3. row out of bounds
  4. column out of bounds
  5. inner dimensions must agree
  6. iteration end
  7. iterator range
  8. out of bounds
  9. does not fit in circular arena
  10. can only place matrices on contiguous buffers

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 71

mul(edit arena, coo, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. null pointer
  3. row out of bounds
  4. column out of bounds
  5. inner dimensions must agree
  6. iteration end
  7. iterator range
  8. out of bounds
  9. arena is out of space
  10. can only place matrices on contiguous buffers

mul - sparse*dense matrix multiplication

Defined in: std/sci/coo.s line 71

mul(new FLOATS, coo, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. null pointer
  2. row out of bounds
  3. column out of bounds
  4. inner dimensions must agree
  5. iteration end
  6. iterator range
  7. allocation failed
  8. cannot resize buffers with alloc; it promises no data reallocation
  9. cannot allocate a buffer of unsized type
  10. out of bounds

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 61

*Warning: the expression self(v)*m yields wrong values

mul(edit circular, vec, coo) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. vector length must match matrix rows
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 61

*Warning: the expression self(v)*m yields wrong values

mul(edit arena, vec, coo) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. vector length must match matrix rows
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

mul - vector*sparse matrix multiplication

Defined in: std/sci/coo.s line 61

*Warning: the expression self(v)*m yields wrong values

mul(new FLOATS, vec, coo) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. vector length must match matrix rows
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 53

mul(edit circular, coo, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. matrix columns must match vector length
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 53

mul(edit arena, coo, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. matrix columns must match vector length
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

mul - sparse matrix*vector multiplication

Defined in: std/sci/coo.s line 53

mul(new FLOATS, coo, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. matrix columns must match vector length
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mul - matrix-matrix multiplication

Defined in: std/sci/mat.s line 102

Grabs an allocator for the result as an effect.

mul(edit circular, mat, mat) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. null pointer
  3. column out of bounds
  4. row out of bounds
  5. inner dimensions must agree
  6. iteration end
  7. iterator range
  8. does not fit in circular arena
  9. can only place matrices on contiguous buffers

div

div - divide by

Defined in: std/core/numbers.s line 89

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

div(float x, float y) -> (float)

Potential errors:

  1. division by zero

div - divide by

Defined in: std/core/numbers.s line 89

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

div(int x, int y) -> (int)

Potential errors:

  1. division by zero

div - divide by

Defined in: std/core/numbers.s line 89

Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.

div(nat x, nat y) -> (nat)

Potential errors:

  1. division by zero

div - vector division

Defined in: std/sci/vec.s line 143

Grabs an FLOATS for the result as an effect.

div(edit circular, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

div - vector division

Defined in: std/sci/vec.s line 143

Grabs an FLOATS for the result as an effect.

div(edit arena, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

div - vector division

Defined in: std/sci/vec.s line 143

Grabs an FLOATS for the result as an effect.

div(new FLOATS, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(edit circular, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(edit circular, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets
  7. different vector sizes

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(edit arena, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(edit arena, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. division by zero
  5. can only place vectors on contiguous buffers
  6. cannot place vectors on buffer offsets
  7. different vector sizes

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(new FLOATS, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

div - vector division

Defined in: std/sci/vec.s line 131

Grabs an FLOATS for the result as an effect.

div(new FLOATS, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero
  4. cannot allocate a buffer of unsized type
  5. allocation failed
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. different vector sizes

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mod

mod - modulo by

Defined in: std/core/numbers.s line 101

Computes the modulo between two natural numbers. This is an overload for the % operator.

mod(nat x, nat y) -> (nat)

Potential errors:

  1. modulo by zero

lt

lt - less than

Defined in: std/core/numbers.s line 110

Compares two numbers of the same type. This is an overload for the < operator.

lt(nat x, nat y) -> (bool)

lt - less than

Defined in: std/core/numbers.s line 110

Compares two numbers of the same type. This is an overload for the < operator.

lt(float x, float y) -> (bool)

lt - less than

Defined in: std/core/numbers.s line 110

Compares two numbers of the same type. This is an overload for the < operator.

lt(int x, int y) -> (bool)

gt

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 118

greater than

gt(float x, float y) -> (bool)

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 118

greater than

gt(int x, int y) -> (bool)

gt - Compares two numbers of the same type. This is an overload for the > operator.

Defined in: std/core/numbers.s line 118

greater than

gt(nat x, nat y) -> (bool)

le

le - less than or equal to

Defined in: std/core/numbers.s line 126

Compares two numbers of the same type. This is an overload for the <= operator.

le(nat x, nat y) -> (bool)

le - less than or equal to

Defined in: std/core/numbers.s line 126

Compares two numbers of the same type. This is an overload for the <= operator.

le(float x, float y) -> (bool)

le - less than or equal to

Defined in: std/core/numbers.s line 126

Compares two numbers of the same type. This is an overload for the <= operator.

le(int x, int y) -> (bool)

ge

ge - greater than or equal to

Defined in: std/core/numbers.s line 134

Compares two numbers of the same type. This is an overload for the >= operator.

ge(nat x, nat y) -> (bool)

ge - greater than or equal to

Defined in: std/core/numbers.s line 134

Compares two numbers of the same type. This is an overload for the >= operator.

ge(int x, int y) -> (bool)

ge - greater than or equal to

Defined in: std/core/numbers.s line 134

Compares two numbers of the same type. This is an overload for the >= operator.

ge(float x, float y) -> (bool)

sub

sub - subtract by

Defined in: std/core/numbers.s line 142

Subtracts two numbers of the same type. This is an overload for the - operator. Natural numbers are safeguarded against acquiring negative results, which would overflow.

sub(nat x, nat y) -> (nat)

Potential errors:

  1. nat subtraction would yield a negative

sub - subtract by

Defined in: std/core/numbers.s line 142

Subtracts two numbers of the same type. This is an overload for the - operator.

sub(int x, int y) -> (int)

sub - subtract by

Defined in: std/core/numbers.s line 142

Subtracts two numbers of the same type. This is an overload for the - operator.

sub(float x, float y) -> (float)

sub - vector subtraction

Defined in: std/sci/vec.s line 87

Grabs an FLOATS for the result as an effect.

sub(edit circular, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 87

Grabs an FLOATS for the result as an effect.

sub(edit arena, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 87

Grabs an FLOATS for the result as an effect.

sub(new FLOATS, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(edit circular, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(edit circular, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(edit arena, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(edit arena, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(new FLOATS, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

sub - vector subtraction

Defined in: std/sci/vec.s line 76

Grabs an FLOATS for the result as an effect.

sub(new FLOATS, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. different vector sizes

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

pow

pow - exponentiate by

Defined in: std/core/numbers.s line 154

Exponentiates a natural number by another.

pow(nat x, nat y) -> (mut nat)

pow

Defined in: std/sci/math.s line 58

pow(float x, float y) -> (float)

pow - vector exponentiation

Defined in: std/sci/vec.s line 123

Grabs an FLOATS for the result as an effect.

pow(edit circular, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 123

Grabs an FLOATS for the result as an effect.

pow(edit arena, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 123

Grabs an FLOATS for the result as an effect.

pow(new FLOATS, float v1, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(edit circular, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(edit circular, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(edit arena, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(edit arena, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets
  6. different vector sizes

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(new FLOATS, vec, float v2) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

pow - vector exponentiation

Defined in: std/sci/vec.s line 112

Grabs an FLOATS for the result as an effect.

pow(new FLOATS, vec, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. cannot allocate a buffer of unsized type
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. different vector sizes

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

console

console - references the system console

Defined in: std/core/print.s line 20

As a singleton, the console should usually be instantiated in the main() function and then passed to dependent calls, for example via an an effect for convenience. Standard library print functions provide the CLI effect and you can propagate to this by prepending effect edit console CLI to function arguments.

The console is a zero-cost abstraction in that it does not transfer any data but relies on singleton safety to synchronize io across threads. Quickly print internals for debugging without with unsafe_console().

console() -> (console)

unsafe_console

unsafe_console - references the system console unsafely

Defined in: std/core/print.s line 35

This is convenient for print debugging by writing unsafe_console().print ... without needing to evoke an effect to pass the normally singleton console.

unsafe_console() -> (console)

flush

flush - flushes the print buffer on the console

Defined in: std/core/print.s line 43

flush(console) -> () with effects CLI

nn

nn - no new line

Defined in: std/core/print.s line 47

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

nn(nat) -> (nat value, cstr)

nn - no new line

Defined in: std/core/print.s line 47

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

nn(int) -> (int value, cstr)

nn - no new line

Defined in: std/core/print.s line 47

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

nn(float) -> (float value, cstr)

nn - no new line

Defined in: std/core/print.s line 47

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without automatically adding a new line.

nn(cstr) -> (cstr value, cstr)

nn - no new line

Defined in: std/core/string.s line 295

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without a new line.

nn(str) -> (str, cstr)

nn - no new line

Defined in: std/sci/vec.s line 214

Given a value, creates a tuple of (value, ""). This enables the pattern ‘print nn value’ to print without a new line.

nn(vec) -> (vec, cstr)

print

Defined in: std/core/print.s line 83

Automatically ends the line too.

print(console CLI, bool value) -> () with effects CLI

Defined in: std/core/print.s line 83

print(console CLI, bool value, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 76

Automatically ends the line too.

print(console CLI, nat value) -> () with effects CLI

Defined in: std/core/print.s line 76

print(console CLI, nat value, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 69

Automatically ends the line too.

print(console CLI, int value) -> () with effects CLI

Defined in: std/core/print.s line 69

print(console CLI, int value, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 61

To pre-specified 6 decimal digits. Automatically ends the line too.

print(console CLI, float value) -> () with effects CLI

Defined in: std/core/print.s line 61

To pre-specified 6 decimal digits.

print(console CLI, float value, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 54

Automatically ends the line too.

print(console CLI, cstr value) -> () with effects CLI

Defined in: std/core/print.s line 54

print(console CLI, cstr value, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 90

print(console CLI, true, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 90

Automatically ends the line too.

print(console CLI, true) -> () with effects CLI

Defined in: std/core/print.s line 97

print(console CLI, false, cstr endl) -> () with effects CLI

Defined in: std/core/print.s line 97

Automatically ends the line too.

print(console CLI, false) -> () with effects CLI

Defined in: std/core/string.s line 245

Ends the line too.

print(console CLI, char c) -> () with effects CLI

Defined in: std/core/string.s line 245

print(console CLI, char c, cstr endl) -> () with effects CLI

Defined in: std/core/string.s line 234

Ends the line too.

print(console CLI, str) -> () with effects CLI

Defined in: std/core/string.s line 234

print(console CLI, str, cstr endl) -> () with effects CLI

Defined in: std/io/file.s line 113

print(edit write, cstr text) -> ()

Potential errors:

  1. failed to write to closed file

Defined in: std/io/file.s line 113

print(edit write, cstr text) -> ()

Potential errors:

  1. failed to write to closed file

Defined in: std/io/file.s line 113

print(edit terminal, cstr text) -> ()

Potential errors:

  1. failed to write to closed file

Defined in: std/io/file.s line 107

print(edit write, str) -> ()

Potential errors:

  1. failed to write to closed file
  2. failed to write to file

Defined in: std/io/file.s line 107

print(edit terminal, str) -> ()

Potential errors:

  1. failed to write to closed file
  2. failed to write to file

Defined in: std/io/file.s line 107

print(edit write, str) -> ()

Potential errors:

  1. failed to write to closed file
  2. failed to write to file

Defined in: std/sci/vec.s line 221

Prints as a row, such as [ 1.0 2.0 3.0 ]

print(console CLI, vec) -> () with effects CLI

Potential errors:

  1. out of bounds
  2. null pointer
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range

Defined in: std/sci/vec.s line 221

Prints as a row, such as [ 1.0 2.0 3.0 ]

print(console CLI, vec, cstr endl) -> () with effects CLI

Potential errors:

  1. out of bounds
  2. null pointer
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range

Defined in: std/sci/coo.s line 87

Prints it as coordinate as list: (i, j): v

print(console CLI, coo) -> () with effects CLI

No failing errors, but can catch these intercepted ones:

  1. null pointer

Defined in: std/sci/coo.s line 87

Prints it as coordinate as list: (i, j): v

print(console CLI, coo, cstr endl) -> () with effects CLI

No failing errors, but can catch these intercepted ones:

  1. null pointer

Defined in: std/sci/mat.s line 116

single-row matrices stay on one line; taller ones get top/mid/bottom brackets

print(console CLI, mat) -> () with effects CLI

Potential errors:

  1. null pointer
  2. column out of bounds
  3. row out of bounds
  4. nat subtraction would yield a negative
  5. iteration end
  6. iterator range

Defined in: std/sci/mat.s line 116

single-row matrices stay on one line; taller ones get top/mid/bottom brackets

print(console CLI, mat, cstr endl) -> () with effects CLI

Potential errors:

  1. null pointer
  2. column out of bounds
  3. row out of bounds
  4. nat subtraction would yield a negative
  5. iteration end
  6. iterator range

supports_ansi

supports_ansi

Defined in: std/core/print.s line 104

supports_ansi(console) -> (bool)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [supports_ansi()]

colors

colors

Defined in: std/core/print.s line 109

colors(console) -> (colors)

Returned values defer use of the following functions:


set

set

Defined in: std/core/print.s line 182

set(colors, "reset_underline") -> ()

set

Defined in: std/core/print.s line 180

set(colors, "reset_bold") -> ()

set

Defined in: std/core/print.s line 178

set(colors, "reset_bg") -> ()

set

Defined in: std/core/print.s line 176

set(colors, "reset_color") -> ()

set

Defined in: std/core/print.s line 174

set(colors, "reset") -> ()

set

Defined in: std/core/print.s line 172

set(colors, "strikethrough") -> ()

set

Defined in: std/core/print.s line 170

set(colors, "reverse") -> ()

set

Defined in: std/core/print.s line 168

set(colors, "blink") -> ()

set

Defined in: std/core/print.s line 166

set(colors, "underline") -> ()

set

Defined in: std/core/print.s line 164

set(colors, "italic") -> ()

set

Defined in: std/core/print.s line 162

set(colors, "dim") -> ()

set

Defined in: std/core/print.s line 160

set(colors, "bold") -> ()

set

Defined in: std/core/print.s line 158

set(colors, "bg_black") -> ()

set

Defined in: std/core/print.s line 156

set(colors, "bg_white") -> ()

set

Defined in: std/core/print.s line 154

set(colors, "bg_cyan") -> ()

set

Defined in: std/core/print.s line 152

set(colors, "bg_magenta") -> ()

set

Defined in: std/core/print.s line 150

set(colors, "bg_blue") -> ()

set

Defined in: std/core/print.s line 148

set(colors, "bg_yellow") -> ()

set

Defined in: std/core/print.s line 146

set(colors, "bg_green") -> ()

set

Defined in: std/core/print.s line 144

set(colors, "bg_red") -> ()

set

Defined in: std/core/print.s line 142

set(colors, "bright_white") -> ()

set

Defined in: std/core/print.s line 136

set(colors, "bright_blue") -> ()

set

Defined in: std/core/print.s line 138

set(colors, "bright_magenta") -> ()

set

Defined in: std/core/print.s line 140

set(colors, "bright_cyan") -> ()

set

Defined in: std/core/print.s line 126

set(colors, "white") -> ()

set

Defined in: std/core/print.s line 124

set(colors, "cyan") -> ()

set

Defined in: std/core/print.s line 122

set(colors, "magenta") -> ()

set

Defined in: std/core/print.s line 120

set(colors, "blue") -> ()

set

Defined in: std/core/print.s line 118

set(colors, "yellow") -> ()

set

Defined in: std/core/print.s line 116

set(colors, "green") -> ()

set

Defined in: std/core/print.s line 114

set(colors, "red") -> ()

set

Defined in: std/core/print.s line 134

set(colors, "bright_yellow") -> ()

set

Defined in: std/core/print.s line 132

set(colors, "bright_green") -> ()

set

Defined in: std/core/print.s line 130

set(colors, "bright_red") -> ()

set

Defined in: std/core/print.s line 128

set(colors, "black") -> ()

exists

exists - checks that a pointer exists

Defined in: std/core/convert.s line 58

exists(any ptr) -> (bool)

exists - checks whether a cstr is not zero-initialized

Defined in: std/core/string.s line 30

exists(cstr) -> (bool)

bits

bits - bit representation

Defined in: std/core/convert.s line 76

Retrives the bit representation of a number of shift arithmetics and bitwise operations.

bits(float) -> (bits)

bits - bit representation

Defined in: std/core/convert.s line 69

Retrives the bit representation of a number of shift arithmetics and bitwise operations.

bits(int) -> (bits)

bits - bit representation

Defined in: std/core/convert.s line 63

Retrives the bit representation of a number of shift arithmetics and bitwise operations.

bits(nat) -> (bits)

lshift

lshift - left shift

Defined in: std/core/convert.s line 102

lshift(bits, nat y) -> (bits)

rshift

rshift - right shift

Defined in: std/core/convert.s line 107

rshift(bits, nat y) -> (bits)

xor

xor - bitwise xor

Defined in: std/core/convert.s line 112

xor(bits, bits) -> (bits)

band

band - bitwise and

Defined in: std/core/convert.s line 117

band(bits, bits) -> (bits)

bor

bor - bitwise or

Defined in: std/core/convert.s line 122

bor(bits, bits) -> (bits)

of

of - yields a pair of nats

Defined in: std/core/range.s line 24

Represents the range [from, to) where ‘from’ and ‘to’ are the arguments.

of(nat from, "to", nat to) -> (nat from, nat to)

of - yields a pair of nats

Defined in: std/core/range.s line 19

Represents the range [0, to) where ‘to’ its its arguments.

of(nat) -> (nat, nat to)

of - yields a pair of nats

Defined in: std/core/range.s line 34

Represents the range [from, from+length] where ‘from’ and ‘length’ are the arguments.

of(nat from, "len", nat length) -> (nat from, nat)

of - yields a pair of nats

Defined in: std/core/range.s line 29

Represents the range [from, to] where ‘from’ and ‘to’ are the arguments.

of(nat from, "upto", nat to) -> (nat from, nat)

range

range - constructs a range

Defined in: std/core/range.s line 39

Endpoints are natural numbers (unsigned integers). This is handy for several kinds of iteration.

range(nat _from, nat to) -> (edit range)

next

next - next range number

Defined in: std/core/range.s line 45

This increments the r.from position and returns the previous one.

next(edit range) -> (nat)

Potential errors:

  1. iteration end

next

Defined in: std/map.s line 38

next(robinhood_nat_entry[], mut nat pos) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer

next

Defined in: std/map.s line 38

next(robinhood_str_entry[], mut nat pos) -> (mut str)

Potential errors:

  1. out of bounds
  2. null pointer

next - Computes the next random number of a Rand sequence.

Defined in: std/rand.s line 88

next(mut Rand) -> (float)

get

get - get a list element pointer

Defined in: std/core/allocators.s line 52

get(list, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})

Potential errors:

  1. out of bounds

get - get a list element pointer

Defined in: std/core/allocators.s line 52

get(circular, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})

Potential errors:

  1. out of bounds

get - get a pointer to a buffer element

Defined in: std/core/array.s line 89

get(any[], nat i) -> (any ptr {follows any ptr buffer.unsafe_ptr})

Potential errors:

  1. out of bounds

get - assert that a number lies in the range

Defined in: std/core/range.s line 54

The item itself is returned. This lets the range be used as an iterator per a pattern like for i in range 10 ....

get(range, nat pos) -> (nat)

Potential errors:

  1. iteration end
  2. iterator range

get - a character in a string

Defined in: std/core/string.s line 241

get(str, nat i) -> (char ptr)

get

Defined in: std/io.s line 10

get(edit circular, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit arena, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file

get

Defined in: std/io.s line 10

get(edit arena, edit terminal, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit arena, edit write, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned. This version downloads to a ‘.tmp’ file.

get(console CLI, str) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned.

get(console CLI, str, cstr path) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned.

get(console CLI, str, str) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned.

get(console CLI, cstr url, str) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get

Defined in: std/io.s line 10

get(edit arena, edit write, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit arena, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit arena, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 7

get(edit open, nat) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. not open dir
  6. end of dir

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned. This version downloads to a ‘.tmp’ file.

get(console CLI, cstr url) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get - GET with system curl

Defined in: std/io/web.s line 15

This creates a GET request using the system’s curl. This implementation is ideal for obtaining individual files without additional dependencies. Retrieved data are saved to a specified file path, overwriting it. For ease of use, the path is returned.

get(console CLI, cstr url, cstr path) -> (str) with effects CLI

Potential errors:

  1. null pointer
  2. unsanitized command: shell metacharacter detected
  3. system call failed
  4. allocation failed
  5. cannot resize buffers with alloc; it promises no data reallocation
  6. cannot allocate a buffer of unsized type
  7. out of bounds
  8. arena is out of space
  9. can only define strings on contiguous buffers
  10. can only define strings on non-offset buffers
  11. string does not fit on buffer

get - get a hash map entry

Defined in: std/map.s line 28

Implemented for string or cstr keys but buffer of any values.

get(robinhood_nat_entry[], any[], nat key) -> (any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

get - get a hash map entry

Defined in: std/map.s line 18

Implemented for string or cstr keys but buffer of any values.

get(robinhood_str_entry[], any[], str) -> (any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

get - get a hash map entry

Defined in: std/map.s line 18

Implemented for string or cstr keys but buffer of any values.

get(robinhood_str_entry[], any[], cstr key) -> (any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. index not found

get

Defined in: std/io.s line 10

get(edit circular, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. end of file

get

Defined in: std/io.s line 10

get(edit circular, edit terminal, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit circular, edit write, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit circular, edit write, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get

Defined in: std/io.s line 10

get(edit circular, edit open, nat) -> (str) with effects CHARS

Potential errors:

  1. not open file
  2. out of bounds
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers
  6. nat subtraction would yield a negative
  7. end of file

get - get a vector element at given position

Defined in: std/sci/vec.s line 49

get(vec, nat i) -> (float ptr)

Potential errors:

  1. out of bounds

get - reference to matrix element (i,j)

Defined in: std/sci/mat.s line 49

get(mat, nat i, nat j) -> (float ptr)

Potential errors:

  1. row out of bounds
  2. column out of bounds

get - get a sparse element

Defined in: std/sci/coo.s line 43

get(coo, nat k) -> (sparse_element ptr)

Potential errors:

  1. out of bounds

KB

KB - kilobytes to bytes

Defined in: std/core/units.s line 19

KB(nat) -> (nat)

MB

MB - megabytes to bytes

Defined in: std/core/units.s line 23

MB(nat) -> (nat)

GB

GB - gigabytes to bytes

Defined in: std/core/units.s line 27

GB(nat) -> (nat)

alloc

alloc

Defined in: std/core/string.s line 26

alloc(new CHARS, nat length) -> (edit allocated) with effects CHARS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - list allocation

Defined in: std/core/allocators.s line 85

Creates room for one element.

alloc(edit list) -> (edit allocated)

Potential errors:

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer

alloc - list allocation

Defined in: std/core/allocators.s line 85

alloc(edit list, nat length) -> (edit allocated)

Potential errors:

  1. division by zero
  2. reallocation failed
  3. cannot resize an unallocated or freed buffer

alloc - circular arena allocation

Defined in: std/core/allocators.s line 71

Creates room for one element.

alloc(edit circular) -> (edit allocated)

Potential errors:

  1. does not fit in circular arena

alloc - circular arena allocation

Defined in: std/core/allocators.s line 71

alloc(edit circular, nat length) -> (edit allocated)

Potential errors:

  1. does not fit in circular arena

alloc - arena allocation

Defined in: std/core/allocators.s line 60

Creates room for one element.

alloc(edit arena) -> (edit allocated)

Potential errors:

  1. arena is out of space

alloc - arena allocation

Defined in: std/core/allocators.s line 60

alloc(edit arena, nat length) -> (edit allocated)

Potential errors:

  1. arena is out of space

alloc - allocate a char[] buffer

Defined in: std/core/array.s line 52

alloc(nat) -> (edit char[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 28

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. For convenience for usage within loops, allocation of the same size only zero-initializes the buffer. If a different size is given, and the buffer is non-empty, this fails. Consider freeing the buffer first with del buffer to allocate again, or use ‘buffer.resize new_size’ once a first non-zero allocation has been made. This version allocates a buffer of ONE element, which can be used for stable indirection.

alloc(edit any[]) -> (edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 28

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. For convenience for usage within loops, allocation of the same size only zero-initializes the buffer. If a different size is given, and the buffer is non-empty, this fails. Consider freeing the buffer first with del buffer to allocate again, or use ‘buffer.resize new_size’ once a first non-zero allocation has been made. This version allocates a buffer of ONE element, which can be used for stable indirection.

alloc(edit any[], "dirty") -> (edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 28

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. For convenience for usage within loops, allocation of the same size only zero-initializes the buffer. If a different size is given, and the buffer is non-empty, this fails. Consider freeing the buffer first with del buffer to allocate again, or use ‘buffer.resize new_size’ once a first non-zero allocation has been made.

alloc(edit any[], nat size) -> (edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - allocates a buffer

Defined in: std/core/array.s line 28

Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. For convenience for usage within loops, allocation of the same size only zero-initializes the buffer. If a different size is given, and the buffer is non-empty, this fails. Consider freeing the buffer first with del buffer to allocate again, or use ‘buffer.resize new_size’ once a first non-zero allocation has been made.

alloc(edit any[], nat size, "dirty") -> (edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

alloc - allocate memory

Defined in: std/unsafe.s line 19

Allocates a memory of the provided size in bytes.

Warning: Its usage in unsafe and guarded under std/unsafe.s.
alloc(nat) -> (mut any ptr)

Potential errors:

  1. allocation failed

resize

resize - resize the buffer

Defined in: std/core/array.s line 56

For stability of data structures, this does nothing if the previous size is the same or less. If old size was zero, an error is created instead of allocating so that this does not leak resources.

resize(edit any[], nat size) -> (edit any[])

Potential errors:

  1. reallocation failed
  2. cannot resize an unallocated or freed buffer

resize - resize the buffer

Defined in: std/core/array.s line 56

For stability of data structures, this does nothing if the previous size is the same or less. If old size was zero, an error is created instead of allocating so that this does not leak resources.

resize(edit any[], nat size, "unsafe") -> (edit any[])

Potential errors:

  1. reallocation failed

last

last - get a pointer to the last buffer element

Defined in: std/core/array.s line 74

last(any[]) -> (any ptr {follows any ptr buffer.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. nat subtraction would yield a negative

mutlast

mutlast - get a mutable pointer to the last buffer element

Defined in: std/core/array.s line 79

mutlast(edit any[]) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. nat subtraction would yield a negative

mutget

mutget - get a list element pointer

Defined in: std/core/allocators.s line 56

mutget(edit list, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})

Potential errors:

  1. out of bounds

mutget - get a list element pointer

Defined in: std/core/allocators.s line 56

mutget(edit circular, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})

Potential errors:

  1. out of bounds

mutget - get a mutable pointer to a buffer element

Defined in: std/core/array.s line 84

mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})

Potential errors:

  1. out of bounds

mutget - get a mutable hash map entry

Defined in: std/map.s line 33

Implemented for string or cstr keys but buffer of any values.

mutget(edit robinhood_nat_entry[], edit any[], nat key) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. string buffer is full
  6. iteration end
  7. iterator range

mutget - get a mutable hash map entry

Defined in: std/map.s line 23

Implemented for string or cstr keys but buffer of any values.

mutget(edit robinhood_str_entry[], edit any[], str) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. string buffer is full
  6. iteration end
  7. iterator range

mutget - get a mutable hash map entry

Defined in: std/map.s line 23

Implemented for string or cstr keys but buffer of any values.

mutget(edit robinhood_str_entry[], edit any[], cstr key) -> (mut any ptr {follows any ptr values.unsafe_ptr})

Potential errors:

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. string buffer is full

mutget - modify a vector element at given position

Defined in: std/sci/vec.s line 44

mutget(edit vec, nat i) -> (mut float ptr)

Potential errors:

  1. out of bounds

mutget - mutable reference to matrix element (i,j)

Defined in: std/sci/mat.s line 43

mutget(edit mat, nat i, nat j) -> (mut float ptr)

Potential errors:

  1. row out of bounds
  2. column out of bounds

mutget - mutable reference to a sparse element

Defined in: std/sci/coo.s line 48

mutget(edit coo, nat k) -> (mut sparse_element ptr)

Potential errors:

  1. out of bounds

len

len - string length

Defined in: std/core/string.s line 102

len(str) -> (nat)

len - the number of buffer elements

Defined in: std/core/array.s line 94

len(any[]) -> (nat)

len - vectot length

Defined in: std/sci/vec.s line 40

len(vec) -> (nat)

new

new - allocations on new bufs

Defined in: std/core/allocators.s line 5

new() -> (new)

arena

arena

Defined in: std/core/string.s line 23

arena(char) -> (edit arena)

arena - a buffer and mutable position pair

Defined in: std/core/allocators.s line 16

The position starts from 0. This structure is often used to track the size of allocated data within the buffer.

arena(edit any[]) -> (edit arena)

arena - a buffer and mutable position pair

Defined in: std/core/allocators.s line 9

The position starts from 0. This structure is often used to track the size of allocated data within the buffer.

arena(edit any[], nat _pos) -> (edit arena)

arena

Defined in: std/sci/vec.s line 6

arena(float) -> (edit arena)

arena

Defined in: std/sci/vec.s line 240

arena(edit vec) -> (edit arena)

allocated

allocated

Defined in: std/core/allocators.s line 22

allocated(edit any[], nat pos) -> (edit allocated)

status

status - convert to a nameless buffer and position pair

Defined in: std/core/allocators.s line 25

This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.

status(allocated) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)

status - convert to a nameless buffer and position pair

Defined in: std/core/allocators.s line 25

This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.

status(arena) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)

circular

circular

Defined in: std/core/string.s line 24

circular(char) -> (edit circular)

circular - circular buf

Defined in: std/core/allocators.s line 39

circular(edit any[]) -> (edit circular)

circular

Defined in: std/sci/vec.s line 7

circular(float) -> (edit circular)

list

list

Defined in: std/core/string.s line 25

list(char) -> (edit list)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

list - list of buf

Defined in: std/core/allocators.s line 44

List defined over a mutable buf that is automatically managed and resized. A capacity is maintained so that resizes are not performed too frequently.

list(edit any[]) -> (edit list)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

list

Defined in: std/sci/vec.s line 8

list(float) -> (edit list)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

at

at - get a mutable pointer to the last buffer element

Defined in: std/core/allocators.s line 97

at(edit allocated) -> (mut any ptr {follows any ptr surface.buf.unsafe_ptr})

Potential errors:

  1. out of bounds

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 72

at(edit robinhood_str_entry[], str) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. string buffer is full
  6. iteration end
  7. iterator range

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 72

at(edit robinhood_str_entry[], cstr _k) -> (mut nat)

Potential errors:

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. string buffer is full

at - find or add an item in a robinhood_entry list

Defined in: std/hash.s line 72

at(edit robinhood_nat_entry[], nat _k) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. string buffer is full
  6. iteration end
  7. iterator range

at

Defined in: std/sci/vec.s line 57

at(vec, nat i) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

at

Defined in: std/sci/vec.s line 54

at(float number, nat i) -> (float)

char_allocator

list

Defined in: std/core/string.s line 25

list(char) -> (edit list)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

circular

Defined in: std/core/string.s line 24

circular(char) -> (edit circular)

arena

Defined in: std/core/string.s line 23

arena(char) -> (edit arena)

new - allocations on new bufs

Defined in: std/core/allocators.s line 5

new() -> (new)

strdat

strdat - string data without the buffer storage

Defined in: std/core/string.s line 35

strdat(nat pos, nat length, char first) -> (nat pos, nat length, char first)

strdat

Defined in: std/mini.s line 41

strdat(nat _pos, nat _length) -> (nat16 pos, nat16 length)

Potential errors:

  1. nat value too large to pack in nat16

str

str - convert to string

Defined in: std/core/string.s line 91

Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.

str(cstr) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 84

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat endpos, "from", nat pos) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative

str - a string residing on a buffer

Defined in: std/core/string.s line 75

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat pos, "to", nat endpos) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative

str - a string residing on a buffer

Defined in: std/core/string.s line 67

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat pos, "len", nat length) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

str - tautology function for strings

Defined in: std/core/string.s line 63

str(str) -> (str)

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 55

str(char[]) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 55

str(char[], nat length) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on a buffer

Defined in: std/core/string.s line 48

str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str)

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 43

str(char ptr unsafe_ptr, nat pos, nat length) -> (str)

str - a string residing on a buffer

Defined in: std/core/string.s line 39

str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str)

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

The read string is placed onto memory that keeps being reallocated to accommodate its size. The resulting memory will consume exactly the required size in bytes.

str(new CHARS, console console) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. allocation failed
  5. reallocation failed
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. cannot allocate a buffer of unsized type
  8. cannot resize an unallocated or freed buffer
  9. out of bounds
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

The read string is placed on an arena while consuming only the necessarily minimum size.

str(edit arena, console console) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. read string does not fit on buffer

str - create a compact str

Defined in: std/mini.s line 54

The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.

str(cstr) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat value too large to pack in nat16

str - create a compact str

Defined in: std/mini.s line 46

The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.

str(str) -> (str)

Potential errors:

  1. nat value too large to pack in nat16

copy

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit list, cstr _other) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. division by zero
  6. reallocation failed
  7. cannot resize an unallocated or freed buffer

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit list, str) -> (str) with effects CHARS

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. division by zero
  4. reallocation failed
  5. cannot resize an unallocated or freed buffer

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit circular, cstr _other) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. does not fit in circular arena

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit circular, str) -> (str) with effects CHARS

Potential errors:

  1. does not fit in circular arena
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit arena, cstr _other) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only define strings on contiguous buffers
  5. can only define strings on non-offset buffers

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(edit arena, str) -> (str) with effects CHARS

Potential errors:

  1. arena is out of space
  2. can only define strings on contiguous buffers
  3. can only define strings on non-offset buffers

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(new CHARS, cstr _other) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. allocation failed
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

copy - copy a string to a new buffer

Defined in: std/core/string.s line 129

copy(new CHARS, str) -> (str) with effects CHARS

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

copy - copy a vector

Defined in: std/sci/vec.s line 232

Grabs a FLOATS for the result as an effect.

copy(edit circular, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

copy - copy a vector

Defined in: std/sci/vec.s line 232

Grabs a FLOATS for the result as an effect.

copy(edit arena, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

copy - copy a vector

Defined in: std/sci/vec.s line 232

Grabs a FLOATS for the result as an effect.

copy(new FLOATS, vec) -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

copy_null_terminated

copy_null_terminated - create null terminated string

Defined in: std/core/string.s line 136

Copies a string to a new buffer while ensuring null termination. This is mainly useful for supporting ‘cstr unsafe_temp’.

copy_null_terminated(new CHARS, str) -> (str) with effects CHARS

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

copy_null_terminated - copy a string while adding null termination

Defined in: std/core/string.s line 217

Constructs the copy on the buffer at a given position and returns it. The position is mutated to indicate where the string ends (e.g., to copy more strings). This operation may fail if the string does not fit the current allocation - prefer copying on a list mut char[] instead.

copy_null_terminated(edit arena, cstr _other) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string buffer out of memory

copy_null_terminated - copy a string while adding null termination

Defined in: std/core/string.s line 217

Constructs the copy on the buffer at a given position and returns it. The position is mutated to indicate where the string ends (e.g., to copy more strings). This operation may fail if the string does not fit the current allocation - prefer copying on a list mut char[] instead.

copy_null_terminated(edit arena, str) -> (str) with effects CHARS

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. string buffer out of memory

unsafe_temp

unsafe_temp - tautology function for cstr

Defined in: std/core/string.s line 168

This is mainly used as a stt-input counterpart for converting str|cstr to cstr.

unsafe_temp(cstr) -> (cstr cstr, str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

unsafe_temp - convert a string to a temporary null-terminated (cstr,str) pair

Defined in: std/core/string.s line 146

This function’s return is meant to be passed to operating system calls, or return from compt with the pattern ‘cstr unsafetemp stringvalue’. It will become invalid once the calling site ends. It also does not admit proper cstr equality comparisons via pointer values that reflect contents; it will always compare equal only to itself. An optimization that safely checks the last element and one position beyond the buffer’s contents for null termination is also employed. Modifying the string buffer in any capacity invalidates the null termination property, so in general do not manipulate strings while this is used in code; use it only for its intended purposes.

Warning: This is unsafe, unless ‘cstr unsafe_temp’ is the last call before passing data to ‘system’ or ‘compt’.
Info: This is safe to run during ‘compt’ in that the latter will fail gracefully.
unsafe_temp(str) -> (unsafe_temp)

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

endpos

endpos - the end position of a string

Defined in: std/core/string.s line 180

This position is computed relative to its start in its enclosing buffer.

endpos(str) -> (nat)

slice

slice

Defined in: std/core/string.s line 252

slice(str, nat from, nat to) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

slice

Defined in: std/core/string.s line 252

slice(cstr _s, nat from, nat to) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

starts_with

starts_with

Defined in: std/core/string.s line 261

starts_with(cstr _stack, cstr _needle) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

starts_with

Defined in: std/core/string.s line 261

starts_with(cstr _stack, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

starts_with

Defined in: std/core/string.s line 261

starts_with(str, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

starts_with

Defined in: std/core/string.s line 261

starts_with(str, cstr _needle) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

ends_with

ends_with

Defined in: std/core/string.s line 268

ends_with(str, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

ends_with

Defined in: std/core/string.s line 268

ends_with(str, cstr _needle) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

ends_with

Defined in: std/core/string.s line 268

ends_with(cstr _stack, str) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

ends_with

Defined in: std/core/string.s line 268

ends_with(cstr _stack, cstr _needle) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. slice out of string bounds

contains

contains

Defined in: std/core/string.s line 284

contains(str, str) -> (bool)

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. iteration end
  4. iterator range
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers
  8. slice out of string bounds

contains

Defined in: std/core/string.s line 284

contains(str, cstr _needle) -> (bool)

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. iteration end
  4. iterator range
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers
  8. slice out of string bounds

contains

Defined in: std/core/string.s line 284

contains(cstr _stack, str) -> (bool)

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. iteration end
  4. iterator range
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers
  8. slice out of string bounds

contains

Defined in: std/core/string.s line 284

contains(cstr _stack, cstr _needle) -> (bool)

Potential errors:

  1. null pointer
  2. nat subtraction would yield a negative
  3. iteration end
  4. iterator range
  5. out of bounds
  6. can only define strings on contiguous buffers
  7. can only define strings on non-offset buffers
  8. slice out of string bounds

contains

Defined in: std/core/string.s line 277

contains(str, char needle) -> (bool)

Potential errors:

  1. iteration end
  2. null pointer
  3. iterator range

contains

Defined in: std/core/string.s line 277

contains(cstr _stack, char needle) -> (bool)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. iteration end
  6. iterator range

is_number

is_number

Defined in: std/core/convertstr.s line 30

is_number(char) -> (bool)

rotl

rotl

Defined in: std/rand.s line 26

rotl(nat x, nat k) -> (nat)

splitmix64

splitmix64 - time seed

Defined in: std/rand.s line 55

Computes the seed of a splitmix64 sequence using the clock as the source of entropy.

splitmix64() -> (nat)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [time.time_ns()]

splitmix64 - next random number

Defined in: std/rand.s line 33

Computes the next random number of a splitmix64 sequence using the mutable unsigned int argument as state to be updated. This is NOT cryptographically secure and also has small period of 2^64 so usage is not recommended for long-running sequences. It is, however, faster than computing a next Rand state with next. If you do not provide a seed, a number obtained from the current time is provided. That can only be the start of a sequence, and marked as a leaking resource to prevent time-based randomization (which is not random).

splitmix64(mut nat) -> (mut nat)

Rand

Rand - random number generator

Defined in: std/rand.s line 80

Xoshiro256plus random numbers from https://prng.di.unimi.it/ These and are NOT cryptographically secure. This a structural type for storing the progress of random number generators on four u64 state fields. This version defaults to a time-based seed. Its period is 2^256-1.

Rand() -> (edit Rand)

Rand - random number generator

Defined in: std/rand.s line 65

Xoshiro256plus random numbers from https://prng.di.unimi.it/ These and are NOT cryptographically secure. This a structural type for storing the progress of random number generators on four u64 state fields. The version is seed-initalized. Its period is 2^256-1.

Rand(nat) -> (edit Rand)

Hashable

nat - an unsigned integer value

Defined by the compiler

Represents values in the range 0 to 2^64-1.

nat() -> (nat)

float

Defined by the compiler

float() -> (float)

cstr - constant string

Defined by the compiler

cstr() -> (cstr)

float - cast to float

Defined in: std/core/convert.s line 95

Converts a bit representation to the corresponding float number.

float(bits) -> (float)

nat - cast to nat

Defined in: std/core/convert.s line 84

Converts a bit representation to the corresponding natural number.

nat(bits) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 51

Converting a character to a natural number considers its bit representation interpreted as an unsigned number.

nat(char) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(nat) -> (nat)

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(int) -> (nat)

Potential errors:

  1. cannot convert negative int to id

nat - cast to nat

Defined in: std/core/convert.s line 40

Converting to natural numbers loses information. Failed on negative input because it typically indicates a later error in buffer indexing.

nat(float) -> (nat)

Potential errors:

  1. cannot convert negative float to id

float - cast to float

Defined in: std/core/convert.s line 20

May lose information because floats are not exact representation of all integers.

float(nat) -> (float)

float - cast to float

Defined in: std/core/convert.s line 20

May lose information because floats are not exact representation of all integers.

float(int) -> (float)

float - cast to float

Defined in: std/core/convert.s line 20

Serves as a tautology function for code that parses on multiple number types.

float(float) -> (float)

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 174

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

cstr(cstr cstr, str) -> (cstr)

cstr - extract the cstr from unsafe_temp string

Defined in: std/core/string.s line 174

This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.

cstr(unsafe_temp) -> (cstr)

str - convert to string

Defined in: std/core/string.s line 91

Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.

str(cstr) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 84

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat endpos, "from", nat pos) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative

str - a string residing on a buffer

Defined in: std/core/string.s line 75

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat pos, "to", nat endpos) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative

str - a string residing on a buffer

Defined in: std/core/string.s line 67

The string automatically detects the first character, which is generally tracked for fewer negative indirections on negative comparisons.

str(char[], nat pos, "len", nat length) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

str - tautology function for strings

Defined in: std/core/string.s line 63

str(str) -> (str)

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 55

str(char[]) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on the full breadth of a buffer

Defined in: std/core/string.s line 55

str(char[], nat length) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. string does not fit on buffer

str - a string residing on a buffer

Defined in: std/core/string.s line 48

str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str)

Potential errors:

  1. can only define strings on contiguous buffers
  2. can only define strings on non-offset buffers

str - a string residing on a buffer

Defined in: std/core/string.s line 43

str(char ptr unsafe_ptr, nat pos, nat length) -> (str)

str - a string residing on a buffer

Defined in: std/core/string.s line 39

str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str)

nat

Defined in: std/core/array.s line 24

nat(nat16) -> (nat)

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

The read string is placed onto memory that keeps being reallocated to accommodate its size. The resulting memory will consume exactly the required size in bytes.

str(new CHARS, console console) -> (str) with effects CHARS

Potential errors:

  1. null pointer
  2. division by zero
  3. nat subtraction would yield a negative
  4. allocation failed
  5. reallocation failed
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. cannot allocate a buffer of unsized type
  8. cannot resize an unallocated or freed buffer
  9. out of bounds
  10. can only define strings on contiguous buffers
  11. can only define strings on non-offset buffers

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

cstr - a cstr description of an error code

Defined in: std/core/error.s line 19

Error codes should not be compared numerically against given numbers, as their numbering changes for different programs. Instead, they should be converted to a cstr string with this function, which can then be compared. This comparison is also one numerical comparison, as care is taken for all cstr to point to the same memory location.

cstr(catch) -> (cstr)

str - reads a string from the console

Defined in: std/core/convertstr.s line 113

The read string is placed on an arena while consuming only the necessarily minimum size.

str(edit arena, console console) -> (str) with effects CHARS

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers
  5. nat subtraction would yield a negative
  6. read string does not fit on buffer

hash

hash

Defined in: std/hash.s line 7

hash(str, nat size) -> (nat)

Potential errors:

  1. iteration end
  2. null pointer
  3. iterator range
  4. modulo by zero

hash

Defined in: std/hash.s line 13

hash(nat k, nat size) -> (nat)

Potential errors:

  1. modulo by zero

to_hash_base

to_hash_base

Defined in: std/hash.s line 27

to_hash_base(nat) -> (bits)

to_hash_base

Defined in: std/hash.s line 27

to_hash_base(int) -> (bits)

to_hash_base

Defined in: std/hash.s line 27

to_hash_base(float) -> (bits)

to_hash_base

Defined in: std/hash.s line 24

to_hash_base(cstr) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

to_hash_base

Defined in: std/hash.s line 24

to_hash_base(str) -> (str)

robinhood_str_entry

robinhood_str_entry

Defined in: std/hash.s line 30

robinhood_str_entry(str, nat cost) -> (str, nat cost)

robinhood_nat_entry

robinhood_nat_entry

Defined in: std/hash.s line 33

robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)

robinhood_entry

robinhood_nat_entry

Defined in: std/hash.s line 33

robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)

robinhood_str_entry

Defined in: std/hash.s line 30

robinhood_str_entry(str, nat cost) -> (str, nat cost)

raw

raw

Defined in: std/hash.s line 44

raw(cstr) -> (str)

Potential errors:

  1. out of bounds
  2. null pointer
  3. can only define strings on contiguous buffers
  4. can only define strings on non-offset buffers

raw

Defined in: std/hash.s line 41

raw(nat) -> (nat)

raw

Defined in: std/hash.s line 41

raw(str) -> (str)

raw

Defined in: std/hash.s line 38

raw(nat s, nat cost) -> (nat)

raw

Defined in: std/hash.s line 38

raw(str, nat cost) -> (str)

is_zero

is_zero

Defined in: std/hash.s line 50

is_zero(nat) -> (bool)

is_zero

Defined in: std/hash.s line 47

is_zero(str) -> (bool)

find

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(nat[], nat _k) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(robinhood_nat_entry[], nat _k) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(str[], cstr _k) -> (mut nat)

Potential errors:

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. index not found

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(robinhood_str_entry[], str) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(str[], str) -> (mut nat)

Potential errors:

  1. out of bounds
  2. null pointer
  3. modulo by zero
  4. nat subtraction would yield a negative
  5. index not found
  6. iteration end
  7. iterator range

find - find an item in a robinhood_entry list

Defined in: std/hash.s line 53

find(robinhood_str_entry[], cstr _k) -> (mut nat)

Potential errors:

  1. null pointer
  2. modulo by zero
  3. nat subtraction would yield a negative
  4. iteration end
  5. iterator range
  6. out of bounds
  7. can only define strings on contiguous buffers
  8. can only define strings on non-offset buffers
  9. index not found

strmap

strmap - a string map

Defined in: std/map.s line 4

Maps string indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.

strmap(edit any[]) -> (mut robinhood_str_entry[], edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

natmap

natmap - a natural number map

Defined in: std/map.s line 11

Maps number indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.

natmap(edit any[]) -> (mut robinhood_nat_entry[], edit any[])

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

unpack

unpack

Defined in: std/mini.s line 66

unpack(char[], nat16 dat.pos, nat16 dat.length) -> (str)

Potential errors:

  1. string does not fit on buffer

unpack - unpack a compact str

Defined in: std/mini.s line 60

The created compact str is unpacked into its ’nat’-using representation that is more efficient for computations in 64-bit architectures.

unpack(str) -> (str)

abs

abs

Defined in: std/sci/math.s line 9

abs(int) -> (nat)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [abs($x)]

abs

Defined in: std/sci/math.s line 4

abs(float) -> (float)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [abs($x)]

sqrt

sqrt

Defined in: std/sci/math.s line 14

sqrt(float) -> (float)

sin

sin

Defined in: std/sci/math.s line 18

sin(float) -> (float)

cos

cos

Defined in: std/sci/math.s line 22

cos(float) -> (float)

log

log

Defined in: std/sci/math.s line 26

log(float) -> (float)

tan

tan

Defined in: std/sci/math.s line 30

tan(float) -> (float)

floor

floor

Defined in: std/sci/math.s line 34

floor(float) -> (int)

asin

asin

Defined in: std/sci/math.s line 38

asin(float) -> (float)

acos

acos

Defined in: std/sci/math.s line 42

acos(float) -> (float)

atan

atan

Defined in: std/sci/math.s line 50

atan(float x, float y) -> (float)

atan

Defined in: std/sci/math.s line 46

atan(float) -> (float)

exp

exp

Defined in: std/sci/math.s line 54

exp(float) -> (float)

isnan

isnan

Defined in: std/sci/math.s line 63

isnan(float) -> (bool)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [math.isnan(x)]

isinf

isinf

Defined in: std/sci/math.s line 68

isinf(float) -> (bool)
Warning: Running this function during ‘compt’ or under a ‘–back vm’ backend involves arbitrary code execution. Always be careful of your dependencies! The executed code is: [math.isinf(x)]

vec

vec - vector allocation

Defined in: std/sci/vec.s line 31

vec(edit circular, nat length) -> (mut vec) with effects FLOATS

Potential errors:

  1. does not fit in circular arena
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - vector allocation

Defined in: std/sci/vec.s line 31

vec(edit circular, nat length, "dirty") -> (mut vec) with effects FLOATS

Potential errors:

  1. does not fit in circular arena
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - vector allocation

Defined in: std/sci/vec.s line 31

vec(edit arena, nat length) -> (mut vec) with effects FLOATS

Potential errors:

  1. arena is out of space
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - vector allocation

Defined in: std/sci/vec.s line 31

vec(edit arena, nat length, "dirty") -> (mut vec) with effects FLOATS

Potential errors:

  1. arena is out of space
  2. can only place vectors on contiguous buffers
  3. cannot place vectors on buffer offsets

vec - treat a float buffer as a vector

Defined in: std/sci/vec.s line 19

vec(edit float[]) -> (mut vec)

Potential errors:

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets

vec - vector on a new buffer

Defined in: std/sci/vec.s line 11

Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.

vec(new FLOATS, nat length) -> (mut vec) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

vec - vector on a new buffer

Defined in: std/sci/vec.s line 11

Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.

vec(new FLOATS, nat length, "dirty") -> (mut vec) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

vec - vector type declaration

Defined in: std/sci/unsafe.s line 3

Warning: directly calling this constructor without safety checks is unsafe.

vec(float ptr unsafe_ptr, nat pos, nat length) -> (mut vec)

vec - view a matrix as a vector

Defined in: std/sci/mat.s line 65

vec(mat) -> (mut vec)

mat

mat - matrix type declaration

Defined in: std/sci/unsafe.s line 8

Warning: directly calling this constructor without safety checks is unsafe.

mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat)

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 55

A ‘type "row"’ or ‘type "col"’ marker is needed to indicate the new matrix’s orientation.

mat(vec, "col") -> (mut mat)

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 55

A ‘type "row"’ or ‘type "col"’ marker is needed to indicate the new matrix’s orientation.

mat(vec, "row") -> (mut mat)

mat - matrix on an existing float[] buffer

Defined in: std/sci/mat.s line 37

mat(edit float[], nat rows) -> (mut mat)

Potential errors:

  1. cannot place matrices on buffer offsets
  2. buffer size not divisible by vector rows
  3. arena is out of space
  4. division by zero
  5. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit circular, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. does not fit in circular arena
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. does not fit in circular arena
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit arena, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. arena is out of space
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. arena is out of space
  3. can only place matrices on contiguous buffers

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 14

mat(new FLOATS, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 14

mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

sparse_element

sparse_element

Defined in: std/sci/unsafe.s line 13

sparse_element(nat row, nat col, float value) -> (nat row, nat col, float value)

coo

coo - coo sparse matrix type declaration

Defined in: std/sci/unsafe.s line 14

Warning: directly calling this constructor without safety checks is unsafe.

coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo)

coo

Defined in: std/sci/coo.s line 40

coo(sparse_element[], nat rows, nat cols) -> (mut coo)

coo - allocate a sparse matrix

Defined in: std/sci/coo.s line 34

This creates a new buffer of sparse elements for convenience.

coo(nat rows, nat cols, nat nnz) -> (mut coo)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

float_allocator

new - allocations on new bufs

Defined in: std/core/allocators.s line 5

new() -> (new)

circular

Defined in: std/sci/vec.s line 7

circular(float) -> (edit circular)

arena

Defined in: std/sci/vec.s line 6

arena(float) -> (edit arena)

constvec

constvec - treat an immutable float buffer as an immutable vector

Defined in: std/sci/vec.s line 25

constvec(float[]) -> (vec)

Potential errors:

  1. can only place vectors on contiguous buffers
  2. cannot place vectors on buffer offsets

reduce

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "add") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "mul", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "mul", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "mul", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "mul") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "add", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "add", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "add", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "add") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec, "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sub", vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "mul", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "mul", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "mul", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "mul") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "add", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "add", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "add", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "add") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec, "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "mul", "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "mul", "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "mul", "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "mul") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "add", "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "add", "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "add", "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "add") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec, "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, vec) -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul", "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "mul") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "add", "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "add", "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "add", "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "add") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "l2") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "sqr") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "abs") -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec) -> (float)

No failing errors, but can catch these intercepted ones:

  1. null pointer

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "mul", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "mul", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "mul", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "mul") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "add", "l2") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "add", "sqr") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

reduce - reduce a vector to one value

Defined in: std/sci/vec.s line 151

You can specify an additive or multiplicative reduction, as well as some transformation that can be applied. A second vector can also be provided to be subtracted or obtain relative value differences without allocating any memory for operation results. All computations are branchless, as literals are optimized away during compilation.

reduce(vec, "rel", vec, "add", "abs") -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

dot

dot - dot product

Defined in: std/sci/vec.s line 187

dot(vec, vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer

sum

sum - sum

Defined in: std/sci/vec.s line 191

sum(vec) -> (float)

sum - sum of each column

Defined in: std/sci/coo.s line 109

result[j] = sum of all stored values in column j

sum(edit circular, coo, "col") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sum - sum of each column

Defined in: std/sci/coo.s line 109

result[j] = sum of all stored values in column j

sum(edit arena, coo, "col") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sum - sum of each column

Defined in: std/sci/coo.s line 109

result[j] = sum of all stored values in column j

sum(new FLOATS, coo, "col") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

sum - sum of each row

Defined in: std/sci/coo.s line 101

result[i] = sum of all stored values in row i

sum(edit circular, coo, "row") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. does not fit in circular arena
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sum - sum of each row

Defined in: std/sci/coo.s line 101

result[i] = sum of all stored values in row i

sum(edit arena, coo, "row") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. arena is out of space
  3. null pointer
  4. can only place vectors on contiguous buffers
  5. cannot place vectors on buffer offsets

sum - sum of each row

Defined in: std/sci/coo.s line 101

result[i] = sum of all stored values in row i

sum(new FLOATS, coo, "row") -> (mut vec) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. allocation failed
  4. cannot resize buffers with alloc; it promises no data reallocation
  5. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mean

mean - mean value

Defined in: std/sci/vec.s line 195

mean(vec) -> (float)

Potential errors:

  1. null pointer
  2. division by zero

var

var - variance

Defined in: std/sci/vec.s line 199

var(vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

std

std - standard deviation

Defined in: std/sci/vec.s line 210

std(vec) -> (float)

Potential errors:

  1. out of bounds
  2. null pointer
  3. division by zero

self

self

Defined in: std/sci/vec.s line 247

self(edit vec) -> (edit arena, edit vec)

rows

rows - number of rows

Defined in: std/sci/mat.s line 6

rows(mat) -> (nat)

rows - number of rows

Defined in: std/sci/coo.s line 22

rows(coo) -> (nat)

cols

cols - number of columns

Defined in: std/sci/mat.s line 10

cols(mat) -> (nat)

cols - number of columns

Defined in: std/sci/coo.s line 26

cols(coo) -> (nat)

constmat

constmat - immutable matrix on an immutable float[] buffer

Defined in: std/sci/mat.s line 31

constmat(float[], nat rows) -> (mat)

Potential errors:

  1. cannot place matrices on buffer offsets
  2. buffer size not divisible by vector rows
  3. arena is out of space
  4. division by zero
  5. can only place matrices on contiguous buffers

mutvec

mutvec - view a matrix as a vector

Defined in: std/sci/mat.s line 69

mutvec(mat) -> (mut vec)

row

row - view matrix row as a vector

Defined in: std/sci/mat.s line 73

row(mat, nat i) -> (mut vec)

Potential errors:

  1. row out of bounds

nnz

nnz - number of stored non-zero entries

Defined in: std/sci/coo.s line 30

nnz(coo) -> (nat)

todense

todense - convert to dense mat

Defined in: std/sci/coo.s line 80

todense(edit circular, coo) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. out of bounds
  3. null pointer
  4. column out of bounds
  5. row out of bounds
  6. does not fit in circular arena
  7. can only place matrices on contiguous buffers

todense - convert to dense mat

Defined in: std/sci/coo.s line 80

todense(edit arena, coo) -> (mut mat) with effects FLOATS

Potential errors:

  1. out of bounds
  2. cannot place matrices on buffer offsets
  3. null pointer
  4. column out of bounds
  5. row out of bounds
  6. arena is out of space
  7. can only place matrices on contiguous buffers

todense - convert to dense mat

Defined in: std/sci/coo.s line 80

todense(new FLOATS, coo) -> (mut mat) with effects FLOATS

Potential errors:

  1. out of bounds
  2. null pointer
  3. column out of bounds
  4. row out of bounds
  5. allocation failed
  6. cannot resize buffers with alloc; it promises no data reallocation
  7. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

matrix

coo - coo sparse matrix type declaration

Defined in: std/sci/unsafe.s line 14

Warning: directly calling this constructor without safety checks is unsafe.

coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo)

mat - matrix type declaration

Defined in: std/sci/unsafe.s line 8

Warning: directly calling this constructor without safety checks is unsafe.

mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat)

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 55

A ‘type "row"’ or ‘type "col"’ marker is needed to indicate the new matrix’s orientation.

mat(vec, "col") -> (mut mat)

mat - view a vector as a matrix on the same memory

Defined in: std/sci/mat.s line 55

A ‘type "row"’ or ‘type "col"’ marker is needed to indicate the new matrix’s orientation.

mat(vec, "row") -> (mut mat)

mat - matrix on an existing float[] buffer

Defined in: std/sci/mat.s line 37

mat(edit float[], nat rows) -> (mut mat)

Potential errors:

  1. cannot place matrices on buffer offsets
  2. buffer size not divisible by vector rows
  3. arena is out of space
  4. division by zero
  5. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit circular, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. does not fit in circular arena
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. does not fit in circular arena
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit arena, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. arena is out of space
  3. can only place matrices on contiguous buffers

mat - matrix on an existing vecpos

Defined in: std/sci/mat.s line 21

mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. cannot place matrices on buffer offsets
  2. arena is out of space
  3. can only place matrices on contiguous buffers

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 14

mat(new FLOATS, nat rows, nat cols) -> (mut mat) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

mat - matrix on a fresh buffer

Defined in: std/sci/mat.s line 14

mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat) with effects FLOATS

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

coo

Defined in: std/sci/coo.s line 40

coo(sparse_element[], nat rows, nat cols) -> (mut coo)

coo - allocate a sparse matrix

Defined in: std/sci/coo.s line 34

This creates a new buffer of sparse elements for convenience.

coo(nat rows, nat cols, nat nnz) -> (mut coo)

Potential errors:

  1. allocation failed
  2. cannot resize buffers with alloc; it promises no data reallocation
  3. cannot allocate a buffer of unsized type

Returned values defer use of the following functions:

exists(any ptr) -> (bool)
free(mut any ptr) -> ()

realloc

realloc - reallocate memory

Defined in: std/unsafe.s line 28

Reallocates an allocated memory pointer, potentially invalidating the original one without any safety.

Warning: Its usage in unsafe and guarded under std/unsafe.s.
realloc(any ptr allocated, nat bytes) -> (any ptr {follows any ptr allocated})

Potential errors:

  1. reallocation failed

free

free - free memory

Defined in: std/unsafe.s line 40

Frees allocated memory.

Warning: Its usage in unsafe and guarded under std/unsafe.s.
free(mut any ptr) -> ()

zero

zero - set memory to zero

Defined in: std/unsafe.s line 47

Memsets a memory region to zero.

Warning: Its usage in unsafe and guarded under std/unsafe.s.
zero(any ptr allocated, nat from, nat to) -> ()