Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror

Comment Re:C++ interop is hard (Score 1) 17

The biggest problem are the platform ABIs that are not expressive enough for either rust or C++. That means both sides do tricks to smuggle extra information through the C-compatible platform ABIs -- or to pass constructs entirely around that ABI. E.g. name mangling is used to smuggle function overloading through the C ABI by encoding type information into the symbol name which is just a string.

Things going around the ABI is all the stuff that C++ requires to always be in a header file. Those headers get directly included into the user of a library, going around the ABI layer completely.

The challenge for interoperability is to extract all the necessary information from one language and make that available in the other. Gathering that information without some defined ABI means extracting it from the source code of the language itself. That is damn hard, especially if one side is C++ that needs heuristics to even get parsed.

Meanwhile Rust-inspired safety principles and constructs are being added to C++ right now in the form of Circle C++ and an enhanced libstdc++, and in the near future in the C++ standard. The future for C++ is quite bright and will allow more cost-effective ways of retrofitting safety onto existing C++ code.

There is a proposal to have Rust semantics in C++. Nothing more. It will take decades to get that through the committee, with prominent members already having said that all other venues need to be explored before this proposal can be considered.

Sean having suggested to not have a new C++ standard library (but to use rusts instead) is not going to help find support inside the committee.

Comment Re: Bugs prevented per line of C++ code (Score 4, Insightful) 140

You should write correct code everywhere.

Yeap, but humans just can not do that. We need tools to help us.

C++ isn't Rust. Are you now suggesting that C++ adopt implementation details of Rust to solve a problem?

... and yet that is exactly what the "Safe C++" proposal is that has hit the committee recently.

Comment Re:Good and bad (Score 4, Insightful) 140

"The responsibility is on our ecosystem, not the developer"

This is false. You need to train your developers (unless they're already skilled).

We are pretty much the only industry that thinks like that. There is no contradiction between "improve eco system" and "train developers". All the other industries around us do both.

We are also pretty unique as an industry in that we watch our products fail and then go "there is nothing we can do about that, sucks that random people were too stupid to write proper code". We urgently need to improve, or we need regulators to step in to make us improve. Code is just getting too important to continue with our attitude.

Comment Re: Yeah, but that's the justification... (Score 1) 258

There was an interesting paper recently that looked at first time contributors to open source projects. They found that their first few patches are way more likely to introduce vulnerabilities when the code base is in C++ compared to Rust. The difference gets smaller the longer the contributor is around but never vanishes.

Maybe the devs are not bad, maybe it's you setting them up for failure?

https://cypherpunks.ca/~iang/p...

Quote from the conclusion ofnthenpaper:

> Namely, while it may still be true that Rust may feel like a more difficult language to learn, in at least some ways, new contributors actually benefit from its adoption, with their first contributions being less than 2% as likely to introduce vulnerabilities as C++,

Comment Re: Possible vs. Enforced (Score 1) 258

> If the compiler barks you should be really careful about that unsafe block over there because memory but hey this block over here which results in melted steel when not done in the correct sequence is not marked for safety by the language and therefore does not deserve attention according to the language, what is the implication from a psychology perspective?

It absolutely would bark at "this melts metal when done wrong". Any sane rust dev would make that a unsafe function, so you would need to call that in an unsafe block.

Comment Re:No. (Score 1) 224

Linux is your sole OS and you use it daily? Pardon me if I am skeptical.

Your rant sounds like that made by a typical MS Fanboy (paid ones were called "Technical Evangelists". Remember them?) And claiming that Windows and Mac ask users to use the terminal only for the difficult problems is also ludicrous.

https://duckduckgo.com/?t=ffab...

I've used Linux since May 1, 1998, and I can't remember the last time I had to compile an app, a driver or the kernel. I started with RH5.0 and switched to SuSE 5.3 in Sept of 1998 because it featured KDE 1.0 beta. I used SuSE until Novell bought them and thought they could ignore the GPL. In 2009 I installed Kubuntu, because it features KDE/Plasma, and it was only in November of last year that I switched to KDE Neon User Edition because I wanted my plasma installation to be closer to the leading edge (not the bleeding edge). SuSE RPM's were available not only from SuSE but also from the website rpmbone. That's when I stopped compiling anything. Ubuntu introduced their distribution repository along with their distro in 2006. No compiling necessary. It's been that way for most distributions ever since. Those that do stray off the repository reservation usually download a tar or zip file and then expand it into a directory. Inside the main directory they issue make config, make and make install. No editors, no coding, All the compiling is automatic.

Ubuntu and its daughters have Discover and Muon as package managers, but experienced users, not because they have to but because they want to, open a terminal and issue "sudo apt update && sudo apt full-upgrade". Why? Because it is easier and faster. My next door neighbor bought a new HP laptop three years ago and after a couple of months asked me to fix a problem he was having. I explained to him that I don't do Windows because a fix is never permanent, and he'd be calling me back in a while to fix it again. I told him I would support him if he let me put Linux on his machine. After I showed him my installation and he realized that it is just using the keyboard and mouse the same as it is in Windows he let me put on Kubuntu 18.04LTS. In three years he's called me twice. Once to fix a browser difficulty (he was misunderstanding how to use it) and once to fix a printer issue. Neither of those two issues were Linux related. I'm 80. I retired in 2008, 14 years ago. A lot of my friends my age, or there about, had similar problems that plagued my retired banker neighbor. I made the same deal with them and for about a decade I was supporting about 20 Linux users, give or take 5, until death took its toll.

Most Linux users are like my friends and neighbors. All they know is the keyboard and mouse. Running Windows or Linux most used FireFox and OpenOffice, Many WinXX users would pay cash to take their problems to a computer tech shop to be fixed, usually, WInXX was reinstalled because that is how tech people make the most money in the easiest way. They make more money if they are asked to recover the owner's data.

From the first day I replace Win95 with RH5.0 on May 1, 1998, I never had my Linux system fail to boot or to crash doing standard stuff. I do a LOT of experimentation on my laptop. In 2016, I adopted BTRFS as my root file system. If I, for example, install Python3 environments and, as it did in one instance, Anaconda messed up the local site repository of modules, it took me less than 3 minutes to roll back to an archival snapshot and reboot into a pristine system. From a cold boot I get a working desktop in 6 to 12 seconds, depending on which services I have loading at boot.

For the last 5 years about 15 of my favorite apps are AppImages. No compiling, Just drop the download into a directory of your choice and mark it executable. Click on it and it runs. To "uninstall" it, you simply delete the AppImage. Aside from a local config file an AppImage never touches your system. Nice. Clean. And no snap or flatpak service always running in the background.

Comment Chrome OS is based on Linux. (Score 1) 224

That 1% figure comes from Netapplications, and using the Netapplications metric of desktop share is ridiculous. That website was shuttered by its owner, Phil Vaccarro, in October of last year. He closed all accounts receivable. It, and its predecessor, sold relabeled EXE programs. He is in bankruptcy and is also being prosecuted by the US AG for fraud. It wouldn't surprise me if he sold OS metrics to the highest bidder.

In 2004 Gartner published a report stating that Linux had 4% of the desktop market share. In 2008 their report stated it was 8% and with linear growth rate (unusual for a natural system) they predicted a 12% share in 2012, but I never saw that report.

This recent Christmas Santa (who knew he was my son? :D ) brought me a new HP laptop. It had Win11 on it. By the end of the day it had KDE Neon User Edition riding the main SSD as the only OS. The bean counters still count my laptop as a Windows install when, in fact, it is Windows -1 and Linux +1. Except for the few who purchase laptops from System76 and other OEM's that feature Linux, most Linux installations exist because they replaced WinXX. Retail channel statistics are the worse statistics of all.

A better source of OS statistics is a website that attracts users of all sorts of OS's:

https://distrowatch.com/awstat...

Windows is 40% and Linux is 45%.

Comment Modern farming ... (Score 1) 151

Dr Alfred Bartlett wrote "Modern farming is nothing more than using land to convert oil into food. We burn 7 times more energy to bring a slice of bread to your table than you get from eating it."

Only fossil fuels currently have the energy density necessary to power agriculture and its processing and transportation to market. People died in Texas last year because the heating system used to prevent the icing of the natural gas lines was powered by solar and wind power.

Comment Contemptible (Score 2) 44

"Amazon's compliance with the Chinese government edict, which has not been reported before, is part of a deeper, decade-long effort by the company to win favor in Beijing to protect and grow its business in one of the world's largest marketplaces. An internal 2018 Amazon briefing document that describes the company's China business lays out a number of "Core Issues" the Seattle-based giant has faced in the country. Among them: "Ideological control and propaganda is the core of the toolkit for the communist party to achieve and maintain its success," the document notes. *We are not making judgement on whether it is right or wrong.*"

Not making judgement? Yes, you are. You judged that the life of at least one individual is worth less than any potential profit you might make, and you are overlooking decades of attrocities committed by the CCP against China's citizens.

My judgement is that I canceled my prime account.

Slashdot Top Deals

Biology is the only science in which multiplication means the same thing as division.

Working...