Crystal blog post 2023/3/30
New month, new blog post, and Crystal 1.8 is just weeks away.
- Killer Sudoku Helper, the goal is to find all combinations of numbers to reach a certain sum with some specific rules.
I want to thank @ryanplusplus for creating (for the track) all of the following exercises:
- Bootle Song, create verses describing how many bottles you have under each verse.
- Pig Latin, Write a translator that can translate English text into Pig Latin.
- Linked List, Linked List, is a common subject in computer science and is when an element in the list points to the next one.
- Sublist, Checking if a list is inside of another list is the goal of this exercise.
There are some major changes to the test runner, to among other things prepare for 1.8
A big push happened early this month in collaboration with parts of the Crystal community to now be able to have outputs in the online editor. This has been enabled through the use of making the test runner inject a script to the test file which then writes a file with outputs sorted to each tests.
The Crystal test runner supports both
p and the
This is a feature I have wanted on the track since day one so it makes me so happy that it is now launched.
Ci also known as continuous integration describes how we ensure that new content and changes work well with the track. For the Crystal track that mostly involves running tests to ensure that the changes are compatible and up to standard. Back in January, a new script was made to ensure that the generated files through our custom-made generator worked and was written in bash.
The push this month for improved ci is among other things to ensure a smoother transition to 1.8. This month that work continued with a new bash script that runs the test files against all examples solution.
Such a script had already existed, but was written in a makefile. Since the crystal track already used plenty of Bash and the track could result in using 1 less language, the decision was to face out makefile. The crystal track now has no bash and uses the following three languages: Crystal, Bash, and jq. All of them are on exercism (jq on exercism, bash on exercism).
This push also makes it so this new test script runs on multiple versions of Crystal. There have been issues in the past where the ci which ran on the latest version of Crystal passed but then errors appeared for the test runner who runs on an older version. Thereby now multiple versions of Crystal are being tested, more exactly 1.2.2, 1.6, and 1.7. I plan to “ensure” that around 3-4 versions are compatible, but older works will often continue to work.
When 1.8 is released the plan is to fully drop support for 1.2 and instead ensure 1.6, 1.7, 1.8, and maybe 1.5 (will have to do some testing).
Also, another ci script was added this month which is the first ci script written in Crystal for the track. It checks so every file is formatted up to the Crystal standard, since it uses Crystal so is it very fast.
There was a plan to add another ci script to the test runner repo in preparation for 1.8. Although I got sick last month and unfortunately at a quite bad time meaning that had to be pushed into hopefully early April.
Katarina has continued her work on improving instructions on current exercises, these are the updated ones:
- Binary Search
- Sum of multiples
- Secret handshake
There was a doc added to describe how to output with the updated system. This can be found at the bottom of the instructions.
What is coming
Crystal 1.8 has been on the roadmap for a very long time, it will mark some big changes on the track. Crystal 1.8 is scheduled for release on the 12th of April. We are on track and won’t move that quickly to the new version and await at least 1.8.1. This means there is a high chance that the update will occur at the end of the month.
My plan is to post a blog post around the 12th of April with more details on what this move means and what to expect.
The new representer has got more work this month. I have done testing with it and it does a good job formatting most files this month a lot of bugs have been squashed out. The biggest thing which is missing is improved macro support, the current system has decent support for macros but a some is still missing, this is something I will spend some more time under the coming month (April).
The release is a bit in the air still but a guess would be later this month or possibly next month.
The learning mode has been worked for the whole month and we have now moved to a state where we have 1 concept merged in, 2 have finished / almost finished reviewing and a further 4 are under review with another one in development. This has been a big focus for the last little while and has been occupying a lot of time. And I want to thank all of the folks who have helped with reviewing concepts.
A content stop was announced to the reviewers earlier this month, which will be around 17th of April. After this date will no new concepts be added and instead focus will switch to finishing up the current one and when everything is ready to launch the learning mode.
Release date do I not want to commit to, but I would say that it shouldn’t be expected to be released in April. It is more likely to occur in May or possibly June.