The Case for Rust (in the base system)

I just looked at the comment section there - lost some IQ points. I hope I can get them unstuck again.
 
Is Phoronix good PR?

It is just a bunch of graphics nerds (myself included) squabbling about trivial stuff ;)

I like Phoronix.

But what is up with that forum that has no ability to track threads and get taken to the current end of one?
 
But what is up with that forum that has no ability to track threads and get taken to the current end of one?
Hand-rolled forum software like its the 90s again ;)

I find it charming. It reminds me of my first foray with Linux decades ago trying to get the (extremely awkward) fglxr drivers working.

I just looked at the comment section there - lost some IQ points. I hope I can get them unstuck again.

Heh, I just approach it with a different mindset. Rather than demonstrating my usual respectful, elegant, intelligent and (above all) humble nature, I just hammer madness into the keyboard. Some parts of my sentences are good, some not so much. Think of it as a prototype version of the kpedersen compared to what you are all graced with here.
 
Germany's heise.de picked up the topic as well. "FreeBSD Greybeards?" :)


Google translate:
 
Heh nice. Personally I think we should listen to them. The greybeards are after all, the only generation who have actually written successful operating systems.

But I don't think any of the prominent people speaking out against Rust actually have grey beards. I guess I have to count on BSDCan.
 
Some free PR for FreeBSD.

More discussions/awareness:


  • unfortunately with reference to the wrong URL for a FreeBSD-provided archive, and the correct URL does not work

 
Actually, I contend that our industry is very very sane. Whenever a big (commercial, not hobbyist) project starts, it evaluates what tools to use. And it picks the optimal one, looking at tradeoffs: What is out biggest bottleneck? Programmer skill? Wall clock time of development? CPU cycles? Reliability once deployed? A language that's designed for readable and long-term maintainable and enhancable code? Different projects find different answers, because their tradeoffs are so radically different. Sometimes, they make a mistake and settle on the wrong answer; c'est la vie. Sometimes the answer they find is painful, for example "we'd really like to code in Y because it will save CPU power in the long run, but we need to use X because we don't have enough manpower to rewrite existing libraries that are in X".

My personal answer has been (for the last ~5 years) to do MOST of my coding in Python and SQL, using C++ only where necessary for performance and to interoperate with existing code. Your mileage WILL vary.
Man, I wanna work wherever you've been working! It seems I've spent large chunks of my career battling
  1. True believers fresh out of school and Hell-bent on making the rest of us see the light of the One True Way.
  2. Mid-career programmers with children and mortgages looking to do resume-driven development 'cause gawd they need that raise.
  3. Inexperienced and/or inept managers that fall for (1) and (2)'s weak Jedi mind tricks.
Garbage collection usually has pauses, but that doesn't mean that the overall CPU time is more. malloc/free has many problems and tradeoffs, namely fragmentation and lack of compactation, which a mark-and-sweep GC avoids. malloc/free can build up significant fragmentation over time for long-running processes.
I ran into this when I first started using Java back in the late '90s. I remember measuring 40-second GC pauses when the heap got into the gigabyte range. Fortunately Sun sunk likely hundreds of millions of dollars into it, and it's much, much better now. There are even GCs that guarantee maximum pauses in the millisecond range. I haven't tried them, though.

And you're not helpless even in a GC system. You can re-use memory you've already allocated. Sure, the language and platform will fight you every step of the way, but it's still less work than doing manual memory management. In my opinion and all that, of course.
 
I've spent large chunks of my career battling
  1. True believers fresh out of school and Hell-bent on making the rest of us see the light of the One True Way.
  2. Mid-career programmers with children and mortgages looking to do resume-driven development 'cause gawd they need that raise.
  3. Inexperienced and/or inept managers that fall for (1) and (2)'s weak Jedi mind tricks.
This is the default condition. You’ve to find your own way. You can write good code in almost any language. The same with bad code! Transcend silly battles of code formatting, language choice, politics and focus on self growth. Spend a fraction of your time writing tools & honing your skills. Keep your ear to the ground and learn the soon to be the new One True Way :-) And don’t lose your sense of humor!
 
You can write good code in almost any language. The same with bad code!
Exactly. Since every language is on an equal footing in that regard, we might as well default to using ANSI C for everything and keep the ecosystem simple and correct, skipping the time consuming nonsense :)
 
1706648788613.png
1706648824324.png
1706649119575.png

How about using Mold to link up Rust modules on a wooden computer, guys!
 
Not knowing much about rust, I read this guy's opinion piece- https://drewdevault.com/2019/03/25/Rust-is-not-a-good-C-replacement.html

He says:- "Both Rust and C++are what I like to call “kitchen sink” programming languages, with the obvious simplication. These languages solve problems by adding more language features. A language like C solves problems by writing more C code."

If what he says is true, that rust is another feature hog like C++, then my vote goes to C, every time. I think the other points he makes form a pretty good argument too.
 
Per that link: "Yes, Rust is more safe. I don’t really care" That's a very big thing about why anyone should consider Rust and if you DGAF about that, then I guess why is anyone who considers that important even talking to you?
 
Per that link: "Yes, Rust is more safe. I don’t really care" That's a very big thing about why anyone should consider Rust and if you DGAF about that, then I guess why is anyone who considers that important even talking to you?
You can program security exploits in Rust, I'm sure. Next Heartbleed, anyone? ;)
 
A"One True Way" is so only for a short time, until the next OTW is proclaimed somehow! So FreeBSD doesn't count! I await the next OTW after Rust with bated breath.
Which will be... wait for it...

Give me a J!
Give me an S!
Give me an L!
J! S! L!
Let's go, JSL!
?‍♂️?
 
Rust might have a place in the base system at some point in the future. But I would find it more interesting to improve what already exists than doing a rewrite.

Having more people pushing for changes to C to improve for the next standard seems a better choice.

I started with rust in 2018 after having already put a good couple years into C++ then C then python & ruby. P.S. I'm actually realizing now it's more like over a decade and that I'm old lol.

Rust is both lovely and at the same time absolute garbage somehow. The ecosystem and tooling around Rust can be downright maddening to deal with. Delving into no_std for embedded systems can be somewhat of a nightmare. To be honest I would trust code I've built in C with a certed compiler against misra or certC more than rust and all the dependencies it tries to pull in for most embedded work.

I don't doubt that rust for the most part removes entire classes of bugs/issues; but the mental load for it's use is crazy high compared to almost anything else. It becomes very easy for one to have logic mistakes or bad assumptions. This only gets worse with the verbosity of the language and the number of keywords making readability absolute (excuse my french) shit.

Things that seem like great and wonderful ideas in rust often seem to become unused and neglected in favor of easier alternatives in code bases. Iterators are a good example of that. I don't see them in use for a lot of peers/coworkers code; I think a large reason for why that's the case is down to it being less readable to most programmers. Same with error handling and unwrap statements all over the place, even if there is a reason why.

Trying to decode some bastardized single line multi mapped and iterated statement over generics that use some magical sealed traits you don't have access to readily is a joke even as a concept. If there was a change I could force upon all rust code bases in the world it would be to force a 80char line limit and to have a stable ABI.

Suppose it's a bit of a long winded way to say I don't think rust has a place in FreeBSD yet.
 
Back
Top