ludic/docs/language
Orkuncakilkaya 6bcb5f4ae1 fix(os): save_dir/config_dir/cache_dir follow the platform, not just macOS
They were the macOS layout on every platform - the comment above them even said
"macOS/BSD layout" - so a game built on Linux wrote its saves to
~/Library/Application Support, a directory that means nothing there. Naming the
right directory is the entire reason a program calls these instead of joining a
path itself.

  macOS   save/config  ~/Library/Application Support/<app>
          cache        ~/Library/Caches/<app>
  Linux   save         $XDG_DATA_HOME   or ~/.local/share/<app>
          config       $XDG_CONFIG_HOME or ~/.config/<app>
          cache        $XDG_CACHE_HOME  or ~/.cache/<app>

macOS is unchanged to the byte, deliberately. save_dir and config_dir stay the
same directory there: Apple's home for a config file that is not an
NSUserDefaults plist is Application Support too, and a shipped game's settings
must not move out from under it. On Linux XDG separates the two and so does this.
An XDG variable that is set but EMPTY falls back to the default, which is what
the spec says and what an exported-but-unset variable looks like from a shell.

uname is read once and remembered rather than per call, because save_dir is
called on every save.

Verified on both branches. macOS by running it; the Linux branch by building the
probe's IR with the cached platform flag pinned, which exercises the emitted XDG
code exactly - unset, set, and set-but-empty all resolve as the spec says. The
suite's own case asserts the HOST's convention, so a macOS box covers the Apple
branch and CI covers XDG.

This is a backend change, so selfhost/ludicc.seed.ll is reseeded with it: the
bootstrap fixpoint (gen2 == gen3) and the C-free rebuild from the seed both pass.
2026-09-11 19:46:47 +03:00
..
angle feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
anim feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
annotations feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
app feat(bundle): ship a game as a macOS .app, with a splash it controls 2026-09-10 16:57:27 +03:00
assets feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
audio feat: per-voice audio, outlines for what is not an actor, and a coast 2026-09-11 15:25:46 +03:00
base64 feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00
bigint feat(types): BigInt + Decimal exact economy numbers (#52) 2026-08-31 18:45:14 +03:00
builtins feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
camera feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
clock feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
collision feat(engine): 2D collision / physics-lite — Body + Collider + esys_move (#65) 2026-09-01 13:17:36 +03:00
color feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
colors docs: add Networking section + process/OS builtins (net_send, owner, is_server, serialize/apply, arg, exit, run, getenv, read_char, file_*) 2026-08-29 16:39:29 +03:00
control feat(types): tagged-union enums — variant payloads + binding match + exhaustiveness (#56) 2026-09-01 03:07:46 +03:00
crypto feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
date feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
datetime feat(stdlib): DateTime format/parse + simulated Clock — completes #9 2026-08-30 03:51:48 +03:00
decimal feat(types): BigInt + Decimal exact economy numbers (#52) 2026-08-31 18:45:14 +03:00
dict feat(types): Dict + Set string-keyed containers (#54) 2026-08-31 18:51:42 +03:00
duration feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
ease feat(stdlib): Math.exp/log/pow + Ease.elastic transcendentals (issue #25) 2026-08-30 01:19:44 +03:00
ecs refactor(lang): rename the str type (and stringify builtin) to string 2026-08-30 01:51:11 +03:00
events docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
file feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
font feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
fs feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
fx feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
gl feat(gl): OpenGL 4.1 and the ludic.render3d renderer 2026-09-10 03:31:12 +03:00
grid feat(stdlib): add Grid.* — tile geometry + A* pathfinding over the tilemap (#24) 2026-08-31 12:36:12 +03:00
hash feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
http feat(http): Http.* poll-based HTTP/HTTPS client over a native NSURLConnection backend (#6) 2026-08-31 18:10:53 +03:00
huge feat(types): Huge + Angle + Percent polish numeric types (#55) 2026-08-31 19:04:37 +03:00
input feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
ivec2 feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
job feat(stdlib): Jobs, Promises & opt-in Sync concurrency (#14) 2026-09-01 03:32:31 +03:00
json feat(reflect): generic value tree + Reflect.serialize/apply + JSON bridge (#44) 2026-08-31 15:19:21 +03:00
light feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
list feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
log feat(stdlib): add Log.* — levelled, structured logging (#15) 2026-08-30 21:57:22 +03:00
map feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
math refactor(lang): rename builtins flr->floor and fx->fixed 2026-08-30 02:01:56 +03:00
memory refactor(lang): rename the ptr/ptrs types to pointer/pointers 2026-08-30 01:58:54 +03:00
mime feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
motion feat(anim): animation ergonomics — named clips, Anim.play/Motion.to, frame events, fluent Tween handles (#48) 2026-08-31 16:53:16 +03:00
network docs: merge duplicate networking namespace dirs; guard against recurrence 2026-08-30 16:46:21 +03:00
noise feat(stdlib): add Noise.* — deterministic fixed-point procedural noise (#3) 2026-08-30 21:50:50 +03:00
operators feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
os fix(os): save_dir/config_dir/cache_dir follow the platform, not just macOS 2026-09-11 19:46:47 +03:00
path feat(stdlib): add Fs.* / Path.* / Mime.* — filesystem, paths, content types (#10) 2026-08-30 22:43:50 +03:00
percent feat(types): Huge + Angle + Percent polish numeric types (#55) 2026-08-31 19:04:37 +03:00
phases feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
pool feat(ecs): #80 entity-pool stats (Pool.live/free/reserved/capacity) 2026-09-02 08:23:58 +03:00
prefab feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
promise feat(stdlib): Jobs, Promises & opt-in Sync concurrency (#14) 2026-09-01 03:32:31 +03:00
query feat(stdlib): add Query.* — ECS spatial queries over the reflection ABI (#42) 2026-08-31 13:19:25 +03:00
random feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
rect feat(types): IVec2 + Rect 2D value types (#1) 2026-08-31 18:29:41 +03:00
reflect feat(reflect): generic value tree + Reflect.serialize/apply + JSON bridge (#44) 2026-08-31 15:19:21 +03:00
regex feat(stdlib): add Regex.* — a linear-time regular-expression engine (#18) 2026-08-31 12:23:19 +03:00
save feat(stdlib): namespaced standard library (issue #2) 2026-08-30 00:26:19 +03:00
scenes docs(api): per-symbol pages, fuzzy search, deep token linking, hover cards 2026-08-29 17:53:22 +03:00
screen feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
set feat(types): Dict + Set string-keyed containers (#54) 2026-08-31 18:51:42 +03:00
sprite feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
structure feat(compiler): list literals, typed compound assignment, file:line diagnostics 2026-09-05 01:12:16 +03:00
sync feat(stdlib): Jobs, Promises & opt-in Sync concurrency (#14) 2026-09-01 03:32:31 +03:00
system refactor(stdlib): consolidate System.* onto Os.*, retire duplicated members 2026-08-30 22:54:28 +03:00
testing refactor(cli)!: split the contributor tool out of the ludic CLI 2026-09-05 23:15:12 +03:00
text refactor(stdlib): consolidate System.* onto Os.*, retire duplicated members 2026-08-30 22:54:28 +03:00
tiled feat(stdlib): Tiled P6 — infinite/chunked maps, .world stitching, base64+zstd (#74) 2026-09-01 16:07:10 +03:00
time feat(stdlib): Time/Date/Duration calendar-clock core (issue #9) 2026-08-30 03:37:38 +03:00
tween feat(anim): animation ergonomics — named clips, Anim.play/Motion.to, frame events, fluent Tween handles (#48) 2026-08-31 16:53:16 +03:00
types feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
ui feat(engine): #90 atlas-aware Sprite component, #91 become from listeners, 0.3.x ergonomics batch 2026-09-04 01:36:08 +03:00
unicode feat(stdlib): add Unicode.* — UTF-8 code points, graphemes, case mapping (#13) 2026-08-30 22:29:00 +03:00
uuid feat(stdlib): finish Crypto (CSPRNG + base64) and add Uuid.* library (#19 #16) 2026-08-30 21:40:51 +03:00
value feat(reflect): generic value tree + Reflect.serialize/apply + JSON bridge (#44) 2026-08-31 15:19:21 +03:00
vector feat(stdlib): 2D Vector type + Vector.* namespace (issue #25) 2026-08-30 02:09:38 +03:00
world feat(input,ecs): #79 Input.axis_i directional int + #84 world bounds 2026-09-02 07:44:41 +03:00
xml feat(stdlib): Tiled P0 — XML reader + base64 decode + gzip framing (#67) 2026-09-01 14:04:49 +03:00