These matters are always problems of organization, and of prioritizing what the job is, what are the inputs/outputs, how do you efficiently parameterize them into messages and data packets, where do they go and how will you send it, etc.
These matters are always problems of organization, and of prioritizing what the job is, what are the inputs/outputs, how do you efficiently parameterize them into messages and data packets, where do they go and how will you send it, etc.
# ASCII RPG
This repo uses Rust + Bevy (0.16.1), multi-crate workspace, RON assets, and a custom ASCII UI. The rules below keep contributions consistent, testable, and verifiable.
## Quick rules (read me first)
- Read/update CURRENT_TASK.md each step; delete when done.
- Build/lint/test (fish): cargo check --workspace; and cargo clippy --workspace --all-targets -- -D warnings; and cargo test --workspace
- Run dev tools: asset-editor/dev.fish; debug via /tmp/ascii_rpg_debug; prefer debug scripts in repo root.
- Logging: use info!/debug!/warn!/error! (no println!); avoid per-frame logs unless trace!.
- ECS: prefer components over resource maps; use markers + Changed<T>; keep resources for config/assets only.
- UI: adaptive content; builder pattern; size-aware components.
- Done = compiles clean (clippy -D warnings), tests pass, verified in-app, no TODOs/hacks.
- If blocked: state why and propose the next viable step.
- Before large refactors/features: give 2–3 options and trade-offs; confirm direction before coding.
## 1) Build, lint, test (quality gates)
- Fish shell one-liner:
- cargo check --workspace; and cargo clippy --workspace --all-targets -- -D warnings; and cargo test --workspace
- Fix all warnings. Use snake_case for functions/files, PascalCase for types.
- Prefer inline rustdoc (///) and unit tests over standalone docs.
## 2) Run and debug (dev loop)
- Start the app with debug flags and use the command pipe at /tmp/ascii_rpg_debug.
- Quick start (fish):
- cargo run --bin app -- --skip-main-menu > debug.log 2>&1 &
- echo "debug viewport 0 0" > /tmp/ascii_rpg_debug
- echo "ui 30 15" > /tmp/ascii_rpg_debug
- Helper scripts at repo root:
- ./debug.sh, ./debug_keyboard.sh, ./debug_click.sh, ./debug_world.sh
- Logging rules:
- Use info!/debug!/warn!/error! (never println!).
- Don’t log per-frame unless trace!.
- Use tail/grep to keep logs readable.
## 3) Testing priorities
1) Unit tests first (small, deterministic outputs).
2) Manual testing while iterating.
3) End-to-end verification using the debug system.
4) UI changes require visual confirmation from the user.
## 4) Architecture guardrails
- ECS: Components (data), Systems (logic), Resources (global), Events (comm).
- Principles:
- Prefer components over resource maps. Avoid HashMap<Entity, _> in resources.
- Optimize queries: marker components (e.g., IsOnCurrentMap), Changed<T>.
- Separate concerns: tagging vs rendering vs gameplay.
- Resources only for config/assets; not entity collections/relationships.
- UI: Adaptive content, builder pattern, size-aware components.
- Code layout: lib/ui (components/builders), engine/src/frontend (UI systems), engine/src/backend (game logic).
## 5) Completion criteria (definition of done)
- All crates compile with no warnings (clippy -D warnings).
- All tests pass. Add/adjust tests when behavior changes.
- Feature is verified in the running app (use debug tools/logs).
- No temporary workarounds or TODOs left in production paths.
- Code follows project standards above.
## 6) Never-give-up policy
- Don’t mark complete with failing builds/tests or known issues.
- Don’t swap in placeholder hacks and call it “done”.
- If truly blocked, state why and propose a viable next step.
## 7) Debug commands (reference)
- Pipe to /tmp/ascii_rpg_debug:
- debug [viewport X Y] [full]
- move KEYCODE (Arrow keys, Numpad1–9, Space, Period)
- click X Y [left|right|middle]
- ui X Y
- Coordinates: y=0 at bottom; higher y = higher on screen.
- UI debug output lists text top-to-bottom by visual position.
## 8) Dev convenience (asset editor)
- Combined dev script:
- ./asset-editor/dev.fish (starts backend in watch mode + Vite dev)
- Frontend only:
- ./asset-editor/start-frontend.fish
## 9) Tech snapshot
- Rust nightly (rust-toolchain.toml), Bevy 0.16.1.
- Workspace layout: apps/ (game + editors), engine/ (frontend/backend), lib/ (shared), asset-editor/.
Keep changes small, tested, and instrumented. When in doubt: write a unit test, run the app, and verify via the debug pipe/logs.
## 10) Design-first for large changes
- When to do this: large refactors, cross-crate changes, complex features, public API changes.
- Deliverable (in CURRENT_TASK.md):
- Problem and goals (constraints, assumptions).
- 2–3 candidate approaches with pros/cons, risks, and impact.
- Chosen approach and why; edge cases; test plan; rollout/rollback.
- Keep it short (5–10 bullets). Get confirmation before heavy edits.
Virtual memory subsystems in operating systems of the last 40+ years pretty much do exactly that – they essentially emulate infinite RAM that spills over onto the external storage that backs it up.
Prosumer grade laptops are already easily available, and in 2-3 years there will be ones with 256-512 Gb as well, so… it is not entirely incoceivable that in 10-20 years (maybe more, maybe less) the Optane style memory is going to make a comeback and laptops/desktops will come with just memory, and the separation into RAM and external storage will finally cease to exist.
P.S. RAM has become so cheap and has reached such large capacity that the current generation of young engineers don't event know what a swap is, and why they might want to configure it.
It's not that much of a stretch to imagine ultra dense wafers that can have compute, storage, and memory all in one SoC.
First, unify compute and memory. Then, later, unify those two with persistent storage so that we have something like RAM = VRAM = Storage.
I don't think this is around the corner, but certainly possible in about 12 years.
Alfred search, in fact, really irritates me in that I've not found a good way to limit the search space. No, I really don't want files inside various node_modules folders filling up the search results. <Sigh> I'll try Spotlight, or go directory traversing, again. Anyone have a solution for that?
Something happened in 15.1 onwards for me where Spotlight has become way faster and way better. But yes, Alfred used to dominate in search and speed as well.
This is cool though, i love these programs that exist in these constraints, like Dwitter does with the demoscene.
Yikes. The golden ratio has limited significance, nothing to do with spirituality, and little presence in nature [1]. Araujo's pictures look great, but in almost any of them you could replace the golden ratio with 1.6, 1.7, or 1.5, and get something no less beautiful.
The Wikipedia page is fairly good on this, especially the "Disputed observations" section: https://en.wikipedia.org/wiki/Golden_ratio#Disputed_observat...
As a mathematician, fetishisation of the golden ratio bugs me.
[1] The main place is spiral arrangements of leaves, petals, etc. Vi Hart explains why (watch all three parts): https://www.youtube.com/watch?v=ahXIMUkSXX0
I know, but hear me out: it's a decent hook for teaching people about Geometry, Recursion, and Dynamic Programming.
Couple years later she told me that happens a lot but one is so focused on their work and the illusion that "once I'm there ..." so strong, that one ignores the hard evidence and much debated proof, despite, well, one's own training.
It doesn't even get that hot with LLMs running with max fans, where the SoC is about 80º C.
Aside from those use cases, the M4 Max runs 43º C or less even in summer conditions.