Become a fan of Slashdot on Facebook

 



Forgot your password?
typodupeerror

Comment Re:Do it yourself (Score 1) 83

Cppcheck apparently knows "hundreds of other rules covering a multitude of language aspects" so you don't "have to mentally apply against every single line of code you write."

Cppcheck doesn't flag anything in Waffle Iron's example.

It also doesn't find anything wrong with:

std::vector<int> vec = {1, 2, 3, 4, 5};
auto it = vec.begin();
vec.push_back(6);
std::cout << *it << std::endl;

Which is another common example of how you can write memory errors without using C++ pointers.

Comment Re:There is already a safe subset of C++ (Score 1) 83

In the sort of places where MISRA and similar coding guides apply, yes, never allocating memory is expected, because once dynamic allocation exists you can't guarantee that you won't die with an out-of-memory error and similarly can't guarantee any time bounds on how long an alloc and dealloc will take.

Sure, so C++ is safe as long as it's used in a way that makes it incredibly painful. Sounds good. Let's just require all C++ code everywhere to be written that way. Rust usage will skyrocket overnight.

Comment Re: Is there anyone here that voted for Trump (Score 1) 261

It is hard to have fair democracy with winners take it all.

For a really rigorous definition of "fair", it's impossible to have fair democracy at all. Arrow's Theorem demonstrates this to a large degree, although many have argued that some of his fairness axioms are excessive. More recent research has concluded that fairness is the wrong standard, because there's no way for an electorate's "will" to really be fairly represented by any electoral system, not in all cases. Some systems can do better most of the time (and "winner take all" is particularly bad), but all systems fail in some cases.

What we need to aim for instead of fairness is "legitimacy", which is more about building broad acceptance of the system than about fixing the system itself, though it's easier to build acceptance for better-designed systems.

Having the country's top politicians continually claiming the system is unfair and rigged is, of course, the worst possible thing to do if you want to build support for the legitimacy of the system.

Comment Re:Jokes on you (Score 1) 261

Precisely none of those books were ever banned.

I decided to check :-)

According to the Book Censorship Database from the Every Library Institute, both "Of Mice and Men" and "Adventures of Huckleberry Finn" have been challenged, but only "Of Mice and Men" was removed, though "restricted" is more accurate. The Birdville Independent School District in Texas removed the book from general access, allowing access only to the AP English class, and the Indian River County Schools in Florida restricted it to high school students.

No Doctor Suess books were banned, although Suess Enterprises voluntarily ceased publication of six books.

Comment Re:Can you imagine needing government permission (Score 1) 105

I dunno. China is a "market socialist" system -- which is a contradiction in terms. If China is socialist, then for practical purposes Norway and Sweden have to be even *more* socialist because they have a comprehensive public welfare system which China lacks. And those Nordic countries are rated quite high on global measures of political and personal freedom, and very low on corruption. In general they outperform the US on most of those measures, although the US is better on measures of business deregulation.

Comment Re: 200 million angry, single disaffected young m (Score 1) 105

It makes no sense to claim Chinese courts have a lot of power, although it may seem that way â" itâ(TM)s supposed to seem that way. One of the foundational principles of Chinese jurisprudence is party supremacy. Every judge is supervised by a PLC â" party legal committee â" which oversees budgets, discipline and assignments in the judiciary. They consult with the judges in sensitive trials to ensure a politically acceptable outcome.

So it would be more accurate to characterize the courts as an instrument of party power rather than an independent power center.

From time to time Chinese court decisions become politically inconvenient, either through the supervisors in the PLC missing something or through changing circumstances. In those cases there is no formal process for the party to make the courts revisit the decision. Instead the normal procedure is for the inconvenient decision to quietly disappear from the legal databases, as if it never happened. When there is party supremacy, the party can simply rewrite judicial history to its current needs.

An independent judiciary seems like such a minor point; and frankly it is often an impediment to common sense. But without an independent judiciary you canâ(TM)t have rule of law, just rule by law.

Comment Re: 200 million angry, single disaffected young me (Score 1) 105

Hereâ(TM)s the problem with that scenario: court rulings donâ(TM)t mean much in a state ruled by one party. China has plenty of progressive looking laws that donâ(TM)t get enforced if it is inconvenient to the party. There are emission standards for trucks and cars that should help with their pollution problems, but there are no enforcement mechanisms and officials have no interest in creating any if it would interfere with their economic targets or their private interests.

China is a country of strict rules and lax enforcement, which suits authoritarian rulers very well. It means laws are flouted routinely by virtually everyone, which gives the party leverage. Displease the party, and they have plenty of material to punish you, under color of enforcing laws. It sounds so benign, at least theyâ(TM)re enforcing the law part of the time, right? Wrong. Laws selectively enforced donâ(TM)t serve any public purpose; theyâ(TM)re just instruments of personal power.

Americans often donâ(TM)t seem to understand the difference between rule of law and rule *by* law. Itâ(TM)s ironic because the American Revolution and constitution were historically important in establishing the practicality of rule of law, in which political leaders were not only expected to obey the laws themselves, but had a duty to enforce the law impartially regardless of their personal opinions or interests.

Rule *by* law isnâ(TM)t a Chinese innovation, it was the operating principle for every government before 1789. A government that rules *by* law is only as good as the men wielding power, and since power corrupts, itâ(TM)s never very good for long.

Comment Kind of? (Score 4, Informative) 159

The BLS monthly numbers are always off when the underlying economy is changing rapidly, because of the "birth death problem", meaning that when large numbers of companies are being created or closed (born or died), the surveys that provide the quick data are guaranteed to be quite far off because the surveys go to companies that are already establish, i.e. those that weren't just born and didn't just die. So when there's a lot of market change, they're sampling the part of the market that is changing less. This means the estimates are off, and the faster the economy is changing the further off they are.

A related issue is that the survey results are only a sample, but BLS needs to extrapolate to the entire population of businesses -- but they don't actually know how many businesses there are in the country, much less how many fit into each of the size / revenue / industry buckets. So their extrapolation necessarily involves some systematic guesswork. In normal, stable economic times good guesses are easy because it's not going to be that much different from the prior year and will likely have followed a consistent trend. But when the economy is changing rapidly, that's not true, so the guesses end up being further off the mark.

Second, it's worse when things are turning for the worse, because of something kind of like "survey fatigue", but not. The problem is that when lots of the surveyed companies are struggling, they're focused on fighting for their existence and don't have time to bother filling out voluntary government reporting forms. It's not that they're tired of surveys, but that they just don't have the time and energy to spare. And, of course, the companies that are going out of business are also the ones w

The phone thing is a red herring, because these BLS surveys are not conducted over the phone.

A new issue compounding the above is that the BLS was hit hard by DOGE cuts and early retirements. They've lost over 20% of their staff, and the loss in experience and institutional knowledge is far larger than that, because the people who were fired and the people who took the buyouts tended to be very senior. So a lot of the experience that would be used to improve the estimates has walked out the door.

Anyway, the core problem is that the economy is going into the toilet, really fast. The BLS didn't break out how much of the 911,000 fewer new jobs were added 2024 vs 2025, but I'll bet a big percentage were after Trump started bludgeoning American businesses with tariffs. Most of that pain won't really be known until the 12-month report next year, because the monthly reports are going to continue underestimating the rate of change. Well, assuming the BLS staff isn't forced to cook the books, in which case we'll just never know.

Comment Re: Legal/illegal bikes (Score 1) 146

Class 1 and 2 e-bikes limit assist to 20 mph, not 15. You can ride them faster than that, but you have to provide the power. 20 mph is well above what most recreational cyclists can maintain on a flat course, so if these classes arenâ(TM)t fast enough to be safe, neither is a regular bike. The performance is well within what is possible for a fit cyclist for short times , so their performance envelope is suitable for sharing bike and mixed use infrastructure like rail trails.

Class 3 bikes can assist riders to 28 mph. This is elite rider territory. There is no regulatory requirement ti equip the bike to handle those speeds safely, eg hydraulic brakes with adequate size rotors. E-bikes in this class are far more likely to pose injury risks to others. I think it makes a lot of sense to treat them as mopeds, requiring a drivers license for example.

Comment Re: Legal/illegal bikes (Score 1) 146

Would treating them as mopeds be so bad?

What weâ(TM)re looking at is exactly what happened when gasoline cars started to become popular and created problems with deaths, injuries, and property damage. The answer to managing those problems and providing accountability was to make the vehicles display registration plates, require licensing of drivers, and enforcing minimum safety standards on cars. Iâ(TM)m not necessarily suggesting all these things should be done to e-bikes, but I donâ(TM)t see why they shouldnâ(TM)t be on the table.

I am a lifelong cyclist , over fifty years now, and in general I welcome e-bikes getting more people into light two wheel vehicles. But I see serious danger to both e-bike riders and the people around them. There are regulatory classes which limit the performance envelope of the vehicle, but class 3, allowing assist up to 28 mph, is far too powerful for a novice cyclist. Only the most athletic cyclists, like professional tour racers, can sustain speeds like that, but they have advanced bike handling skills and theyâ(TM)re doing it on bikes that weigh 1/5 of what complete novice novice e-bike riders are on. Plus the pros are on the best bikes money can buy. If you pay $1500 for an e-bike, youâ(TM)re getting about $1200 of battery and motor bolted onto $300 of bike.

Whatâ(TM)s worse, many e-bikes which have e-bike class stickers can be configured to ignore class performance restrictions, and you can have someone with no bike handling skills riding what in effect is an electric motorcycle with terrible brakes.

E-bike classification notwithstanding, thereâ(TM)s a continuum from electrified bicycles with performance roughly what is achievable by a casi recreational rider on one end, running all the way up to electric motorcycles. If there were only such a thing as a class 1 e-bike thereâ(TM)d be little need to build a regulatory system with registration and operator licensing. But you canâ(TM)t tell by glancing at a two wheel electric vehicle exactly where on the bike to motorcycle spectrum it falls; that depends on the motor specification and software settings. So as these things become more popular, I donâ(TM)t see any alternative to having a registration and inspection system for all of them, with regulatory categories and restrictions based on the weight and hardware performance limitations of the vehicle. Otherwise youâ(TM)ll have more of the worst case weâ(TM)re already seeing: preteen kids riding what are essentially electric motorcycles that weigh as much as they do because the parents think those things are âoebikesâ and therefore appropriate toys.

Comment Re:Horseshit. (Score 1) 202

Absolutely. We should just apply carbon taxes (and tariffs) to internalize the externality, so the playing field is level, and let the market work.

You state agreement that the government should not be putting a thumb on the scale in favor of BEVs and then express support for carbon taxes. It appears you are confused on what it means to have the government stay out of the free market.

No, you just don't understand externalities and the necessary role of government in internalizing them.

Comment Re:Horseshit. (Score 1) 202

Their rationale is total horseshit and it's plain to see. Everything about this screams, "but our profit margins!" and an endless stream of crocodile tears.

As I see it there's nothing stopping a competitor to put an end to BMW's profits by offering BEVs that make anything with an internal combustion engine look like expensive junk. Putting a government thumb on the scale to favor BEV makers is restricting fair competition, that is the government picking who makes a profit and so is open to all kinds of corruption.

Absolutely. We should just apply carbon taxes (and tariffs) to internalize the externality, so the playing field is level, and let the market work.

Comment Re:Non sequitur. (Score 1) 202

Second, it means that things that inherently use lots of power, like arc furnaces, become unprofitable, and suddenly you end up depending on imports for all of your metal. You end up storing your data on servers in third-world countries because the server farms cost too much here. You end up with more and more businesses moving overseas to avoid the extra costs.

This is why carbon taxes must be accompanied by carbon tariffs. That also incentivizes the foreign seller to reduce their own emissions (or fake it -- enforcement wouldn't always work, but it only needs to work most of the time).

Slashdot Top Deals

"The voters have spoken, the bastards..." -- unknown

Working...