Live data from Hacker News

Rust to C compiler – 95.9% test pass rate, odd platforms

fractalfir.github.io

151–160 of 264 posts

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#152
post #142

Earlier quoted context omitted.

Two people is many people. The general trend I see is that Rust is exploding in adoption.

It is, but it is still tiny compared to C/C++. And many people also do not like it.

There are two categories of people who don’t like Rust:

1. C/C++ developers who are used to C/C++ and don’t want to learn Rust.

2. Go developers who claim Rust is too difficult and unreadable.

Which one is you?

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#153

Earlier quoted context omitted.

That’s what I’m saying. By a few decades you and most of those alleged 7 million C/C++ developers will retire and there won’t be anyone to replace them because everyone will be using Rust or Zig or Go.

Very strong statement, one I don't really believe

That’s what happened to COBOL, right?

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#154
post #127

Earlier quoted context omitted.

Probably not. Many people prefer C/C++ to Rust, which has its own fair share of problems.

Two people is many people. The general trend I see is that Rust is exploding in adoption.

The last I checked various stats (GitHub Language stats, TIOBE, etc.), Rust wasn't even in the top 10. I'm sure its adoption is increasing. However, other languages like Go seem to be doing much better. Neither will replace C++ or C anytime soon.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#156

Earlier quoted context omitted.

Two people is many people. The general trend I see is that Rust is exploding in adoption.

The last I checked various stats (GitHub Language stats, TIOBE, etc.), Rust wasn't even in the top 10. I'm sure its adoption is increasing. However, other languages like Go seem to be doing much better. Neither will replace C++ or C anytime soon.

C/C++ will be replaced incrementally and it’s already happening. Cloudflare recently replaced nginx with their own alternative written in Rust for example.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#157

Earlier quoted context omitted.

what a weird take to me... C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. And, if we discount the fact that "buying" a book is such a big hurdle, even more high quality academic text books and papers to boost; anything from embedded on the weirdest platforms, basic parsing, writing compilers, language design, high perf…

> C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. Which means all that high quality teaching material is DECADES old. Rust development is centralised and therefore the docs are always up-to-date, unlike C/C++ which is a big big mess.

Being decades old does not make it out of date. Until a few years ago, the Linux kernel was written using C89. While it has switched to C11, the changes are fairly small such that a book on C89 is still useful. Many projects still write code against older C versions, and the C compiler supports specifying older C versions.

This is very different than Rust where every new version is abandonware after 6 weeks and the compiler does not let you specify that your code is from a specific version.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#158
post #151

Would it be possible for Rust to output LLVM IR? Would that make it easier to port if they have a LLVM frontend?

This comment is strange, given that LLVM is rust's most mature backend

I think the GP means emit LLVM IR directly. And the answer to that is yes; you can pass a flag to rustc that will emit the IR[1].

[1]: https://stackoverflow.com/questions/39004513/how-to-emit-llv...

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#159

Earlier quoted context omitted.

> Though, the trend I'm seeing a lot of is greenfield projects just migrating their MCUs to ARM. That’s what I would expect, too. The Venn diagram of projects using an old architecture like alpha but also wanting to adopt a new programming language is nearly two separate circles. The parent comment even included HPPA (PA-RISC) which almost makes me think they’re into either retro computing or they have some arbitrary…

Hi, retro computing person here. I've had a similar debate with Rust evangelists in past Something the Rust community doesn't understand is when they shout "REWRITE IT IN RUST!" at a certain point that's simply not possible Those mainframes your Bank runs? I'm sure they'd love to see all that "awful" FORTRAN or C or whatever other language rewritten in Rust. But if Rust as a platform doesn't support the architecture?…

>Those mainframes your Bank runs? I'm sure they'd love to see all that "awful" FORTRAN or C or whatever other language rewritten in Rust. But if Rust as a platform doesn't support the architecture? Well then that's a non-starter

But Rust does support S390x?

>Worse still, Rust seems to basically leave anything that isn't i686/x86_64 or ARM64 as "Tier 2" or worse

Rust has an explicit documented support tier list with guarantees laid out for each level of support. Point me to a document where GCC or Clang lists out their own explicit guarantees on a platform-by-platform basis.

Because I strongly suspect that the actual "guarantees" which GCC, clang and so forth provide for most obscure architectures is not that much better than Rust, if at all - just more ambiguous. And I don't find it very likely that the level of quality control for C compilers on m68k or alpha or s390x is not, in practice, at least a bit lower than that provided for x86 and ARM.

Re: Rust to C compiler – 95.9% test pass rate, odd platforms

#160
post #157

Earlier quoted context omitted.

> C has DECADES of high quality teaching material in form of books, university courses, plenty of which is freely available with a bit of searching. Which means all that high quality teaching material is DECADES old. Rust development is centralised and therefore the docs are always up-to-date, unlike C/C++ which is a big big mess.

Being decades old does not make it out of date. Until a few years ago, the Linux kernel was written using C89. While it has switched to C11, the changes are fairly small such that a book on C89 is still useful. Many projects still write code against older C versions, and the C compiler supports specifying older C versions. This is very different than Rust where every new version is abandonware after 6 weeks and the c…

> Being decades old does not make it out of date.

Right, the docs never get out of date if the thing they document never changes. Can you say the same about C++ though? I’ve heard they release new versions every now and then. My robotics teacher didn’t know ‘auto’ is a thing for example.

Post reply on HN