{"id":20081989,"url":"https://github.com/exercism/erlang","last_synced_at":"2025-04-07T07:18:38.343Z","repository":{"id":14560402,"uuid":"17276138","full_name":"exercism/erlang","owner":"exercism","description":"Exercism exercises in Erlang.","archived":false,"fork":false,"pushed_at":"2024-05-19T21:44:48.000Z","size":1789,"stargazers_count":125,"open_issues_count":10,"forks_count":90,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-05-22T16:23:32.875Z","etag":null,"topics":["community-contributions-accepted","exercism-track"],"latest_commit_sha":null,"homepage":"https://exercism.org/tracks/erlang","language":"Erlang","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/exercism.png","metadata":{"funding":{"github":["exercism"],"custom":["https://exercism.org/donate"]},"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2014-02-28T05:23:39.000Z","updated_at":"2024-05-28T17:13:10.936Z","dependencies_parsed_at":"2024-03-03T20:36:18.961Z","dependency_job_id":"4b78ce7f-35cd-425f-ab35-b8e86b6ae7b4","html_url":"https://github.com/exercism/erlang","commit_stats":{"total_commits":1067,"total_committers":77,"mean_commits":"13.857142857142858","dds":0.6110590440487348,"last_synced_commit":"2bdb5352c25d7e2f33817afb0106191133042dd3"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Ferlang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Ferlang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Ferlang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/exercism%2Ferlang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/exercism","download_url":"https://codeload.github.com/exercism/erlang/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247480581,"owners_count":20945669,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["community-contributions-accepted","exercism-track"],"created_at":"2024-11-13T15:41:16.462Z","updated_at":"2025-04-07T07:18:38.310Z","avatar_url":"https://github.com/exercism.png","language":"Erlang","readme":"# Exercism Erlang Track\n\nExercism exercises in Erlang\n\n## Contributing guide\n\nFor general information about how exercism works, please see the\n[contributing guide](https://github.com/exercism/x-api/blob/master/CONTRIBUTING.md#the-exercise-data).\n\nIf you create “claiming” PRs with obviously unfinished code, please provide an estimate in the PR description when you will continue to work on the PR or you think it will be finished.\n\n### Setting up your system for local development on the track\n\nPlease make sure you have installed erlang/OTP and `rebar3` as\ndescribed on [Installing Erlang](https://exercism.org/docs/tracks/erlang/installation)\nor `docs/INSTALLATION.md` in this repository. Also run\n`bin/fetch-configlet` to download the JSON-checker.\n\nPlease make sure you use one of the releases of erlang/OTP as\nspecified in `.github/workflows/main.yml` (see the\n`jobs.test_erlang.strategy.matrix.otp` key), as these are the ones\nofficially tested and supported by this track.\n\nFeel free to use any feature that was introduced in the oldest version\nof the range, while also avoiding everything that has been removed or\ndeprecated in the newest one.\n\n### Implementing an exercise\n\nWhen there is a mention of \"slug-name\", it refers to the slug as used\non exercism URLs.  In contrast, \"erlangified_slug_name\" is the slug-name\nwith all dashes (`-`) replaced by underscores (`_`) to make the name\ncompatible with Erlang syntax.\n\n  1. Create a folder `exercises/\u003cslug-name\u003e`.\n  2. Set up folder structure (`src`, and `test`).\n  3. Copy `rebar.config` and `src/*.app.src` from another exercise.\n    1. Leave `rebar.config` unchanged.\n    1. Rename `src/*.app.src` to `src/\u003cerlangified_slug_name\u003e.app.src`.\n    1. On the first line of this file change the old erlangified_slug_name to the new one.\n    1. On the second line change the old slug-name to the new one.\n  4. In the `src`-folder, create two files: `example.erl` and `\u003cerlangified_slug_name\u003e.erl`.\n   The first is for your example solution, the second is the 'empty' solution to give\n   students a place to start.\n   You might take the files from another exercise as your starting point.\n   Ensure their module names match their (new) file names.\n  5. In the `test`-folder, create one file: `\u003cerlangified_slug_name\u003e_tests.erl`\n   and insert the boilerplate code shown below.\n   This file is for the test cases.\n  6. Implement/correct your solution in `src/example.erl`.\n  7. Add tests to `\u003cerlangified_slug_name\u003e_tests.erl`.\n  8. Run tests using `rebar3 eunit`.\n\nRepeat steps 6, 7, and 8 until all tests are implemented and your\nexample solution passes them all.\n\nIf there is a `exercises/\u003cslug-name\u003e/canonical-data.json`\nin [problem-specifications](https://github.com/exercism/problem-specifications), make sure to\nimplement your tests and examples in a way that the canonical data is\nintegrated and not violated.\n\nYou may add further tests, as long as they do not violate canonical\ndata and add value to the exercise or are necessary for erlang\nspecific things.\n\nAlso please make sure to add a `HINTS.md` with some hints for the\nstudents if the exercise becomes tricky or might not be obvious.\n\n```erl\n-module(\u003ctest module name\u003e).\n\n-include_lib(\"erl_exercism/include/exercism.hrl\").\n-include_lib(\"eunit/include/eunit.hrl\").\n```\n\nYou will need to add entry for the exercise in the track's `config.json` file,\nwhich you will find in the respository's root directory (two levels up).\nFor details see [Exercise configuration](https://github.com/exercism/docs/blob/master/language-tracks/configuration/exercises.md).\n\n### Before pushing\n\nPlease make sure, that all tests pass by running\n`_test/check-exercises.escript`. On windows you might need to call\n`escript _test/check-exercises.escript`. Also a run of `bin/configlet lint`\nshould pass without error message.\n\nBoth programs will be run on CI and a merge is unlikely if tests fail.\n","funding_links":["https://github.com/sponsors/exercism","https://exercism.org/donate"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Ferlang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexercism%2Ferlang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexercism%2Ferlang/lists"}