exercism / clojure

Exercism exercises in Clojure.
https://exercism.org/tracks/clojure
MIT License
160 stars 155 forks source link

Implement new learning exercise: Atoms #551

Open bobbicodes opened 1 year ago

bobbicodes commented 1 year ago

Per this forum post, as well as the go discussion, both languages have strong concurrency support and this should be on the syllabus and taught by a learning exercise.

It may be a good idea to watch the go track, because if they create an exercise we could simply port it or collab with them.

This issue describes how to implement the concurrency learning exercise for the Clojure track.

Getting started

Please please please read the docs before starting.

Please watch the following video:

Goal

The goal of this exercise is to teach the student how concurrency is used in Clojure.

Learning objectives

Out of scope

Concepts

Prerequisites

Resources to refer to

Atoms

Representer

Analyzer

Implementing

To implement a concept exercise, the following files must be created:

languages
└── clojure
    └── exercises
        └── concept
            └── <SLUG>
                ├── .docs
                |   ├── instructions.md
                |   ├── introduction.md
                |   ├── hints.md
                |   └── after.md (optional)
                ├── .meta
                |   |── design.md
                |   └── Example.clj
                ├── <NAME>.clj
                └── <NAME>_test.clj

Help

If you have any questions while implementing the exercise, please post the questions as comments in this issue.

bobbicodes commented 11 months ago

Changed the title because what we really need is a learning exercise for Atoms, not concurrency in general. Things like agents and refs are advanced Clojure concepts that are likely out of scope, at least until the syllabus reasonably covers the fundamentals, which atoms definitely are.

Refs, in particular, are almost never used in modern Clojure, the community has mostly gravitated to using atoms as the go-to reference type.