Skip to content

Instantly share code, notes, and snippets.

View planetis-m's full-sized avatar
πŸ‘‘
Open to new job opportunities

Antonis Geralis planetis-m

πŸ‘‘
Open to new job opportunities
View GitHub Profile

Instead of using std/json in Nimony to build JSON strings from a DOM, let's use an approach similar to the one used by the httpheaders module, with compile-time validation of string literals.

JSON will be supplied as string literals, and when an expression involves string concatenation with runtime values, the compile-time plugin should be able to infer the necessary information and inject the appropriate runtime operations.

For example:

json"{'key':" & myArr & "}"
json"{'key': [1, 0, " & myInt & "]}"
json"{" & myKey & ":[1]}"

New Fedora Workstation Installation Guide

Download and Boot Fedora ISO

  1. Download the latest Fedora Workstation ISO from Fedora Downloads.
  2. Burn the ISO to a USB drive using Fedora Media Writer or Rufus.
  3. Boot from the USB drive and start the live installation.

Installation (Manual Partitioning)

Nimony OpenAPI Auto-Projection: Finished Design

This is the intended product shape, constrained to ordinary Nimony plugins. There is no compiler pass, compiler modification, privileged semantic hook, or post-semantic mutation of an already-used nominal type.

What application code looks like

The normal application uses complete-looking generated types and ordinary field syntax:

How to use Crush with the Alibaba Cloud Token Plan

Crush (charmbracelet) natively supports both Anthropic and OpenAI-compatible APIs, so the token plan works out of the box. Add this to ~/.local/share/crush/crush.json under providers:

"bailian-token-plan": {
  "name": "Alibaba Cloud Model Studio (Token Plan)",
  "type": "anthropic",
  "base_url": "https://token-plan.ap-southeast-1.maas.aliyuncs.com/apps/anthropic",
  "api_key": "YOUR_TOKEN_PLAN_KEY",

OpenRouter Provider Fidelity Policy

Updated: 19 Aug 2026 Primary criterion: model fidelity. Rule: model labs serving their own models are automatically Allowed. Secondary infrastructure providers must show roughly β‰₯90% of first-party/reference capability on same-checkpoint comparisons. A clear sub-90% result moves a secondary provider to Ignored. Providers without enough clean evidence stay in Hold / Unproven.

OpenRouter endpoint-specific AutoExacto results take priority over brand reputation, speed, or generic infrastructure quality.

1. Allowed

## Standalone benchmark for the hottest Responses API path: decoding a realistic
## response body and extracting what a consumer needs (first text, first function
## call, usage tokens, parsing call arguments).
##
## Strategies:
## jsonx typed : package `fromJson(body, ResponseResult)` + accessor scans
## (identical logic to `openai/responses` accessors; schema-only
## import avoids linking relay)
## std/json typed : `parseJson(body).to(MyFlatTypes)` into flat own types
## (`type` fields as strings, `JsonNode` for open payloads,

Game System Design Protocol for AI Agents (Nim)

Directive

When asked to architect, implement, or review a game system in Nim, follow this protocol sequentially. Do not skip steps. Do not introduce abstractions not prescribed here unless the user explicitly requests them.


Phase 1: Classify the Subsystem

@planetis-m
planetis-m / game_arch_nim.md
Last active July 3, 2026 18:44
Architecting Games in Nim: A Pragmatic Guide

Architecting Games in Nim: A Pragmatic Guide

1. The Core Recommendation

Start simple. Stay simple. Most games never need ECS.

The game we just built β€” a survival arena with hundreds of agents, projectiles, particles, spatial queries, and camera-following β€” runs in a fraction of a millisecond using nothing more exotic than seq[Agent] and seq[Color]. The entire architecture is plain Nim: types, arrays, and procs. There is no framework, no query layer, no entity manager, no component registration, no archetype migration.

This is not a compromise. It is the optimal answer for the vast majority of games.

Results are stable across 3 runs. The pattern holds:

System ECS-Arch MI-AoS Consistency
ai_update ~2.13 ~1.71-2.93 Noisy β€” genuine tie (data fits L2)
move ~0.76 ~1.19 Stable β€” Arch wins 1.6x
combat ~0.27 ~0.45 Stable β€” Arch wins 1.6x
projectile ~1.12 ~0.74 Stable β€” AoS wins 1.5x
cull ~2.8 ~0.55 Rock solid β€” AoS wins 5x
despawn ~0.002 ~0.001 Stable β€” AoS wins 2x
## Archetype ECS vs MI-AoS Benchmark
## ==================================
## Two approaches for a mixin-based entity simulation with cross-entity refs:
##
## 1. ECS-Archetype β€” SoA columns within archetype buckets, no signature scan
## 2. MI-AoS β€” per-archetype value arrays (composition), direct field access
##
## Scenario: Tactical field simulation
## Building {pos, sprite} β€” static, can be a parent
## Unit {pos, worldPos, vel, hp, sprite,