Better HN
topnewbestaskshowjobs
Log inSign up

ComputerGuru

32,405 karma · joined Jan 3, 2008 (18y ago) · 8,297 submissions

mqudsi on most sites.
Submissions

comment 14y ago · link · parent

Guys, the sections change to display the actual features when you hover over them with the mouse.

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

You mean, basically, the SSH way of doing things.

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

The latter, unfortunately. I've been in that boat so often on both G+ and Facebook.

comment 14y ago · link · parent

No, I'm perfectly well-versed in the differences between C and C++, having written in one or the other for a long time. A trivial look-alike implementation of std::string can be written in C, and would look a lot like the RString class.

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

Heh. I would have gone with "Ruby Optimizations: Why short strings are an order of magnitude faster" or something.

comment 14y ago · link · parent

Absolutely. Keep in mind that the OP is coming from a Ruby background and TFA targets people more familiar with high-level interpreted languages than with C/C++.

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

Interesting fact: that's still a phrase very much in-use in certain parts of the world (South America and the Middle East come to mind) in everyday layman talk.

comment 14y ago · link · parent

I was intrigued to learn that Tony Kaye went virtually mad during the production and writing of American History X, arguably one of the top ten movies of the last 100 years, and was so dissatisfied with the end result that he attempted to disown the film entirely, even going so far as to try to use a pseudonym (the undying `Alan Smithee' and, later, 'Humpty Dumpty') just to keep from being tied to the movie.

comment 14y ago · link · parent

There are many cheap sites that provide credit monitoring and reporting from all three agencies on a monthly basis.

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

s/vary/very/

Sorry! Can't edit it now, either. :$

comment 14y ago · link · parent

Not really. RString operates in the same way std::string does - it has a character array and it has a member variable denoting the length.

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

No - instead of allocating memory on the heap for the C character array aka "string", Ruby is the text itself directly in the RString object.

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

I read the title and thought that I was going to see some really stupid design decisions. To the contrary, it's vary clean and smart.

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

Yes, but the referrer will only be google.com.

Google SSL uses POST for the search query parameters, so the referrer URI w/ GET parameters will not leak your search terms.

comment 14y ago · link · parent

Can a mod please change the link? TFA is very clearly blogspam. The article Sniffnoy posted, in contrast, is actually a very good read.

comment 14y ago · link · parent

You are overestimating the ability of people to listen to directions and think and adapt them for themselves.

If it were that easy, none of us here would be complaining about hiring incompetent people :)

comment 14y ago · link · parent

> frequent crashing and slow booting

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

My only problem with DDG is page load speeds. Initial page load is slower, searches take a while, but my major problem is that even after the page loads, the results of the page aren't yet fully loaded.

comment 14y ago · link · parent

I think this, or a similar implementation at any rate, was previously posted on HN. It's certainly a good idea, and I think that the more popular crypto libraries (I'm looking at you, OpenSSL) would do well to consider implementing something similar.

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

And Chicago! Come on, Thomas, how could you forget Chicago?

comment 14y ago · link · parent

It's 'free' so it's not selling. Developers are allowed to 'give away' copies of their apps with promo codes. Obviously this is super-gray area, but it's 'technically' not disallowed.

comment 14y ago · link · parent

Can you be knighted posthumously?

comment 14y ago · link · parent

In fact, should he even end up a British citizen (dual-citizenship, give up his US citizenship, or whatever else), he would automatically become a full knight.

comment 14y ago · link · parent

Welcome to Hacker News. Please keep in mind that we place a high value on abstaining from memes and cliches here, try not to use the "This" meme too often :)

Hope you enjoy it here.

comment 14y ago · link · parent

>(what is the verb for women, "damed"?)

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.

comment 14y ago · link · parent

I had plenty of female cousins come over and play Legos with me when I (male) was a child, and vice versa. This is just corporate thinking it can make more money by trying to fix a problem that doesn't exist.

comment 14y ago · link · parent

Is it the same girl? They certainly do look very similar, but I wouldn't bet it was the same actress if my life hung in the balance..

comment 14y ago · link · parent

It's a launch page with two buttons to share on twitter and facebook. Am I missing something???
1
229230231
277