[*] Readme while I work on network

This commit is contained in:
Reece Wilson 2022-03-11 16:42:54 +00:00
parent c826df484e
commit 395dd0aa97

View File

@ -131,7 +131,7 @@ SysPushError[EFailureCategory shorthand] can be used to include additional side-
information about the execution of a program. SysPushError_(...) takes a string format sequence and
a variadic sequence of substitute values - or no arguments whatsoever.
examaple:
#### Example:
```cpp
IBufferedCharacterConsumer *BufferConsumerFromProviderNew(const AuSPtr<ICharacterProvider> &provider)
{
@ -147,6 +147,9 @@ IBufferedCharacterConsumer *BufferConsumerFromProviderNew(const AuSPtr<ICharacte
### Asserts
[TODO]
#### Example:
Debug, Release, and Ship (all) assertions:
```cpp
SysAssert(AuFunction{}, "unexpected default function")
@ -163,6 +166,7 @@ You should ensure AuDebug::CheckErrors() or a SysPushError-like function is call
captured. AuDebug::PrintErrors() will print the the errors gathered by the debug subsystem for telemetry purposes. These may
include the crts errno, the last reported posix return value, the last Win32 error code, and/or last reported microkernel error.
#### Example
Try/Catch:
```
try
@ -263,6 +267,16 @@ binary blob of UTF-8. Looking to switch to `tiny-utf8` for UTF-8 safety.
## Memory
### Allocator
Objects are allocated across API/Module boundaries; and so long as the high level API design isn't horribly inefficient, the
cache invalidation and indirect lookups should be minimalized. On modern hardware, indirect branching versus short jumps aren't
so expensive, and in combination with a fast enough allocator, it's a model that could provide reasonable OOP performance
through a C-with-classes-like API.
As for allocation, we generally expect a dependence on Microsoft's mimalloc. Linking against the Aurora Runtime in the Aurora
Ecosystem will automatically replace global allocators with `Aurora::Memory`, which in turn, proxies any other suitable allocator
with extended re[zero]allocate[aligned] with uniform deallocate APIs.
### Memory Heap
@ -271,11 +285,11 @@ Aurora provides a heap allocator for dividing up a large preallocated region of
### Shared Pointers
By default, AuSPtr is backed by `std::shared_ptr`, extended by `#include <Aurora/Memory/ExtendStlLikeSharedPtr>`. Using this
class, undefined behaviour on dereference and operator pointer is altered to guarantee an AU_THROW_STRING. It would be 'nice'
to live in a world without C++ exceptions; however, noexcept simply requires that `std::terminate` is called, and not handling
them at all should be handled as a fatal error. Defer to [exceptions](#exceptions) on how we log and report internal errors.
Those who live in noexcept land can eat the exception, turning it into a terminate condition. Smarter applications may be able
to catch the null dereference and continue operation without brining the whole kingdom down with it. Either way, no UB.
class, undefined behaviour on dereference and operator pointer is altered to guarantee an AU_THROW_STRING. Such hacks without
support for native behaviour from the language drivers themselves can be rather expensive; however, it's an experiment worth
trying now that modern hardware can make up for software and microcode flaws; and architecture translation. Null exception
experiments can be easily disabled or configured from within your AuroraConfiguration.h file globally.
```
Types:
@ -347,17 +361,20 @@ UTF-8 and attempt to read a BOM to translate any other input to UTF-8.
We assume all paths are messy. Incorrect splitters, double splitters, relative paths, and keywords are resolved internally.
No URL or path builder, data structure to hold a tokenized URI expression, or similar concept exists in the codebase.
All string 'paths' are simply expanded, similar to MSCRT's `fullpath` or UNIX's `realpath`, at time of usage.
<br>
Path tokens include:<br>
[0] == '.' = cwd<br>
[0] == '~' = platform specific user directory / brand / Profile<br>
[0] == '!' = platform specific app config directory / brand / System<br>
[0] == '?' = ., !, or ~<br>
.. = go back<br>
/ = splitter<br>
\ = splitter<br>
<br>
| Expression | Meaning |
|------------------|-------------------------------------|
| `Path[0] == '.'` | Current Working Directory |
| `Path[0] == '^'` | Executable module's Directory |
| `Path[0] == '~'` | User Profile Storage + SDK brand |
| `Path[0] == '!'` | All User Shared Storage + SDK brand |
| `..` | Go up a directory |
| `/` | Agnostic Directory Splitter |
| `\` | Agnostic Directory Splitter |
| `.` [SPLITTER] | Nothing |
[TODO] Aurora Branding <br>
### Resources