-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Fix #14341, rewrite bytes2hex to be more efficient #14397
Conversation
Add hex(x::Vector{UInt8}) & hex(x::ByteString)
Using the (unregistered) |
@@ -234,4 +234,19 @@ function hex2bytes(s::AbstractString) | |||
return a | |||
end | |||
|
|||
bytes2hex(arr::Vector{UInt8}) = join([hex(i,2) for i in arr]) | |||
function hex(arr::Vector{UInt8}) | |||
out = Vector{UInt8}(sizeof(arr)<<1) |
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.
why sizeof, isn't length what you care about?
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.
It's a vector of bytes, sizeof and length are the same, but I can change it
@tkelman Does this look OK to you now? Thanks! |
No one could provide a coherent definition of |
That includes what behavior? I think it is pretty clear what |
That was not the consensus of the issue #14341 thread, which you seem to have entirely ignored. |
No, I hadn't ignored it at all, I just hadn't had time to respond yet (it was the weekend), |
If you separate out the change to |
|
Even when this project was just four people, we didn't just make changes when one person out of the four still had unaddressed objections. There's an obvious uncontroversial change here which is specifically what issue #14341 is about. (An issue, incidentally, which I marked as "intro" so that someone new to the project would have the chance to do something small, simple and self-contained). The original issue does not mention merging If this was occurring in isolation it would be no big deal. But it isn't. You've done this over and over again. Almost every PR you've made mixes far too many changes together, many of which are clearly still controversial, but which you’ve decided you want made. When people point this out, you make a big fuss about it (like you are here), argue with them (like you are here), and much of the time, you end up winning by attrition: people get so sick of dealing with you arguing that after a while they just give up and leave the discussion, letting others carry on, until the last person standing finally merges your PR even with contentious changes still in it, just so the annoyance will stop. By this particularly banal and obnoxious form of bullying, you've ended up getting your way repeatedly. You've succeeded in bulldozing many changes that you wanted through, despite lack of consensus, frankly, just because everyone involved was tired of dealing with you. The Julia community has now been dealing with this for almost a year. This is a warning. If you do this again, I will block you from the JuliaLang repo and that will be that. |
See ScottPJones@6d11a70.
|
For those reading this, @ScottPJones has been blocked. To provide some context and background, his behavior has been an ongoing community issue for a long time now – the exact time doesn't really matter. What does matter is that it has been brought up many times by a variety of people, and on each occasion the complaint has been met with further argument and no lasting improvement in disruptive behavior. This warning has been met yet again with argument rather than any sort of acknowledgement of the problem or willingness to change. Since this essentially eliminates any hope for cessation of problematic conduct, blocking is the only viable option remaining to protect the community and project. |
Add hex(x::Vector{UInt8}) & hex(x::ByteString)