5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions
comment 14y ago · link · parent
So if someone makes a physical invention that does something they can patent it but if it's something a general purpose computer can be programmed to do, writing that program does not cause the computer to violate the patent.
comment 14y ago · link · parent
All I care about is removing the veto power the patent system gives random strangers have over my ability to develop things they have nothing to do with.
comment 14y ago · link · parent
Any electrical power source that doesn't displace a power plant is a toy.
comment 14y ago · link · parent
You could give existing civil servants tenure both to be fair to them and ensure a gradual transition.
comment 14y ago · link · parent
comment 14y ago · link · parent
If you actually have a reason to believe you need a gold-plated general-case OS identification system then throwing all those patterns at it is no worse than the nested-if spaghetti procedural code that would be the naieve procedural solution.
But in both cases it's just a stupid answer to a stupid question ("How do I overengineer a string->string table lookup?")
comment 14y ago · link · parent
I'm not saying there isn't somewhere where local politicians are conspiring to suppress turnout, but often long lines are just a matter of understaffed or under-hosted polling places, which presumably means that the various campaigns would rather have their election-day volunteers calling people or driving them around than running a polling place.
comment 14y ago · link · parent
There is no shortage of money, they can support all the volunteers they can get.
comment 14y ago · link · parent
comment 14y ago · link · parent
Since you'll constantly have many times what you expect to gain in a day at risk on the markets, a single rollback event could put you very deep in the red.
comment 14y ago · link · parent
When I try to login or do account recovery with the email address linked to the account it, I get
No Accounts Found
The email you entered does not belong to any account.
The account didn't have any "friends" so I'm not sure if the account vanished or is just not usable now. This was in September 2012.comment 14y ago · link · parent
When you're summarizing coarse relative size across arbitrary categories, bar charts and tables give your selection of categories too much weight: everyone looks at the biggest bar or the biggest number and it's really hard to measure a long tail distribution visually.
If the message you're trying to send is, "nothing but X and Y matter, everything else combined is tiny", I still can't imagine a better visualization than a pie (or a doughnut).
comment 14y ago · link · parent
const auto TagDataMap = map_initializer( { "foo", { 1, 20, func }, ... } );
where map_initializer would be a template function that inspects the typedefs of its std::initializer_list<T> argument and generates an appropriate map.In real C++ code, this would almost never be what you actually want, though, as the types in an initializer list in C++ do not imply the types being initialized, they are parameters to a constructor to be determined elsewhere.
comment 14y ago · link · parent
Tuples in python are a reasonable tradeoff between not wanting to declare anything and the hassle of anonymous structure. This doesn't apply C++ where the equivalent is the POD struct:
//In the olden days we could not initialize a map inline like this
//Key -> metadata mapping. Unfortunately strutcts cannot be declared
//inside a template declaration.
struct TagData { int start; int length; StrToStr mapfun; };
const map<const string, const TagData> TagDataMap {
{"title" , { 3, 30, stripnulls}},
{"artist" , { 33, 30, stripnulls}},
{"album" , { 63, 30, stripnulls}},
{"year" , { 93, 4, stripnulls}},
{"comment" , { 97, 29, stripnulls}},
{"genre" , {127, 1, ord}}};
Creating a named struct pays off when it's time to use the Map, no extra locals or tie() needed to write clear code: //for loops over collections are finally convenient to use.
for(auto td : TagDataMap){
//C++ created a horrible precedent by making the data type of
//a map pair<K,V> instead of struct ValueType { K key; V value; };
auto tdd = td.second;
ret[td.first] = tdd.mapfun(sbuf.substr(tdd.start, tdd.length));
}
http://liveworkspace.org/code/bcd52515fb7161858e974b7ff3c0aa...comment 14y ago · link · parent
There's also a ton of redundant libraries and language features, resulting in a lot of decisions being arbitrary choices between equivalents. Having the same decision made throughout the code makes everyone who has to read the code's life easier.
comment 14y ago · link · parent
How would a new legal justification for something cops have been doing forever suddenly cause a crime reduction? You'd have a much better case arguing that the semi-professionalization of the police in the aftermath of Warren court rules complicating police procedure caused it.
I'm not sure I understand your larger point at all: Singapore is a police state and people there seem to be pretty on board with it, so until everywhere is like Singapore we shouldn't do anything about it?
comment 14y ago · link · parent
Rapiscan denies that they hired him to as a government lobbyist, so they're very specifically denying something other than what they're being accused of.
comment 14y ago · link · parent
Stock prices during the depression were reasonable, they were just news nobody wanted to hear.
comment 14y ago · link · parent
The rule about locking your glove compartment isn't because the police have less rights to search a locked glove box than an unlocked one; it's because police lie that a search was consensual when challenged, and a broken lock makes that awkward.