Working locally through a track's syllabus

I’ve been working through F# and Go for #12in23. Both have very nice learning tracks.

I got a bit frustrated using the website to go back to revisit concept documents: too many clicks, too much waiting. Then I realized that I already have all the materials in my exercism workspace: the concept exercise README files.

This shell snippet will create a _concepts/ directory in your track with symbolic links the appropriate readme files:

track=elixir      # adjust to suit
cd "$(exercism workspace)/$track" &&
mkdir _concepts &&
cd _concepts &&
curl -s$track/main/config.json | 
jq -r '
    (.concepts | map({key:.slug,}) | from_entries) as $C
    | .exercises.concept[]
    | .slug as $S
    | .concepts[]
    | select(in($C))
    | "ln -s ../\($S)/ \"\($C[.] | gsub("/"; "-"))\""
    ' | 
sh &&
ls -l

As symbolic links, there’s no fuss that the target does not yet exist. And they live quite nicely in a git repo.


Tangentially, I learned something about the vim NerdTree plugin: it won’t display a symbolic link if the link destination does not exist.