Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror

Comment Re: Stupidity snowballs (Score 2) 106

> There is no exception here. Teachers are to teach what is in the published curriculum

If the curriculum limits answers to certain questions for religious reasons than it's in violation of the separation clause.

> It can be a matter of health,

I'm sure the evil GOP will try to twist their argument into being about health or the like, but underlying it's religion trying to camouflage itself, like how Intelligent Design tried to disguise creationism as science. It's bearing False Witness and thus should be punished via an elevator to Hell. Jesus can read GOP's evil minds.

Comment Re:Do it yourself (Score 1) 49

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 2) 49

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) 49

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:Do it yourself (Score 1) 49

You oversimplify. I despise Rust, but it does address real problems. (I'm not sure how well, because I won't use it.) I'm thinking of thinks like deadlock, livelock, etc. As someone above pointed out, there are lots of applications that don't need to deal with that, and subsets can work for them. (The above poster worked in a domain where all memory could be pre-allocated.)

Rust felt like programming with one hand tied behind my back. So I dropped it. Only one reference to a given item it just too restrictive. Perhaps it is really Turing complete, but so is a Turing machine. But multi-threaded programs really do need a better approach. (My real beef with C++ (and C) though is their handling of unicode. So I'm currently experimenting with D [ https://dlang.org/ ], which seems pretty good for the current application (though honestly since it's I/O bound Python would be quite acceptable). )

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

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:Probably! (Score 1) 17

Reform copyright, allow derivative works, abolish moral rights. What's the worst that could happen? Solves the problem of AI being "inspired" by existing works. Well, perhaps someone will write a crappy HP-inspired story about Tanya Grotter, a machine-gun wielding lady wizard who goes after bad Chechens (that is a real book, BTW). So what? The goal of copyright is cultural abundance, and that will (eventually) include AI generated works.

Look at Nosferatu, considered to be one of the great vampire movies. The movie was called that because they did not secure the copyright to the Dracula story, and after a lost lawsuit they had to destroy all copies and negatives. Luckily a few survived, and we can still enjoy it.

Comment Re:Hitler and Trump get rid of the comedians first (Score 2) 229

Exactly what background and/or career does prepare one well for the presidency? A law degree? Founding a successful business? A career in politics? An MBA? Perhaps being a comedian. Or perhaps the job (like many high level managerial jobs) is such a complex multi-faceted one that no career is going to prepare you for it, and no background is a great predictor for success. Perhaps it is more about personality than experience, but even that is not a great predictor. I've seen plenty of politicians who looked great for the job, only to turn out complete rubbish, or the other way around. Or a brilliant mayor who turned out to be a shit minister. And it depends on circumstances as well... one of our MPs is remembered as lackluster and ineffectual, but I think he would have been great if times had been different. Likewise I think that Zelensky would have been a so-so president in peacetime conditions... but he stepped up brilliantly after his country got invaded. Kind of how people look back on Churchill... before the war, people didn't think he was all that either.

Comment Re: Stupidity snowballs (Score 0) 106

> School teachers don't have a 1st Amendment right in the classroom, just as I didn't have a 1st Amendment right while in my US Army uniform.

Apples and oranges. In the military one has to learn to STFU or the enemy can hear where you are. A teacher simply describing what LGBTQ+ concepts are shouldn't be an exception to the 1st. There's no logical reason other than religious offense, which then has the church sticking its peanut butter in secular chocolate.

> How do we resolve this [restroom & shower issues]?

There are ways to compromise, but that's a longer topic.

> If the teachers want to express their beliefs

That's NOT what I proposed.

> While in the classroom the teachers should be expected to follow the state specified curriculum or expect to be fired.

It's realistic to answer a simple question from a child, even if it offends religious troglodytes.

Comment Stupidity snowballs (Score 2, Insightful) 106

how numerous friends of his became Trump supporters due to the LGBTQ discussions happening in their children's schools... just not popular and it was a major reason that dickbag was re-elected. Even if it seems like the correct moral decision, the unpopularity of it led to a far worse situation.

GOP successfully spooked parents with LGBTQ+ bullshit. They cherry-picked a few bad apples and painted it as common-place. Plus, school content is controlled at the state level, not national, and was thus moot for the election.*

Stupidficial gimmicks worked on US's gullible population, just like 1930's Germany; Don pulled Jedi Clown Tricks. The parents ALSO need more education in critical thinking. Stupidity snowballs. Maybe America is just too dumb to hold a democracy, as too many want a theocracy. Perhaps we can negotiate an amiable split before they drag blue states into their cave.

* An exception may be firing or jailing teachers for merely mentioning LGBTQ+ in the classroom, which should be protected under 1st Amendment and separation clause, but the GOP SCOTUS seems overly bribed by rich evangelicals handing out grift-wrapped RV's. The idea that a non-transgender student will become transgendered by mere mention is dumber than rocks. Idiots!

Slashdot Top Deals

Per buck you get more computing action with the small computer. -- R.W. Hamming

Working...