Skip to content

Commit

Permalink
fix library docs path
Browse files Browse the repository at this point in the history
  • Loading branch information
JaDogg committed Dec 21, 2023
1 parent a9af8f7 commit e0bf08c
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions src/pages/lib.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -234,15 +234,15 @@ 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
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)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand All @@ -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
Expand Down Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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?
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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]
Expand All @@ -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]
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down

0 comments on commit e0bf08c

Please sign in to comment.