110 points

The cool kids are forcing people to read this at gunpoint nowadays

permalink
report
reply
69 points

Right? It’s in the kernel and everything now. Linus likes it. Linus hates everything. HOW MUCH ARE THEY PAYING HIM?

permalink
report
parent
reply
41 points

Big Rust has gotten to Linus

permalink
report
parent
reply
4 points

Not the L man!

permalink
report
parent
reply
24 points

Did he actually say that he likes it? My impression was that it’s not his comfort zone, but he recognizes that for the vast majority of young programmers, C is not their comfort zone. And so, if they don’t hop on this Rust train, the Linux kernel is going to look like a COBOL project in a not too distant future. It does not happen very often that a programming language capable of implementing kernels gains wide-spread adoption.

permalink
report
parent
reply
22 points

One (1) good programming language is what they paid him XD

permalink
report
parent
reply
7 points

I’ll never touch Rust.

I hate the syntax and cargo too much for that. If that means that I’ll never write mission critical, low level code, so be it.

permalink
report
parent
reply
8 points

What don’t you like about Cargo? Is there another package manager you like more?

permalink
report
parent
reply
4 points
*

Well - of course I prefer a centralized package manager like pacman, which I also use for python packages etc., but I mainly dislike the building process of rust, which is usually done with cargo. No libraries, not even a global cache for already compiled dependencies, no distcc. This makes it infinitely slower than most C/C++ projects. Compiling the kernel is literally faster than compiling a “simple” project like spotify_cli (500+ dependencies, depending on configuration).

So it’s ass from a user perspective, waiting for stuff to compile (just for it to fail, and start from scratch, as some stuff needs a clean build/src dir), and imo very weird from a dev perspective.

permalink
report
parent
reply
4 points

Why is there Gleam and Deno on the cover?

permalink
report
parent
reply
5 points

I know you’re joking, but uh, both of those are (largely) implemented in Rust…

permalink
report
parent
reply
2 points

Cool, I didn’t know that!

permalink
report
parent
reply
3 points

I like Go better

However, C is still king in a lot of ways

permalink
report
parent
reply
3 points

C is definitely still king, but I wonder if crABI will eventually be able to dethrone it:

https://github.com/rust-lang/rust/issues/111423

If they can define a useful ABI that manages to include lifetimes, that might just be enough of an improvement to get people to switch over from assuming the C ABI everywhere.

permalink
report
parent
reply
2 points

Still remains to be seen if a potential rust ABI can avoid becoming a chain to the wall the way the C++ ABI seems to have become. When a lot of C++ers apparently agree with “I’m tired of paying for an ABI stability I’m not using” it’s not so clear it would really be a boon to Rust.

That said no_std appears to be what people go to for the lean Rust.

And a lot of us are happy not having to juggle shared dependencies, but instead having somewhat fat but self-contained binaries. It’s part of the draw of Go too; fat binaries come up as a way to avoid managing e.g. Python dependencies across OS-es. With Rust and Go you can build just one binary per architecture/libc and be done with it.

permalink
report
parent
reply
1 point

The problem is that both Rust and Go are huge. The compiled binaries are bigger and the compilers themselves and slower and more resource intensive. The current benefit to C is that is lean and compiles quickly.

permalink
report
parent
reply
68 points

Linux is C only, ever read the rant by Linus last century about C++ ? I was there, in usenet

permalink
report
reply
43 points

They’re about allow bits of rust though

permalink
report
parent
reply
8 points

Heresy!

permalink
report
parent
reply
6 points

Have they tried applying a bit of protective oil coating?

permalink
report
parent
reply
17 points

Wait, you are telling people had discussion in Usenet? No way!

permalink
report
parent
reply
10 points
*

it was mostly flame wars, alt.bin.pictures.erotica, warez, discussion about The Simpson, and of course The Oracle, and Kibo.

EDIT for young people, the usenet oracle and kibology

permalink
report
parent
reply
3 points

He’s having the same rant every couple of years. It’s always funny.

permalink
report
parent
reply
49 points

C++? Shoot me

permalink
report
reply
37 points

Wat? Don’t you dare talk that way about my favorite multiple personality disorder clusterfuck of a language.

permalink
report
parent
reply
23 points
*

C is the only language, all the rest are mental disorders (/j 😉)

Edit: maybe rust, but it’s on thin ice XD

permalink
report
parent
reply
4 points

I still.like fortran better. (And I am not even lying.)

permalink
report
parent
reply
0 points

As someone that has programmed professionally a good chunk in C for embedded systems (basically it’s home turf), fuck C.

permalink
report
parent
reply
16 points

the author of C++ said that C gives you many opportunities to shoot yourself in the leg. You have a much less chance for this to happen with C++, but when it does, you will blow your whole lower body off

permalink
report
parent
reply
4 points

Yeah C++ is a bazooka, C is like the death of 1000 paper cuts.

The paper cuts are all poisonous and kills you anyway.

permalink
report
parent
reply
3 points

I haven’t used either, but compiled a lot of C source code and they compiled or could be adjusted easier even for someone who barely knows what printf, fopen, or #include are

permalink
report
parent
reply
1 point

C++ is a bazooka that only fires when it’s pointed at your feet

permalink
report
parent
reply
48 points

Put the gun away and throw that cpp book in the bin, fool. I brought The Linux Kernel Programming Guide, which is in C, and my own socks, which are wool. Now let’s gets crackin.

permalink
report
reply
7 points

I already use linux. My feet have been getting cold lately. it never occurred to me to get wool socks. Is this how it starts? Are skirts next?

permalink
report
parent
reply
8 points

Unless you use goat wool socks. Then you can go for a old school hippie build. Sandals, long hair, tie dye shirt and go from there.

permalink
report
parent
reply
3 points

Socks were invented to be used in sandals, it’s the one true way!

(Typed wearing big woolen socks in birkenstocks)

permalink
report
parent
reply
4 points

Bonus points for some Rust device drivers.

permalink
report
parent
reply
1 point

Never touched rust, so I don’t understand the hype. I’m not arguing against it, mind you, but I’m gathering, more and more, that it’s worth a look. Maybe I’ll look into it after work.

permalink
report
parent
reply
2 points

even all of that hype about memory safety and borrow checker you keep hearing aside, the actual coolest thing about Rust is how it does Traits instead of classes and that you can bind arbitrary data to enums

permalink
report
parent
reply
35 points
*

Girl, I will wear whatever socks you want, but… pulls out my own gun. We’re reading this damn book instead.

permalink
report
reply
13 points

Why no K&R?

/s

permalink
report
parent
reply
5 points

Lol. I prefer the New Testament.

permalink
report
parent
reply
6 points

Don’t kink shame her

permalink
report
parent
reply
3 points

how does it compare to k&r (2nd ed.)?

permalink
report
parent
reply
6 points
*

Honestly, I prefer King’s book to any other for intro to C programming. K&R is a classic, and is really quite good for diving into some cool tricks (i.e. postfix operation wizardry).

But as a beginner, I can just say that King’s book is much more digestible. The author holds your hand a lot more and assumes you only have a basic knowledge of programming and the UNIX command line.

That said, the exercises and simple projects do push you to demonstrate what you learned in each chapter as well as enforcing other Computer Science fundamentals like basic data structures (stacks, queues, linked lists) through demonstrations in the C language.

My plan is to revisit K&R after a few other books in C like Advanced Programming In The Unix Environment, Unix Network Programming, and The Linux Programming Interface. All while referencing Beej’s Resources.

I feel like by then I’ll hopefully have a more solid grasp on C and can then more aptly appreciate The K&R Book.

permalink
report
parent
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

Hint: :q!


Sister communities:

Community rules (click to expand)

1. Follow the site-wide rules
2. Be civil
  • Understand the difference between a joke and an insult.
  • Do not harrass or attack members of the community for any reason.
  • Leave remarks of “peasantry” to the PCMR community. If you dislike an OS/service/application, attack the thing you dislike, not the individuals who use it. Some people may not have a choice.
  • Bigotry will not be tolerated.
  • These rules are somewhat loosened when the subject is a public figure. Still, do not attack their person or incite harrassment.
3. Post Linux-related content
  • Including Unix and BSD.
  • Non-Linux content is acceptable as long as it makes a reference to Linux. For example, the poorly made mockery of sudo in Windows.
  • No porn. Even if you watch it on a Linux machine.
4. No recent reposts
  • Everybody uses Arch btw, can’t quit Vim, and wants to interject for a moment. You can stop now.

 

Please report posts and comments that break these rules!


Important: never execute code or follow advice that you don’t understand or can’t verify, especially here. The word of the day is credibility. This is a meme community – even the most helpful comments might just be shitposts that can damage your system. Be aware, be smart, don’t fork-bomb your computer.

Community stats

  • 7.3K

    Monthly active users

  • 1.4K

    Posts

  • 73K

    Comments