Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The bitwise-operators concept #3564

Merged
merged 4 commits into from
Dec 27, 2023
Merged

Conversation

colinleach
Copy link
Contributor

Another concept, to review non-urgently at your leisure.

There was some minor confusion about calling it bitwise-operators (better) or bitwise-operations (occurs in a few places in the plans). That's why the concept uses one, the branch uses the other name.

@BethanyG BethanyG changed the title bitwise-operators concept The bitwise-operators concept Dec 26, 2023
@BethanyG
Copy link
Member

We also have this concept we can refer/link to, but as I read through what you've written, perhaps it needs a go-over/edit, so that the two work together? What do you think?

And we also have this pending concept, should we combine them, or keep it by itself?

Real Python does it all in a fell swoop, but I ... sorta feel like the article is TMI. There is a lot to explore with bitmasks....Thoughts?

@colinleach
Copy link
Contributor Author

Ummm, OK - I had completely failed to notice the existing concepts, so obviously didn't take them into account. It's probably best if I think about this tomorrow and get back to you, instead of rushing it now. We certainly need to make everything fit together!

This is a foretaste of what we'll be dealing with on the functions sub-tree, which has even more of what patent lawyers call "prior art" to work around.

First draft of edits and links for Bitwise operations.
@BethanyG
Copy link
Member

BethanyG commented Dec 27, 2023

Ok. That took considerably longer than I wanted it to. Apologies for that.

I've pushed a first pass, but will wait for you to look things over and re-work. I am not attached (particularly) to this edit, so if you need to, you can revert it. 😄

This is a foretaste of what we'll be dealing with on the functions sub-tree, which has even more of what patent lawyers call "prior art" to work around.

Amen to that. But as the saying goes "let's not borrow trouble." We'll leave tomorrows problem for tomorrow.

Onward to collections and datetime!! 🚀

@colinleach
Copy link
Contributor Author

That's a big improvement on my draft. I've no big changes to suggest, just some small details:

  • Line 46, the Bitwise Logic sub-header has a broken link. We need to add a reference [bitwise-operators].
  • Line 63 refers to "both the input strings". Technically, these are (binary) ints/numbers, not strings. Worth changing?
  • Line 92, broken link to [concept:python/sets]. Is this a GitHub thing that fixes itself on the Exercism website, or do we need to fix it?
  • Line 116, the most minor of niggles. I would call this "most significant bit" or MSB. By all means stick with "significant bit" if that's what you prefer.

@BethanyG
Copy link
Member

Those edits make total sense. 😄 I will investigate the widget link pronto.

Any further thoughts on #3564 (comment)? Should I hold off on any edits pending your reviews/thoughts? I can work on the other concepts and exercises meanwhile. 😄

@BethanyG
Copy link
Member

That's a big improvement on my draft. I've no big changes to suggest, just some small details:

  • Line 46, the Bitwise Logic sub-header has a broken link. We need to add a reference [bitwise-operators].

Thank you for the catch! ✅

  • Line 63 refers to "both the input strings". Technically, these are (binary) ints/numbers, not strings. Worth changing?

worth changing!

  • Line 92, broken link to [concept:python/sets]. Is this a GitHub thing that fixes itself on the Exercism website, or do we need to fix it?

Good eyes here! The link was missing a set of (). I added them in, and now it should work. ✅ 🤞🏽

  • Line 116, the most minor of niggles. I would call this "most significant bit" or MSB. By all means stick with "significant bit" if that's what you prefer.

Not a minor niggle at all! If it is MSB, then we should use MSB. I spelled it out, then used the abbreviation later. LMK if it looks OK. ✅

Just pushed a new version with those changes ++ other things I saw on a re-read.

@colinleach
Copy link
Contributor Author

I like your latest commit. That just leaves the question of how to integrate with the binary-octal-hexadecimal concept.

Can we answer that question now? As both lack concept exercises (and there is nothing good to fork from - crystal/secrets is pretty lame), we may need to revisit this once we have something to deploy on the learning syllabus. Or am I just evading the question?

@BethanyG
Copy link
Member

You are evading, but that's fine (and totally understandable!).

I am pretty happy with this write-up, and I don't hate the binary-octal-hexadecimal concept. It needs a go-over, but it can be done when we find an exercise idea to implement. I had been working on one about an explosion in a paint-by-numbers factory (putting different color sets back together) or some other colorspace or image conversion problem where you need to use/convert between the three numberspaces. But didn't get too far.

So maybe we merge this and work on the bitflags concept? And focus on trying to dream up good exercises for both bitwise and bitflag.

One thought is a Unicode version of this exercise, where students would need to track MSB in order to keep diacritical marks together with the user-characters they modify, in order to properly "truncate" text?

Or we could implement a Unicode version of reverse-string, with a similar issue. Though that could be really complicated, especially for triple-byte character sets....

Copy link
Member

@BethanyG BethanyG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am going to bite the bullet and merge this for now. We can revisit the other issues as we move along. Thank you again for all your hard work on this! 🌟 🌈

@BethanyG BethanyG merged commit 7e5a83d into exercism:main Dec 27, 2023
8 checks passed
@colinleach
Copy link
Contributor Author

Yay!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants