2,246 karma · joined Feb 1, 2010 (16y ago) · 627 submissions
comment 16y ago · link · parent
Simply, you can subtract pointers. Let's say you're walking a string from the front and from the back at the same time, and want to find the length of the substring. Well, you don't have to use indeces, just do this:
int len = back_ptr - front_ptr;
You'd be surprised how often this crops up when you're using lots of pointer tricks.576.
Sexism on the Internet is a Gray Area(regreteverything.tumblr.com ↗)
3 points · by CountHackulus · 16y ago · discuss
comment 16y ago · link · parent
Unfortunately, the Cheez Whiz ponies aren't implemented yet, but if D ever hits 3.0 maybe it can be pushed into the spec.
comment 16y ago · link · parent
[1] http://www.amazon.com/Hackers-Delight-Henry-S-Warren/dp/0201...
comment 16y ago · link · parent
This is so very far from the truth. Different OEMs ship with different patches, and some have custom drivers written, or "management" software that replaces key windows applications. If you've ever tried to write a game for Windows you'll know that once you get to testing, you'll find a ton of just plain strange setups that make no sense.
You are however quite correct in saying that differing software is the key issue here.
comment 16y ago · link · parent
Just for clarification, that tool SHOULD be going back to the sanitized surface correct?
comment 16y ago · link · parent
These are really interesting visualizations, wish I could see visualizations of modern 4K demos like this.
comment 16y ago · link · parent
comment 16y ago · link · parent
How about we use that time and money and use it towards better driver education. Something more than a 20 questions test and 10 minutes in the car with a tester would be a good start. Maybe some sort of forced driving school?
Then, when everyone's better educated, we can raise the speed limits to reasonable levels and still have less accidents.
comment 16y ago · link · parent
comment 16y ago · link · parent
[1] Available for free straight from Cory Doctorow: http://craphound.com/littlebrother/download/
comment 16y ago · link · parent
This is a common thing to use in randomized or approximate algorithms. For example, solving min-cut by assigning to 2 sets randomly is provably a 2-approximation.
comment 16y ago · link · parent
comment 16y ago · link · parent
What I think would be really interesting however would be to dump the results of a keylogger with a weeks worth of data into it. Would definitely be more accurate, and maybe interesting to see where my hands spend most of their time during the week.