Hacker Newsnew | past | comments | ask | show | jobs | submit | creato's commentslogin

The one time I saw traffic lights go down, it was total chaos. There were two separate crashes that had already happened when I got there, and there would probably be >1 wreck per few minutes with the driving I observed.

I moved from South Africa to Ireland 2 years ago. It was very noticeable to me how drivers in Ireland have no idea what to do when the lights are out. Absolute chaos!

In south africa, traffic lights not working is a daily occurrence. And we've all learned how to navigate a dead intersection wit zero casualties.

Massive 6 way intersections with 2-4 lanes per direction worked perfectly with everyone taking turns to go.


Past innovation did though.


The fatal mistake I see people repeatedly making is that it isn't about the system or checks and balances or whatever. It's about the people. The US had a deep bench of mostly reasonable leaders that mostly respected ideas like checks and balances or conflicts of interest.

Those people are mostly gone now. Our society used to elevate people like that, but it just doesn't now.


The "standard" (typically defined in projects I'm familiar with, and as of C23, an actual standard) is "unreachable": https://en.cppreference.com/w/c/program/unreachable.html


That is not the same thing at all. Unreachable means that entire branch cannot be taken and the compiler is free to inject optimizations assuming that’s the case. It doesn’t need to crash if the violation isn’t met - indeed it probably won’t. It’s the equivalent of having something like

    x->foo();
    if (x == null) {
        Return error…;
    }
This literally caused a security vulnerability in the Linux kernel because it’s UB to dereference null (even in the kernel where engineers assumed it had well defined semantics) and it elided the null pointer check which then created a vulnerability.

I would say that using unreachable() in mission critical software is super dangerous, moreso than an allocation failing. You want to remove all potential for UB (ie safe rust with no or minimal unsafe, not sprinkling in UB as a form of documentation).


You're right, the thing I linked to do does exactly that. I should have read it more closely.

The projects that I've worked on, unconditionally define it as a thing that crashes (e.g. `std::abort` with a message). They don't actually use that C/C++ thing (because C23 is too new), and apparently it would be wrong to do so.


You can use the standard feature with the unreachable sanitizer: https://godbolt.org/z/3hePd18Tn


For many types of projects and approaches, avoiding UB is necessary but not at all sufficient. It's perfectly possible to have critical bugs that can cause loss of health or life or loss of millions of dollars, without any undefined behavior being involved.

Funnily enough, Rust's pattern matching, an innovation among systems languages without GCs (a small space inhabited by languages like C, C++ and Ada), may matter more regarding correctness and reliability than its famous borrow checker.


Didn't PASCAL have variant record types with a kind of primitive pattern matching already?


Possibly, I am not sure, though Delphi, a successor language, doesn't seem to advertise itself as having pattern matching.

Maybe it is too primitive to be considered proper pattern matching, as pattern matching is known these days. Pattern matching has actually evolved quite a bit over the decades.


C++ keeps getting bigger and bigger :D

Thanks for sharing


This is actually C and C++ has not done something similar AFAIK.



Fortunately the major compiler vendors all have. Routing around the standards committee is getting more and more common.


C++23 does have std::unreachable (as a function), and its counterpart [[assume(expr)]]


This isn't necessarily a problem if you don't consider the output to be "source" code. Assembly is also garbage spaghetti code but that doesn't stop you from using a compiler does it?


This might be a reasonable summary of the situation but I suspect it's vastly oversimplified. The trajectory of these businesses depends on more than who's name is at the top of the org chart. TI pivoting away from semiconductors and towards other goods may seem like a stupid move in hindsight, but even in hindsight it's not clearly the case. TI's move is basically them trying to be Apple or NVIDIA instead of Intel or TSMC. Because they failed at that, doesn't necessarily mean that attempting it was wrong.

And none of this necessarily has anything to do with Morris Chang personally. Many factors need to align for a company like TSMC to be successful. Morris Chang may be one of them, but there are other factors that may or may not have existed at TI. The claim that they didn't exist at TI because TI didn't like Morris Chang is not something we'll ever know for sure.


> The claim that they didn't exist at TI because TI didn't like Morris Chang is not something we'll ever know for sure.

We do, though, have VERY GOOD evidence of what TI could have been had they provided the conditions that TSMC did.


>TI pivoting away from semiconductors and towards other goods may seem like a stupid move in hindsight, but even in hindsight it's not clearly the case

I think even by the turn of the 90's this could be seen as an extraordinarily stupid move. The PC was on the up and up and they abandon expertise on a resource that will only explode in demand? I'm sure there was some cushy educational deals with school supplies, but they literally left a gold mine for China.


> Populist rent control is an excellent motivator to get counter-parties to the table to discuss productive alternatives in a market where no outside pressure currently exists.

This makes no sense, the battle is ultimately between renters and owners of low density housing. Those owners don't care about rent control, they only care about zoning disallowing construction of new rentals. If anything, they're probably happy to see rent control if it means the pressure on cities to upzone is removed.


The scarcity in Europe (at least the two countries I'm familiar with) comes from a standardized test. If you don't do well on the test, you don't go to college.


That's not exactly true. Funnily enough, you are extremely dependent on your sociological background. If you come from a poor family and do very well, you'll get a full ride for sure. But if you do well but come from a well-off family that refuse to pay for your education, you are fucked. It's only university attendance that is (mostly) free. you still need to finance housing and life costs. Since most good universities are in expensive cities and student loans are not much of a thing, it is an extremely selective process that targets both class standing (from a money standpoint) and parental implication.

There was a study on one of the most selective school in France and actually diversity of background has gone down in the last 20 years. Europe is highly politicised and it was always about selecting for ideologically compatible behavior. Otherwise education wouldn't need so much government intervention/support, even if said education would be paid for by the taxpayer (everyone could get some amounts of credits, that they could spend on their institution of choice).


America used to do that, but Jewish students started taking (and doing well on) the test, and later Black and Asian students had the audacity to be brilliant too. This led to America's "holistic" college admissions process.

For what it's worth, the USA isn't unique in adapting admissions to reject an unwanted minority. The most interesting mechanism has to be Moscow State University's Jewish Problems: https://arxiv.org/abs/1110.1556


The Chinese national entrance exam (gaokao?) is notoriously grueling, but doing well pretty much guarantees you a spot in a top university. Would have been useful to me, having grabbed a middle-of-the-road SAT score for Ivies but having failed to apply to one. There's definitely a multi-pronged strategy for ensuring exclusivity.


> One commenter justifies it by saying “if I’m fucking up, it’s ok to speak to me this way”. Sure guy, we believe you.

Did you read the issue at hand?

This is not average people making "mistakes". This is severe incompetence at every layer of decision making, and a complete lack of care for quality work. If you want to be mad at someone for being unfair, be mad at the manager of these people for putting them in a position they are grossly unprepared for.


> Please don't comment on whether someone read an article. "Did you even read the article? It mentions that" can be shortened to "The article mentions that".

https://news.ycombinator.com/newsguidelines.html

Could you review the guidelines of this website and follow them?


Yeah, calling the authors of this code losers and monkeys is being kind. There is zero excuse for ever writing code like this, the incompetence is staggering.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: