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 print nn supports_ansi colors set exists bits lshift rshift xor band bor bnot tochar slice mask of range mutget get KB MB GB alloc resize last len new bucket_contents bucket arena allocated status circular list unsafe_alloc at char_allocator strdat str copy copy_null_terminated unsafe_temp endpos revalidate starts_with ends_with contains find empty is_number ok printf rotl splitmix64 Rand next Hashable hash to_hash_base robinhood_str_entry robinhood_nat_entry robinhood_entry raw is_zero strmap natmap unpack post 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 min max var std self accumulator append pearson rows cols constmat mutvec row nnz todense matrix tagged unsafe_match unsafe_defer_free tagged_alloc match pipe mutex_size unsafe_pipe_lock unsafe_pipe_unlock with system_thread unsafe_spawn join cpu growing_thread_pool thread unsafe_pipe_match unsafe_pipe_defer_free unsafe_pipe_mutax_init pipe_alloc shared unsafe_blob blob as find_compatible_size realloc free zero dereference_ptr color position size unsafe_open_window window is_open unsafe_begin_drawing unsafe_end_drawing draw clear text sleep TextureData Texture open texture circ ellipse line rect tri dt uptime key_down key_pressed key_released mouse_pos mouse_down mouse_pressed mouse_wheel KEY_NULL KEY_APOSTROPHE KEY_COMMA KEY_MINUS KEY_PERIOD KEY_SLASH KEY_ZERO KEY_ONE KEY_TWO KEY_THREE KEY_FOUR KEY_FIVE KEY_SIX KEY_SEVEN KEY_EIGHT KEY_NINE KEY_SEMICOLON KEY_EQUAL KEY_A KEY_B KEY_C KEY_D KEY_E KEY_F KEY_G KEY_H KEY_I KEY_J KEY_K KEY_L KEY_M KEY_N KEY_O KEY_P KEY_Q KEY_R KEY_S KEY_T KEY_U KEY_V KEY_W KEY_X KEY_Y KEY_Z KEY_LEFT_BRACKET KEY_BACKSLASH KEY_RIGHT_BRACKET KEY_GRAVE KEY_SPACE KEY_ESCAPE KEY_ENTER KEY_TAB KEY_BACKSPACE KEY_INSERT KEY_DELETE KEY_RIGHT KEY_LEFT KEY_DOWN KEY_UP KEY_PAGE_UP KEY_PAGE_DOWN KEY_HOME KEY_END KEY_CAPS_LOCK KEY_SCROLL_LOCK KEY_NUM_LOCK KEY_PRINT_SCREEN KEY_PAUSE KEY_F1 KEY_F2 KEY_F3 KEY_F4 KEY_F5 KEY_F6 KEY_F7 KEY_F8 KEY_F9 KEY_F10 KEY_F11 KEY_F12 KEY_LEFT_SHIFT KEY_LEFT_CONTROL KEY_LEFT_ALT KEY_LEFT_SUPER KEY_RIGHT_SHIFT KEY_RIGHT_CONTROL KEY_RIGHT_ALT KEY_RIGHT_SUPER KEY_KB_MENU KEY_KP_0 KEY_KP_1 KEY_KP_2 KEY_KP_3 KEY_KP_4 KEY_KP_5 KEY_KP_6 KEY_KP_7 KEY_KP_8 KEY_KP_9 KEY_KP_DECIMAL KEY_KP_DIVIDE KEY_KP_MULTIPLY KEY_KP_SUBTRACT KEY_KP_ADD KEY_KP_ENTER KEY_KP_EQUAL KEY_BACK KEY_MENU KEY_VOLUME_UP KEY_VOLUME_DOWN NumberOrPtr to_number already_defined String run print_marker restore_stdout stdout_to_err assert test time
Defined in: builtins line 1
cstr
Defined in: std/core/string.s line 218
cstr(cstr cstr, str) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/error.s line 19
cstr(last_error) -> (cstr)
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.
Complexity
Defined in: builtins line 1
int
Represents values in the range 2^-63 to 2^63-1.
Defined in: std/core/convert.s line 75
int(bits {tag, nat value}) -> (int)
Converts a bit representation to the corresponding integer.
Complexity
Defined in: std/core/convert.s line 27
int(nat) -> (int)
Overflows are mapped to negative integers without any numerical safeguards.
Complexity
Defined in: std/core/convert.s line 27
int(int) -> (int)
Serves as a tautology function for code that parses on multiple number types.
Complexity
Defined in: std/core/convert.s line 27
int(float) -> (int)
May lose information due to truncating.
Complexity
Defined in: std/core/convertstr.s line 148
int(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (int)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 148
int(cstr) -> (int)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 36
int(console {tag}) -> (int)
Complexity
Potential errors
Defined in: builtins line 1
nat
Represents values in the range 0 to 2^64-1.
Defined in: std/core/convert.s line 170
nat(nat32) -> (nat)
Complexity
Defined in: std/core/convert.s line 170
nat(nat16) -> (nat)
Complexity
Defined in: std/core/convert.s line 170
nat(nat8) -> (nat)
Complexity
Defined in: std/core/convert.s line 70
nat(bits {tag, nat value}) -> (nat)
Converts a bit representation to the corresponding natural number.
Complexity
Defined in: std/core/convert.s line 35
nat(nat) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Defined in: std/core/convert.s line 35
nat(int) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Potential errors
Defined in: std/core/convert.s line 35
nat(float) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Potential errors
Defined in: std/core/convertstr.s line 171
nat(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 171
nat(cstr) -> (nat)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 60
nat(console {tag}) -> (nat)
Complexity
Potential errors
Defined in: builtins line 1
nat32
Represents values in the range 0 to 2^32-1.
Defined in: std/core/convert.s line 175
nat32(nat16) -> (nat32)
Complexity
Defined in: std/core/convert.s line 175
nat32(nat8) -> (nat32)
Complexity
Defined in: std/core/convert.s line 162
nat32(nat x, "truncate") -> (nat32)
The conversion truncates the given input, if it would not fit. For example, 4294967295 becomes 1.
Complexity
[x%4294967295]Defined in: std/core/convert.s line 154
nat32(nat) -> (nat32)
The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.
Complexity
Potential errors
Defined in: builtins line 1
nat16
Represents values in the range 0 to 2^16-1.
Defined in: std/core/convert.s line 180
nat16(nat8) -> (nat16)
Complexity
Defined in: std/core/convert.s line 147
nat16(nat x, "truncate") -> (nat16)
This conversion truncates the given input, if it would not fit. For example, 65536 becomes 1.
Complexity
Defined in: std/core/convert.s line 139
nat16(nat) -> (nat16)
The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.
Complexity
Potential errors
Defined in: builtins line 1
nat8
Represents values in the range 0 to 255.
Defined in: std/core/convert.s line 132
nat8(char) -> (nat8)
The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.
Complexity
Defined in: std/core/convert.s line 120
nat8(nat) -> (nat8)
The conversion checks whether the previous value fits in the new one. If it does not, this operation can fail.
Complexity
Potential errors
Defined in: builtins line 1
float
Defined in: std/core/convert.s line 81
float(bits {tag, nat value}) -> (float)
Converts a bit representation to the corresponding float number.
Complexity
Defined in: std/core/convert.s line 20
float(nat) -> (float)
May lose information because floats are not exact representation of all integers.
Complexity
Defined in: std/core/convert.s line 20
float(int) -> (float)
May lose information because floats are not exact representation of all integers.
Complexity
Defined in: std/core/convert.s line 20
float(float) -> (float)
Serves as a tautology function for code that parses on multiple number types.
Complexity
Defined in: std/core/convertstr.s line 183
float(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (float)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 183
float(cstr) -> (float)
Complexity
Potential errors
Defined in: std/core/convertstr.s line 80
float(console {tag}) -> (float)
Complexity
Potential errors
Defined in: builtins line 1
bool
Can only be true or false.
Defined by the compiler
err
Defined in: builtins line 1
blank() -> ()
This is the type of non-existent variables, empty parantheses, and functions of no returns.
Defined in: builtins line 1
char
Represents characters in the numeric range 0 to 255.
Defined in: std/core/string.s line 115
char(cstr) -> (char)
The first character of a string is extracted,
for example to write c = char "C".
Complexity
Defined in: std/core/string.s line 109
char(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (char)
The first character of a string is extracted,
for example to write c = char str "C".
Complexity
Defined in: std/core/convertstr.s line 24
char(console {tag}) -> (char)
Complexity
Potential errors
Defined in: builtins line 1
any() -> ()
Represents a generic for buffers and pointers for type-independent code that can be matched to a concrete type later. This type ordains special treatment by the compiler.
Defined in: std/core/bool.s line 51
eq(false, true) -> (false)
This is a compile-time operation that does not evoke any runtime booleans.
Complexity
Defined in: std/core/bool.s line 46
eq(true, false) -> (false)
This is a compile-time operation that does not evoke any runtime booleans.
Complexity
Defined in: std/core/bool.s line 41
eq(false, false) -> (true)
This is a compile-time operation that does not evoke any runtime booleans.
Complexity
Defined in: std/core/bool.s line 36
eq(true, true) -> (true)
This is a compile-time operation that does not evoke any runtime booleans.
Complexity
Defined in: std/core/bool.s line 20
eq(bool x, bool y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 56
eq(any ptr x, any ptr y) -> (bool)
Compares the address of two pointers.
Complexity
Defined in: std/core/numbers.s line 40
eq(last_error x, last_error y) -> (bool)
Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.
Complexity
Defined in: std/core/numbers.s line 26
eq(nat x, nat y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 26
eq(int x, int y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 26
eq(float x, float y) -> (bool)
Complexity
Defined in: std/core/bool.s line 82
eq(bool value, false) -> (bool)
Complexity
Defined in: std/core/bool.s line 78
eq(false, bool value) -> (bool)
Complexity
Defined in: std/core/bool.s line 74
eq(bool value, true) -> (bool)
Complexity
Defined in: std/core/bool.s line 70
eq(true, bool value) -> (bool)
Complexity
Defined in: std/core/string.s line 295
eq(cstr x, str) -> (bool)
Complexity
Defined in: std/core/string.s line 289
eq(str, cstr y) -> (bool)
Complexity
Defined in: std/core/string.s line 261
eq(str, str) -> (bool)
This implementation avoids indirection by checking for the first string character first, which will typically be stored only one indirection away instead of two, and is thus very friendly to CPU cache usage when manipulating strings.
It is interesting to consider what happens
should the memory surfaces where strings are stored be corrupted
by replacing string data while the string is still used in code
(this is a logical bug but memory-safe). In that case, two strings
could have the exact same contents but be deemed not equal to
each other. This contradiction occurs only when active strings
are overwritten with new data, and is in fact a good way to check
for logical inconsistencies. In the rare cases where you want
to guarantee the outcome of this equality under data corruptions
use eq(revalidate x, revalidate y)
to re-retrieve the first characters. This is still faster than
full comparison of large strings, given that most string comparisons
yield false.
Complexity
Defined in: std/core/string.s line 252
eq(cstr x, cstr y) -> (bool)
Comparing two cstrs is as simple as comparing their addresses, so this operation is exceedingly lightweight and a convenient means for checking for runtime tags. The compier enforces that two same-content cstr will always have the same memory address.
Complexity
Defined in: std/core/string.s line 122
eq(char x, char y) -> (bool)
Complexity
Defined in: std/ptrpeek.s line 63
eq(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 43
eq(cstr ptr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 43
eq(cstr ptr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 43
eq(str ptr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 43
eq(str ptr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 39
eq(cstr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 39
eq(cstr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 39
eq(str, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 39
eq(str, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 35
eq(cstr ptr x, cstr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 35
eq(cstr ptr x, str) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 35
eq(str ptr x, cstr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 35
eq(str ptr x, str) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 63
eq(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/bool.s line 25
neq(bool x, bool y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 48
neq(last_error x, last_error y) -> (bool)
Compares two error messages. This comparison is used only for comparing error messages produced by the same running program.
Complexity
Defined in: std/core/numbers.s line 33
neq(nat x, nat y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 33
neq(int x, int y) -> (bool)
Complexity
Defined in: std/core/numbers.s line 33
neq(float x, float y) -> (bool)
Complexity
Defined in: std/core/bool.s line 90
neq(bool x, false y) -> (bool)
Complexity
Defined in: std/core/bool.s line 90
neq(bool x, true y) -> (bool)
Complexity
Defined in: std/core/bool.s line 86
neq(false x, bool y) -> (bool)
Complexity
Defined in: std/core/bool.s line 86
neq(true x, bool y) -> (bool)
Complexity
Defined in: std/core/bool.s line 66
neq(false x, false y) -> (false)
Complexity
Defined in: std/core/bool.s line 66
neq(false x, true y) -> (true)
Complexity
Defined in: std/core/bool.s line 66
neq(true x, false y) -> (true)
Complexity
Defined in: std/core/bool.s line 66
neq(true x, true y) -> (false)
Complexity
Defined in: std/unsafe.s line 19
neq(any ptr x, any ptr y) -> (bool)
Compares the address of two pointers.
Complexity
Defined in: std/core/string.s line 301
neq(cstr x, cstr y) -> (bool)
Negates the outcome of equality checks between cstr and strings.
Complexity
Defined in: std/core/string.s line 301
neq(cstr x, str) -> (bool)
Negates the outcome of equality checks between cstr and strings.
Complexity
Defined in: std/core/string.s line 301
neq(str, cstr y) -> (bool)
Negates the outcome of equality checks between cstr and strings.
Complexity
Defined in: std/core/string.s line 301
neq(str, str) -> (bool)
Negates the outcome of equality checks between cstr and strings.
Complexity
Defined in: std/core/string.s line 127
neq(char x, char y) -> (bool)
Complexity
Defined in: std/ptrpeek.s line 55
neq(cstr ptr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 55
neq(cstr ptr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 55
neq(str ptr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 55
neq(str ptr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 51
neq(cstr x, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 51
neq(cstr x, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 51
neq(str, cstr ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 51
neq(str, str ptr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 47
neq(cstr ptr x, cstr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 47
neq(cstr ptr x, str) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 47
neq(str ptr x, cstr y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 47
neq(str ptr x, str) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 73
neq(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/bool.s line 61
not(false) -> (true)
This is a compile-time operation on the compiler::false type rather than a runtime boolean.
Complexity
Defined in: std/core/bool.s line 56
not(true) -> (false)
This is a compile-time operation on the compiler::true type rather than a runtime boolean.
Complexity
Defined in: std/core/bool.s line 30
not(bool) -> (bool)
This operates on boolean values at runtime.
Complexity
Defined in: builtins line 1
nat
Represents values in the range 0 to 2^64-1.
Defined in: builtins line 1
float
Defined in: builtins line 1
int
Represents values in the range 2^-63 to 2^63-1.
Defined in: std/core/numbers.s line 23
is_different(nat x, nat y) -> (false)
Complexity
Defined in: std/core/numbers.s line 23
is_different(nat x, int y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(nat x, float y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(int x, nat y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(int x, int y) -> (false)
Complexity
Defined in: std/core/numbers.s line 23
is_different(int x, float y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(float x, nat y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(float x, int y) -> (true)
Complexity
Defined in: std/core/numbers.s line 23
is_different(float x, float y) -> (false)
Complexity
Defined in: std/core/numbers.s line 62
neg(nat) -> (nat)
Complexity
Defined in: std/core/numbers.s line 62
neg(int) -> (int)
Complexity
Defined in: std/core/numbers.s line 62
neg(float) -> (float)
Complexity
Defined in: std/core/numbers.s line 67
add(nat x, nat y) -> (nat)
Adds two numbers of the same type. This is an overload for the + operator.
Complexity
Defined in: std/core/numbers.s line 67
add(int x, int y) -> (int)
Adds two numbers of the same type. This is an overload for the + operator.
Complexity
Defined in: std/core/numbers.s line 67
add(float x, float y) -> (float)
Adds two numbers of the same type. This is an overload for the + operator.
Complexity
Defined in: std/unsafe.s line 66
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
Adds a natural number offset to a pointer.
Complexity
Defined in: std/core/string.s line 458
add(edit arena, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:
import std.core
def main()
CLI = edit console()
CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
print s3+copy(78)+copy(9)
The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.
Complexity
Potential errors
Defined in: std/core/string.s line 458
add(edit arena, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:
import std.core
def main()
CLI = edit console()
CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
print s3+copy(78)+copy(9)
The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.
Complexity
Potential errors
Defined in: std/core/string.s line 458
add(edit arena, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:
import std.core
def main()
CLI = edit console()
CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
print s3+copy(78)+copy(9)
The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.
Complexity
Potential errors
Defined in: std/core/string.s line 458
add(edit arena, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation ensures that consecutively allocated strings, or adding to strings placed at the end of buffers, does not needlessly copy memory. This way, consecutive additions do not copy the previous result before appending to it. For example, consider the following:
import std.core
def main()
CLI = edit console()
CHARS = edit arena alloc 10
s1 = copy 123
s2 = copy 456
s3 = s1+s2
print s3+copy(78)+copy(9)
The snippet fits the result in a contiguous area on the arena’s buffer, with only one copying operation for each character. This does not magically optimize all copying operations, but it does makes most convenient optimizatins when allocating and immediately concatenating.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit list, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit list, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit list, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit list, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit circular, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit circular, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit circular, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit circular, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit bucket, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit bucket, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit bucket, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(edit bucket, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
Defined in: std/core/string.s line 432
add(new CHARS, cstr _s1, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 432
add(new CHARS, cstr _s1, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 432
add(new CHARS, str, cstr _s2) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 432
add(new CHARS, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on an allocator effect CHARS. This implementation creates a new allocation and is therefore slower compared to using a simple arena, circular buffer, or even an automatically resized list. Since that allocation defers its deallocation too, it cannot be returned from nested code blocks. Switch to a different character allocator to produce more dynamic yet safe and fast code.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 93
add(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 93
add(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 93
add(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 82
add(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(nat _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(int _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(float _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(nat ptr _x, nat _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(nat ptr _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(int ptr _x, int _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(int ptr _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(float ptr _x, float _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 83
add(float ptr _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/core/numbers.s line 75
mul(nat x, nat y) -> (nat)
Multiplies two numbers of the same type. This is an overload for the * operator.
Complexity
Defined in: std/core/numbers.s line 75
mul(int x, int y) -> (int)
Multiplies two numbers of the same type. This is an overload for the * operator.
Complexity
Defined in: std/core/numbers.s line 75
mul(float x, float y) -> (float)
Multiplies two numbers of the same type. This is an overload for the * operator.
Complexity
Defined in: std/sci/vec.s line 129
mul(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 129
mul(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 129
mul(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 118
mul(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/coo.s line 79
mul(edit arena, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/coo.s line 79
mul(new FLOATS, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/coo.s line 69
mul(edit circular, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
*Warning: the expression self(v)*m yields wrong values
Complexity
Potential errors
Defined in: std/sci/coo.s line 69
mul(edit arena, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
*Warning: the expression self(v)*m yields wrong values
Complexity
Potential errors
Defined in: std/sci/coo.s line 69
mul(new FLOATS, vec, coo) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
*Warning: the expression self(v)*m yields wrong values
Complexity
Potential errors
Defined in: std/sci/coo.s line 61
mul(edit circular, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/coo.s line 61
mul(edit arena, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/coo.s line 61
mul(new FLOATS, coo, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 123
mul(edit circular, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 123
mul(edit arena, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 123
mul(new FLOATS, mat, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/mat.s line 111
mul(edit circular, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 111
mul(edit arena, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 111
mul(new FLOATS, vec, mat) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 99
mul(edit circular, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 99
mul(edit arena, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/mat.s line 99
mul(new FLOATS, mat, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs an allocator for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/coo.s line 79
mul(edit circular, coo, mat) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(nat _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(int _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(float _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(nat ptr _x, nat _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(nat ptr _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(int ptr _x, int _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(int ptr _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(float ptr _x, float _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 103
mul(float ptr _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/core/numbers.s line 83
div(nat x, nat y) -> (nat)
Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.
Complexity
Potential errors
Defined in: std/core/numbers.s line 83
div(nat x, nat y, "unsafe_assume_nonzero") -> (nat)
Divides two numbers of the same type. This is an overload for the / operator.
Complexity
Defined in: std/core/numbers.s line 83
div(int x, int y) -> (int)
Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.
Complexity
Potential errors
Defined in: std/core/numbers.s line 83
div(int x, int y, "unsafe_assume_nonzero") -> (int)
Divides two numbers of the same type. This is an overload for the / operator.
Complexity
Defined in: std/core/numbers.s line 83
div(float x, float y) -> (float)
Divides two numbers of the same type. This is an overload for the / operator. Safeguards against division by zero.
Complexity
Potential errors
Defined in: std/core/numbers.s line 83
div(float x, float y, "unsafe_assume_nonzero") -> (float)
Divides two numbers of the same type. This is an overload for the / operator.
Complexity
Defined in: std/sci/vec.s line 167
div(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 167
div(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 167
div(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 155
div(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(float _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(nat ptr _x, nat _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(nat ptr _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(int ptr _x, int _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(int ptr _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(float ptr _x, float _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(float ptr _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(nat _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 113
div(int _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/core/numbers.s line 96
mod(nat x, nat y) -> (nat)
Computes the modulo between two natural numbers. This is an overload for the % operator.
Complexity
Potential errors
Defined in: std/core/numbers.s line 96
mod(nat x, nat y, "unsafe_assume_nonzero") -> (nat)
Computes the modulo between two natural numbers. This is an overload for the % operator.
Complexity
Defined in: std/core/numbers.s line 106
lt(nat x, nat y) -> (bool)
Compares two numbers of the same type. This is an overload for the < operator.
Complexity
Defined in: std/core/numbers.s line 106
lt(int x, int y) -> (bool)
Compares two numbers of the same type. This is an overload for the < operator.
Complexity
Defined in: std/core/numbers.s line 106
lt(float x, float y) -> (bool)
Compares two numbers of the same type. This is an overload for the < operator.
Complexity
Defined in: std/ptrpeek.s line 123
lt(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 123
lt(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/numbers.s line 114
gt(nat x, nat y) -> (bool)
greater than
Complexity
Defined in: std/core/numbers.s line 114
gt(int x, int y) -> (bool)
greater than
Complexity
Defined in: std/core/numbers.s line 114
gt(float x, float y) -> (bool)
greater than
Complexity
Defined in: std/ptrpeek.s line 133
gt(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 133
gt(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/numbers.s line 122
le(nat x, nat y) -> (bool)
Compares two numbers of the same type. This is an overload for the <= operator.
Complexity
Defined in: std/core/numbers.s line 122
le(int x, int y) -> (bool)
Compares two numbers of the same type. This is an overload for the <= operator.
Complexity
Defined in: std/core/numbers.s line 122
le(float x, float y) -> (bool)
Compares two numbers of the same type. This is an overload for the <= operator.
Complexity
Defined in: std/ptrpeek.s line 143
le(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 143
le(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/numbers.s line 130
ge(nat x, nat y) -> (bool)
Compares two numbers of the same type. This is an overload for the >= operator.
Complexity
Defined in: std/core/numbers.s line 130
ge(int x, int y) -> (bool)
Compares two numbers of the same type. This is an overload for the >= operator.
Complexity
Defined in: std/core/numbers.s line 130
ge(float x, float y) -> (bool)
Compares two numbers of the same type. This is an overload for the >= operator.
Complexity
Defined in: std/ptrpeek.s line 153
ge(nat _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(int _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(float _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(nat ptr _x, nat _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(nat ptr _x, nat ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(int ptr _x, int _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(int ptr _x, int ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(float ptr _x, float _y) -> (bool)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 153
ge(float ptr _x, float ptr _y) -> (bool)
Complexity
Potential errors
Defined in: std/core/numbers.s line 150
sub(nat x, nat y, "assume_smaller") -> (nat)
Subtracts two natural numbers without underflow check. This is an overload for the - operator, for example used like below. This overload never fails and instead adds 0xFFFFFFFFFFFFFFFF to the result if it would produce a negative.
0-(1 assume_smaller)
Complexity
Defined in: std/core/numbers.s line 138
sub(nat x, nat y) -> (nat)
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.
Complexity
Potential errors
Defined in: std/core/numbers.s line 138
sub(int x, int y) -> (int)
Subtracts two numbers of the same type. This is an overload for the - operator.
Complexity
Defined in: std/core/numbers.s line 138
sub(float x, float y) -> (float)
Subtracts two numbers of the same type. This is an overload for the - operator.
Complexity
Defined in: std/sci/vec.s line 109
sub(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 109
sub(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 109
sub(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 98
sub(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(nat _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(int _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(float _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(nat ptr _x, nat _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(nat ptr _x, nat ptr _y) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(int ptr _x, int _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(int ptr _x, int ptr _y) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(float ptr _x, float _y) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 93
sub(float ptr _x, float ptr _y) -> (float)
Complexity
Potential errors
Defined in: std/core/numbers.s line 161
pow(nat x, nat y) -> (mut nat)
Exponentiates a natural number by another.
Complexity
Defined in: std/sci/math.s line 89
pow(float x, float y) -> (float)
Complexity
Defined in: std/sci/vec.s line 146
pow(edit circular, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 146
pow(edit arena, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 146
pow(new FLOATS, float v1, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(edit circular, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(edit circular, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(edit arena, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(edit arena, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(new FLOATS, vec, float v2) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/sci/vec.s line 135
pow(new FLOATS, vec, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS allocator effect to store the result.
Complexity
Potential errors
Defined in: std/core/print.s line 20
console() -> (console {tag})
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 with unsafe_console().
Complexity
Defined in: std/core/print.s line 34
unsafe_console() -> (mut console {tag})
This is convenient for print debugging by writing unsafe_console().print ...
without needing to evoke an effect to pass the normally singleton console.
Complexity
Defined in: std/core/print.s line 60
print(console CLI, float value) -> () with effects CLI
To pre-specified 6 decimal digits. Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 60
print(console CLI, float value, cstr endl) -> () with effects CLI
To pre-specified 6 decimal digits.
Complexity
Defined in: std/core/print.s line 53
print(console CLI, cstr value) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 53
print(console CLI, cstr value, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/print.s line 42
print(console CLI, "flush") -> () with effects CLI
Complexity
Defined in: std/core/print.s line 96
print(console CLI, false) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 96
print(console CLI, false, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/print.s line 89
print(console CLI, true) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 89
print(console CLI, true, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/print.s line 82
print(console CLI, bool value) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 82
print(console CLI, bool value, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/print.s line 75
print(console CLI, nat value) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 75
print(console CLI, nat value, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/print.s line 68
print(console CLI, int value) -> () with effects CLI
Automatically ends the line too.
Complexity
Defined in: std/core/print.s line 68
print(console CLI, int value, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/string.s line 337
print(console CLI, char c) -> () with effects CLI
Ends the line too.
Complexity
Defined in: std/core/string.s line 337
print(console CLI, char c, cstr endl) -> () with effects CLI
Complexity
Defined in: std/core/string.s line 323
print(console CLI, str) -> () with effects CLI
Ends the line too.
Complexity
Defined in: std/core/string.s line 323
print(console CLI, str, cstr endl) -> () with effects CLI
Complexity
Defined in: std/sci/vec.s line 261
print(console CLI, vec) -> () with effects CLI
Prints as a row, such as [ 1.0 2.0 3.0 ]
Complexity
Potential errors
Defined in: std/sci/vec.s line 261
print(console CLI, vec, cstr endl) -> () with effects CLI
Prints as a row, such as [ 1.0 2.0 3.0 ]
Complexity
Potential errors
Defined in: std/sci/mat.s line 137
print(console CLI, mat) -> () with effects CLI
single-row matrices stay on one line; taller ones get top/mid/bottom brackets
Complexity
Potential errors
Defined in: std/sci/mat.s line 137
print(console CLI, mat, cstr endl) -> () with effects CLI
single-row matrices stay on one line; taller ones get top/mid/bottom brackets
Complexity
Potential errors
Defined in: std/sci/coo.s line 95
print(console CLI, coo) -> () with effects CLI
Prints it as coordinate as list: (i, j): v
Complexity
Defined in: std/sci/coo.s line 95
print(console CLI, coo, cstr endl) -> () with effects CLI
Prints it as coordinate as list: (i, j): v
Complexity
Defined in: std/core/print.s line 46
nn(nat) -> (nat value, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.
Complexity
Defined in: std/core/print.s line 46
nn(int) -> (int value, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.
Complexity
Defined in: std/core/print.s line 46
nn(float) -> (float value, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.
Complexity
Defined in: std/core/print.s line 46
nn(cstr) -> (cstr value, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without automatically adding a new line.
Complexity
Defined in: std/core/string.s line 425
nn(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without a new line.
Complexity
Defined in: std/sci/vec.s line 254
nn(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (vec, cstr)
Given a value, creates a tuple of (value, “"). This enables the pattern ‘print nn value’ to print without a new line.
Complexity
Defined in: std/core/print.s line 103
supports_ansi(console {tag}) -> (bool)
Complexity
[supports_ansi()]Defined in: std/core/print.s line 108
colors(console {tag}) -> (colors {tag, console CLI, bool initialized})
Complexity
defered calls
Defined in: std/core/print.s line 181
set(colors, "reset_underline") -> ()
Complexity
Defined in: std/core/print.s line 179
set(colors, "reset_bold") -> ()
Complexity
Defined in: std/core/print.s line 177
set(colors, "reset_bg") -> ()
Complexity
Defined in: std/core/print.s line 175
set(colors, "reset_color") -> ()
Complexity
Defined in: std/core/print.s line 173
set(colors, "reset") -> ()
Complexity
Defined in: std/core/print.s line 171
set(colors, "strikethrough") -> ()
Complexity
Defined in: std/core/print.s line 169
set(colors, "reverse") -> ()
Complexity
Defined in: std/core/print.s line 167
set(colors, "blink") -> ()
Complexity
Defined in: std/core/print.s line 165
set(colors, "underline") -> ()
Complexity
Defined in: std/core/print.s line 163
set(colors, "italic") -> ()
Complexity
Defined in: std/core/print.s line 161
set(colors, "dim") -> ()
Complexity
Defined in: std/core/print.s line 159
set(colors, "bold") -> ()
Complexity
Defined in: std/core/print.s line 157
set(colors, "bg_black") -> ()
Complexity
Defined in: std/core/print.s line 155
set(colors, "bg_white") -> ()
Complexity
Defined in: std/core/print.s line 153
set(colors, "bg_cyan") -> ()
Complexity
Defined in: std/core/print.s line 151
set(colors, "bg_magenta") -> ()
Complexity
Defined in: std/core/print.s line 149
set(colors, "bg_blue") -> ()
Complexity
Defined in: std/core/print.s line 147
set(colors, "bg_yellow") -> ()
Complexity
Defined in: std/core/print.s line 145
set(colors, "bg_green") -> ()
Complexity
Defined in: std/core/print.s line 143
set(colors, "bg_red") -> ()
Complexity
Defined in: std/core/print.s line 141
set(colors, "bright_white") -> ()
Complexity
Defined in: std/core/print.s line 139
set(colors, "bright_cyan") -> ()
Complexity
Defined in: std/core/print.s line 137
set(colors, "bright_magenta") -> ()
Complexity
Defined in: std/core/print.s line 135
set(colors, "bright_blue") -> ()
Complexity
Defined in: std/core/print.s line 133
set(colors, "bright_yellow") -> ()
Complexity
Defined in: std/core/print.s line 131
set(colors, "bright_green") -> ()
Complexity
Defined in: std/core/print.s line 129
set(colors, "bright_red") -> ()
Complexity
Defined in: std/core/print.s line 127
set(colors, "black") -> ()
Complexity
Defined in: std/core/print.s line 125
set(colors, "white") -> ()
Complexity
Defined in: std/core/print.s line 123
set(colors, "cyan") -> ()
Complexity
Defined in: std/core/print.s line 121
set(colors, "magenta") -> ()
Complexity
Defined in: std/core/print.s line 119
set(colors, "blue") -> ()
Complexity
Defined in: std/core/print.s line 117
set(colors, "yellow") -> ()
Complexity
Defined in: std/core/print.s line 115
set(colors, "green") -> ()
Complexity
Defined in: std/core/print.s line 113
set(colors, "red") -> ()
Complexity
Defined in: std/core/convert.s line 44
exists(any ptr) -> (bool)
Complexity
Defined in: std/core/string.s line 32
exists(cstr) -> (bool)
Complexity
Defined in: std/graphics.s line 155
exists(Texture {tag, nat,float,float,nat,nat[]}) -> (bool)
Complexity
Defined in: std/core/convert.s line 189
bits(char) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 185
bits(nat32) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 185
bits(nat16) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 185
bits(nat8) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 62
bits(float) -> (bits {tag, nat value})
Retrieves the bit representation of a number of shift arithmetics and bitwise operations.
Complexity
Defined in: std/core/convert.s line 55
bits(int) -> (bits {tag, nat value})
Retrieves the bit representation of a number of shift arithmetics and bitwise operations.
Complexity
Defined in: std/core/convert.s line 49
bits(nat) -> (bits {tag, nat value})
Retrieves the bit representation of a number of shift arithmetics and bitwise operations.
Complexity
Defined in: std/core/convert.s line 88
lshift(bits, nat y) -> (bits {tag, nat value})
Reminder that bits store 64 bits and thus this shift should be casted to lower-bit numbers (e.g., nat16) to truncate leading ones.
Complexity
Defined in: std/core/convert.s line 95
rshift(bits, nat y) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 100
xor(bits, bits) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 105
band(bits, bits) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 110
bor(bits, bits) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 115
bnot(bits {tag, nat value}) -> (bits {tag, nat value})
Complexity
Defined in: std/core/convert.s line 128
tochar(nat8) -> (char)
Complexity
Defined in: std/core/convert.s line 193
slice(bits, nat from, nat to) -> (bits {tag, nat value})
The extracted range is shifted down so that from becomes bit 0.
Complexity
Potential errors
Defined in: std/core/allocators.s line 235
slice(edit arena, nat length) -> (mut any[] {follows any ptr surface.buf.unsafe_ptr})
This allocates a region of a given number of elements within an arena and returns a buffer interface wrapping it. It is an alternative to allocating buffers on the heap.
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(str, cstr _from, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(cstr _s, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(cstr _s, str, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(cstr _s, cstr _from, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(cstr _s, cstr _from, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 344
slice(str, nat from, nat to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
This operation does not perform any additional allocations or memory moves and is thus convenient for parsing code. Explicitly copy the result to move it away from volatile memory, such as circular buffers.
Complexity
Potential errors
Defined in: std/core/string.s line 344
slice(cstr _s, nat from, nat to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
This operation does not perform any additional allocations or memory moves and is thus convenient for parsing code. Explicitly copy the result to move it away from volatile memory, such as circular buffers.
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(str, str, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(str, str, cstr _to) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 418
slice(str, cstr _from, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/convert.s line 203
mask(bits, nat from, nat to, bits) -> (bits {tag, nat value})
The provided value must fit entirely inside the selected bit range.
Bit 0 of other is written at position from.
Complexity
Potential errors
Defined in: std/core/range.s line 34
of(nat from, "len", nat length) -> (nat from, nat)
Represents the range [from, from+length] where ‘from’ and ‘length’ are the arguments.
Complexity
Defined in: std/core/range.s line 29
of(nat from, "upto", nat to) -> (nat from, nat)
Represents the range [from, to] where ‘from’ and ‘to’ are the arguments.
Complexity
Defined in: std/core/range.s line 24
of(nat from, "to", nat to) -> (nat from, nat to)
Represents the range [from, to) where ‘from’ and ‘to’ are the arguments.
Complexity
Defined in: std/core/range.s line 19
of(nat) -> (nat from, nat to)
Represents the range [0, to) where ‘to’ its its arguments.
Complexity
Defined in: std/core/range.s line 39
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
Endpoints are natural numbers (unsigned integers). This is handy for several kinds of iteration. When iterating over ranges, it matters whether they are constant or not in whether the first element is modified to track iteration progress or not. Also use ’of’ to construct descriptive ranges. Example:
import std.core
def main()
CLI = edit console()
r = range of(0 to 3)
for i in r: print i
print r.from
In this example, the final print retains value 0 because the range is constant, which evokes the constant range ‘get’ iterator. However, if the range was mutable, the starting position would be modified via the ‘mutget’ iterator to consume its elements. In most usage scenarios this does not matter, as the range would be a temporary creation.
Complexity
Defined in: std/core/range.s line 60
mutget(edit range {tag, mut nat from, nat to}) -> (nat)
This increments the range from position and returns the previous one.
Complexity
Potential errors
Defined in: std/core/range.s line 60
mutget(edit range, nat skipped) -> (nat)
This increments the range from position and returns the previous one.
Complexity
Potential errors
Defined in: std/core/allocators.s line 145
mutget(edit list, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 145
mutget(edit list, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 145
mutget(edit circular, nat pos) -> (mut any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 109
mutget(edit arena, nat pos) -> (mut any ptr {follows any ptr l.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 109
mutget(edit arena, nat pos, "unsafe_assume_inbounds") -> (mut any ptr {follows any ptr l.buf.unsafe_ptr})
Complexity
Defined in: std/core/array.s line 83
mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
This uses pointer arithmetics to index the buffer, basically performing the operation
i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment
equal to element size, but more complicated situations arise in situations where sub-buffers
are retrieved or sliced.
Complexity
Potential errors
Defined in: std/core/array.s line 83
mutget(edit any[], nat i, "unsafe_assume_inbounds") -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
This uses pointer arithmetics to index the buffer, basically performing the operation
i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment
equal to element size, but more complicated situations arise in situations where sub-buffers
are retrieved or sliced.
Complexity
Defined in: std/io.s line 26
mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit circular, edit terminal, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit circular, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit circular, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit circular, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit terminal, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit write, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 26
mutget(edit arena, edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/io.s line 23
mutget(edit open, nat) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/map.s line 49
mutget(edit robinhood_nat_entry[], edit any[], nat key) -> (mut any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/map.s line 39
mutget(edit robinhood_str_entry[], edit any[], str) -> (mut any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/map.s line 39
mutget(edit robinhood_str_entry[], edit any[], cstr key) -> (mut any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/sci/vec.s line 61
mutget(edit vec, nat i) -> (mut float ptr)
Complexity
Potential errors
Defined in: std/sci/vec.s line 61
mutget(edit vec, nat i, "unsafe_assume_inbounds") -> (mut float ptr)
Complexity
Defined in: std/sci/coo.s line 52
mutget(edit coo, nat k) -> (mut sparse_element ptr)
Complexity
Potential errors
Defined in: std/sci/coo.s line 52
mutget(edit coo, nat k, "unsafe_assume_inbounds") -> (mut sparse_element ptr)
Complexity
Defined in: std/sci/mat.s line 59
mutget(edit mat, nat i, nat j) -> (mut float ptr)
Complexity
Potential errors
Defined in: std/core/range.s line 68
get(range, nat _pos) -> (nat)
The item itself is returned. This lets the range be used as an iterator
per a pattern like for i in range 10 ....
Complexity
Potential errors
Defined in: std/core/allocators.s line 138
get(list, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 138
get(list, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 138
get(circular, nat pos) -> (any ptr {follows any ptr self.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 99
get(arena, nat pos) -> (any ptr {follows any ptr l.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 99
get(arena, nat pos, "unsafe_assume_inbounds") -> (any ptr {follows any ptr l.buf.unsafe_ptr})
Complexity
Defined in: std/core/array.s line 96
get(any[], nat i) -> (any ptr {follows any ptr buffer.unsafe_ptr})
This uses pointer arithmetics to index the buffer, basically performing the operation
i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment
equal to element size, but more complicated situations arise in situations where sub-buffers
are retrieved or sliced.
Complexity
Potential errors
Defined in: std/core/array.s line 96
get(any[], nat i, "unsafe_assume_inbounds") -> (any ptr {follows any ptr buffer.unsafe_ptr})
This uses pointer arithmetics to index the buffer, basically performing the operation
i*buffer.unsafe_align+buffer.unsafe_offset. Fresh buffers have zero offset and alignment
equal to element size, but more complicated situations arise in situations where sub-buffers
are retrieved or sliced.
Complexity
Defined in: std/core/string.s line 330
get(str, nat i) -> (char ptr)
Complexity
Potential errors
Defined in: std/core/string.s line 330
get(str, nat i, "unsafe_assume_inbounds") -> (char ptr)
Complexity
Defined in: std/map.s line 34
get(robinhood_str_entry[], any[], cstr key) -> (any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/map.s line 44
get(robinhood_nat_entry[], any[], nat key) -> (any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/map.s line 34
get(robinhood_str_entry[], any[], str) -> (any ptr {follows any ptr values.unsafe_ptr})
Implemented for string or cstr keys but buffer of any values.
Complexity
Potential errors
Defined in: std/net/fetch.s line 88
get(edit circular, str) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 88
get(edit arena, cstr url) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 88
get(edit arena, str) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 88
get(new CHARS, cstr url) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 88
get(new CHARS, str) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 88
get(edit circular, cstr url) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/sci/vec.s line 67
get(vec, nat i) -> (float ptr)
Complexity
Potential errors
Defined in: std/sci/vec.s line 67
get(vec, nat i, "unsafe_assume_inbounds") -> (float ptr)
Complexity
Defined in: std/sci/coo.s line 43
get(coo, nat k) -> (sparse_element ptr)
Complexity
Potential errors
Defined in: std/sci/coo.s line 43
get(coo, nat k, "unsafe_assume_inbounds") -> (sparse_element ptr)
Complexity
Defined in: std/sci/mat.s line 65
get(mat, nat i, nat j) -> (float ptr)
Complexity
Potential errors
Defined in: std/sci/mat.s line 65
get(mat, nat i, nat j, "unsafe_assume_inbounds") -> (float ptr)
Complexity
Defined in: std/core/units.s line 19
KB(nat) -> (nat)
Complexity
Defined in: std/core/units.s line 23
MB(nat) -> (nat)
Complexity
Defined in: std/core/units.s line 27
GB(nat) -> (nat)
Complexity
Defined in: std/unsafe.s line 25
alloc(nat) -> (mut any ptr)
Allocates a memory of the provided size in bytes.
Complexity
Potential errors
Defined in: std/core/string.s line 26
alloc(new CHARS, nat length) -> (mut allocated {tag, mut char[], mut nat pos}) with effects CHARS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/allocators.s line 219
alloc(edit list {tag, mut any[], mut nat length}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Creates room for one element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 219
alloc(edit list, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Complexity
Potential errors
Defined in: std/core/allocators.s line 219
alloc(edit list {tag, mut any[], mut nat length}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Creates room for one element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 219
alloc(edit list, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Complexity
Potential errors
Defined in: std/core/allocators.s line 205
alloc(edit circular {tag, edit any[], mut nat pos}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Creates room for one element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 205
alloc(edit circular, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket) -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket, "dirty") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket, "unsafe_first") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions. This version allocates a buffer of ONE element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket, nat size) -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket, nat size, "dirty") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.
Complexity
Potential errors
Defined in: std/core/allocators.s line 179
alloc(edit any[], edit bucket, nat size, "unsafe_first") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers, as it never reallocates an allocation. The allocated memory is tracked alongside others on an allocation bucket, so that they are released all together. This strategy entangles the return with the bucket, but at least ensures that only one easy-to-track bucket should be moved across functions.
Complexity
Potential errors
Defined in: std/core/allocators.s line 149
alloc(edit arena {tag, edit any[], mut nat pos}) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Creates room for one element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 149
alloc(edit arena, nat length) -> (edit allocated {tag, edit any[] {follows any ptr allocator.buf.unsafe_ptr}, nat pos})
Complexity
Potential errors
Defined in: std/core/array.s line 55
alloc(nat) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[]) -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/array.s line 23
alloc(edit any[], "dirty") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], "dirty", "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/array.s line 23
alloc(edit any[], "unsafe_first") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], "unsafe_first", "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/array.s line 23
alloc(edit any[], nat size) -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], nat size, "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/array.s line 23
alloc(edit any[], nat size, "dirty") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], nat size, "dirty", "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/array.s line 23
alloc(edit any[], nat size, "unsafe_first") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 23
alloc(edit any[], nat size, "unsafe_first", "unsafe_leaky") -> (edit any[])
Allocates an empty buffer and zero-initializes it. This is stable with regards to pointers,
as it never reallocates an allocation. 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.
Complexity
Potential errors
Defined in: std/core/string.s line 132
alloc(edit bucket, nat length) -> (edit allocated {tag, edit char[], nat pos})
Complexity
Potential errors
Defined in: std/tag.s line 40
alloc(cstr) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/tag.s line 40
alloc(cstr surface, cstr obj) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/array.s line 60
resize(edit any[], nat size) -> (edit any[])
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.
Complexity
Potential errors
Defined in: std/core/array.s line 60
resize(edit any[], nat size, "unsafe") -> (edit any[])
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.
Complexity
Potential errors
Defined in: std/core/array.s line 77
last(edit any[]) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
Complexity
Potential errors
Defined in: std/core/allocators.s line 135
len(list {tag, any[], nat length}) -> (nat)
Complexity
Defined in: std/core/allocators.s line 135
len(list {tag, any[], nat length}) -> (nat)
Complexity
Defined in: std/core/allocators.s line 84
len(arena {tag, any[], nat pos}) -> (nat)
This is not the total arena size, but rather the number of elements actively in use.
Complexity
Defined in: std/core/array.s line 109
len(any[]) -> (nat)
Complexity
Defined in: std/core/string.s line 105
len(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)
Complexity
Defined in: std/sci/vec.s line 57
len(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (nat)
Complexity
Defined in: std/core/allocators.s line 22
new() -> (new {tag})
Complexity
Defined in: std/core/allocators.s line 26
bucket_contents() -> (edit bucket_contents {tag, mut any ptr elements {follows any ptr ..}, mut nat size, mut nat allocated})
Complexity
Potential errors
Defined in: std/core/allocators.s line 33
bucket() -> (edit bucket {tag, mut bucket_contents ptr unsafe_ptr})
This is similar to ’new’ but moves all allocated memory together, releasing it only when there is no further use for any of its contents. Do note that this operation is typically the lazy way out, as it acquires and releases memory using one extra layer of indirection compared to structures like arenas. On the other hand, it’s pretty versatile for holding conditional results. Example:
import std.core
def conditional(bool case)
CHARS = edit bucket()
if case s = copy 123
else s = copy 345
return (s, CHARS) # this would not be possible with 'CHARS = new()'
def main()
CLI = edit console()
print conditional true
print conditional false
Complexity
Potential errors
defered calls
of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
ptr
mul(nat x, nat y) -> (nat)
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
dereference_ptr(any ptr) -> (any ptr)
free(mut any ptr) -> ()
free(mut any ptr) -> ()
free(mut any ptr) -> ()
Defined in: std/core/string.s line 23
arena("char__t9t") -> (edit arena {tag, edit char[], mut nat pos})
Complexity
Defined in: std/core/allocators.s line 75
arena(edit any[]) -> (edit arena {tag, edit any[] {follows any ptr buf.unsafe_ptr}, mut nat pos})
The position starts from 0. This structure is often used to track the size of allocated data within the buffer. Contrary to circular buffers, arenas are not freed automatically and therefore eventually run out of space. However, they come with data integrity guarantees.
Complexity
Defined in: std/core/allocators.s line 63
arena(edit any[], nat _pos) -> (edit arena {tag, edit any[], mut nat pos})
This structure is often used to track the size of allocated
data within the buffer.
Contrary to circular buffers, arenas are not freed automatically
and therefore eventually run out of space. However, they come
with data integrity guarantees. Attach a garbage
collector to an arena per gc arena alloc 4 (or construct it
with another allocator).
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4174t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4108t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t3821t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t655t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t616t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t614t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t612t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 281
arena(edit vec {tag, mut float ptr unsafe_ptr, nat pos, nat length}) -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/core/allocators.s line 90
allocated(edit any[], nat pos) -> (edit allocated {tag, edit any[], nat pos})
Complexity
Defined in: std/core/allocators.s line 93
status(allocated {tag, any[], nat pos}) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)
This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.
Complexity
Defined in: std/core/allocators.s line 93
status(arena {tag, any[], nat pos}) -> (any[] {follows any ptr self.buf.unsafe_ptr}, nat)
This unpacking is used to pass an arena’s state or allocated memory data as part of structural input.
Complexity
Defined in: std/core/string.s line 24
circular("char__t9t") -> (edit circular {tag, edit char[], mut nat pos})
Complexity
Defined in: std/core/allocators.s line 119
circular(edit any[]) -> (edit circular {tag, edit any[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4174t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4108t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t3821t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t655t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t616t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t614t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t612t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/core/string.s line 25
list("char__t9t") -> (edit list {tag, mut char[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/allocators.s line 124
list(edit any[], "external") -> (edit list {tag, mut any[] {follows any ptr _buf.unsafe_ptr}, mut nat length})
List defined over a mutable buf that is automatically managed and resized. A capacity is maintained so that resizes are not performed too frequently.
Complexity
Defined in: std/core/allocators.s line 124
list(edit any[]) -> (edit list {tag, mut any[] {follows any ptr _buf.unsafe_ptr}, mut nat length})
List defined over a mutable buf that is automatically managed and resized. A capacity is maintained so that resizes are not performed too frequently.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t4174t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t4108t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t3821t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t655t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t616t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t614t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t612t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 25
list("float__t4t") -> (edit list {tag, mut float[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/allocators.s line 160
unsafe_alloc(edit bucket {tag, mut bucket_contents ptr unsafe_ptr}) -> (mut any ptr {follows any ptr ..})
Creates room for one element.
Complexity
Potential errors
Defined in: std/core/allocators.s line 160
unsafe_alloc(edit bucket, nat bytes) -> (mut any ptr {follows any ptr ..})
Complexity
Potential errors
Defined in: std/core/allocators.s line 231
at(edit allocated {tag, edit any[], nat pos}) -> (mut any ptr {follows any ptr surface.buf.unsafe_ptr})
Complexity
Potential errors
Defined in: std/hash.s line 87
at(edit robinhood_nat_entry[], nat _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 87
at(edit robinhood_str_entry[], str) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 87
at(edit robinhood_str_entry[], cstr _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/sci/vec.s line 79
at(vec, nat i) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 76
at(float number, nat i) -> (float)
Complexity
Defined in: std/core/string.s line 25
list("char__t9t") -> (edit list {tag, mut char[], mut nat length})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 24
circular("char__t9t") -> (edit circular {tag, edit char[], mut nat pos})
Complexity
Defined in: std/core/string.s line 23
arena("char__t9t") -> (edit arena {tag, edit char[], mut nat pos})
Complexity
Defined in: std/core/allocators.s line 33
bucket() -> (edit bucket {tag, mut bucket_contents ptr unsafe_ptr})
This is similar to ’new’ but moves all allocated memory together, releasing it only when there is no further use for any of its contents. Do note that this operation is typically the lazy way out, as it acquires and releases memory using one extra layer of indirection compared to structures like arenas. On the other hand, it’s pretty versatile for holding conditional results. Example:
import std.core
def conditional(bool case)
CHARS = edit bucket()
if case s = copy 123
else s = copy 345
return (s, CHARS) # this would not be possible with 'CHARS = new()'
def main()
CLI = edit console()
print conditional true
print conditional false
Complexity
Potential errors
defered calls
of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
ptr
mul(nat x, nat y) -> (nat)
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
dereference_ptr(any ptr) -> (any ptr)
free(mut any ptr) -> ()
free(mut any ptr) -> ()
free(mut any ptr) -> ()
Defined in: std/core/allocators.s line 22
new() -> (new {tag})
Complexity
Defined in: std/core/string.s line 37
strdat(nat pos, nat length, char first) -> (nat pos, nat length, char first)
Complexity
Defined in: std/mini.s line 22
strdat(nat _pos, nat _length) -> (nat16 pos, nat16 length)
Complexity
Potential errors
Defined in: std/core/string.s line 69
str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 65
str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 57
str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 57
str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 50
str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 45
str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 41
str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 93
str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.
Complexity
Defined in: std/core/string.s line 86
str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 77
str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/convertstr.s line 113
str(edit arena, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The read string is placed on an arena while consuming only the necessarily minimum size.
Complexity
Potential errors
Defined in: std/core/convertstr.s line 113
str(new CHARS, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/mini.s line 35
str(cstr) -> (str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length})
The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.
Complexity
Potential errors
Defined in: std/mini.s line 27
str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length})
The created str variation should be used only for storng and retrieving data with ‘unpack’ for memory efficiency.
Complexity
Potential errors
Defined in: std/ptrpeek.s line 59
str(cstr ptr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/ptrpeek.s line 59
str(str ptr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit list, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit list, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit circular, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit circular, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit arena, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit arena, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit bucket, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(edit bucket, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
Defined in: std/core/string.s line 143
copy(new CHARS, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 143
copy(new CHARS, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is a fresh string in a new memory surface effect CHARS. The result is guaranteed to be a bit-correct replica of the string immediately after. But, even though strings cannot be edited, their supporting memory can be corrupted with new data, especially when they are placed on reused arenas or circular buffers. That said, that would be a logical bug of insufficient sizing or sequencing. Strings remain valid slices of allocated memory regions without runtime failures; they always preserve their size.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 135
copy(edit list, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 135
copy(edit circular, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 135
copy(edit arena, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 135
copy(edit bucket, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 135
copy(new CHARS, char other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 571
copy(edit list, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 571
copy(edit circular, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 571
copy(edit arena, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 571
copy(edit bucket, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
Defined in: std/core/string.s line 571
copy(new CHARS, float n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 510
copy(edit list, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on a character memory surface effect CHARS. Example:
CHARS = edit list char[]
s = copy 123
Complexity
Potential errors
Defined in: std/core/string.s line 510
copy(edit circular, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on a character memory surface effect CHARS. Example:
CHARS = edit circular alloc 10
s = copy 123
Complexity
Potential errors
Defined in: std/core/string.s line 510
copy(edit arena, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on a character memory surface effect CHARS. Example:
CHARS = edit arena alloc 10
s = copy 123
Complexity
Potential errors
Defined in: std/core/string.s line 510
copy(edit bucket, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on a character memory surface effect CHARS. Example:
s = copy 123
Complexity
Potential errors
Defined in: std/core/string.s line 510
copy(new CHARS, nat n) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The result is placed on a character memory surface effect CHARS. Example:
CHARS = new()
s = copy 123
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/vec.s line 272
copy(edit circular, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/vec.s line 272
copy(edit arena, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS for the result as an effect.
Complexity
Potential errors
Defined in: std/sci/vec.s line 272
copy(new FLOATS, vec) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Grabs a FLOATS for the result as an effect.
Complexity
Potential errors
Defined in: std/core/string.s line 306
copy_null_terminated(edit arena, cstr _other) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
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.
Complexity
Potential errors
Defined in: std/core/string.s line 306
copy_null_terminated(edit arena, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
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.
Complexity
Potential errors
Defined in: std/core/string.s line 161
copy_null_terminated(new CHARS, str) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
Copies a string to a new buffer while ensuring null termination. This is mainly useful for supporting ‘cstr unsafe_temp’.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 212
unsafe_temp(cstr) -> (cstr cstr, str)
This is mainly used as a stt-input counterpart for converting str|cstr to cstr.
Complexity
Defined in: std/core/string.s line 173
unsafe_temp(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (unsafe_temp {tag, cstr cstr, str})
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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 173
unsafe_temp(str, str) -> (unsafe_temp {tag, cstr cstr, str})
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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/string.s line 224
endpos(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (nat)
This position is computed relative to its start in its enclosing buffer.
Complexity
Defined in: std/core/string.s line 230
revalidate(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
This operation should be rarely used, if at all. It basically re-retrieves the first character of the string from its supporting memory surface. Normal bug-free code can continue to operate properly even without this operation, but if memory gets corrupted you can use this operation to obtain a string that properly matches the underlying memory for its new data. Here is an example:
CHARS = edit arena alloc 8
s1 = copy 123 # place '123' on the arena
CHARS.pos = 0 # manually reset the arena
copy 456 # place different data on the arena
print s1.dat.first # prints 1 (wrong cached first character)
print s1 # prints 456
s2 = revalidate s1
print s2.dat.first # prints 2
Complexity
Defined in: std/core/string.s line 358
starts_with(str, str) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 358
starts_with(str, cstr _needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 358
starts_with(cstr _stack, str) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 358
starts_with(cstr _stack, cstr _needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 366
ends_with(str, str) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 366
ends_with(str, cstr _needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 366
ends_with(cstr _stack, str) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 366
ends_with(cstr _stack, cstr _needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 384
contains(str, str) -> (bool)
Complexity
Defined in: std/core/string.s line 384
contains(str, cstr _needle) -> (bool)
Complexity
Defined in: std/core/string.s line 384
contains(cstr _stack, str) -> (bool)
Complexity
Defined in: std/core/string.s line 384
contains(cstr _stack, cstr _needle) -> (bool)
Complexity
Defined in: std/core/string.s line 376
contains(str, char needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 376
contains(cstr _stack, char needle) -> (bool)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, str) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, str, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, str, nat _skip) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, str, nat _skip, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, cstr _needle) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, cstr _needle, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, cstr _needle, nat _skip) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(str, cstr _needle, nat _skip, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, str) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, str, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, str, nat _skip) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, str, nat _skip, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, cstr _needle) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, cstr _needle, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, cstr _needle, nat _skip) -> (nat)
Complexity
Potential errors
Defined in: std/core/string.s line 397
find(cstr _stack, cstr _needle, nat _skip, "end_pos") -> (nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(nat[], nat _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(str[], str) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(str[], cstr _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(robinhood_nat_entry[], nat _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(robinhood_str_entry[], str) -> (mut nat)
Complexity
Potential errors
Defined in: std/hash.s line 69
find(robinhood_str_entry[], cstr _k) -> (mut nat)
Complexity
Potential errors
Defined in: std/core/string.s line 504
empty(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (bool)
Prefer this check because its cstr-checking counterpar is faster than casting to a string.
Complexity
Defined in: std/core/string.s line 496
empty(cstr) -> (bool)
There are two conditions checked: a) that the cstr is an emptry pair of brackets, b) that the cstr is zero-initialized, corresponding to a null memory address. This function is faster than ‘0==len str c’, as there is no need to actually traverse the character contents.
Complexity
Defined in: std/core/convertstr.s line 31
is_number(char) -> (bool)
Complexity
Defined in: std/core/error.s line 31
ok(last_error) -> (bool)
Complexity
Defined in: std/core/format.s line 4
printf(cstr) -> (mut char[])
This splits the provided string into subsegments and bracketed expressions.
Ignoring empty substrings, the same function call is made for all substrings
and expressions. Example, where the default applied call is print nn:
import std.core
def main()
CLI = edit console()
macro<printf> "hello {1+1} word\n"
This variation outputs an empty buffer.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/format.s line 4
printf(cstr func, cstr args) -> (mut char[])
This splits the provided string into subsegments and bracketed expressions. Ignoring empty substrings, the same function call is made for all substrings and expressions. The results are placed on a buffer; this makes no allocation in case of blank types, but otherwise this pattern can be used to apply the same conceptual transformation on heterogeneous data to yield the same output. Printing like above is the main intended use, but consider the logic of the following example too:
import std.core
import std.format::F
def inc(nat x)
return float(x+1)
def inc(float x)
return x+1.0
def main()
CLI = edit console()
v = macro<printf>("inc", "{1}{5.0}")
print v[0] # 2.0
print v[1] # 6.0
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/rand.s line 26
rotl(nat x, nat k) -> (nat)
Complexity
Defined in: std/rand.s line 56
splitmix64("time") -> (nat)
Computes the seed of a splitmix64 sequence using the clock as the source of entropy.
Complexity
[time.time_ns()]Defined in: std/rand.s line 34
splitmix64(mut nat) -> (mut nat)
Computes the next number of a splitmix64 random 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).
Complexity
Defined in: std/rand.s line 79
Rand() -> (edit Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3})
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 nat state fields. This version defaults to a time-based seed. Its period is 2^256-1.
Complexity
Defined in: std/rand.s line 66
Rand(nat) -> (edit Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3})
Xoshiro256plus random numbers from https://prng.di.unimi.it/ These and are NOT cryptographically secure. This a type for storing the progress of random number generators on four nat state fields. The version is seed-initalized. Its period is 2^256-1.
Complexity
Defined in: std/rand.s line 87
next(mut Rand {tag, mut nat s0, mut nat s1, mut nat s2, mut nat s3}) -> (float)
Computes the next random number of a Rand sequence.
Complexity
Defined in: std/map.s line 54
next(robinhood_nat_entry[], mut nat pos) -> (mut nat)
Complexity
Potential errors
Defined in: std/map.s line 54
next(robinhood_str_entry[], mut nat pos) -> (mut str {tag, mut char ptr unsafe_ptr, mut nat dat.pos, mut nat dat.length, mut char dat.first})
Complexity
Potential errors
Defined in: builtins line 1
nat
Represents values in the range 0 to 2^64-1.
Defined in: builtins line 1
float
Defined in: builtins line 1
cstr
Defined in: std/core/convert.s line 170
nat(nat32) -> (nat)
Complexity
Defined in: std/core/convert.s line 170
nat(nat16) -> (nat)
Complexity
Defined in: std/core/convert.s line 170
nat(nat8) -> (nat)
Complexity
Defined in: std/core/convert.s line 81
float(bits {tag, nat value}) -> (float)
Converts a bit representation to the corresponding float number.
Complexity
Defined in: std/core/convert.s line 70
nat(bits {tag, nat value}) -> (nat)
Converts a bit representation to the corresponding natural number.
Complexity
Defined in: std/core/convert.s line 35
nat(nat) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Defined in: std/core/convert.s line 35
nat(int) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Potential errors
Defined in: std/core/convert.s line 35
nat(float) -> (nat)
Converting to natural numbers loses information. Fails on negative inputs to guard against assumption errors.
Complexity
Potential errors
Defined in: std/core/convert.s line 20
float(nat) -> (float)
May lose information because floats are not exact representation of all integers.
Complexity
Defined in: std/core/convert.s line 20
float(int) -> (float)
May lose information because floats are not exact representation of all integers.
Complexity
Defined in: std/core/convert.s line 20
float(float) -> (float)
Serves as a tautology function for code that parses on multiple number types.
Complexity
Defined in: std/core/string.s line 69
str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 65
str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 57
str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 57
str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 50
str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 45
str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 41
str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 218
cstr(cstr cstr, str) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 93
str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.
Complexity
Defined in: std/core/string.s line 86
str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 77
str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/hash.s line 29
hash(nat k, nat size) -> (nat)
Complexity
Potential errors
Defined in: std/hash.s line 23
hash(str, nat size) -> (nat)
Complexity
Potential errors
Defined in: std/hash.s line 43
to_hash_base(nat) -> (bits {tag, nat value})
Complexity
Defined in: std/hash.s line 43
to_hash_base(int) -> (bits {tag, nat value})
Complexity
Defined in: std/hash.s line 43
to_hash_base(float) -> (bits {tag, nat value})
Complexity
Defined in: std/hash.s line 40
to_hash_base(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/hash.s line 40
to_hash_base(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/hash.s line 46
robinhood_str_entry(str, nat cost) -> (str, nat cost)
Complexity
Defined in: std/hash.s line 49
robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)
Complexity
Defined in: std/hash.s line 49
robinhood_nat_entry(nat s, nat cost) -> (nat s, nat cost)
Complexity
Defined in: std/hash.s line 46
robinhood_str_entry(str, nat cost) -> (str, nat cost)
Complexity
Defined in: std/hash.s line 60
raw(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/hash.s line 57
raw(nat) -> (nat)
Complexity
Defined in: std/hash.s line 57
raw(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/hash.s line 54
raw(nat s, nat cost) -> (nat)
Complexity
Defined in: std/hash.s line 54
raw(str, nat cost) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/hash.s line 66
is_zero(nat) -> (bool)
Complexity
Defined in: std/hash.s line 63
is_zero(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (bool)
Complexity
Defined in: std/map.s line 20
strmap(edit any[]) -> (mut robinhood_str_entry[], edit any[])
Maps string indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/map.s line 27
natmap(edit any[]) -> (mut robinhood_nat_entry[], edit any[])
Maps number indexes to the buffer provided using a robinhood scheme. Map size is static and cannot be adjusted after initialization.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/mini.s line 47
unpack(char[], nat16 dat.pos, nat16 dat.length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/mini.s line 41
unpack(str {tag, char ptr unsafe_ptr, nat16 dat.pos, nat16 dat.length}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The created compact str is unpacked into its ’nat’-using representation that is more efficient for computations in 64-bit architectures.
Complexity
Defined in: std/net/fetch.s line 92
post(edit circular, cstr url, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, cstr url, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, str, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, str, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit circular, str, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, cstr url, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, cstr url, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, str, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, str, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(edit arena, str, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
Defined in: std/net/fetch.s line 92
post(new CHARS, cstr url, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, cstr url, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, cstr url, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, cstr url, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, str, cstr _body) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, str, cstr _body, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, str, str) -> (nat status, str) with effects CHARS
The default application/json content type is used.
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/net/fetch.s line 92
post(new CHARS, str, str, cstr content_type) -> (nat status, str) with effects CHARS
Complexity
Potential errors
defered calls
exists(any ptr) -> (bool)
free(mut any ptr) -> ()
Defined in: std/sci/math.s line 20
abs(float) -> (float)
Complexity
Defined in: std/sci/math.s line 27
abs(int) -> (int)
Complexity
Defined in: std/sci/math.s line 34
sqrt(float) -> (float)
Complexity
Defined in: std/sci/math.s line 39
sin(float) -> (float)
Complexity
Defined in: std/sci/math.s line 44
cos(float) -> (float)
Complexity
Defined in: std/sci/math.s line 49
log(float) -> (float)
Complexity
Defined in: std/sci/math.s line 54
tan(float) -> (float)
Complexity
Defined in: std/sci/math.s line 59
floor(float) -> (int)
Complexity
Defined in: std/sci/math.s line 64
asin(float) -> (float)
Complexity
Defined in: std/sci/math.s line 69
acos(float) -> (float)
Complexity
Defined in: std/sci/math.s line 79
atan(float x, float y) -> (float)
Complexity
Defined in: std/sci/math.s line 74
atan(float) -> (float)
Complexity
Defined in: std/sci/math.s line 84
exp(float) -> (float)
Complexity
Defined in: std/sci/math.s line 94
isnan(float) -> (bool)
Complexity
[math.isnan(x)]Defined in: std/sci/math.s line 100
isinf(float) -> (bool)
Complexity
[math.isinf(x)]Defined in: std/sci/unsafe.s line 19
vec(float ptr unsafe_ptr, nat pos, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})
Warning: directly calling this constructor without safety checks is unsafe.
Complexity
Defined in: std/sci/vec.s line 48
vec(edit circular, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/vec.s line 48
vec(edit circular, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/vec.s line 48
vec(edit arena, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/vec.s line 48
vec(edit arena, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/vec.s line 36
vec(edit float[]) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})
Complexity
Potential errors
Defined in: std/sci/vec.s line 28
vec(new FLOATS, nat length) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.
Complexity
Potential errors
Defined in: std/sci/vec.s line 28
vec(new FLOATS, nat length, "dirty") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
Has the provided length. Requires a ’new()’ allocator to denote that the vector will be placed on a new buffer.
Complexity
Potential errors
Defined in: std/sci/mat.s line 86
vec(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})
Complexity
Defined in: std/sci/unsafe.s line 24
mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
Warning: directly calling this constructor without safety checks is unsafe.
Complexity
Defined in: std/sci/mat.s line 30
mat(new FLOATS, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/mat.s line 30
mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/mat.s line 75
mat(vec, "col") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.
Complexity
Defined in: std/sci/mat.s line 75
mat(vec, "row") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.
Complexity
Defined in: std/sci/mat.s line 53
mat(edit float[], nat rows) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit circular, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit arena, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/unsafe.s line 29
sparse_element(nat row, nat col, float value) -> (nat row, nat col, float value)
Complexity
Defined in: std/sci/unsafe.s line 32
coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
Warning: directly calling this constructor without safety checks is unsafe.
Complexity
Defined in: std/sci/coo.s line 40
coo(sparse_element[], nat rows, nat cols) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
Complexity
Defined in: std/sci/coo.s line 34
coo(nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
This creates a new buffer of sparse elements for convenience.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/core/allocators.s line 22
new() -> (new {tag})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4174t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4108t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t3821t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t655t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t616t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t614t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t612t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 24
circular("float__t4t") -> (edit circular {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4174t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4108t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t3821t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t655t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t616t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t614t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t612t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 23
arena("float__t4t") -> (edit arena {tag, edit float[], mut nat pos})
Complexity
Defined in: std/sci/vec.s line 42
constvec(float[]) -> (vec {tag, float ptr unsafe_ptr, nat pos, nat length})
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "mul", "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "mul", "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "mul", "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "mul") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "add", "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "add", "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "add", "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "add") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec, "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, vec) -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "mul") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "add", "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "add", "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "add", "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "add") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "l2") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "sqr") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "abs") -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)
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.
Complexity
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "mul", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "mul", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "mul", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "mul") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "add", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "add", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "add", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "add") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec, "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "rel", vec) -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "mul", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "mul", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "mul", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "add", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "add", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "mul") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "add", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "add") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec, "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "sub", vec) -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "mul", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "mul", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "mul", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "mul") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "add", "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "add", "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "add", "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "add") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "l2") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "sqr") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec, "abs") -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 176
reduce(vec, "mul", vec) -> (float)
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.
Complexity
Potential errors
Defined in: std/sci/vec.s line 212
dot(vec, vec) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 216
sum(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)
Complexity
Defined in: std/sci/coo.s line 125
sum(coo, "all") -> (mut float)
Complexity
Defined in: std/sci/coo.s line 117
sum(edit circular, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[j] = sum of all stored values in column j
Complexity
Potential errors
Defined in: std/sci/coo.s line 117
sum(edit arena, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[j] = sum of all stored values in column j
Complexity
Potential errors
Defined in: std/sci/coo.s line 117
sum(new FLOATS, coo, "col") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[j] = sum of all stored values in column j
Complexity
Potential errors
Defined in: std/sci/coo.s line 109
sum(edit circular, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[i] = sum of all stored values in row i
Complexity
Potential errors
Defined in: std/sci/coo.s line 109
sum(edit arena, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[i] = sum of all stored values in row i
Complexity
Potential errors
Defined in: std/sci/coo.s line 109
sum(new FLOATS, coo, "row") -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) with effects FLOATS
result[i] = sum of all stored values in row i
Complexity
Potential errors
Defined in: std/sci/stats.s line 32
mean(accumulator {tag, float sums, float square_sums, nat count}) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 220
mean(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 224
min(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (mut float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 231
max(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (mut float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 239
var(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)
Complexity
Potential errors
Defined in: std/sci/stats.s line 35
std(accumulator {tag, float sums, float square_sums, nat count}) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 250
std(vec {tag, float ptr unsafe_ptr, nat pos, nat length}) -> (float)
Complexity
Potential errors
Defined in: std/sci/vec.s line 288
self(mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length}) -> (edit arena, mut vec)
Complexity
Defined in: std/sci/stats.s line 21
accumulator() -> (edit accumulator {tag, mut float sums, mut float square_sums, mut nat count})
Complexity
Defined in: std/sci/stats.s line 27
append(edit accumulator, float value) -> ()
Complexity
Defined in: std/sci/stats.s line 40
pearson(vec, vec) -> (float)
Complexity
Potential errors
Defined in: std/sci/mat.s line 22
rows(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (nat)
Complexity
Defined in: std/sci/coo.s line 22
rows(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)
Complexity
Defined in: std/sci/mat.s line 26
cols(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (nat)
Complexity
Defined in: std/sci/coo.s line 26
cols(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)
Complexity
Defined in: std/sci/mat.s line 47
constmat(float[], nat rows) -> (mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride})
Complexity
Potential errors
Defined in: std/sci/mat.s line 90
mutvec(mat {tag, float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride}) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})
Complexity
Defined in: std/sci/mat.s line 94
row(mat, nat i) -> (mut vec {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat length})
Complexity
Potential errors
Defined in: std/sci/coo.s line 30
nnz(coo {tag, sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz}) -> (nat)
Complexity
Defined in: std/sci/coo.s line 88
todense(edit circular, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/coo.s line 88
todense(edit arena, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/coo.s line 88
todense(new FLOATS, coo) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/unsafe.s line 32
coo(sparse_element ptr unsafe_ptr, nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
Warning: directly calling this constructor without safety checks is unsafe.
Complexity
Defined in: std/sci/unsafe.s line 24
mat(float ptr unsafe_ptr, nat pos, nat rows, nat cols, nat stride) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
Warning: directly calling this constructor without safety checks is unsafe.
Complexity
Defined in: std/sci/mat.s line 30
mat(new FLOATS, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/mat.s line 30
mat(new FLOATS, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/coo.s line 40
coo(sparse_element[], nat rows, nat cols) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
Complexity
Defined in: std/sci/coo.s line 34
coo(nat rows, nat cols, nat nnz) -> (mut coo {tag, mut sparse_element ptr unsafe_ptr, mut nat rows, mut nat cols, mut nat nnz})
This creates a new buffer of sparse elements for convenience.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/sci/mat.s line 75
mat(vec, "col") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.
Complexity
Defined in: std/sci/mat.s line 75
mat(vec, "row") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
A ‘type “row"’ or ‘type “col"’ marker is needed to indicate the new matrix’s orientation.
Complexity
Defined in: std/sci/mat.s line 53
mat(edit float[], nat rows) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride})
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit circular, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit circular, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit arena, nat rows, nat cols) -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/sci/mat.s line 37
mat(edit arena, nat rows, nat cols, "dirty") -> (mut mat {tag, mut float ptr unsafe_ptr, mut nat pos, mut nat rows, mut nat cols, mut nat stride}) with effects FLOATS
Complexity
Potential errors
Defined in: std/tag.s line 20
tagged(cstr) -> (tagged {tag, cstr value})
Ensures that ‘tag ptr’ has a unique type and allocates at least a cstr’s (a pointer’s) worth of storage so that tag checking is always valid.
Complexity
Defined in: std/tag.s line 26
unsafe_match(tagged ptr obj, cstr name, any ptr type) -> (mut any ptr {follows any ptr type})
Complexity
Potential errors
Defined in: std/tag.s line 31
unsafe_defer_free(mut tagged ptr) -> (mut tagged ptr)
Complexity
defered calls
free(mut any ptr) -> ()
Defined in: std/tag.s line 36
tagged_alloc(edit arena, nat size) -> (mut char ptr)
Complexity
Potential errors
Defined in: std/tag.s line 63
match(cstr obj, cstr type_name) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/pipe.s line 123
match(cstr obj, cstr type_name) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/pipe.s line 21
pipe(cstr) -> (pipe {tag, cstr value})
Ensures that ‘pipe ptr’ has a unique type and allocates at least a cstr’s (a pointer’s) + sizeof(mutex_t) worth of storage so that tag checking and mutex checking are always valid.
Complexity
Defined in: std/pipe.s line 28
mutex_size() -> (nat)
Complexity
Defined in: std/pipe.s line 32
unsafe_pipe_lock(pipe ptr) -> ()
Complexity
Defined in: std/pipe.s line 36
unsafe_pipe_unlock(pipe ptr) -> ()
Complexity
Defined in: std/pipe.s line 40
with(pipe ptr) -> (with {tag, pipe ptr obj})
This blocks other threads from accessing its data.
Complexity
defered calls
unsafe_pipe_unlock(pipe ptr) -> ()
Defined in: std/pipe.s line 48
system_thread(any ptr) -> (system_thread {tag, any ptr unsafe_ptr})
Complexity
Defined in: std/pipe.s line 51
unsafe_spawn((pipe ptr) -> () func, pipe ptr input) -> (system_thread {tag, any ptr unsafe_ptr {follows any ptr _unsafe_ptr}})
Complexity
Defined in: std/pipe.s line 56
join(system_thread {tag, any ptr unsafe_ptr}) -> ()
Complexity
Defined in: std/pipe.s line 60
cpu(nat) -> (cpu {tag, nat cores})
Complexity
Defined in: std/pipe.s line 63
growing_thread_pool(cpu {tag, nat cores}) -> (edit growing_thread_pool {tag, cpu, mut arena, mut bool joined})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
not(bool) -> (bool)
len(any[]) -> (nat)
of(nat) -> (nat from, nat to)
range(nat _from, nat to) -> (edit range {tag, mut nat from, nat to})
mutget(edit range, nat skipped) -> (nat)
mutget(edit any[], nat i) -> (mut any ptr {follows any ptr buffer.unsafe_ptr})
join(system_thread {tag, any ptr unsafe_ptr}) -> ()
Defined in: std/pipe.s line 73
thread(edit growing_thread_pool, (pipe ptr) -> () func, pipe ptr input) -> (mut system_thread {tag, mut any ptr unsafe_ptr {follows any ptr ..unsafe_ptr}}) with effects THREADS
Complexity
Potential errors
Defined in: std/pipe.s line 78
unsafe_pipe_match(with, cstr name, any ptr type) -> (mut any ptr {follows any ptr type})
Complexity
Potential errors
Defined in: std/pipe.s line 83
unsafe_pipe_defer_free(mut pipe ptr) -> (mut pipe ptr)
Complexity
defered calls
free(mut any ptr) -> ()
Defined in: std/pipe.s line 88
unsafe_pipe_mutax_init(mut pipe ptr) -> (mut pipe ptr)
Complexity
defered calls
add(any ptr allocated, nat offset) -> (any ptr {follows any ptr allocated})
Defined in: std/pipe.s line 96
pipe_alloc(edit arena, nat size) -> (mut char ptr)
Complexity
Potential errors
Defined in: std/pipe.s line 100
shared(cstr) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/pipe.s line 100
shared(cstr surface, cstr obj) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 64) -> (unsafe_blob {tag, any ptr unsafe_ptr, 64})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 32) -> (unsafe_blob {tag, any ptr unsafe_ptr, 32})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 16) -> (unsafe_blob {tag, any ptr unsafe_ptr, 16})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 8) -> (unsafe_blob {tag, any ptr unsafe_ptr, 8})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 4) -> (unsafe_blob {tag, any ptr unsafe_ptr, 4})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 2) -> (unsafe_blob {tag, any ptr unsafe_ptr, 2})
Complexity
Defined in: std/blob.s line 19
unsafe_blob(any ptr unsafe_ptr, 1) -> (unsafe_blob {tag, any ptr unsafe_ptr, 1})
Complexity
Defined in: std/blob.s line 23
blob(64) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 64})
Complexity
Defined in: std/blob.s line 23
blob(32) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 32})
Complexity
Defined in: std/blob.s line 23
blob(16) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 16})
Complexity
Defined in: std/blob.s line 23
blob(8) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 8})
Complexity
Defined in: std/blob.s line 23
blob(4) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 4})
Complexity
Defined in: std/blob.s line 23
blob(2) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 2})
Complexity
Defined in: std/blob.s line 23
blob(1) -> (unsafe_blob {tag, any ptr unsafe_ptr {follows any ptr ..}, 1})
Complexity
Defined in: std/blob.s line 53
blob(cstr) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 28
as(unsafe_blob, char[]) -> (char[])
Complexity
Potential errors
Defined in: std/blob.s line 39
find_compatible_size(nat) -> (mut char[])
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/unsafe.s line 34
realloc(any ptr allocated, nat bytes) -> (any ptr {follows any ptr allocated})
Reallocates an allocated memory pointer, potentially invalidating the original one without any safety. As a stopgap measure against unforeseen complications, this function is set to invalidate all pointers in the calling context and parrent contexts, BESIDES calling function mutable arguments and calling function outputs, as those have the intent of immediate reuse.
Complexity
Potential errors
Defined in: std/unsafe.s line 34
realloc(any ptr allocated, nat bytes, "super_unsafe") -> (any ptr {follows any ptr allocated})
Reallocates an allocated memory pointer, potentially invalidating the original one without any safety. As a stopgap measure against unforeseen complications, this function is set to invalidate all pointers in the calling context and parrent contexts, BESIDES calling function mutable arguments and calling function outputs, as those have the intent of immediate reuse.
Complexity
Potential errors
Defined in: std/unsafe.s line 52
free(mut any ptr) -> ()
Frees allocated memory.
Complexity
Defined in: std/unsafe.s line 59
zero(any ptr allocated, nat from, nat to) -> ()
Memsets a memory region to zero.
Complexity
Defined in: std/unsafe.s line 74
dereference_ptr(any ptr) -> (any ptr)
Pointers directly pointing to pointers induce both indirection
and unsafety to the degree that idiomatic code just cannot do
without massive safety violations that the unsafety-inducing
model is not equipped to bypass without invalidating the
type system or derefencing mechanisms. This function performs
a well-controlled indirection instead that does not leave
any safety tracking residues AT ALL when called.
To make absolutely sure that using this is properly understood
the result is an immutable pointer, which often needs to be pass
through unsafe_mut, for example to be freed.
Complexity
Defined in: std/graphics.s line 21
color(nat _r, nat _g, nat _b) -> (nat8 r, nat8 g, nat8 b, nat8 a)
Complexity
Potential errors
Defined in: std/graphics.s line 21
color(nat _r, nat _g, nat _b, nat _a) -> (nat8 r, nat8 g, nat8 b, nat8 a)
Complexity
Potential errors
Defined in: std/graphics.s line 30
position(float x, float y) -> (float x, float y)
Complexity
Defined in: std/graphics.s line 33
size(float width, float height) -> (float width, float height)
Complexity
Defined in: std/graphics.s line 36
unsafe_open_window(float size.width, float size.height, cstr title, cstr font_path) -> ()
Complexity
Potential errors
(pyray.set_trace_log_level(pyray.LOG_NONE), pyray.init_window(int($size__width),int($size__height),$title),pyray.set_target_fps(60),memory.set_global('font', pyray.load_font_ex($font_path,128,None,0) if $font_path else pyray.get_font_default()))Defined in: std/graphics.s line 51
window(float size.width, float size.height, cstr title, cstr font_path) -> (edit window {tag, float size.width, float size.height, cstr title, mut bool ready})
Complexity
Potential errors
Defined in: std/graphics.s line 75
is_open(edit window {tag, float size.width, float size.height, cstr title, mut bool ready}) -> (bool) with effects WINDOW
Complexity
[not pyray.window_should_close()]Defined in: std/graphics.s line 80
unsafe_begin_drawing() -> ()
Complexity
pyray.begin_drawing()Defined in: std/graphics.s line 84
unsafe_end_drawing() -> ()
Complexity
pyray.end_drawing()Defined in: std/graphics.s line 90
draw(edit window {tag, float size.width, float size.height, cstr title, mut bool ready}) -> (bool) with effects WINDOW
Complexity
Potential errors
defered calls
unsafe_end_drawing() -> ()
Defined in: std/graphics.s line 99
clear(edit window, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.clear_background(pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 129
text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW
Complexity
pyray.draw_text_pro(memory.globals['font'].font,str($txt),pyray.Vector2($pos__x,$pos__y),pyray.Vector2($origin__x,$origin__y),$rotation,$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 129
text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW
Complexity
pyray.draw_text_pro(memory.globals['font'].font,str($txt),pyray.Vector2($pos__x,$pos__y),pyray.Vector2($origin__x,$origin__y),$rotation,$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 116
text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_text_ex(memory.globals['font'],str($txt),pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 116
text(edit window, str, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_text_ex(memory.globals['font'],str($txt),pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 103
text(edit window, cstr txt, float pos.x, float pos.y, float size, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_text_ex(memory.globals['font'],$txt,pyray.Vector2($pos__x,$pos__y),$size,1.0,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 144
sleep(nat) -> ()
Complexity
time.sleep($seconds*0.001)Defined in: std/time.s line 3
sleep(float secs, "skip_on_negative") -> ()
Other sleep functions may exist in the standard library, but this requires no extra linkage.
Complexity
Potential errors
Defined in: std/time.s line 3
sleep(float) -> ()
Other sleep functions may exist in the standard library, but this requires no extra linkage.
Complexity
Potential errors
Defined in: std/graphics.s line 148
TextureData(nat id, float size.width, float size.height, nat mipmaps, nat format) -> (nat id, float size.width, float size.height, nat mipmaps, nat format)
Complexity
Defined in: std/graphics.s line 151
Texture(nat id, float size.width, float size.height, nat mipmaps, nat format) -> (Texture {tag, nat,float,float,nat,nat[]})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/graphics.s line 158
open(cstr) -> (Texture {tag, nat,float,float,nat,nat[]})
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/graphics.s line 220
texture(edit window, Texture, float pos.x, float pos.y, float size.width, float size.height, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW
Complexity
Potential errors
Defined in: std/graphics.s line 207
texture(edit window, Texture, float pos.x, float pos.y, float scale, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW
Complexity
Potential errors
Defined in: std/graphics.s line 193
texture(edit window, Texture, float pos.x, float pos.y, float size.width, float size.height, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float rotation) -> () with effects WINDOW
Complexity
Potential errors
Defined in: std/graphics.s line 181
texture(edit window, Texture, float pos.x, float pos.y, float scale, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float rotation) -> () with effects WINDOW
Complexity
Potential errors
Defined in: std/graphics.s line 171
texture(edit window, Texture, float pos.x, float pos.y, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
Potential errors
Defined in: std/graphics.s line 320
circ(edit window, float pos.x, float pos.y, float radius, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_ring(pyray.Vector2($pos__x,$pos__y),max(0,$radius-$thickness),$radius,0,360,64,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 233
circ(edit window, float pos.x, float pos.y, float radius, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_circle_v(pyray.Vector2($pos__x,$pos__y),$radius,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 253
ellipse(edit window, float pos.x, float pos.y, float radius.x, float radius.y, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
Defined in: std/graphics.s line 243
ellipse(edit window, float pos.x, float pos.y, float radius.x, float radius.y, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
Defined in: std/graphics.s line 263
line(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_line_ex(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),$thickness,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 288
rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a, "rotate", float origin.x, float origin.y, float rotation) -> () with effects WINDOW
Complexity
Defined in: std/graphics.s line 284
rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "line", nat thickness, nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_rectangle_lines_ex(pyray.Rectangle($pos__x,$pos__y,$size__width,$size__height),$thickness,pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 274
rect(edit window, float pos.x, float pos.y, float size.width, float size.height, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_rectangle(int($pos__x),int($pos__y),int($size__width),int($size__height),pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 309
tri(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float p3.x, float p3.y, "line", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_triangle_lines(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),pyray.Vector2($p3__x,$p3__y),pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 298
tri(edit window, float p1.x, float p1.y, float p2.x, float p2.y, float p3.x, float p3.y, "solid", nat8 color.r, nat8 color.g, nat8 color.b, nat8 color.a) -> () with effects WINDOW
Complexity
pyray.draw_triangle(pyray.Vector2($p1__x,$p1__y),pyray.Vector2($p2__x,$p2__y),pyray.Vector2($p3__x,$p3__y),pyray.Color($color__r,$color__g,$color__b,$color__a))Defined in: std/graphics.s line 338
dt(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW
Complexity
[pyray.get_frame_time()]Defined in: std/graphics.s line 343
uptime(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW
Complexity
[pyray.get_time()]Defined in: std/graphics.s line 348
key_down(window, nat key) -> (bool) with effects WINDOW
Complexity
[pyray.is_key_down($key)]Defined in: std/graphics.s line 353
key_pressed(edit window, nat key) -> (bool) with effects WINDOW
Complexity
[pyray.is_key_pressed($key)]Defined in: std/graphics.s line 358
key_released(edit window, nat key) -> (bool) with effects WINDOW
Complexity
[pyray.is_key_released($key)]Defined in: std/graphics.s line 363
mouse_pos(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float x, float y) with effects WINDOW
Complexity
[(lambda p=pyray.get_mouse_position():(p.x,p.y))()]Defined in: std/graphics.s line 371
mouse_down(window, nat button) -> (bool) with effects WINDOW
Complexity
[pyray.is_mouse_button_down($button)]Defined in: std/graphics.s line 376
mouse_pressed(edit window, nat button) -> (bool) with effects WINDOW
Complexity
[pyray.is_mouse_button_pressed($button)]Defined in: std/graphics.s line 381
mouse_wheel(window {tag, float size.width, float size.height, cstr title, bool ready}) -> (float) with effects WINDOW
Complexity
[pyray.get_mouse_wheel_move()]Defined in: std/graphics.s line 386
() -> (0)
Defined in: std/graphics.s line 387
() -> (39)
Defined in: std/graphics.s line 388
() -> (44)
Defined in: std/graphics.s line 389
() -> (45)
Defined in: std/graphics.s line 390
() -> (46)
Defined in: std/graphics.s line 391
() -> (47)
Defined in: std/graphics.s line 392
() -> (48)
Defined in: std/graphics.s line 393
() -> (49)
Defined in: std/graphics.s line 394
() -> (50)
Defined in: std/graphics.s line 395
() -> (51)
Defined in: std/graphics.s line 396
() -> (52)
Defined in: std/graphics.s line 397
() -> (53)
Defined in: std/graphics.s line 398
() -> (54)
Defined in: std/graphics.s line 399
() -> (55)
Defined in: std/graphics.s line 400
() -> (56)
Defined in: std/graphics.s line 401
() -> (57)
Defined in: std/graphics.s line 402
() -> (59)
Defined in: std/graphics.s line 403
() -> (61)
Defined in: std/graphics.s line 404
() -> (65)
Defined in: std/graphics.s line 405
() -> (66)
Defined in: std/graphics.s line 406
() -> (67)
Defined in: std/graphics.s line 407
() -> (68)
Defined in: std/graphics.s line 408
() -> (69)
Defined in: std/graphics.s line 409
() -> (70)
Defined in: std/graphics.s line 410
() -> (71)
Defined in: std/graphics.s line 411
() -> (72)
Defined in: std/graphics.s line 412
() -> (73)
Defined in: std/graphics.s line 413
() -> (74)
Defined in: std/graphics.s line 414
() -> (75)
Defined in: std/graphics.s line 415
() -> (76)
Defined in: std/graphics.s line 416
() -> (77)
Defined in: std/graphics.s line 417
() -> (78)
Defined in: std/graphics.s line 418
() -> (79)
Defined in: std/graphics.s line 419
() -> (80)
Defined in: std/graphics.s line 420
() -> (81)
Defined in: std/graphics.s line 421
() -> (82)
Defined in: std/graphics.s line 422
() -> (83)
Defined in: std/graphics.s line 423
() -> (84)
Defined in: std/graphics.s line 424
() -> (85)
Defined in: std/graphics.s line 425
() -> (86)
Defined in: std/graphics.s line 426
() -> (87)
Defined in: std/graphics.s line 427
() -> (88)
Defined in: std/graphics.s line 428
() -> (89)
Defined in: std/graphics.s line 429
() -> (90)
Defined in: std/graphics.s line 430
() -> (91)
Defined in: std/graphics.s line 431
() -> (92)
Defined in: std/graphics.s line 432
() -> (93)
Defined in: std/graphics.s line 433
() -> (96)
Defined in: std/graphics.s line 434
() -> (32)
Defined in: std/graphics.s line 435
() -> (256)
Defined in: std/graphics.s line 436
() -> (257)
Defined in: std/graphics.s line 437
() -> (258)
Defined in: std/graphics.s line 438
() -> (259)
Defined in: std/graphics.s line 439
() -> (260)
Defined in: std/graphics.s line 440
() -> (261)
Defined in: std/graphics.s line 441
() -> (262)
Defined in: std/graphics.s line 442
() -> (263)
Defined in: std/graphics.s line 443
() -> (264)
Defined in: std/graphics.s line 444
() -> (265)
Defined in: std/graphics.s line 445
() -> (266)
Defined in: std/graphics.s line 446
() -> (267)
Defined in: std/graphics.s line 447
() -> (268)
Defined in: std/graphics.s line 448
() -> (269)
Defined in: std/graphics.s line 449
() -> (280)
Defined in: std/graphics.s line 450
() -> (281)
Defined in: std/graphics.s line 451
() -> (282)
Defined in: std/graphics.s line 452
() -> (283)
Defined in: std/graphics.s line 453
() -> (284)
Defined in: std/graphics.s line 454
() -> (290)
Defined in: std/graphics.s line 455
() -> (291)
Defined in: std/graphics.s line 456
() -> (292)
Defined in: std/graphics.s line 457
() -> (293)
Defined in: std/graphics.s line 458
() -> (294)
Defined in: std/graphics.s line 459
() -> (295)
Defined in: std/graphics.s line 460
() -> (296)
Defined in: std/graphics.s line 461
() -> (297)
Defined in: std/graphics.s line 462
() -> (298)
Defined in: std/graphics.s line 463
() -> (299)
Defined in: std/graphics.s line 464
() -> (300)
Defined in: std/graphics.s line 465
() -> (301)
Defined in: std/graphics.s line 466
() -> (340)
Defined in: std/graphics.s line 467
() -> (341)
Defined in: std/graphics.s line 468
() -> (342)
Defined in: std/graphics.s line 469
() -> (343)
Defined in: std/graphics.s line 470
() -> (344)
Defined in: std/graphics.s line 471
() -> (345)
Defined in: std/graphics.s line 472
() -> (346)
Defined in: std/graphics.s line 473
() -> (347)
Defined in: std/graphics.s line 474
() -> (348)
Defined in: std/graphics.s line 475
() -> (320)
Defined in: std/graphics.s line 476
() -> (321)
Defined in: std/graphics.s line 477
() -> (322)
Defined in: std/graphics.s line 478
() -> (323)
Defined in: std/graphics.s line 479
() -> (324)
Defined in: std/graphics.s line 480
() -> (325)
Defined in: std/graphics.s line 481
() -> (326)
Defined in: std/graphics.s line 482
() -> (327)
Defined in: std/graphics.s line 483
() -> (328)
Defined in: std/graphics.s line 484
() -> (329)
Defined in: std/graphics.s line 485
() -> (330)
Defined in: std/graphics.s line 486
() -> (331)
Defined in: std/graphics.s line 487
() -> (332)
Defined in: std/graphics.s line 488
() -> (333)
Defined in: std/graphics.s line 489
() -> (334)
Defined in: std/graphics.s line 490
() -> (335)
Defined in: std/graphics.s line 491
() -> (336)
Defined in: std/graphics.s line 492
() -> (4)
Defined in: std/graphics.s line 493
() -> (5)
Defined in: std/graphics.s line 494
() -> (24)
Defined in: std/graphics.s line 495
() -> (25)
Defined in: builtins line 1
nat
Represents values in the range 0 to 2^64-1.
Defined in: builtins line 1
float
Defined in: builtins line 1
int
Represents values in the range 2^-63 to 2^63-1.
Defined in: std/ptrpeek.s line 20
nat ptr() -> (mut nat ptr)
Defined in: std/ptrpeek.s line 20
int ptr() -> (mut int ptr)
Defined in: std/ptrpeek.s line 20
float ptr() -> (mut float ptr)
Defined in: std/ptrpeek.s line 21
to_number(nat) -> (nat)
Complexity
Defined in: std/ptrpeek.s line 21
to_number(int) -> (int)
Complexity
Defined in: std/ptrpeek.s line 21
to_number(float) -> (float)
Complexity
Defined in: std/ptrpeek.s line 21
to_number(nat ptr) -> (nat)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 21
to_number(int ptr) -> (int)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 21
to_number(float ptr) -> (float)
Complexity
Potential errors
Defined in: std/ptrpeek.s line 27
already_defined(nat x, nat y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat x, int y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat x, float y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat x, float ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, nat y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, int y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, float y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int x, float ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, nat y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, int y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, float y) -> (true)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float x, float ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, nat y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, int y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, float y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(nat ptr x, float ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, nat y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, int y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, float y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(int ptr x, float ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, nat y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, int y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, float y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, nat ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, int ptr y) -> (false)
Complexity
Defined in: std/ptrpeek.s line 27
already_defined(float ptr x, float ptr y) -> (false)
Complexity
Defined in: builtins line 1
cstr
Defined in: std/core/string.s line 69
str(char[], nat pos, "len", nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 65
str(str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 57
str(char[]) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 57
str(char[], nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 50
str(char[], nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Potential errors
Defined in: std/core/string.s line 45
str(char ptr unsafe_ptr, nat pos, nat length) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 41
str(char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Complexity
Defined in: std/core/string.s line 218
cstr(cstr cstr, str) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 218
cstr(unsafe_temp {tag, cstr cstr, str}) -> (cstr)
This function’s return is meant to be passed to operating system calls, or to comptime returns with the pattern ‘cstr unsafetemp stringvalue’.
Complexity
Defined in: std/core/string.s line 93
str(cstr) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
Defines an implicit constant buffer using the cstr’s memory data. Subsequent comparisons no longer use the underlying pointer value.
Complexity
Defined in: std/core/string.s line 86
str(char[], nat endpos, "from", nat pos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/string.s line 77
str(char[], nat pos, "to", nat endpos) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first})
The string automatically detects the first character, which is generally tracked for fewer indirections on comparisons of unequal strings.
Complexity
Potential errors
Defined in: std/core/error.s line 19
cstr(last_error) -> (cstr)
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.
Complexity
Defined in: std/core/convertstr.s line 113
str(edit arena, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
The read string is placed on an arena while consuming only the necessarily minimum size.
Complexity
Potential errors
Defined in: std/core/convertstr.s line 113
str(new CHARS, console console) -> (str {tag, char ptr unsafe_ptr, nat dat.pos, nat dat.length, char dat.first}) with effects CHARS
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.
Complexity
Potential errors
defered calls
free(mut any ptr) -> ()
Defined in: std/test.s line 5
run(console CLI, str) -> (cstr) with effects CLI
Complexity
Potential errors
Defined in: std/test.s line 5
run(console CLI, cstr command) -> (cstr) with effects CLI
Complexity
Potential errors
Defined in: std/test.s line 12
print_marker(colors, "pending") -> () with effects colors
Complexity
Defined in: std/test.s line 12
print_marker(colors, "failure") -> () with effects colors
Complexity
Defined in: std/test.s line 12
print_marker(colors, "success") -> () with effects colors
Complexity
Defined in: std/test.s line 28
restore_stdout(int) -> ()
Complexity
Defined in: std/test.s line 33
stdout_to_err(console {tag}) -> (int) with effects CLI
Complexity
defered calls
restore_stdout(int) -> ()
Defined in: std/test.s line 43
assert(console CLI, bool condition, cstr text) -> () with effects CLI
This outputs to stderr, so that asserts are printed even if stout is suppressed during the ‘test’ function.
Complexity
Potential errors
Defined in: std/test.s line 65
test(colors, str) -> (bool) with effects colors
Returns whether the command succeeded or not. A completion assert is performed at the end.
Complexity
Potential errors
Defined in: std/test.s line 65
test(colors, str, bool should_fail) -> (bool) with effects colors
Returns whether the command succeeded or not. A completion assert is performed at the end.
Complexity
Potential errors
Defined in: std/time.s line 12
time() -> (float)
Other time measurement functions may exist in the standard library, but this requires no extra linkage.
Complexity