I'm very excited about this feature because it transforms the online editor into a proper interactive Clojure environment. Once I prototyped the desired behavior using Nextjournal's clojure-mode, the next task was to figure out how to best integrate it into the existing Ruby on Rails/React application while making as minimal impact on the codebase as possible. The first thing I tried was to use scittle to load SCI via the <script> tag. This worked great, but I wanted something more modular and realized the best thing to do would be to make it into a proper plugin for Codemirror 6 and package it as an npm library similar to @nextjournal/lang-clojure which I was able to fork and use as a template, which is itself based on @codemirror/lang-javascript. This makes it extremely easy on the website team because it simply replaces the legacy plugin used previously, with the added benefit of creating a Clojure-evaluation plugin that can be used by the rest of the Clojure community to build highly interactive editors on the web. Repo: https://github.com/bobbicodes/clojure-eval
-
Basic intro - I tried to give special attention to this, because its purpose is to provide the fastest possible onramp to get the student started without them needing to go anywhere else right away. Since Exercism is all about teaching new languages to folks who already know how to code, our target experience level is someone who has never seen Clojure, Lisp, or functional programming concepts before, but is fluent in at least one other language.
-
Lists exercise - This one needed to be revamped because the idiomatic solution included threading macros, which were not yet taught at that point. So this exercise now teaches threading macros, and the Card Games exercise (see below) is being ported from the Python track because it is a better exercise for teaching list operations.
- Hashmaps - International Calling Connoisseur
- Chars - Squeaky Clean
- Regex - Date Parser
- closures - Coordinate Transformation
- Lists - Card games
- Atoms
- Threading macros
- Multimethods
- Protocols
- Partition
- Associative destructuring
- Multiarity, variadic, anonymous functions
- Yacht
- Zipper
The learning exercise test suites now include metadata linking each test case to its respective task in the instructions. This enables a better user experience, because now after the tests are run, there is a button to return the student to the proper place.