this post was submitted on 11 Apr 2024
162 points (95.0% liked)

Linux

51569 readers
464 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

I'm curious how software can be created and evolve over time. I'm afraid that at some point, we'll realize there are issues with the software we're using that can only be remedied by massive changes or a complete rewrite.

Are there any instances of this happening? Where something is designed with a flaw that doesn't get realized until much later, necessitating scrapping the whole thing and starting from scratch?

you are viewing a single comment's thread
view the rest of the comments
[–] lil@lemy.lol 52 points 11 months ago (16 children)

There is some Rust code that needs to be rewritten in C.

[–] Lodra@programming.dev 19 points 11 months ago (7 children)

Strange. I’m not exactly keeping track. But isn’t the current going in just the opposite direction? Seems like tons of utilities are being rewritten in Rust to avoid memory safety bugs

[–] Khanzarate@lemmy.world -2 points 11 months ago (5 children)

The more the code is used, the faster it ought to be. A function for an OS kernel shouldn't be written in Python, but a calculator doesn't need to be written in assembly, that kind of thing.

I can't really speak for Rust myself but to explain the comment, the performance gains of a language closer to assembly can be worth the headache of dealing with unsafe and harder to debug languages.

Linux, for instance, uses some assembly for the parts of it that need to be blazing fast. Confirming assembly code as bug-free, no leaks, all that, is just worth the performance sometimes.

But yeah I dunno in what cases rust is faster than C/C++.

[–] sunbeam60@lemmy.one 13 points 11 months ago* (last edited 11 months ago) (1 children)

C/C++ isn’t really faster than Rust. That’s the attraction of Rust; safety AND speed.

Of course it also depends on the job.

https://benchmarksgame-team.pages.debian.net/benchmarksgame/box-plot-summary-charts.html

[–] 0x0@programming.dev 5 points 11 months ago (1 children)

C/C++ isn’t

You're talking about two languages, one is C, the other is C++. C++ is not a superset of C.

[–] sunbeam60@lemmy.one 2 points 11 months ago

Yes thank you. But my statement remains true nevertheless.

load more comments (3 replies)
load more comments (4 replies)
load more comments (12 replies)