If you get stuck in Erlang

I have found that programming exercises help reinforce my learning while working out a new programming language. So, I came to Exercism for that. In case you get stuck I have found a few things that might help for the Erlang track (as of June 2023 at least.):

  1. The implementation for the website’s unit testing (when you click the “Run Tests” button in the editor it tests the code against a series of unit tests.) If the code compiles and runs the unit tests, they will capture whatever bugs/problems the author of the tests anticipated and report them pretty clearly. BUT if there is any problem outside of those anticipated, there will be a very generic, and often not helpful, message. SO I recommend testing code on a local machine or elsewhere such that you will get better and more specific feedback on errors.

  2. Occasionally you might encounter a problem that only happens on the server and not on the local machine. In that case one place to look is at the version(s) you are running on the local machine versus that on Exercism. For instance, once I used lists:uniq/1 in a iteration. Worked fine on my version 25 of Erlang, but does not exist on Exercism’s version 22… See http://forum.exercism.org/t/what-version-of-erlang-otp/6271/2

1 Like

Thanks for the post, Bill. I’m interesting in what extra info you get locally. I see no reason we shouldn’t also be showing that information in the test runner. Could you give an example of the command you run locally and the output that you get in response that’s missing from the online test runner please?

Sadly the testrunner can not show the same bits of information, due to the way how it is implemented.

The actual eunit testing library that you use locally, does not provide (or at least did not provide) the necessary interfaces to run it programmatically and get back the information we need in the testrunner.

Therefore I did a shallow re-implementation of eunit embedded in the runner.

For the cases I had locally, the information gathered for each testcase was mostly the same. The one thing that I know that the testrunner does not cover is “printing” or other kind of debug-output.

If there are other things that are not represented or are lacking information, I’d be happy about reproducers that I could add to the testsuite I use to test the runner.


I am aware that I need to find some time to update the runner. I hope I will be able to push it to OTP 25 this weekend. I am not sure if I want to use the freshly released 26 yet…

If you still want me to post examples, let me know.

I don’t know if this is common for Erlang/OTP, but my distro seems to like 25.

For myself I don’t have a major complaint about the runner. Mainly because there are always little impediments that crop up in any endeavor., and understanding how to get around them is part of learning.

Distros tend to lack behind by about a year, they call this “stability”

But you are right, I should take a look first what would be available in a most recent LTS Ubuntu.