Learning tracks
learn is a standalone command, registered alongside polyforge at activation.
It owns everything under Dev/Learn/<lang>/.
It has two layers, and they answer different needs: a curriculum for structure, and a playground for daily volume.
Layer 1 — the tiered curriculum
Section titled “Layer 1 — the tiered curriculum”learn init goIdempotent — re-running it never destroys work. It scaffolds:
DirectoryDev/Learn/go/
- README.md
- ROADMAP.md
- PROGRESS.md
- go.mod one module for the whole track
Directory00-setup/ hello world, environment
- …
Directory01-basics/ variables, data types, control flow, functions, packages
- …
Directory02-data-structures/ arrays, slices, maps, structs
- …
Directory03-intermediate/ pointers, interfaces, errors, generics, concurrency
- …
Directory04-advanced/ goroutines, channels, context, http, testing, benchmarks
- …
Directoryplayground/ daily practice — experiments, snippets, scratch
- …
Directorychallenges/ easy, medium, hard
- …
Directorynotes/ concepts, mistakes, cheatsheets
- …
One module for all days, so cross-referencing yesterday’s code costs nothing.
Layer 2 — daily practice
Section titled “Layer 2 — daily practice”Days live under playground/, one folder each:
learn go loops # next day → playground/day01-loopslearn go next slices # explicit next day, works from anywherelearn go day5 generics # a specific day → playground/day05-genericslearn next slices # only when standing inside Dev/Learn/goIf the track does not exist yet, learn go loops initialises it first — so the
curriculum command is optional in practice.
Run a day the normal way:
go run ./playground/day01-loopsnext fills gaps first
Section titled “next fills gaps first”next creates the lowest missing day, not the highest plus one. Delete
day02 and the next call recreates day02 before moving on to day07.
That means the day numbers stay a real sequence rather than a high-water mark, and deleting a throwaway experiment does not permanently punch a hole in your history.
Seeing where you are
Section titled “Seeing where you are”learn list goShows progress and exactly what next would create — worth running before you
start, so you know whether you are filling a gap or extending the track.
Publishing a track
Section titled “Publishing a track”-
Publish it (needs
gh, logged in):Terminal window learn publish goThis pushes the track as its own repository —
learn-go— and registers it:polyforge.registry.toml [learn.go]repo = "git@github.com:youruser/learn-go.git" -
Commit and push
polyforge.registry.tomlin the PolyForge repo. -
On any other machine:
Terminal window learn get all # every tracklearn get go # or just one
get needs only git. Where a track already exists locally it runs git pull,
so it is safe to re-run.
A workable rhythm
Section titled “A workable rhythm”learn list go # what's next?learn go interfaces # create the day# ... write code, run it, take notes in notes/mistakes/learn publish go # occasionally — it's just a git repo, so commit normally tooRelated
Section titled “Related”learnreference — every command and flag- Content separation — why tracks are separate repos