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

Fixes bugs in bitwise operations #350

Merged
merged 2 commits into from Jan 24, 2020

Conversation

indented-automation
Copy link
Contributor

PR Summary

Fixes #349

Context

Bug fixes for bitwise operators. Can't beat tech review, thanks!

Changes

  • Fixes converter function.
    • Adds more graceful handler for underscore values.
    • Fixes string conversion.
    • Fixes Int16 conversion.
    • Adds Int64 conversion.
  • Fixes bad values and typos.
  • Adds extra comment for -bnot inversion.
  • Fixes endian ordering mess.

Checklist

  • Pull Request has a meaningful title.
  • Summarised changes.
  • Pull Request is ready to merge & is not WIP.
  • Added tests / only testable interactively.
    • Make sure you add a new test if old tests do not effectively test the code changed.
  • Added documentation / opened issue to track adding documentation at a later date.

@vexx32 vexx32 added Category-Koans Invoking the Great Doubt PR-Needs-Review 🔍 Let's take a closer look! labels Jan 21, 2020
Copy link
Owner

@vexx32 vexx32 left a comment

Choose a reason for hiding this comment

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

Looks good to me overall! 😊 💖

Comment on lines +217 to +226
This can make the result of the operation below confusing. When written in binary, the result is
similar to:

11111111 11111111 11111111 ________

-band can be used to mask the result, limiting the possible result to a single byte.

11111111 11111111 11111111 ________
-band 00000000 00000000 00000000 11111111
#>
Copy link
Owner

Choose a reason for hiding this comment

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

This mismatched indentation looks a bit funny 😁

Also, wow that's confusing as all hell. Even with a specific byte-type input it still upcasts to int32... I'm sure that's probably a .NET thing, but... damn.

@vexx32
Copy link
Owner

vexx32 commented Jan 22, 2020

@JoeWatts would you like to give the changes a quick once-over as well since you've run through these pretty recently?

@vexx32 vexx32 added this to In progress in Koan Topic Tracking via automation Jan 22, 2020
@vexx32 vexx32 removed the PR-Needs-Review 🔍 Let's take a closer look! label Jan 22, 2020
@vexx32 vexx32 merged commit 657bdea into vexx32:master Jan 24, 2020
Koan Topic Tracking automation moved this from In progress to Done Jan 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category-Koans Invoking the Great Doubt
Projects
Development

Successfully merging this pull request may close these issues.

"AboutBitWiseOperations" a few things to look at
2 participants