What I set up
I already had Zed, Roc, and Zig on my Debian machine from earlier. Tonight I treated learning like a work block: show up, practice, stop when tired.
I made a home base:
Bash
mkdir -p ~/learn-zig-roc
cd ~/learn-zig-roc
I open that folder in Zed with z. and keep a separate terminal for commands so Wazuh and other sessions stay alone.
I confirmed both toolchains:
- Roc nightly (rv)
- Zig 0.14.0 (zv)
- Zed on PATH via ~/.local/bin
Anthropic is configured in Zed (API key set). The agent can use Claude. Ollama is optional for local models when I want zero API cost.
How I practice (the loop I want to keep)
This is my IDLE-style loop:
- Zed agent explains one small thing
- I pause
- I edit the file (nano or Zed)
- I run in my terminal
- I tell the agent “done” only when I’m ready
| Window | Job |
|---|---|
| Zed | Lesson + edit |
| Terminal | zig run / roc — my proof |
I do not paste Zig or Roc code into bash. Code goes in a file. Commands go in the terminal.
What I actually did tonight (Zig Lesson 1)
My hello.zig lived in home first; the learning folder started empty. I ran:
Bash
zig run ~/hello.zig
# Hello, Zig!
Then I copied it into the practice folder and edited it with nano until the file really changed:
zig
try stdout.print("Hello, Zig Day 01!\n", .{});
Bash
zig run hello.zig
# Hello, Zig Day 01!
That was the win: edit → run → see my change.
I almost pasted a print line into the shell again (!\n / event not found). Reminder to myself: nano/Zed for code, terminal for commands only.
Next small step (when I’m fresh)
Format string practice the agent gave me:
zig
try stdout.print("Hello, {s}! Day {d}\n", .{ "Zig", 1 });
- {s} = string
- {d} = decimal number
- values come from .{ “Zig”, 1 } in order
Then run zig run hello.zig and expect something like Hello, Zig! Day 1.
After that, Roc lesson — only when I say so. One track at a time.
Money and machine notes (for future me)
- Leaving Zed open overnight is fine
- Idle does not spend Anthropic credits
- Credits spend on new agent requests and long tool-heavy turns
- ~$17 API balance goes further with short steps and me running commands myself
- Fans got loud under load; stop the agent when AFK; don’t stress “Operation not permitted” on system PIDs
Stop the agent with the stop control when it’s generating; if the chat is idle, it’s already stopped.
Aliases I rely on
Roc: rv rr rb rbo rrepl rfmt rcheck Zig: zv zr zb zbs zbf zfmt ztest zbuild zbr Zed: z z. zed.
Plus PATH for ~/.local/bin so zed works.
How I want tomorrow to start
Bash
cd ~/learn-zig-roc
source ~/.bashrc
zig run hello.zig
Open Zed on that folder if it isn’t already. Continue the format-string step — or just reread. No wasted setup if I leave Zed and the terminal parked here.
One-line reminder
I’m not behind. I’m practicing on purpose: one edit, one run, one “done.” Zig tonight, Roc when I’m ready. Deitel plus this is enough for a day. Rest is part of the work.