refactor(stdlib): de-abbreviate namespaces (Mem/Sys/Net/Collide)

Expand the abbreviated public namespaces to full words, part of the
language-wide de-abbreviation pass:
  Mem -> Memory, Sys -> System, Net -> Network, Collide -> Collision

Math stays (universally accepted, like int/bool). Renames the dispatch
strings, LSP signatures, docs (dirs, files, frontmatter), and the
inventory manifest; behavior is byte-identical (the bare rt_ targets are
unchanged). Reseeded; C-free bootstrap fixpoint holds; all suites green.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Orkun ÇAKILKAYA 2026-08-30 01:30:47 +03:00
parent 6e6467b515
commit 2f19c8d8e2
50 changed files with 360 additions and 360 deletions

View file

@ -0,0 +1,7 @@
---
id: system
title: System
order: 6
---
Process and OS access — command-line arguments, environment, exit code, running a shell command, and raw file I/O. Outside the deterministic simulation.

View file

@ -0,0 +1,14 @@
---
id: system-arg
name: System.arg
category: system
kind: namespace-method
tokens: System.arg
sig: System.arg(i) -> str
tip: A command-line argument by index.
order: 0
ns: System
member: arg
---
Returns the <code>i</code>-th command-line argument; index 0 is the program path.

View file

@ -0,0 +1,14 @@
---
id: system-arg_count
name: System.arg_count
category: system
kind: namespace-method
tokens: System.arg_count
sig: System.arg_count() -> int
tip: The number of command-line arguments.
order: 1
ns: System
member: arg_count
---
Returns how many command-line arguments were passed, including the program path.

View file

@ -0,0 +1,14 @@
---
id: system-env
name: System.env
category: system
kind: namespace-method
tokens: System.env
sig: System.env(name) -> str
tip: Read an environment variable.
order: 4
ns: System
member: env
---
Returns the value of environment variable <code>name</code>, or a null string if it is unset.

View file

@ -0,0 +1,14 @@
---
id: system-exit
name: System.exit
category: system
kind: namespace-method
tokens: System.exit
sig: System.exit(code) -> void
tip: End the process with a status code.
order: 2
ns: System
member: exit
---
Terminates the program immediately, returning <code>code</code> to the shell.

View file

@ -0,0 +1,14 @@
---
id: system-file_close
name: System.file_close
category: system
kind: namespace-method
tokens: System.file_close
sig: System.file_close(file) -> void
tip: Close a file.
order: 11
ns: System
member: file_close
---
Closes <code>file</code>, flushing any buffered writes.

View file

@ -0,0 +1,14 @@
---
id: system-file_open
name: System.file_open
category: system
kind: namespace-method
tokens: System.file_open
sig: System.file_open(path, mode) -> ptr
tip: Open a file.
order: 6
ns: System
member: file_open
---
Opens <code>path</code> with the given <code>mode</code> (as C <code>fopen</code>) and returns a file handle, or null on failure.

View file

@ -0,0 +1,14 @@
---
id: system-file_read
name: System.file_read
category: system
kind: namespace-method
tokens: System.file_read
sig: System.file_read(file, buf, n) -> int
tip: Read bytes from a file.
order: 7
ns: System
member: file_read
---
Reads up to <code>n</code> bytes from <code>file</code> into <code>buf</code> and returns the number read.

View file

@ -0,0 +1,14 @@
---
id: system-file_seek
name: System.file_seek
category: system
kind: namespace-method
tokens: System.file_seek
sig: System.file_seek(file, offset, whence) -> int
tip: Move a file's read/write position.
order: 9
ns: System
member: file_seek
---
Seeks <code>file</code> to <code>offset</code> relative to <code>whence</code> (as C <code>fseek</code>).

View file

@ -0,0 +1,14 @@
---
id: system-file_tell
name: System.file_tell
category: system
kind: namespace-method
tokens: System.file_tell
sig: System.file_tell(file) -> int
tip: The current file position.
order: 10
ns: System
member: file_tell
---
Returns the current read/write offset of <code>file</code>.

View file

@ -0,0 +1,14 @@
---
id: system-file_write
name: System.file_write
category: system
kind: namespace-method
tokens: System.file_write
sig: System.file_write(file, buf, n) -> int
tip: Write bytes to a file.
order: 8
ns: System
member: file_write
---
Writes <code>n</code> bytes from <code>buf</code> to <code>file</code> and returns the number written.

View file

@ -0,0 +1,14 @@
---
id: system-read_char
name: System.read_char
category: system
kind: namespace-method
tokens: System.read_char
sig: System.read_char() -> int
tip: Read one byte from standard input.
order: 5
ns: System
member: read_char
---
Reads and returns the next byte from standard input, or a negative value at end of input.

View file

@ -0,0 +1,14 @@
---
id: system-run
name: System.run
category: system
kind: namespace-method
tokens: System.run
sig: System.run(command) -> int
tip: Run a shell command.
order: 3
ns: System
member: run
---
Runs <code>command</code> through the system shell and returns its exit status. Blocks until it finishes.

View file

@ -0,0 +1,14 @@
---
id: system-stderr
name: System.stderr
category: system
kind: namespace-method
tokens: System.stderr
sig: System.stderr() -> ptr
tip: The standard error handle.
order: 13
ns: System
member: stderr
---
Returns the standard-error file handle, for <code>System.file_write</code>.

View file

@ -0,0 +1,14 @@
---
id: system-stdout
name: System.stdout
category: system
kind: namespace-method
tokens: System.stdout
sig: System.stdout() -> ptr
tip: The standard output handle.
order: 12
ns: System
member: stdout
---
Returns the standard-output file handle, for <code>System.file_write</code>.