[-] HaraldvonBlauzahn@feddit.org 7 points 4 days ago

Is there an equivalent for the software industry to indicate one wants to distance themself from a commit or a project they don't approve?

Other strategies might be better suited. For example, say you work on automobile steering software and management is cutting so much corners that things become unsafe. In that case, it might be best to write a mail to the legal department and naively ask some questions about safety and technical concerns. Then print it and take it home.

In general, if you can't ethically agree to a commit in open source software, it should be possible to withdraw that contribution.

There might be other cases where autorship or contribution to some software might expose you to discrimination. In that case, I think it is perfectly ok to work anonymously.

[-] HaraldvonBlauzahn@feddit.org 3 points 5 days ago

I like Python for quick and dirty stuff

There is one more little secret that not everyone knows:

You do not need lifetime annotations and full borrow checking if you do not care to press out the last drop of performance out of the CPU, or if you just draft experimental code.

In fact, you can very much program in a style that is similar to python:

  • just pass function arguments as references, or make a copy (if you need to modify them)
  • just return copies of values you want to return.

This makes your code less efficient, yes. But, it avoids to deal with the borrow checker before you really need it, because the copied values get an own life time. It will still be much faster than Python.

This approach would not work for heavily concurrent, multi-threaded code. But not everyone needs Rust for that. There are other quality-of-life factors which make Rust interesting to use.

... and of course it can't beat Python for ease of use. But it is in a good place between Python and C++. A bit more difficult than Java, yes. But when you need to call into such code from Python, it is far easier than Java.

[-] HaraldvonBlauzahn@feddit.org 1 points 5 days ago

For software developers, it is better to have frequent tiny changes that can break things, than a big mess of breakage.

Do you hate distractions? Do you love steady improvements? This will affect your preference and judgement about rolling release.

The same can be true for desktop users. It also depends on how stable your software is. If you use mainly vim, dwm, and LaTeX, very few changes will break your flow.

[-] HaraldvonBlauzahn@feddit.org 4 points 5 days ago

EDIT: also, there are very few languages less productive and beginner-friendly than C++ in my opinion.

I am a professional C++ developer with 20 years of experience and have worked in about eight other languages professionally, while learning and using a dozen more in hobby projects.

I agree with you here. The only areas where specifics are worse are package management in Python, and maintainability of large SIMULINK models.

[-] HaraldvonBlauzahn@feddit.org 5 points 5 days ago

The function composition style comes from functional programming and Rust's OCaml heritage. It can make it easier to reason about invriants and possible sets of values of the result of a computation step.

Rust transforms these to the same or a close equivalent of hand-written loops.

Similar methods are used in specialized, high-performance C++ libraries such as blitz++ and Eigen. But if you mess up bounds, you will get UB with them.

[-] HaraldvonBlauzahn@feddit.org 4 points 5 days ago

The one thing I really did not enjoy, subjectively, with Rust, is that writing "C-style loops" comes with a performance penalty because there are bound checks happening, so the idiomatic version of a loop in Rust usually involves iterators and function composition.

IIRC you can speed up such checks by putting an assertion in front that checks for the largest index - this will make repeated checks for smaller indices unnecessary. Also, bound checks are often not even visible on modern CPUs because speculative execution, branch prediction, and out-of-order execution. The CPU just assumes that the checks will succeed, and works on the next step.

[-] HaraldvonBlauzahn@feddit.org 7 points 5 days ago

Generally no. As soon as a class hierarchy becomes moderately complex, implementation inheritance makes code very hard to maintain, because you need to read the whole stack of classes to see what a single change will actually do.

Rust has another system, traits and trait implementations.

[-] HaraldvonBlauzahn@feddit.org 15 points 5 days ago* (last edited 5 days ago)

Enjoy! I don't know what you used to seriously program on but I am willing to bet that the ownership paradigm that it enforces is going to feel at least moderately new to you, unless you forced yourself to code that way anyways.

Thinking about ownership is the right way e.g. for C++ as well, so if one has coded professionally in larger systems, it should not be too alien.

One still needs to learn life time annotations. So, assuming that you know, for example, C++, it is an a bit larger hurdle than picking up Java or Go, but it is worth the time.

In many aspects, Rust is far more productive and also more beginner-friendly than C++:

  • far better compiler error messages
  • a superb and easy-to-use packaging system
  • Unicode support
  • support for unit testing right in the language
  • strong support for a side-effect-free or "functional programming" style which is great for testing and tasks like data analysis or parsing
  • better modularization
  • avoids implementation inheritance, and the trait system is a bit different but superb
  • no undefined behavior (in safe Rust) which means nothing less than that the code does what it says - and this is extremely useful in larger projects
  • great support for safe concurrency
  • the language and library frees one to think about interfaces and algorithms which is where the big wins for performance are hidden (and IMO one of the key factors for the astounding success of Python).

I could go on... but I need to do other stuff

[-] HaraldvonBlauzahn@feddit.org 4 points 5 days ago* (last edited 5 days ago)

A nice editor for both Markdown and reStructuredText with minimal dependencies, which allows to change seamlessly editing between rendered text and source text. Like one has a tab for source text, and one for rendered text, and can change and edit both tabs.

Gollum wiki has something similar but it could be better. Maybe even having two panes side-by-side, left source, right rendering, and one can edit both and / or flip them.

Also, I think one could find a ton of small useful improvements in Zim Wiki. I use it all the time to gather and structure information on poorly documented stuff, which is very often needed when working with legacy software, and it is great and extremely useful but not perfect.

[-] HaraldvonBlauzahn@feddit.org 49 points 5 days ago

I guess that still depends on the maintainer which is responsible. But since drivers often deal with untrusted data, which can lead to security exploits, this makes a lot of sense.

[-] HaraldvonBlauzahn@feddit.org 30 points 5 days ago

Great news! So, we can expect that European industrial companies will start to pick up Rust around 2035 and it will become kinda mainstream around 2045... shortly after the heat death of ~~the universe~~ Southern France. ;-)

75
submitted 5 days ago* (last edited 5 days ago) by HaraldvonBlauzahn@feddit.org to c/programming@programming.dev

cross-posted from: https://feddit.org/post/22760294

The topic of the Rust experiment was just discussed at the annual Maintainers Summit. The consensus among the assembled developers is that Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay. So the "experimental" tag will be coming off. Congratulations are in order for all of the Rust for Linux team.

273
submitted 5 days ago* (last edited 5 days ago) by HaraldvonBlauzahn@feddit.org to c/linux@lemmy.ml

The topic of the Rust experiment was just discussed at the annual Maintainers Summit. The consensus among the assembled developers is that Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay. So the "experimental" tag will be coming off. Congratulations are in order for all of the Rust for Linux team.

204

cross-posted from: https://lemmy.ca/post/55496692

Devs gripe about having AI shoved down their throats

3

cross-posted from: https://lemmy.zip/post/53410191

https://archive.is/xxoOx

Battery-powered electric vehicles made up about a quarter of all new car and SUV sales through October this year, more than doubling their market share from a year ago

Chinese brands like BYD, JAC and Omoda accounted for about 90% of the approximately 11,000 battery electric cars and SUVs sold in Uruguay this year.

23
submitted 4 weeks ago* (last edited 4 weeks ago) by HaraldvonBlauzahn@feddit.org to c/linux@lemmy.ml

cross-posted from: https://feddit.org/post/21743329

Fortunately, data demonstrates that making a better choice does not require daunting multiyear rewrites of existing codebases. Security can be dramatically improved by incrementally shifting the development of just new code to memory-safe languages. If these vulnerabilities can be avoided with low impact on other development goals, then choosing to introduce new ones should increasingly be considered unacceptable, and our goal should be for vulnerabilities to become increasingly impossible to introduce.

[...] This leads to a counterintuitive insight that defies some popular anecdotes: The most vulnerable code in your project is not some dusty legacy component, but the code being written today. This is because, like most bugs, vulnerabilities have a half life. The longer code exists and is exercised, the more likely its flaws are to be found and fixed, leaving the freshest code with the highest concentration of bugs.

[....]

Beyond stability, there have also been gains in development velocity. Change lead time, the time it takes for a code commit to be successfully deployed, is a critical measure of efficiency. One of the largest factors in this metric is often code-review latency. Our data shows a fascinating trend: As our developer community has gained experience with Rust, the time required for code reviews has decreased (see figure 4b). Rust changes tend to go through fewer revisions and spend less time in the review cycle, with an approximately two times faster median code review in 2024 compared with C++.

25
submitted 4 weeks ago* (last edited 4 weeks ago) by HaraldvonBlauzahn@feddit.org to c/programming@programming.dev

Fortunately, data demonstrates that making a better choice does not require daunting multiyear rewrites of existing codebases. Security can be dramatically improved by incrementally shifting the development of just new code to memory-safe languages. If these vulnerabilities can be avoided with low impact on other development goals, then choosing to introduce new ones should increasingly be considered unacceptable, and our goal should be for vulnerabilities to become increasingly impossible to introduce.

[...] This leads to a counterintuitive insight that defies some popular anecdotes: The most vulnerable code in your project is not some dusty legacy component, but the code being written today. This is because, like most bugs, vulnerabilities have a half life. The longer code exists and is exercised, the more likely its flaws are to be found and fixed, leaving the freshest code with the highest concentration of bugs.

[....]

Beyond stability, there have also been gains in development velocity. Change lead time, the time it takes for a code commit to be successfully deployed, is a critical measure of efficiency. One of the largest factors in this metric is often code-review latency. Our data shows a fascinating trend: As our developer community has gained experience with Rust, the time required for code reviews has decreased (see figure 4b). Rust changes tend to go through fewer revisions and spend less time in the review cycle, with an approximately two times faster median code review in 2024 compared with C++.

[...]

These positive outcomes demonstrate that choosing a memory-safe language is not about making a tradeoff between security and productivity. We are not sacrificing quality for velocity or productivity for security. We are improving across all of these metrics simultaneously. The results were achieved while reducing costs associated with sandboxing, fuzzing, and the engineering hours spent triaging and patching bugs. Using a better tool allows for fewer tradeoffs, resulting in better software and, ultimately, a better product.

41
136
submitted 1 month ago* (last edited 4 weeks ago) by HaraldvonBlauzahn@feddit.org to c/climate@slrpnk.net

Archive link:

https://archive.ph/o500u

New electric vehicles cost thousands more than similar models that run on gasoline. But a growing number of shoppers are discovering that for used cars, often the opposite is true.

Used battery-powered vehicles often sell for less than comparable cars with internal combustion engines, making them a good deal even before calculating savings in maintenance costs and fuel. That is expanding the number of people who can afford to buy such models.

Sales of used electric vehicles rose 40 percent in July from a year earlier, according to Cox Automotive, a research firm.

149

cross-posted from: https://feddit.org/post/21623016

Jensen Huang, the CEO of supercomputer chip-maker Nvidia, has for years claimed that his company’s artificial intelligence products, as some of the most advanced scientific tools in history, will help the world solve climate change, warning last year that “climate disasters are now normal.”

Yet Huang is now loudly cozying up to U.S. Energy Secretary Chris Wright, even though Wright is fully on board with the Trump administration’s climate denial policies.

A so-called “climate science” report Wright’s Department of Energy released in July has been condemned by scores of scientists as “biased, full of errors, and not fit to inform policymaking.” The report is part of the administration’s effort to overturn the scientific basis for regulating greenhouse gas emissions as pollution — the 2009 endangerment finding — under the Clean Air Act.

855

cross-posted from: https://discuss.tchncs.de/post/48813307

!!! IF YOU ARE AN EU CITIZEN, PLEASE DO THE FOLLOWING FORM !!!

https://fightchatcontrol.eu/#contact-tool

Be especially sure to select your home country's permanent representation in the Committee, but selecting everyone the website proposes is a very good idea (and done by default).

Raise your voices and flood their inbox, this might be the last chance we ever get

Source

Patrick Breyer's warning about this from 2 days ago

22
submitted 1 month ago* (last edited 1 month ago) by HaraldvonBlauzahn@feddit.org to c/programming@programming.dev

This post is part of my series comparing C++ to Rust, which I introduced with a discussion of C++ and Rust syntax. In this post, I discuss move semantics. This post is framed around the way moves are implemented in C++, and the fundamental problem with that implementation, With that context, I shall then explain how Rust implements the same feature. I know that move semantics in Rust are often confusing to new Rustaceans – though not as confusing as move semantics in C++ – and I think an exploration of how move semantics work in C++ can be helpful in understanding why Rust is designed the way it is, and why Rust is a better alternative to C++.

39
submitted 1 month ago* (last edited 1 month ago) by HaraldvonBlauzahn@feddit.org to c/climate@slrpnk.net

What the article describes means so, so much. Being able to have electric light, to charge a phone, this was not a given for so many people. I think it's huge.

AFAIK, alone air pollution from kerosene fuel in the house is in Africa a leading cause of death.

You know that feeling when you’re waiting for the cable guy, and they said ‘between 8am and 6pm, and you waste your entire day, and they never show up?

Now imagine that, except the cable guy is ‘electricity,’ the day is ‘50 years,’ and you’re one of 600 million people. At some point, you stop waiting and figure it out yourself.

What’s happening across Sub-Saharan Africa right now is the most ambitious infrastructure project in human history, except it’s not being built by governments or utilities or World Bank consortiums. It’s being built by startups selling solar panels to farmers on payment plans. And it’s working.

Over 30 million solar products sold in 2024. 400,000 new solar installations every month across Africa. 50% market share captured by companies that didn’t exist 15 years ago. Carbon credits subsidizing the cost. IoT chips in every device. 90%+ repayment rates on loans to people earning $2/day.

And if you understand what’s happening in Africa, you understand the template for how infrastructure will get built everywhere else for the next 50 years.

[...]

What I am also thinking for a while that the switch to non-fossil power is a historic seismic shift in how huge streams of money are flowing. It changes how power is transmitted very much in a double sense.

And this is not the end of what is possible and what is needed. Tiny solar installations might not be enough for cooking, efficient induction stoves might now still be too expensive. Standard AC voltage systems for home appliances might not match these power sources well. Broken components might be difficult to repair and create waste.

But hey, that's life, isn't it - we solve one problem and in turn we get two new ones for free ;-)

view more: next ›

HaraldvonBlauzahn

joined 8 months ago