What Happened When Unix Co-Creator Brian Kernighan Tried Rust? (thenewstack.io)
- Reference: 0178939854
- News link: https://developers.slashdot.org/story/25/08/30/044226/what-happened-when-unix-co-creator-brian-kernighan-tried-rust
- Source link: https://thenewstack.io/unix-co-creator-brian-kernighan-on-rust-distros-and-nixos/
And last month the video was uploaded to YouTube, [2]a new article points out , "showing that his talk ended with a unique question-and-answer session that turned almost historic..."
> "Do you think there's any sort of merit to Rust replacing C?" one audience member asked... "Or is this just a huge hype bubble that's waiting to die down...?"
>
> '"I have written only one Rust program, so you should take all of this with a giant grain of salt," he said. "And I found it a — pain ... I just couldn't grok the mechanisms that were required to do memory safety, in a program where memory wasn't even an issue!" Speaking of Rust, Kernighan said "The support mechanism that went with it — this notion of crates and barrels and things like that — was just incomprehensibly big and slow. And the compiler was slow, the code that came out was slow..."
>
> All in all, Kernighan had had a bad experience. "When I tried to figure out what was going on, the language had changed since the last time somebody had posted a description! And so it took days to write a program which in other languages would take maybe five minutes..." It was his one and only experience with the language, so Kernighan acknowledged that when it comes to Rust "I'm probably unduly cynical. "But I'm — I don't think it's gonna replace C right away, anyway."
Kernighan was also asked about NixOS and HolyC — but his formative experiences remain rooted in Bell Labs starts in the 1970s, where he remembers it was "great fun to hang out with these people."
And he acknowledged that the descendants of Unix now power nearly every cellphone. "I find it intriguing... And I also find it kind of irritating that underneath there is a system that I could do things with — but I can't get at it!"
Kernighan [3]answered questions from Slashdot readers in 2009 and [4]again in 2015 ...
[1] https://youtu.be/WEb_YL1K1Qg
[2] https://thenewstack.io/unix-co-creator-brian-kernighan-on-rust-distros-and-nixos/
[3] https://developers.slashdot.org/story/09/10/06/2356214/interview-with-brian-kernighan-of-awkampl-fame
[4] https://features.slashdot.org/story/15/11/18/1748247/interviews-alan-donovan-and-brian-kernighan-answer-your-questions
Always with the pot-boiler to get views (Score:2, Insightful)
Attention seeking behavior by pumping up the most trivial of things and events by the media and social media is a detriment to progress.
Trying to boil the pot to pit us into "group x" and "group y" to get red-meat shouting matches on every area of life, technology, trend, whatever is not forward progress.
The root of the problem (Score:2)
"And he acknowledged that the descendants of Unix now power nearly every cellphone. "I find it intriguing... And I also find it kind of irritating that underneath there is a system that I could do things with — but I can't get at it!"" - That's called lock-down enshitification for the sake of monetization. Tech bros are your gods and you need to bow to them accordingly.
I'd be interested to know... (Score:4, Insightful)
... what he thinks of modern C++ where the learning curve for newbies is now getting close to vertical. Speaking as a C++ dev of 25 years I wouldn't go near the language now if I was starting out, the number of paradigms and syntactic complexity has become ridiculous. And yes, if you're going to work on code written by others you do need to know and understand all these paradigms.
He mentioned this experience with Rust before (Score:2, Informative)
In a podcast in 2022 Kernighan mentioned an experience with Rust, and it appears to be this one. At that time he considered it too brief to have much of an opinion on the language, and apparently it was already a while back, when the language was changing very rapidly and not yet very popular.
He didn't mention the issues he took up this time either. The discussion went in many directions, but it's a bit strange he didn't bring up more of what he experienced at that time, especially since the focus of the po
What Happened When Colonel Sanders Tried Church's? (Score:2)
"It wasn't finger lickin' good," said Sanders, "and it only had 9 herbs and spices instead of 11 like my chicken."
All in all, the Colonel had had a bad experience.
Age: part of the issue? (Score:3)
I remember that 30 - 35 years ago, during CS classes at university, we used to switch our minds from a language to another, from course to course: ADA, C/C++, Smalltalk, Prolog, Lisp ...
But in the last few years, I tried the Rust tutorial. Two times. I failed. My brain cannot cope with the syntax. It's way to close to C/C++, but with different and new meanings.
I think "I'm too old for this shit" ...
I find confort telling me that the younger coders need sidekicks to hide low level considerations.
But I may be wrong ...
Rust: Desperate for Linux Merit Badge (Score:2)
And who cares if there is no one person who can code anything in the Linux kernel--most of us. Why not fork Linux and do whatever the hell you want?
Seriously? (Score:4, Funny)
What kind of an idiot asks Brian Kernighan something like that?
It's like asking Henry Ford what he thinks of the new Toyota.
Re:Seriously? (Score:5, Insightful)
There are no stupid questions. Brian Kernighan offers a unique historical and reflective perspective that few others can provide. Asking him about Rust or NixOS isn’t about a product review — it’s about insight into how the field has evolved. It’s less like asking Henry Ford whether he prefers a new Toyota, and more like asking him what he thinks of the evolution of car design decades after creating the assembly line.
Re: (Score:2)
At least for what TFS has included, I think he's just more of an old dude set in his ways on that. The semantic differences between C and Rust are huge (also as you might note in my signature, semantics is one of a few major differences between languages that extends beyond syntax, and the very much non-developer who claims to be a developer doesn't even know that -- notice for example that java has quite different semantics from C++, namely Java is mostly implicitly pass by reference, whereas in C++, refer
Re: (Score:2)
Er *ahem* pointers, rather than references, for those C developers that read my post.
Re: (Score:3)
So these things he says aren't true? He said that he was being forced to do memory safety when it wasnt even a concern and that the compiler was slow. Was he wrong about that?
Re: (Score:1)
> So these things he says aren't true? He said that he was being forced to do memory safety when it wasnt even a concern and that the compiler was slow. Was he wrong about that?
Yes. Unless all of your variables are floats and integers on the stack, memory safety is always an issue when you write code in C. (If all of his values were actually floats and integers on the stack, he would have had no problem writing the Rust code either.)
Re: (Score:3)
To be fair, memory safety is only an issue if your code has a bug. I just assumed he was writing a short inconsequential program that could be written without a leak.
Re: (Score:2)
He said it would have taken about 5 minutes in C, so I think you're right.
Re: (Score:2)
Or rather, that he was writing one that could be written with a leak. You can't access freed memory if you never free memory, and short programs can often get away with that.
Re: (Score:2)
> To be fair, memory safety is only an issue if your code has a bug. I just assumed he was writing a short inconsequential program that could be written without a leak.
Memory safety is a pain when you're asked to prove the correctness if your code.
There are things like a subset of C such as MISRA C and static analysis tools that let you do some very limited checking. But it doesn't quite rise to the level of a formal proof.
Nursery paradigm (Score:2)
> the familiar ideas of scope and lifetime that came from languages like Algol don't really apply and are hard to describe when there are asynchronous threads that may or may not also be running in parallel.
The "nursery" paradigm can help to bring some sense of scope and lifetime back to a multithreaded task. See [1]"Notes on structured concurrency, or: Go statement considered harmful" by Nathaniel J. Smith [vorpus.org] (8000 words)
[1] https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/
Re: (Score:2)
> C is a really terrible language to use for text-processing, even more so once you move beyond ASCII.
Don't know why you were modded down because this is so true. The way C handles strings is pretty fly-by-night, which IIRC is something it inherited from its PDP-11 days. They're just character arrays that are terminated by a null character. That's it. There's no length indicator stored with it (i.e. no fat pointers) so you just keep reading unless and until there's a null character to tell it when it's done, which may or may not exist where you intended it to. There are so many ways this can go incredibly f
Re: (Score:2, Interesting)
Rust really shouldn't be treated as a general purpose language. It's a specialized language for special situations: when you want to get the absolute fastest performance possible, and you're willing to put in extra work to get it, but you don't want to sacrifice memory safety.
For most code that most people write, you're better off using a language that gives up a little performance to get memory safety without the effort. There are lots of languages like that: Java, C#, Kotlin, Swift, etc. They give the
Re: (Score:2)
An interesting selection of langauges. I, personally, switch between C++, Python, and D, depending on what I'm doing. I find all of the ones you selected ... umm ... less suitable. I'd be interested in Go if Doxygen could handle it. Similarly for Ruby. Both have cases where they would be the better choice, but documentation of my work says to avoid them. (And Sphinx is lousy, but since Doxygen handles Python I don't need to deal with it.)
Re: Seriously? (Score:2)
Wait, doxygen support? That's what determines your choice of language? I mean, that's a strong opinion.
Re:Seriously? (Score:4, Informative)
Asking Henry Ford about a car would indeed be rather daft. That would be like a lot asking Kernighan what he thinks about the the latest version of MS Office. It's not a very interesting topic to ask about.
What was asked is more akin to asking Henry Ford about what he thinks about the Toyota car design and manufacturing process. And there he'd have a lot of interesting insight, comparing it to his sensibilities which were instrumental in kickstarting the modern industrial era.
Kernighans experience of Rust illuminates some aspects of the modern development experience that are usually not made explicit. The developers who use the language are accustomed to it, and very few people come at it with the amount of experience Kernighan has. The objections to using the lamguage I have read from others have been a lot less articulate and succinct. And at the same time, his explanation tells me a lot about why these aspects are no issue to many others.
Re: (Score:2)
I bought "Java for C++ Programmers" and "Java in 21 days" back in the day.
It took me probably a couple weeks to really get the hang of it to the point I was building message queues and passing objects among threads (a client-server app).
It was probably only my 9th or 10th language at the time and quite different than some others I'd used.
I've looked at Rust fundamentals and am currently waiting for the dust to settle. Odds are good that Java code I wrote in the 90's would mostly run today. Not interested
Re:Seriously? (Score:4, Informative)
I expect Henry Ford would have pretty insightful things to say about the new Toyota.
Kernighan is an accomplished computer scientist who's written books about several languages, including the famous one he wrote about C.