Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mtrsk/exercism-shell

A nix-based environment to solve exercism in multiple languages
https://github.com/mtrsk/exercism-shell

devenv direnv exercism exercism-tooling nix

Last synced: 4 months ago
JSON representation

A nix-based environment to solve exercism in multiple languages

Awesome Lists containing this project

README

        

# Exercism

This is a nix shell for reproducible exercism in multiple languages. This is all the tooling you need:

- [Nix](https://nixos.org/)
- [direnv](https://direnv.net/)

## Usage

Create or edit the `.config/exercism/user.json` file, and dump the following content
```json
{
"apibaseurl": "https://api.exercism.io/v1",
"token": "",
"workspace": ""
}
```

then you can proceed to do exercism in your favorite (supported) languages, adding support for more is easy.

```shell
$ cd erlang
direnv: loading ~//.envrc
direnv: using flake .#erlang --impure
direnv: nix-direnv: Using cached dev shell
Starting Erlang environment...
# <...>
$ exercism download --track=erlang --exercise=difference-of-squares

Downloaded to
//exercism/erlang/difference-of-squares
```
now just solve your exercise,
```shell
# <...>
$ cd difference-of-squares
# <...>
$ rebar3 eunit
# <...>
# =======================================================
# All 9 tests passed.
$ exercism submit src/difference_of_squares.erl
```

## Supported Languages

1. Elixir
2. Erlang
3. F#
4. Gleam
5. Haskell