32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions
comment 14y ago · link · parent
I literally spent the better part of 5 minutes reading the text and comparing Chrome, IE, and Firefox to search for the kerning changes and fractions support, because I just couldn't see it.. Until I accidentally hovered over the sections and the content changed to match.
comment 14y ago · link · parent
No one bothers signing the public key of the SSH server you're trying to connect to by a CA; your client just says "this is the first time you're connecting to xxxx, do you accept?" but the next time you try to connect and you get a mismatch, all kinds of warnings and hell break loose if the key doesn't match the one in the cache.
Makes sense to me.
comment 14y ago · link · parent
Your argument is actually, essentially mine. The need to use the platforms' string functions heavily swings (but does not force) the choice of null-terminating the RString members. As I mentioned, it would be really stupid but entirely possible to simply clone the non-null-terminated string into a temporary null-terminated char array every time you want to use a function that takes standard "C strings" if you really, truly, madly wanted to have an RString implementation that was one byte smaller to store. But that would be insane.
comment 14y ago · link · parent
BTW, I think though I cannot be sure that both the GCC and MSVC std::string implementations use this optimization in release mode, but I gotta dash and don't have time to verify this fact, so take it with a grain of salt, if you will.
comment 14y ago · link · parent
comment 14y ago · link · parent
I get mycreditinform.com for free with my CapitalOne MasterCard. They're OK, they provide very detailed raw data and info that you can go through and read.
comment 14y ago · link · parent
It's not null-terminated. You can store a sequence of nulls and that will not affect the result of std::string.size()
In C, you'll be forgiven for thinking it was null terminated, because attempting to assign a std::string a value from a null-containing array of characters would terminate the copy upon reaching the null, but that's only because the original char array is null-terminated when read as a C string.
However, you can manually construct a std::string with \0 sequences in the middle and that will not terminate the string, nor affect the separate length calculation. The same applies for Ruby's RString.
So that was the reason they're not null-terminated. Now the reason why they technically are (i.e. the reason NULLs are stored at the end of the string) is for compatibility and optimization. At the cost of one byte per string (for the trailing \0), we get instant compatibility with non-RStrng/std::string functions. If a function needs a C string, we can just pass the internal pointer to the character array - no need to copy the string to a temporary buffer and append a null.
Therefore, while null-termination is absolutely NOT required when dealing with an exclusively counted-length implementation of C strings (a la RString, CString, std::string, etc.) if you can just pass the pointer and the length separately, it would be a ridiculously foolish optimization for a general string implementation to NOT have the option of directly exposing the underlying null-terminated string to any functions that need it, with the caveat that null-containing counted strings will obviously terminate sooner than expected.
comment 14y ago · link · parent
These short strings would actually NOT have COW optimization because they're structs and cloning one would clone its embedded string as well (as there are no pointers involved in < 24 byte strings).
comment 14y ago · link · parent
It's not that strings over 24 are slow, it's that strings below length 24 have extra optimizations.
It's a great article, but I really, really despise the linkbait title.
comment 14y ago · link · parent
That was the combo that made me ditch my BlackBerry (8900 Curve, great phone at the time otherwise) and move to the iPhone 4. At the mall, take out the phone to snap a picture, and whatdya know, the camera program crashes taking down the whole system with it. Reboot? I'll be lucky if it's back up and running by the time I get to the car.
EDIT: Yeah, obviously I'm lying out of my ass and should be downvoted. Because, you know, BlackBerry's still doing super-hot, and is clearly impeccable. There's no way anyone had problems with their BB and switched to Apple.
comment 14y ago · link · parent
The key point being that (and this was my biggest concern), it is fully compatible with AES-NI, the Intel's hardware-accelerated AES instruction set. According to TFA, with AES-NI there is no performance penalty for keeping the AES keys stored in registers and out of the RAM. What's not to like?
comment 14y ago · link · parent
Spent a good ten minutes Googling this one. It would seem no separate word exists ('damed' is not a word), though one site suggested the use of 'daymed' (it's a pun. not very funny :)
I believe technically both men and women are knighted. One becomes a Sir, and the other a Dame. If you think it sounds funny, I supposed "made a dame" might be another way of phrasing it.