Codync
免費、開源的 1:1 替代方案,取代 Grok Bot 與 Muse。從 iPhone、Mac 或 Linux 桌面將 Claude Code、Codex、Cursor 與 40+ 程式碼代理人作為持續機器人傳訊。群組聊天、主題串…
AI 翻譯
製作者的介紹僅有上面的一句話。 更多詳情請閱讀儲存庫 README。 儲存庫 README ↗
正在載入完整 README。
檢視完整 README ↗Requires C++23 (e.g.,
-std=c++23for GCC/Clang,/std:c++latestfor MSVC).
The shared foundation of the dasmig generator libraries (address, biodata, birth, city, country, device, email, entity, interest, name, nickname, occupation, persona, phone, relationship, trait, user). Each library vendors a copy.
The same output everywhere. A seed gives bit-identical results on GCC, Clang and MSVC, with libstdc++, libc++ or the MSVC STL, on x86-64, ARM64 and WebAssembly. The std:: distributions cannot promise this: each standard library implements them differently.
xoshiro256** engine seeded through SplitMix64, with seed(), unseed() and split(label). A split stream depends only on the parent seed and the label, so adding a draw in one part of a generator does not shift the others.
Distributions with fixed algorithms. Uniform integer (Lemire), uniform real, Bernoulli, normal (Marsaglia polar), log-normal, gamma (Marsaglia and Tsang), beta, Weibull, weighted choice, shuffle (Fisher-Yates), sampling without replacement and pick.
Deterministic exp, log and trigonometry (sine and cosine, arctangent and the arcsine and arccosine, in degrees) built only from operations IEEE 754 defines exactly, because the platform <cmath> functions differ in the last bit.
Data tables with extension layers. A TSV reader with typed, exactly parsed cells and located errors (file:line: column: problem), and layered tables: users add, override or replace rows with their own files, validated atomically, with a data hash for replay.
Data on disk or compiled in. Finds a library's resources/ from the usual working directories, or reads it from a generated header (scripts/embed.py) so a WebAssembly build needs no filesystem; both give the same data hash.
Weighted tables, JSON and seed signatures. Weighted choice with per-call conditional weights and exclusions; a dependency-free JSON writer with platform-independent number formatting; a seed-data replay format.
Check digits. Luhn, ISO 7064 (MOD 97-10, MOD 11-2, MOD 11,10), IBAN, GTIN, ICAO 9303 and Verhoeff, plus the weighted sums national identifiers build on; constexpr, with errors that name the position.
Identifier patterns. A small pattern language ([A-CEGHJ-PR-TW-Z]@######[A-D], (DE|FR)#{2,4}) to draw a string with a fixed use of the engine, test a string in polynomial time, and count the strings a pattern can make.
Money. Amounts in integer minor units with their ISO 4217 code, rounding from major units halves away from zero, exact decimal text, and one JSON shape.
Copy dasmig/core.hpp and the dasmig/core/ directory next to your library header, then:
#include "core.hpp"
// Fails to compile if another library in the same translation unit vendors
// an incompatible core.
DASMIG_CORE_REQUIRE(1, 0);
#include <dasmig/core.hpp>
namespace core = dasmig::core;
core::rng r{42}; // same sequence everywhere
auto body = r.split("body"); // independent child stream
double height = core::normal(body, 170.0, 7.5); // Marsaglia polar
double weight = core::lognormal(body, 4.25, 0.18);
int mood = core::uniform_int(r, 1, 10); // inclusive
bool left = core::bernoulli(r, 0.1);
core::discrete eyes{0.79, 0.12, 0.09}; // weighted index
std::size_t eye = eyes(r);
See the usage guide for every function and the exact algorithms.
make test # build and run the tests
make lint # clang-tidy
make docs # Doxygen
make kat # regenerate tests/kat_vectors.hpp from scripts/reference.py
make embed-fixtures # regenerate the resource fixtures and their embedded header
MIT. See LICENSE.MIT.
Time-zone rules. Periods plus a POSIX TZ rule, as text the caller gives: the offset at an instant, local time to UTC and back through gaps and repeats, the same on every platform, without the operating system's time-zone database.
Batch generation. item_seed, run_batch and for_each_batch generate many results from one seed, in parallel if asked, with the same output for any thread count, optional uniqueness by a key, and JSON Lines and CSV writers for the results.
Checked against an independent implementation. scripts/reference.py implements every algorithm again in Python and generates the known-answer vectors the C++ tests compare against, bit for bit. The engine is checked against published test vectors.