Exercism Crystal Operation Obsidian Part 1+2

Obsidian

You can watch my speech about Exercism and the new content from the Crystal conference 2023 here: Carl Harrison – Learning Crystal | CrystalConf 2023 - YouTube.

This is the third operation on the Crystal track, operations aim to deliver bigger content pieces compared to our ongoing work (like fixes, adding exercises etc).
Most of the content for this operation was released pre-Crystal conference but some will be released this week due to some last-minute content (which is the reason of being 2 parts).

Crystal exercises on Exercism

It is an operation since this will be released over a period, usually 1-2 weeks (but in this case over a month).

Summery:

  • 4 new concepts
  • Crystal 1.10
  • Representer improvements
  • Analyzer improvements
  • Test Runner improvements
  • Practice tag

Operation Obsidian Part 1

Learning mode

The learning mode was released in July with a starting set of 10, in late October were 6 new concepts added. With operation Obsidan part 1 is the total count brought up to 18 concepts. The new concepts focused on Arrays and how to work with them. With these 2 concepts followed 2 new exercises.

Crystal 1.10.1

Note: This may lead to some current solutions to break

This upgrade makes it so you can use the latest tools.
This also makes Crystal 1.10 an “officially” supported version.
This makes our list of “officially” supported versions: 1.6, 1.7, 1.8, 1.9, 1.10

With official means, we ensure that the version can solve all of the exercises and also that we will mention if some feature is not available for some of the versions.

As detailed in the last operation Crystal 1.5 is no longer supported and the next operation will drop 1.6.

Representer improvements

Exercism has enabled various new features for the representer like the community solution page will now group solutions after representation which means duplicate solutions will no longer be displayed.

The Crystal representer has also received a major upgrade, it now features both a CLI mode and a proper API mode. Before the representer were quite hard coded and meant it was not portable at all since it was just intended to run in a docker environment. It has now received a proper interface, and as a bonus, it is now available to download as shard and we got our first iteration of documentation (it will be iterated on) for it based on the document generator tool: Representer 1.2.0 (exercism.github.io).

This has benefits for the track as I will just mention in a bit but if you are looking for a tool which can group Crystal solutions feel free to try it out:

To install include this in the shard.yml

dependencies:
  representer:
    github: exercism/crystal-representer
    version: ~> 1.2.1

Analyzer improvements

As stated above so did the representer receive a new interface this is because the representer is now bundled with the analyzer. This makes it so the analyzer can finally compare solutions. This means we can now tell the user if they solved it the same way as the exemplar solution:
image

There were also some additions of five new comments for the following exercises:

  • Crystal Hunter
  • Gigasecond
  • Leap
  • Wellingtons-weather-station

Practice tag

We have added practice tags for exercises which means if you want to practice a certain concept you can now see exercises that practice that concept.

Test runner improvements

The test runner will now limit user output to 500 characters to follow the Exercism spec.

Operation Obsidian Part 2

This part was significantly smaller in content but a lot of fixes were fixed in this period and some of the representer received some new methods. And a further 2 new concepts were added.

Learning mode

2 new concepts were added bringing the total to 20 concepts, and this marks the first concept written by a contributor, @kahgoh. The two new concepts focused on binary octal and hexadecimal and the methods around them. A big thanks to @kahog for writing the concept about binary manipulation and with said exercise.

The array concept also has some smaller additions in content to cover some missing features.

8 Likes