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
Multi Mode Support #25
Conversation
Hey, thanks for this @ssayer. I'll try and get to look at this at my first opportunity. |
@whomwah in the meantime, can you approve me to run the workflows so I can see if all the tests/builds pass? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Some of it is over my head to be honest, but the fact it's opt in and is tested is fine with me. I like the approach. I've also made a note that the whole lib probably needs some named params
love at some point where we pass multiple args to methods.
I seem to have to approve to run the CI every time. I wonder if it only remembers once you are a contributor? |
Thanks for the feedback, I'll get started on these items. I would like to add named params in a couple of places. I didn't see it used so I wasn't sure if that was a backwards compatibility thing, but it looks like we're targeting 2.5+ right? |
Yes, |
One thing I was considering is adding a QRCode.new('foo', mode: 'byte_8bit') It's a little more verbose, but I think a bit cleaner and could consolidate some of the code related to handling modes. |
@whomwah ^ Can you let me know what you think of the QRSegment idea? Otherwise if you'd prefer to keep the code how it is, I'll mark this as ready. |
@ssayer I like the idea of the |
Once this is merged, we should probably add an equivalent class in RQRCode for QRSegment like you do with QRCode so we're not mixing RQRCode and RQRCodeCore when using segments. |
Thanks. I should have time to have a good look at all these changes tomorrow at last. I'll also have a think about the RQRCode interface too. I'd really want to that interface to remain as simple to use as possible. The RQRCode gem is a conversation on its own 😀 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few comments now I've had time to sit a look things over. Nothing too controversial I hope. Thanks again for the work you have done so far.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Really close now. Some very tiny comments.
Sounds good, I'll knock these out later today. |
I think that covers all the comments. I'll be available for any further changes until Thursday, when I leave for vacation until the 23rd. |
Just seen your comment. I will look over this and do a test with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all looks great! 👍
That's great! I'm back from vacation as of today, so let me know if you need anything. |
I'm due to be working on the project this Thu so I will likely do a new release then 👍 PS I know this is not related but I'd be interested in your opinion if you have any spare time: #28 |
Like you, I'm not an expert in bitwise operators but it would make sense that using them would be more efficient than doing math with a bunch of integer literals in Ruby (though I am surprised it makes that much difference in memory). In regards to your comment about hardcoding to 32bits: I suppose you could try hardcoding the result of If you want to hold off a little on a release till both these are in, I'm not in a huge hurry. For the time being I can just point our Gemfile at GitHub. |
Hey @whomwah,
Here's my first pass at addressing #23. It's not done, but I thought this was a good point to get feedback:
MultiUtil
,MultiTest
), but I can move these into existingqr_code
,qr_util
etc. if you prefer.Let me know what you think! I'll be working on documentation and cleanup in the meantime.