diff --git a/src/pages/lib.mdx b/src/pages/lib.mdx index 929288d..6fbca5a 100644 --- a/src/pages/lib.mdx +++ b/src/pages/lib.mdx @@ -234,7 +234,7 @@ def valid_table(x: Table) -> bool # Is this a valid table? ``` -## libs.fileformats.io +## libs.io ```yaksha def readfile(fname: str) -> str # Read a file to as string, on error returns empty @@ -242,7 +242,7 @@ def writefile(fname: str, data: str) -> bool # Write a file ``` -## libs.fileformats.numbers +## libs.numbers ```yaksha def cdbl2d(a: libs.c.CDouble) -> f64 # c.CDouble to f64 (double precision) @@ -278,7 +278,7 @@ def uu2f(a: u64) -> float def uu2i(a: u64) -> int ``` -## libs.fileformats.os +## libs.os ```yaksha class Arguments # UTF-8 converted arguments and argument count @@ -318,7 +318,7 @@ def which(binary: str) -> str # os.which("zig") ``` -## libs.fileformats.os.cpu +## libs.os.cpu ```yaksha class Cpu # Extracted CPU information: @@ -329,7 +329,7 @@ def info() -> Cpu # Extract CPU information ``` -## libs.fileformats.os.path +## libs.os.path ```yaksha def basename(p: str) -> str # Get just the filename of given path @@ -359,7 +359,7 @@ def writable(p: str) -> bool # Is a writable? ``` -## libs.fileformats.perlin +## libs.perlin ```yaksha def noise1d(x: f64) -> f64 # Get perlin noise in 1d (Calls 3d noise with hardcoded y, z values) @@ -374,7 +374,7 @@ def noise3df(x: float, y: float, z: float) -> float # Get perlin noise in 3d ``` -## libs.fileformats.random +## libs.random ```yaksha def init_random() -> u64 # Set a seed to random number generator using time (crypto unsafe) @@ -393,7 +393,7 @@ def set_seed(seed: u64) -> None # Set a seed to random number generator (crypto unsafe) ``` -## libs.fileformats.strings +## libs.strings ```yaksha def contains(haystack: str, needle: str) -> bool # Does the string needle contain in string haystack? @@ -452,7 +452,7 @@ def valid_cstr(s: libs.c.CStr) -> bool # Is a valid CStr ``` -## libs.fileformats.strings.array +## libs.strings.array ```yaksha def del_str_array(sa: Array[str]) -> None # Delete a string array by deleting individual string objects and array itself @@ -476,7 +476,7 @@ def suffix(sa: Array[str], suffix_str: str) -> Array[str] # Mutate all strings in this array by suffixing with suffix_str ``` -## libs.fileformats.strings.buffer +## libs.strings.buffer ```yaksha class StringBuffer # String buffer object @@ -496,7 +496,7 @@ def to_str(buf: StringBuffer) -> str # Get a new string out of string buffer ``` -## libs.fileformats.strings.utf8 +## libs.strings.utf8 ```yaksha class Utf8IterateState # Iterator state for UTF-8 iteration @@ -512,7 +512,7 @@ def new_iter(s: str) -> Utf8IterateState # Create a new iterator from given string ``` -## libs.fileformats.thread +## libs.thread ```yaksha BUSY: Const[int] # The requested operation failed because a tesource requested by a test and return function is already in use @@ -550,7 +550,7 @@ def sleep_ex(duration: Ptr[libs.timespec.TimeSpec], remainder: Ptr[libs.timespec def yield() -> None ``` -## libs.fileformats.thread.condition +## libs.thread.condition ```yaksha class Condition # Condition Object @@ -562,7 +562,7 @@ def timed_wait(cnd: Ptr[Condition], mtx: Ptr[libs.thread.mutex.Mutex], ts: Ptr[l def wait(cnd: Ptr[Condition], mtx: Ptr[libs.thread.mutex.Mutex]) -> int ``` -## libs.fileformats.thread.mutex +## libs.thread.mutex ```yaksha PLAIN: Const[int] RECURSIVE: Const[int] @@ -576,7 +576,7 @@ def trylock(mtx: Ptr[Mutex]) -> int def unlock(mtx: Ptr[Mutex]) -> int ``` -## libs.fileformats.thread.pool +## libs.thread.pool ```yaksha ERROR_INVALID: Const[int] ERROR_LOCK_FAILURE: Const[int] @@ -621,7 +621,7 @@ def internal_tpool_work(tpool_obj: AnyPtr) -> int # Perform work as a thread in the managed thread pool ``` -## libs.fileformats.thread.tss +## libs.thread.tss ```yaksha class Key # Key to access/create thread specific storage @@ -635,7 +635,7 @@ def get(key: Key) -> AnyPtr def set(key: Key, data: AnyPtr) -> int ``` -## libs.fileformats.timespec +## libs.timespec ```yaksha class TimeSpec def add_nanoseconds(a: Ptr[TimeSpec], n: i64) -> None