Better HN
topnewbestaskshowjobs
Log inSign up

bcoates

5,109 karma · joined Jun 27, 2012 (14y ago) · 1,639 submissions

ben blueskylabs com
Submissions

comment 13y ago · link · parent

That's way beyond driverless car, that's a global optimization problem. If it were possible, you wouldn't even need driverless cars to implement it. System-to-car communication and slightly more complicated street lights would be enough.

For example, many cities already have lit signs that forbid turns from cross-streets onto oversubscribed roads, your nav system could allow you to pay the congestion fee and get authorization to disregard the sign and take the turn. Similarly, you could get out your smartphone and queue yourself to a destination and be told when you get to leave and take the fast route for free. As long as queuing at home got you to your destination faster than queuing in traffic, it would be the individual best strategy to do it and enough people would use it for it to work.

The hard part is probably doing traffic scheduling at an acceptable latency, for a city like LA you'd need to model the behavior of millions of cars however many iterations your optimization algorithm needs every few seconds. These kind of problems are really computationally expensive, it may not be economical with current systems and algorithms.

comment 13y ago · link · parent

Why would the DOT want a black box? They already have reliable and difficult to circumvent revenue streams from gas taxes and registration fees. Congestion charges only make sense in extremely rare places like London, and even there they just use plate recognition.

comment 13y ago · link · parent

Driverless cars would be a fantastic improvement to society, but I think you might be underestimating how much people will compensate. Traffic rises to fill roads, and only a small part of public transport budgets are for drivers (it looks like around 10% for LA)

comment 13y ago · link · parent

Is raytracing still linear with pixel count if you're doing something like Metropolis light transport to get global illumination effects?

comment 13y ago · link · parent

He said "no job paid any money", not Milton Friedman style guaranteed income. A lot of jobs need to pay a premium over the alternatives to get enough people to do them.

comment 13y ago · link · parent

Irony meter explosion aside, I still pretty regularly run into entirely legitimate broken links to Megaupload from people just using it as an host for their own stuff.

comment 13y ago · link · parent

It probably would, but I was hoping for something a little more built-to-task: holes for cables, a grippy surface, the right size, etc.

comment 13y ago · link · parent

Speaking of unconventional desk surfaces, does anyone make a good wall-mounted standing keyboard tray? All I can find are crazy articulated arm systems and gigantic freestanding desks. I just want a ready-made shelf designed to be used for only a keyboard + mouse facing a wall-mounted monitor.

comment 13y ago · link · parent

To be fair to mergesort, it's particularly suitable for actual computation hardware too. It's mostly linear reads and writes, which almost all i/o systems heavily favor. GNU sort uses mergesort (in C).

comment 13y ago · link · parent

Iterator invalidation is a giant hassle, although it's easier to catch with debug or safety-mode libraries. I kind of got dragged into a derail ranting about the bizarre strawmen above.

My core point is that the OP has a theory about there being a school of C programmers that intentionally or unintentionally invoke undefined behavior and expect the compiler to do the right thing. He's doing a pretty good job of backing it up, although I'm not sure I understand what exactly he's proposing to do about it.

... And then he just kind of throws C++ in for the ride, presumably on the argument that C++ is just like C with even more cases for undefined behavior. But that's not correct because he's making both a technical and a cultural argument. C++ is technologically (mostly) a superset of C, the culture is completely different to the extent that Linus famously argued that the main advantage of using C is that it keeps all the C++ programmers out. http://article.gmane.org/gmane.comp.version-control.git/5791...

Of the widely fragmented C++ user base, there are multiple, popular methods of development that encourage true high-level development were you are encouraged to target your code to the abstract/portable machine that the standard uses and not your personal guess of how the compiler should work and avoids doing things that require inordinate care to get right.

Again, C++ is full of practical problems, the kind of undefined behavior cases the OP worries about don't really rank up there among them.

comment 13y ago · link · parent

I really don't have any difficulty finding programmers who have the discipline to not use the unsafe parts of the language all over the place. C++ has an issue with having a fragmented multitude of sane subsets, but any of them are fine if they get the job done.

That said, I don't understand why you still keep putting up awful mostly-C code as if any trained C++ programmer wouldn't yell at you for doing it wrong, even before they saw the part with the error.

  for(i = 0; i < input.length(); i++)
Where did you learn this? don't do this. Everyone else knows not to do this.

  for(i = 0; i < min(input.length(), some_vector.length()); i++)
This is actually worse, though it does have the virtue of probably working. If you want a run-time check, use at(), or better still use an iterator already.

C++ has all sorts of issues. It's too hard to learn, it's missing some very useful features, and it has a number of rough edges that you have to learn your way around. But the things being complained about in the OP and by you are not real problems for anything but beginners. There just aren't that many naked array accesses or pointer math operations going on in an ordinary C++ application written in non-C style.

comment 13y ago · link · parent

Not sure why everyone's being so cryptic, so it's probably me that's the confused one. Let me try to guess:

"There is a wikiality driven split in the English language.

Camp A says that a strongly typed language prohibits immoral implicit conversions, such as "1" + 1 => 2 or even more grotesquely, "1000" == "1e3" => true.

Camp B says that a strongly typed language gives each value a type, and that all operations which do not have well-defined semantics will signal an error rather than allow operations to execute which assume incorrect typing.

Camp A currently owns the articles "weak typing" and most of the article "strong typing". Camp B is settling for teaching the controversy in "Strong vs Weak typing" and putting passive-aggressive little notes on all the articles that Camp A's view is mistaken. "

Did I get it right? If so, camp B is correct and camp A are being dicks about terminology that they're getting wrong.

comment 13y ago · link · parent

I don't see the error he's making, would you mind pointing it out?

comment 13y ago · link · parent

I'm not saying the language is some sort of security barrier that prevents any error, I'm saying sanely styled code does not have these issues in practice. The solution is "don't do that, and cultivate habits that will not cause you to do that by accident", not having the compiler make up semantics for broken code or putting in checks everywhere. Just because someone, somewhere does it wrong, doesn't mean it's impossible to do it right.

this:

  vector<int> somevector(100);
  somevector[200] = 5;
Is a C idiom translated by cut-and-paste. The unmotivated poking of arbitrary magic-number offsets into a magic-number sized vector is not proper. It's the kind of thing that sets off alarm bells on even the most casual of review.

comment 13y ago · link · parent

Hey, don't lump C++ in with this. If you write code in the STL weenie style or the Pretend It's Java style there aren't any idioms I know of that would ever violate the rules he mentions (out-of-range pointers, signed overflow, invalid aliasing). I don't do those things and the C++ programmers I work with don't do those things, at least not habitually. I don't see violations of undefined behavior rules, or the use of idioms that come close to it, very often in our code. Not nearly as often as the sort of mundane errors that no language can prevent.

These are not problems of a language per se, but the original sins of neo-vaxocentrism and confusing "I understand how this might work, at some random abstraction layer" and "I can depend on what happens when I do something stupid". Free your mind of these and the rest will follow.

These low-level bit banging errors are vastly less common than shared-memory concurrency issues, which as far as I can tell are endemic to all code that attempts shared-memory concurrency, in any language. If you want to have an axe to grind about languages that aren't future proof, look there.

comment 13y ago · link · parent

It appears he's just referring to an ancient (2.6.16.5) Linux kernel bug. "Don't use unpatched versions of obsolete kernels" would be better advice.

comment 13y ago · link · parent

If what they're doing is illegal, they have a right not to have their property taken without the protections of being a criminal defendant.

If what they're doing isn't illegal, the state and city governments have the power to pass a law against it that actually gives them fair warning as opposed to nonspecific threats.

If what they're doing isn't illegal and the state and city governments don't want to pass a law against it, there's no reason to substitute the US Attorney's judgement for that of the people whose job it is to enforce the law.

The US attorney's office shouldn't have standing to sue on behalf of the neighborhood. The neighbors might. If it's for some reason in the national interest to make sure that this particular flop-house changes its address, I suppose they could fund the case.

In other words, it is a textbook case of CAF abuse: avoiding criminal trials to get a plaintiff-friendly civil trial, stretching jurisdiction limits, bypassing separation of powers by enshrining prosecutors as policymakers, the whole deal.

comment 13y ago · link · parent

If they have the same semantics why doesn't the library do an unboxing implementation for types that support it and not for the rest?

comment 13y ago · link · parent

> I cannot think of anything people do in C++ that I am unable to do in Lisp

The biggest technical advantage I've noticed C++ having over other languages is that library performance characteristics are documented as part of the portable language spec. I really miss that when I switch to other languages and have no idea if the builtin list class acts like a linked list or a vector or a deque or what.

Knowing that the algorithm you just built out of library components doesn't have a n^3 blowup on some platform is a correctness issue, not a premature optimization. I'm more comfortable that's not going to happen working in C++, and the culture and libraries around it than anywhere else.

Does CL specify that, as part of the specification and not just by convention? I'm having a hard time finding docs to that effect but I don't use Lisp enough to know where to look.

comment 13y ago · link · parent

Forth and Fortran would like to have a word with you :)

But seriously, I would expect the maximum possible performance on today's architectures to come from the infamous sufficently smart compiler that can do bytecode generation at runtime. That can at least in theory produce programs faster than any system restricted to ahead-of-time operations, including handwritten AOT assembly. Whatever language can make that practical without having some other crippling performance issue might be able to consistently leave C and every other AOT language in the dust.

comment 13y ago · link · parent

Out of curiosity, what are you hoping to get out of Rust that Go let you down on?

comment 13y ago · link · parent

> The tooling and library ecosystem of C is absolutely second to none, and there's an enormous community out there that consists of some of the smartest programmers you will ever meet.

This is causing me some pretty serious issues right now. The C community loves its giant ecosystem of C libraries. Everything on Earth seems to bring in a pile of delicate dependencies on the rest of the C universe. What should be fairly mundane configure, build and deployment problems become nightmares.

C is also more likely than a lot of other languages to use outside tools to generate program text as part of a build. In a lot of other languages developers would use those hairy features everyone complains about instead, and avoid complicating the build for everyone who could otherwise treat their library as a black box.

comment 13y ago · link · parent

What does the OS being written in C matter? libc has to make a syscall to access OS functions just like anything else does. There's no obligation on a language implementation to make calls through C. It's a thin enough layer that if your language runtime is otherwise written in C you may as well, but that's a design decision.

It would be perfectly reasonable to write a non-C language runtime targeting Linux against syscall instructions or against Windows' documented system DLL interfaces.

Even if it didn't there's no reason to ever add a C dependency to your system if one of the languages you're already using has sufficient "systems" versatility. Go is clearly intended to fill this role.

tl;dr: you can get past C just fine even on an OS written in C and the C dependency isn't free.

comment 13y ago · link · parent

If you're not young, able, and heterosexual, technology can easily be the difference between isolation and connection.

comment 13y ago · link · parent

It's character building! If tinkering was merely hard instead of forbidden, it wouldn't be nearly as satisfying.

comment 13y ago · link · parent

In the sense of "the democratic party is using technology to their advantage" or "the democratic party is moving the tech industry into their political machine"?

comment 13y ago · link · parent

OK, here's some substantiation: http://www.nytimes.com/2013/01/03/opinion/how-bankers-help-d...

HSBC has admitted that it is for all practical purposes a criminal enterprise masquerading as a bank. This is not a paperwork mistake or a lapse of oversight, it's their business model. Nobody will be prosecuted. The people performing these admitted criminal acts will be allowed to keep their paychecks, their bonuses, and in many cases, their jobs. No jail time, no criminal records, not even 40 hours of picking up trash in a park.

comment 13y ago · link · parent

The one objection I have to Kerr's otherwise excellent article is that he entirely ignores the policy aspect of Prosecutorial discretion.

Lots of people openly violate federal criminal laws. An enormous number of them, like Swartz in this case, do so non-openly but in a way that a trivial amount of investigative effort would reveal. The vast majority of them are not charged.

This selective prosecution is a de facto policymaking process. It's not enough that the prosecution not be an abuse of discretion, it needs to also be good policy. Saying that the law needs to be amended to stop enforcement might be the technically proper thing to do but it's not the only option open to opponents of the law.

comment 13y ago · link · parent

Enterprisey types can already buy "Zero Clients" and "Thin Clients" similar to this from Dell for around that price, before you add in the cost for the monitor/keyboard/mouse.

I think the idea is to convert that into something the consumer market could use.

comment 13y ago · link · parent

You don't need to know anything except how to confirm a dialog. On IE, you press the download link and about 5 warning dialogs later the software is running. No navigation or double-clicks involved.
1
474849
55