Catch up on stories from the past week (and beyond) at the Slashdot story archive

 



Forgot your password?
typodupeerror

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

MISRA is absolutely a coding standard if it is adopted as one. There are multiple MISRA rule checkers that enforce the rules as coding standards.

MISRA makes no guarantees. MISRA mitigates several problems. There are copious other issues like determinism (which is generally impossible with dynamic resource allocations) and plain old logic errors. There is no shortage of ways a program can be wrong or broken. Rust won't save programmers from logic errors either. Using MISRA as a coding standard means there will be bounds checks. Using MISRA as a coding standard means there will be no use after free because there is no free.

You mention stack overflow. MISRA forbids recursion: "V2565. MISRA. A function should not call itself either directly or indirectly." In a deterministic system, the maximum needed depth of the stack is known at compile time.

I'll ignore the rest of your sophomoric nonsense.

Comment Re:Do it yourself (Score 1) 82

Nobody said the Standard Template Library (STL) wasn't a monstrosity :). The "rules" of mutable collections in STL state that collections may not be mutated while being iterated.

Note: The free Cppcheck that should be part of every C++ build system states:

~/Desktop/bug/bug/build $ cppcheck ../main.cpp
Checking ../main.cpp ... ../main.cpp:8:15: error: Calling 'push_back' while iterating the container is invalid. [invalidContainerLoop]
                        v.push_back(i + 10);
                            ^ ../main.cpp:6:5: note: Iterating container here.
        for (const auto i : v) {
        ^ ../main.cpp:8:15: note: Calling 'push_back' while iterating the container is invalid.
                        v.push_back(i + 10);

Comment There is already a safe subset of C++ (Score 4, Interesting) 82

There is already a safe subset of C++ as demonstrated by safety critical code including code in aircraft cockpits. Standards like Motor Industry Software Reliability Association (MISRA) exist for C++. Such standards generally include rules prohibiting dynamic resource allocation at run time. All threads and all memory must be allocated are compile time or at initialization time. Of course, following these rules means that 90% of the Standard Template Library (STL) cannot be used. All memory accesses must be bounds checked, etc.

I live in the world of MISRA C++. It is surprisingly easy to live with the constraints. I work in large code bases that do not contain a single "new" or "delete". The problem is that most programmers are unaware of the risks that standards like MISRA try to mitigate. Programmers are poorly trained about memory safety and dynamic resource allocation. In my opinion, languages like Rust exist to put ignorant programmers in straight jackets for their own good. Java tried to do the same thing with "managed" code. The real solution is to cultivate less ignorant programming programmers.

With all of the above said, there are two different worlds of programming: Closed World, and Open World. This is not a reference to Opensource. This is about he types of problems to be solved.

Closed world is like ethe transmission in a traditional car. All of the parts are created to exacting standards and fit together only one way. Transmissions are not user serviceable. Any modifications to the transmission likely degrade its functionality. All of the parts were present at the factory (compile time), and none will ever be added or removed (no dynamic resource allocation).

Open World problems are like the trunk of the car. Nobody at the factory can predict everything that might be stored in the trunk. Items are added and removed from the trunk all the time. Limitations to the contents of the trunk make the trunk less useful. Databases and authoring tools like Word or Blender and most user interfaces with plugins etc. are exist in the Open World. Limitations to the number of pages in your document or the number of tables in your database make the documents and databases less useful.

C++ is used to solve both Closed World and Open World problems. C++ id the largest most complex programming language ever conceived in part because it tries to be everything for everyone. This is why "Profiles" are so important. If I understand correctly, "Profiles" identify subsets of teh languages and force programmers to live within the selected subset. In reality, this is the only way C++ programmers survive today. Everybody chooses a subset of the language. Unfortunately, even team chooses a different subset, so when components are integrated from multiple teams/suppliers, the union of the subsets produces a larger subset. Since and repeat until you are using the entire language again.

By the way, tools exist to audit C++ code for things like MISRA compliance. Adding such tools to the language itself may not be particularly valuable...

Comment Re:Post-secondary should be free, as in beer (Score 2) 122

I think you will find that when university is free as in beer, it is rationed. There is not an unlimited amount of money or an unlimited number of places for students. Then, how and when are students selected for further education? In Germany, they generally decide each student's entire future at age 14 - gymnasium or not. Is that a good system?

So, we tax working class people to pay for the higher educations of students who have enough advantages by age 14 to win the meritocracy - in other words, not the working class kids.

Comment Nothing on the market suggest "Intel is back... (Score 4, Insightful) 23

"Intel is back from a technology point of view," Barrett wrote...

Fool me once, shame on you. Fool me twice, shame on me. I'll believe it when I see it.

If I recall correctly,
- Intel sold or just closed its ARM business right before ARM took off. There are 10 times as many ARM CPUs as Intel CPUs now. Intel missed the whole mobile business space.
- Intel never invested in high performance GPUs, and GPUs are vastly more profitable than CPUs now.
- Intel didn't notice AI server farms might one day be a thing
- Intel missed at least one and possibly two whole generations of chip fabrication technology. I have seen no evidence of a working 2nm process from Intel.

What is a CEO for if it is not to guide the ship of commerce to fruitful shores? Gelsinger's whole job was to not miss any of the opportunities and business changes, and he missed the ALL. As an outsider, it looks to me that Gelsinger was fired for failure to meet any of his goals or even tread water.

Comment Re: Intel's STOCK (Score 3, Informative) 34

Dec Alpha was a Reduced Instruction Set Computer (RISC) that was "really" reduced and 64-bit. Alpha could not even load a single byte. String operations needed to load 8 bytes and the shift bits to extract individual bytes. The transistors Alpha saved by not decoding complex instructions were used to supply lots of registers. If I recall correctly, Alpha processors were not pipelined.

Pentium 4 was 32-bit. Pentium 4 and its successors have the most complex variable length instructions ever attempted in a CPU. Pentium 4 and is successors translate complex instructions into multiple simpler instructions and then execute the simpler instructions. Pentium used a seventeen stage pipeline! Transistors are more plentiful today but the waste of so many transistors delayed the Intel move to 64-bit by a decade and still hampers the architecture to this day.

It was the many-stage pipeline needed to obtain high clock rates that limited the Intel design and caused so much power consumption.

Comment Just use the Patreon WEB interface already (Score 1) 83

If you use a credit card with Patreon, the credit card company takes a cut.

If you use Patreon at all, Patreon takes a cut.

If you use Apple's in-app purchases to fund Patreon, Apple takes a cut.

SO DON'T USE APPLE'S In-App Purchases to fund Patreon. Was that difficult?

Use the F-ing Patreon web page. Here you go: https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.patreon.com.%2F Now you are only paying the credit card company's fee and Patreon's fee.

Bitching about Apple's services taking a cut is like bitching that the post office requires stamps on snail mail.
Bitching about Apple's services taking a cut for in-app purchases is like bitching that restaurants have to pay rent to the building owner.
Bitching about Apple's services taking a cut for in-app purchases is like bitching about paying shipping for online purchases.

Comment Apple cannot track you this way (Score 5, Informative) 176

A) Apple cannot track you this way. A cryptographic signature that is generated on your device is used. Apple has no access to the signature.
B) When a device is factory reset, cryptographic keys are regenerated, and it becomes impossible to track the device via "find my". Used devices are not a "find my" privacy issue for this among many other reasons.
C) If you don't like it, turn it off, and it is really off. This is in contrast to Goole who continued to track Android phone locations even when opt out. https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fwww.tomsguide.com%2Fnews....

One company makes money by invading your privacy, and it isn't Apple.

Comment Grateful for the existence of Homebrew. (Score 2) 37

Homebrew is superior to *yum* and *apt* in my humble opinion. Homebrew emphasizes NOT needing administrative permissions and NOT replacing the distributions' default versions. Even Homebrew itself may be installed without sudo.

Homebrew also works with the Linux subsystem for Windows and with Linux.

I am very grateful for the existence of Homebrew.

Comment What is TCTI (spell out acronyms anyone?) (Score 1) 21

What is TCTI? I've never heard of it. It's used right after QEMU. The QEMU project on GitHUB does not contain a single reference to TCTI. WTF?!?.

https://ancillary-proxy.atarimworker.io?url=https%3A%2F%2Fgithub.com%2Fsearch%3Fq%3Dre...

What does TCTI have to do with being JIT-less?

Comment Company Culture is EVERYTHING (Score 1) 200

I was a co-op management trainee at GE in the late 1980s. The culture was fear and intimidation. We marched in hallways chanting "Nobody is Irreplaceable". You've heard of open door policies? There were three locked doors and two admins between the hallway and the general manager's office. My direct manager locked herself in an office and cried all afternoon at least once every week. They required managers to rate at least 10% of employees "unsatisfactory" every year. It didn't matter if you had a team of superstars. You had to fire or force out 10% every year. Managers hired idiots on purpose so they would have someone to sacrifice at the end of the year and keep the staff they really wanted.

I worked for a French Canadian small company that had the bureaucracy and politics of a large company. There was so much bickering and dick measuring that nothing could be completed.

I worked as a contractor in a Rockwell Collins facility. It was heavenly. You could eat lunch in the cafeteria with (or at least near) the President if you wanted. Everybody helped everybody. They promoted from within. The best way to get promoted was to get your boss promoted. There was minimum bureaucracy. They just paid the company card balance every months no questions asked. I once asked what would stop me from buying a car on the company card. The answer: "We know where you live". There was a supply/inventory room. You asked for a part or a computer or lab equipment, and it. was scanned along with your badge as they handed it to you no questions asked. The union, the IBEW, never had a strike in the history of the company, and the union had at least one seat on the board of directors. I never met more friendly people.

My own company had simple policies:
- Employees were expected to work 2000 hours every year. It doesn't matter which hours or where they're worked. I had night owls who worked at night. I had an employee who worked his hours every year by October and took the last three months of the year off.
- If I was present, I paid for everything. If we went to lunch, it was on me. If we saw a movie in the middle of release day because we all loved movies, I paid.

Comment Anyone can compile and install iOS software (Score 1) 35

Anyone with a free Apple Developer account and a computer running Mac OS can compile, sign, and install any software they want on an iOS device. All you need is a USB cable and the ability to unlock the iOS device. It has been this way since at least 2009 and possibly before that.

This recurring BS that you Cann't side load on iOS is bizarre. How do you think developers test their software?

I myself have over 50 public GitHub repos full of iOS software that you can download, compile, and install on any iOS device as described above. The source code for my iOS related programming books is in GitHub.

Slashdot Top Deals

You had mail. Paul read it, so ask him what it said.

Working...