Skip to content

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.

Terminal window
learn init go

Idempotent — 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.

Days live under playground/, one folder each:

Terminal window
learn go loops # next day → playground/day01-loops
learn go next slices # explicit next day, works from anywhere
learn go day5 generics # a specific day → playground/day05-generics
learn next slices # only when standing inside Dev/Learn/go

If 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:

Terminal window
go run ./playground/day01-loops

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.

Terminal window
learn list go

Shows 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.

  1. Publish it (needs gh, logged in):

    Terminal window
    learn publish go

    This 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"
  2. Commit and push polyforge.registry.toml in the PolyForge repo.

  3. On any other machine:

    Terminal window
    learn get all # every track
    learn 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.

Terminal window
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 too