Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror

Comment Make Builds Reproducible (Score 2) 19

As a maintenance programmer for most of my career, non-reproducible builds were the bane of my existence. Object files with embedded time stamps and source paths, changes in link order, which module got done compiling first when doing multiple modules in parallel... Hell, even uninitialized padding bytes to align to word boundaries could change from build to build. We were using C and gcc, so it might be fair to say that was our problem. I'm not even sure it's possible for that toolchain to produce identical binaries every time for any non-trivial project.

Comment IANAL but... (Score 4, Insightful) 91

Writing a letter to a company asking them a question doesn't entitle you to an answer. Let alone a legally-binding answer.

I can imagine it's reasonable to expect a positive answer if you are going to get sued. But for a company to explicitly declare you in the clear is a courtesy, not something I'd think you can compel.

Comment Re:Do it yourself (Score 3, Interesting) 84

So don't use STL

Indeed, No True Scotsman would use STL with C++.

clang-tidy and Cppcheck and flaw finder and Sonarqube

The last job I had where I had to use C/C++, we automatically ran an expensive static analysis tool every time we checked in code. I'd estimate that it only found about half of the potential segfaults, and it made up for that by finding twice as many false positives.

Comment Re:Do it yourself (Score 3, Insightful) 84

The "rules" of mutable collections in STL state that collections may not be mutated while being iterated.

Nope. If I had used st::list instead of std::vector, it would have been perfectly fine and officially supported. (Assuming I changed "i+10" to "i+11" in order to make the algorithm actually terminate, although that change wouldn't affect the vector crash.).

The problem is that there are dozens of different rules you have to remember to apply to the different types of lists and iterators. And that's only talking about that one topic. There are hundreds of other rules covering a multitude of language aspects that you have to mentally apply against every single line of code you write, many of which can potentially cause memory corruption.

Comment Re:Do it yourself (Score 4, Interesting) 84

You don't need the language to enforce memory safety to program memory-safe. The most important thing is, for example, to never touch raw pointers. C++ makes it very easy to avoid this. Rust forces you to avoid it, but just because C++ gives you the loaded gun, it doesn't mean you have to use it. In particular not on your own foot.

That is a dangerous misconception. You don't need to use any pointers to get memory errors in C++:

#include <stdio.h>
#include <vector>
 
int main() {
    std::vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9};
    for (auto i : v) {
        if (i % 2 == 0) {
            v.push_back(i + 10);
        }
        printf("%d\n", i);
    }
 
    return 0;
}
 
$ g++ -Wall -pedantic t.cpp
$ echo $?
0
$ ./a.out
 
1
2
-947527061
1600570778
5
6
7
8
9

Comment Re:There is already a safe subset of C++ (Score 4, Insightful) 84

languages like Rust exist to put ignorant programmers in straight jackets for their own good

Are you seriously trying to suggest that never allocating memory is not also a "straight jacket"?

You seem to be saying that a currently existing bowdlerized version C++ is safe for close-world problems. Possibly so, but that still leaves C++ unsuitable for open-world problems. That makes C++ only suitable for niche applications. Why learn it?

If you just use Rust or any other memory safe language, you won't have to worry about what kind of "world" you're writing for, or about choosing from a range of increasingly dangerous "profiles".

Comment Re:Too many EVs (Score 1) 117

END NATO, No more LNG of the EU, Stop funding foreign conflicts.

I mean... or... green-light Ukraine joining NATO, and we'll all stomp the unjustifiable Russian invasion in a couple months.

While we're at it... let's recognize Palestine and let them in too. In fact, every country should be included. Any act of military aggression on any nation by any other nation and the entire world should curb-stomp that into oblivion. Want lines on the map to move? Do it via diplomacy, where like-minded countries merge and countries that have different opinions within split.

Now that sounds like civilization.

Comment Re:smart! (Score 2) 230

Nearly every TFW candidate in Canada is for fast food.

Citation required. Not that I'm saying you're wrong. Just... that's a great soundbite-without-stats. I'd like to see .gov.ca stats on where the TFWs are actually placed. Not applied-for. Approved.

I am concerned that much of the complaint about TFW is xenophobia, because racism and xenophobia are among the loudest siren calls of the conservative extremists to the south. Pollievre did not get the message: don't talk like, act like, sound like, or in any way resemble the dictator to the South. While he may be 100% correct on this topic, I will be extremely skeptical because it inspires the expectation that the next step is masked CBSA agents demanding citizenship papers from brown-skinned people.

Comment Re:Teachers (Score 1) 110

Sadly the teacher is correct unless you plan to give your son a great inheritence he will need to purchase cars, rent places, and even buy a home some day.

Lenders need to know who they are doing business with before they lend out the money and take a risk.

Yes, this country has terrible credit problems with tiktokkers saying they are planning to get pregant so they can qualify for the payment for a car and other stupid stuff (yes this was on facebook for a girl entitled for a Mercedes making 30k a year at probably Walmanrt). They are addicting too as a simple swipe and bam instant free stuff etc.

But responsibly they are life saver and a bank has no idea with a character underwrite these days if they are going to get paid back? 70 years ago when people lived in the same town and knew the banker personally it was a different story and time.

Comment Re:Credit scores are not what you think they are (Score 1) 110

No. Its more likely you will be late paying them so they use that as an excuse not to do business with you.

Case in point I switched cards with a different number and forget. My auto insurance thanks to one late payment went from $250 to $475 a month!! At the time my score was 735 too. I was so pissed and it was greed obviously as they viewed me as broke.

Comment Re:Credit scores are not what you think they are (Score 1) 110

I would mod you up if I had points.

Credit systems are a scam as Dave Ramsey says he has a score of 0 and would be denied renting a 1 bedroom apartment ... but could buy the whole complex in cash :-D. Read my last paragraph below to show how stupid this it with correlation = causation arguements to rig it? ... reality is very very few people can buy homes, emergency medical expensives and cars in cash.

Credit score = The % you are likely to pay someone back or your bills on time. No more no less. It is has nothing to do with wealth or success.

But in 2025 it is an evil necessity unless you are a millionaire. My Dave Ramsey example for those who do no tknow teaches financial literacy on youtube and is famous and hates all debt, but he is worth $160 million so can buy homes, boats, and cars in cash and his business. You and I reading this cannot.

Your credit score went down because you closed an account. Not because it was paid off. Broke people close accounts so therefore you are less likely to pay back with the whole correlation vs causation. It also impacts your debt/assets ratio. With less available credit available your other debt %/total available debt% ratio went thru the roof as it looked like you were borrowing too much, therefore you are going to default then those that don't. Again the causation = correlation arguement.

Go do some simple credit research on youtube. The proper way is get those ratios, account lenghts, and percentages in high, Keep ancient cards for lengthening credit history and keeping %total available debt% as big as possible so it looks like you aren't in over your head and over extended. Pay fees in interest for 3% to 5% of balances carried over to show you love debt and willing to have history and you will be good. If you rent be careful of broke neigherhoods as you are statsitically less likely to pay back if you live in X thanks to other broke people.

Slashdot Top Deals

"Bond reflected that good Americans were fine people and that most of them seemed to come from Texas." - Ian Fleming, "Casino Royale"

Working...