164 Commits
Author SHA1 Message Date
faumarayandClaude Fable 5 8a6065539a Add Async lock-free infrastructure and reflection JSON serializer
Async (Void::Async):
- MpscQueue<T>: unbounded Vyukov multi-producer/single-consumer queue.
  Wait-free push (XCHG + store, no CAS loop); consumer-owned reclamation so
  no hazard pointers and no ABA. The transient mid-link empty window is
  documented; try_pop/empty are re-poll hints.
- Executor/ManualExecutor: minimal scheduling bridge for Coro::Task with
  lock-free post() from any thread and single-thread run_one()/drain();
  schedule_on() awaitable and spawn() for detached task launch with a
  self-destroying wrapper frame.

Data (Void::Json):
- Reflect.hpp: P2996 to_json/from_json for aggregate structs (field-name
  keys; arithmetic/bool/string/enum-by-name/vector/optional/string-map/
  nested aggregates), tolerant deserialization (unknown fields ignored,
  missing fields keep defaults, mismatches report dotted field paths).
- Versioned envelopes {"__version", "data"} with StateTraits<T> and
  MigrationChain for stepwise schema upgrades - groundwork for plugin
  hot-reload state transfer.
- Member to_json/from_json customization wins over reflection and is the
  only path on compilers without <meta> (Reflectable is false there).

Verified with GCC 16.1 (-freflection): 25 new tests including an
8-producer x 100k MPSC stress with per-producer FIFO assertion, coroutine
frame lifetime checks, and a 3-step v1->v3 migration; suite green under
ASan+UBSan.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:57:15 +03:00
faumarayandClaude Fable 5 28b94883fd Restructure into umbrella modules (~55 -> 16 targets)
Headers move, CMake targets merge, C++ namespaces stay unchanged:
- Core: Scope, Lazy, Counted, Flags, Hash, Bits, Uuid, TypeList, TypeMap, Variant
- Functional: Pipeline, Either, Result, Retry
- Containers: Ring, Pool, PriorityQueue, LRU, Trie, Graph, DisjointSet, Bitset, Interval
- Math: +Matrix, Numeric, Random, Histogram
- Text: Str, Format, Tokenizer, Diff, Encoding, Semver
- Data: Json, Csv, Ini
- Async: Coro, Concurrency, EventBus, Observable
- Time: +Bench
- Log: Log facade + Logging framework (facade now header-only, breaking
  the Stacktrace<->Log link cycle the merge would have created)
- System: FileSystem + Process
- Configuration: +Argparse
- Unchanged: Stacktrace, Plugin, StateMachine, Testing, TestingMock, Detail

Module system fixes:
- OPTIONAL_DEPS resolution deferred to void_finalize_modules() so it no
  longer depends on the alphabetical discovery order of src/ subdirs
  (Testing -> Text would have been silently dropped).
- Every header-only module now has a tracked module.cmake; previously the
  empty src/<Name> marker dirs were untracked, so a fresh clone would have
  silently skipped those modules.
- VOID_HAS_LOGGING/CONCURRENCY/STR consumers renamed to LOG/ASYNC/TEXT.

Tests move to tests/standalone/<Umbrella>/<Feature>.cpp (Result suite files
prefixed: ResultBasic etc.). Test count verified identical (831) before and
after. README/CLAUDE.md module tables updated.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:50:02 +03:00
faumarayandClaude Fable 5 da2e93c405 Finish module consolidation: fold Memo into Pipeline, dedupe Channel/Stopwatch
Completes the in-progress merges (Optional->Either/Opt, Curry+Memo->Pipeline,
ScopeGuard->Scope, String->Str):
- Pipeline/Memo.hpp now carries the full Memo API (memoize with recursion
  support, TupleHash, SimpleCache) alongside memoize_fn; old Memo module
  and its test dir removed.
- Duplicate Channel module removed; Concurrency::Channel gains empty() and
  the unique test cases (drain-after-close, multi-producer, string payloads).
- StopWatch module merged into Time::Stopwatch: one class with explicit
  start/stop/laps plus a started() factory for the auto-start RAII style;
  ScopedTimer moved along.
- Testing optional dep retargeted String->Str (pad_right lives in Str now).
- Stale empty dirs removed: src/{ScopeGuard,String,Core}, include/Void/{Core,
  Filesystem,Memo,Channel,StopWatch}.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-12 18:41:24 +03:00
faumarayandClaude Sonnet 4.6 58ff7b38a0 Add 20+ new modules with tests: Pipeline, Matrix, Tokenizer, ScopeGuard, Bitset, Optional, Counted, Curry, TypeMap, Bench, DisjointSet, Histogram, StopWatch, and more
Also fixes Diff/Memo/PriorityQueue from previous session: LineDiff is now
an alias for Edit<string> so count_op/apply work on line diffs; Memoized
uses std::apply instead of type-based get to handle duplicate arg types.

874/877 tests pass (3 are platform-gated plugin tests).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 23:49:09 +03:00
faumarayandClaude Sonnet 4.6 cb4dd58500 Add Ini, Csv, Semver modules
Void::Ini — IniFile parser supporting [sections], key=value pairs, ; and #
comments, quoted values, error reporting with line numbers, set/get, has_key,
sections(), serialize().

Void::Csv — RFC 4180 CSV parse/serialize with quoted fields, doubled-quote
escaping, custom delimiter, CRLF support; CsvWithHeader for named column access.

Void::Semver — Version struct with major/minor/patch/pre-release/build; parse()
(accepts optional v-prefix); to_string(); spaceship comparison per semver spec
(release > pre-release, build metadata ignored); compatible_with(), is_stable(),
bumped_major/minor/patch().

47/47 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 23:02:29 +03:00
faumarayandClaude Sonnet 4.6 b54f2156c5 Add Numeric and Format modules
Void::Numeric — checked_add/sub/mul/div returning std::expected<T,Error>;
saturating_add/sub/mul clamping at min/max; wrapping_add/sub/mul for unsigned;
clamp, parse_int (with base), parse_double, narrow_cast.

Void::Format — render() named-placeholder template engine ({key} syntax,
{{}} escaping); render_pos() positional ({0},{1}); indent() per-line prefix;
word_wrap() at whitespace boundaries; format_table() with auto column alignment.

44/44 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:59:55 +03:00
faumarayandClaude Sonnet 4.6 3c3ff46e39 Add Graph, Trie, LRU modules
Void::Graph — DiGraph<V,E> directed adjacency-list graph: add_vertex/add_edge,
has_vertex/has_edge, BFS/DFS traversal, topological sort (Kahn, returns nullopt
on cycle), can_reach, shortest_path (BFS, unweighted).

Void::Trie — Prefix tree Trie<V>: insert, contains, get, starts_with, erase
(with node pruning), keys_with_prefix, size/empty.

Void::LRU — LruCache<K,V>: get (promotes to MRU), put (evicts LRU when full),
peek (no promotion), erase, clear, contains, full/empty/size.

42/42 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:57:53 +03:00
faumarayandClaude Sonnet 4.6 388e75011f Add Observable, Pool, Ring modules
Void::Observable — Observable<T> reactive value with typed on_change listeners
and unsubscribe-by-handle; Signal<Args...> event broadcast with connect/disconnect.

Void::Pool — ObjectPool<T,ChunkSize> slab-based pool with unique_ptr<T,Deleter>
ownership; FixedPool<T,N> fixed-capacity in-place pool, returns nullptr when full.

Void::Ring — SpscRing<T,N> single-producer/single-consumer wait-free ring buffer;
MpscRing<T,N> multi-producer/single-consumer ring using CAS on the head pointer.
Both tested under real threads.

39/39 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:54:35 +03:00
faumarayandClaude Sonnet 4.6 a9a2e2b59a Add Scope, StateMachine, TypeList modules; remove macros from Scope
Void::Scope — RAII scope guards: ScopeExit/ScopeSuccess/ScopeFail with
on_exit/on_success/on_fail factory functions. No macros.

Void::StateMachine — compile-time FSM driven by Transition<From,Ev,To>
type lists. Supports typed entry/exit callbacks and returns bool from send()
indicating whether the transition was valid.

Void::TypeList — compile-time type list with: size_of, at, front, back,
contains, index_of, push_front/back, pop_front, concat, filter, transform,
reverse, unique, for_each, all_of/any_of/none_of.

Void::Encoding — Base64 (standard + URL-safe encode/decode) and Hex
encode/decode. Included in previous commit but missed in message.

36/36 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 22:49:22 +03:00
faumarayandClaude Sonnet 4.6 a09e000f0f Add Hash, Random, Uuid, Encoding, Bits, Math modules + make Testing deps optional
New header-only modules:
- Void::Hash — FNV-1a 32/64, CRC-32, DJB2, MurmurHash3-32, UDL literals
- Void::Random — Xoshiro256** PRNG, uniform_int/real, coin_flip, shuffle, random_string
- Void::Uuid — v4 (random), v5_lite (name-based), parse, RFC 4122 namespaces
- Void::Encoding — Base64 (standard + URL-safe), Hex encode/decode
- Void::Bits — popcount, bit extract/deposit, rotation, align, byteswap, masks
- Void::Math — Vec2/Vec3/Vec4, Mat4 (identity, translation, scale, rotation)

Testing module: move Stacktrace from INTERNAL_DEPS to OPTIONAL_DEPS. Added
Detail/Color.hpp shim that delegates to Stacktrace::Color when present or
provides inline ANSI fallback otherwise. All Stacktrace calls in SignalHandler,
ConsoleReporter, and Runner are gated on VOID_HAS_STACKTRACE.

Fix Repr.hpp reflect_struct to handle template specializations that lack
std::meta::identifier_of (now guarded by has_identifier check).

33/33 tests pass.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-14 21:52:22 +03:00
faumaray 42268c6c35 Reflection and filesystem
Signed-off-by: faumaray <faumaray@gmail.com>
2026-05-03 18:09:46 +03:00
faumaray f0825fbd1a Stacktrace module
Signed-off-by: faumaray <faumaray@gmail.com>
2026-04-29 23:23:20 +03:00
faumaray e7186f17f0 Testing module
Signed-off-by: faumaray <faumaray@gmail.com>
2026-04-29 22:49:33 +03:00
faumarayandClaude Sonnet 4.6 4fc129fb7e Initial commit: VoidLibrary C++23 modular library
Adds Logging module with thread-safe Logger base class, ScopedContext
RAII guards, Preset helpers, and a FileLogger standalone test/example.
Includes CMake module system for auto-discovery and CTest integration.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-25 21:28:29 +03:00