exercism / elm

Exercism exercises in Elm.
https://exercism.org/tracks/elm
MIT License
135 stars 110 forks source link

Concept: bitwise operations #698

Open jiegillet opened 5 months ago

jiegillet commented 5 months ago

Design

Goal

The Goal is to learn to use the Bitwise module

Learning objectives

Students should be able to

Out of scope

Nothing

Concepts

The concept this exercise unlocks is:

Prerequisites

Analyzer


Comments

stewartmurrie commented 3 weeks ago

I'd like to work on this ✋

ceddlyburge commented 3 weeks ago

Awesome!

Do you want any help / pointers to the docs or similar?

I usually start by copy posting an existing concept and concept exercise, and replace things as I go, but I think some of the other maintainers have a different process ...

stewartmurrie commented 3 weeks ago

If you know of tracks that have good examples of this concept I'm happy to borrow from them. Also, this will be my first Exercism contribution so I might need some help making sure it's good :D

ceddlyburge commented 3 weeks ago

Hi Stewart, we are certainly here for code review and advice and things like that.

This place shows all the concept exercises that currently exist, across all languages, so I can look for things there. https://exercism.org/docs/building/tracks/stories

And these are the docs for creating a concept https://exercism.org/docs/building/tracks/concept-exercises

Cheers , cedd

jiegillet commented 2 weeks ago

I usually recommend looking at the Elixir track, but in this case the concept exercise is linked to another, and not very helpful. I'm not sure if other tracks have what we need.

Anyway in this case, we can keep the intro it really simple: Elm uses the Bitwise module, here is or, and, etc, a couple of examples and we are done.

The exercise should be simple too, hopefully it would have no other dependencies than the basic ones. I just thought of something (no need to pick this, you can probably do better): creating helper tools for the Linux permission system read/write/exec encoded in numbers up to 7, like canOnlyRead canReadOrWrite, things like that? And then maybe some other OS "SlidingDoor" is encoding the same information, but on higher bits (101000 instead of 101) so we need to convert to and from. Or maybe there are three sets of permissions user/group/all in one integer (uuugggaaa) and we need to copy a permission from user to group?

stewartmurrie commented 2 weeks ago

I looked at Elixir and didn't think what they had was all that useful here. But the Java one seems helpful, so I based the Elm concept and exercise on that.

So, I think I have the concept ready for review. I've checked that the exemplar passes the tests, and configlet lint is more-or-less happy. Is there anything else I should do before I create the PR?

ceddlyburge commented 2 weeks ago

I think put in in review. We can always review it twice if needs be ...