« first day (983 days earlier)      last day (2496 days later) » 

12:00 AM
your first playground don't compile, this is normal ?
 
@Stargateur Ah, thanks for reminding me. I had some typos and forgot to fix the link.
 
indeed this look strange to me, the behavior is strange
 
Yep, and the docs do not mention much about it.
 
12:25 AM
@E_net4 I've found MSDN to often have good docs
 
@Shepmaster E_net4 don't say that this is a quote, stackoverflow.com/questions/44710877/…
 
@Stargateur true, but I saw it
I SEE ALL
(not really)
 
what is the capital of colombia ?
 
None.
The capital of "Columbia" is "C"
 
@Shepmaster I do believe it's spelt "Colombia" in Spanish. :P
 
12:31 AM
ah, i was making a capitalization joke, not a spelling joke
 
@E_net4 also. why would you need a signed hex
that's silly
 
@Shepmaster Don't make me do a comeback.
 
@E_net4 are you looking for something like play.integer32.com/…
 
@Shepmaster I did that myself some minutes ago. :)
 
12:37 AM
@E_net4 I see no self answer
 
@Shepmaster That's because this doesn't zero pad. Isn't is supposed to zero-pad?
Ignore "right".
 
@Shepmaster if you want the ref of my question (there are english sub tittle) :p
 
@E_net4 ah, you want The Full Power
 
@Shepmaster Aye
@Stargateur NEON KNIIIIIIIIIIIIIIGHTS
 
@E_net4 also hard: 2 mutable references to random hashmap entries
 
12:49 AM
@Shepmaster Oh wow, you're getting close to enough content for an "expanding mind" meme.
 
Thoughts on this - revision 3 stackoverflow.com/posts/44710057/revisions
this Rando edited my answer. That's cool. But they bolded more stuff in the quote that I said "emphasis mine"
like, now it's not my emphasis
 
does it improve the answer ?
seem that not really
 
1:18 AM
@Stargateur I kind of see what they were going for, but it does seem to bold the majority of the paragraph
 
 
2 hours later…
2:55 AM
@E_net4 more power is now available
 
I don't understand why X don't work for signed.
 
 
6 hours later…
9:14 AM
@Stargateur It depends on what you call "does not work". :P The implementation just treats signed integers as unsigned.
Aaanyways...
Am I the only one who thinks this one hits the Too Broad borderline?
Yet people are moving that boat upwards.
 
 
3 hours later…
12:35 PM
@FrancisGagné stackoverflow.com/questions/31233938/… any objections to moving the as_str variant into the answer directly?
@E_net4 FWIW, the current form is what I'd expect. I want to know the bits that represent the number.
 
@Shepmaster OTOH you'd typically keep that in an unsigned type, right?
 
nah. Perhaps it's just my lower-level side showing through, but there are times where I just need to know the bits
 
@Shepmaster Mathematically speaking, a hexadecimal representation does not imply showing the bits. I do believe it's fair to admit that there's some ambiguity in how these implementations are documented.
 
12:54 PM
@E_net4 oh, sure. Just saying that the current implementation jives with my intuition
but I see how it can be interpreted another way
i deffo think you should file an issue or a PR
 
@Shepmaster I was thinking about that... Will do soonish.
 
1:12 PM
Oo, macro-magick.
 
 
1 hour later…
2:23 PM
@E_net4 But this not documented.
 
@Stargateur Uh... Like, that's exactly what I said?
In the question, I mean.
 
well for me it's not work as expected if it's not documented
 
2:57 PM
Right, that's why I'm filing an issue right now.
 
@Stargateur haha, and it works just like I expect, so by definition it is working as expected ;-)
 
I see what you mean XD
 
I just don't know why everyone else's brain doesn't work like mine
(what a scary world that would be)
 
@Shepmaster I can see both sides, but srsly.
It's a signed integer. Without bit widths in mind, "0xFFFF" is 65535, not -1.
 
4:02 PM
at least this should be a compile error
cast shoud be explicit
 
 
2 hours later…
5:33 PM
@Stargateur That could happen easily if there were no impls for i16, i32, ...
But again, that is pretty biased.
It's also not true that signed integers can't have a hex/oct/bin representation.
 
5:54 PM
@Shepmaster better now? :)
 
@FrancisGagné So. Many. Options.
(pun not intended, but recognized)
 
@FrancisGagné which of those ways would you use in your code?
 
probably |x| &**x because it's the first one that comes to my mind
as evidenced by the fact that this is the first option I propose in my answer
 
@FrancisGagné I like the as_str nowadays, although I have a soft spot for &** for working back to 1.0 and being shorter
 
6:00 PM
durr, I read as_str as as_ref and I wrote as_ref in my answer
I didn't even know about as_str
/me edits again
what's funny is that the implementations of as_str and as_ref both rely on the Deref impl (because their body is just self)
 
6:15 PM
@Shep found a dupe for the lifetime one?
 
@E_net4 " but I think this is no duplicate."
challenge!
 
It ought to be.
 
but I'm in the middle of a refactor ATM
so, it'll have to wait
you can give it a go
 
Pff, it's a hard one to dupe-find. And oh so much easier to just answer. :<
 
@E_net4 I know that feel
write up the answer in your head
then search using those terms ;-)
and if that doesn't work, rewrite the OPs title
and search again
and if that doesn't work, post the answer
 
6:25 PM
Too late.
 
@E_net4 Gotta work on your 0-60 speed
 
@Shepmaster I wasn't proactively pursuing this TBH.
 
 
5 hours later…
11:17 PM
when I saw this tittle, I take a break... of 3 days ^^
 

« first day (983 days earlier)      last day (2496 days later) »